fix(runner): Dev-Neustart bei geänderten Variablen, Liveness-Prüfung, npm-ci-Fallback

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-09-30 21:54:01 +00:00
1 parent cd9a6e0cf1
commit 96c26fb9b8
8 files changed
+139 -10

No files matched your search

+23
View File
@@ -231,3 +231,26 @@ test('mem() wirft ⇒ wie wenig Speicher; Cache während des Laufs vor pruneCach
await wait(s.jobs, id);
assert.equal(during, true);
});
test('I8: npm ci scheitert ⇒ Wiederholung mit npm install (Protokoll, Build läuft weiter)', async () => {
const s = setup({
files: { 'package.json': PKG(), 'package-lock.json': '{}' },
dockerImpl: (args) => {
if (args.includes('ci')) return { code: 1 };
if (args.includes('build')) { mkdirSync(join(workOf(args), 'dist'), { recursive: true }); writeFileSync(join(workOf(args), 'dist', 'index.html'), 'N'); }
return { code: 0 };
},
});
const r = await wait(s.jobs, s.jobs.submit(job()));
assert.equal(r.state, 'done'); assert.equal(r.result, 'build');
assert.equal(s.calls.length, 3);
assert.deepEqual(s.calls[1].args.slice(-5), ['npm', 'install', '--include=dev', '--no-audit', '--no-fund']);
assert.ok(r.log.some((l) => l.includes('npm install')));
});
test('I8: auch npm install scheitert ⇒ Installationsfehler', async () => {
const s = setup({ files: { 'package.json': PKG(), 'package-lock.json': '{}' }, dockerImpl: () => ({ code: 1 }) });
const r = await wait(s.jobs, s.jobs.submit(job()));
assert.equal(r.state, 'failed'); assert.match(r.error, /Installation fehlgeschlagen/);
assert.equal(s.calls.length, 2);
});