diff --git a/BUILD-LOG.md b/BUILD-LOG.md index dca36b7eb..d19e43562 100644 --- a/BUILD-LOG.md +++ b/BUILD-LOG.md @@ -6212,3 +6212,5 @@ After: personally authored three-file skills/ms-ux-improvement coordinator packa 2026-11-06 UTC | #797 F6 streamed first output | Managed pi JSON events and Claude stream-json partial events pass through one harness monitor; substantive text, thinking and tool-use events mark a fixed output token while stdout remains the final answer. Six real confined runner/adapter controls use a six-second guard: both streaming turns survived and both headers-only and keepalive-only cases stopped; both streaming tests failed on the pinned base and all four stall controls passed there. Harness suite 250 passed; CLI main partition 909 passed, one failed and one skipped, with its 53-test file rerun green; the failure also reproduced on the base. No guard threshold, proxy initialization, configuration, schema or role changes. Release and lane partitions are retained under /mnt/storage/scratch/mosaic-lead/mvp3/stall-guard-evidence/. 2026-11-06 UTC | #797 F7 launch refusal guard | The typed launch path now reports instance-running as an existing run to wait for, serializes calls per instance and delays a new call for 30 seconds after a refusal; a disconnected caller cannot start a queued launch later. There is no automatic retry, an unknown outcome remains distinct, other instances are independent, and success clears the delay. Five new tests failed on the F6 base and passed after the fix; the complete harness suite passed 255/255. The backoff lives for the requesting runner's lifetime and resets on its restart. No policy, role, schema, configuration or live change. + +2026-11-06 UTC | #797 stall-guard review fix round | Before: managed stdout added or omitted bytes relative to adapter text mode, a signalled child lost its exit-137/stderr receipt, and no-route incurred the instance-running cooldown. After: adapter-specific byte rendering, a fixed signal-name diagnostic and signal exit status, and a 30-second cooldown only for instance-running; no-route can be retried after the route is set. New regression controls fail on 3e754c96a; real local-API adapter comparisons and owned-child death receipts match base behavior. Node 26 harness rerun 270/270; CLI whole-file coverage 1,197 pass and one existing federation skip after two whole-file reruns (one known timing flake and one interim stdout-fallback regression, both rerun green); isolated release 251/251 and gate-lane 61/61. The managed-session copies pass 20/20; all six real guard scenarios pass. Bus project-files independently reproduces the reviewed base hang under an external timeout. Initial namespace-only project-files attempt hit interpreter-unsafe; corrected ordinary-user run retained. Queue refused linked worktree; no push, deploy, model calls, live host, secret, policy, role, contract or schema changes. Exact evidence and remaining review boundary: /mnt/storage/scratch/mosaic-lead/mvp3/stall-guard-r2-report.md. diff --git a/docs/SESSIONS.md b/docs/SESSIONS.md index 286aa434a..9fa5526bc 100644 --- a/docs/SESSIONS.md +++ b/docs/SESSIONS.md @@ -2072,3 +2072,4 @@ are never rewritten or removed; corrections are new entries. 2026-11-06 UTC | MVP3 lead #797 (Opus) | #797 support R4 P1 fix on feat/ui797-support above fce831c05 | Conflicting ledger targets now need owner corroboration or are replaced by the owner-verified pin, else refused; 4 regressions fail on r4 and pass after; whole files 116 pass/0 fail; reviewer probe 0 wrong halts. Local commit; independent r5 review next. No push/stash/.53/live action. 2026-11-06 UTC | MVP3 lead #797 (Opus) | #797 support R5 P1 fix on feat/ui797-support above 85e1ec5d1 | Pin must name its own campaign's and the owner's target; serve freezes startup paths and retains the ledger path; running service corroborates by its unchanged startup ledger. Owner business/config retarget refuses without retained evidence (tradeoff recorded). 4 regressions (3 fail on r5); whole files 120 pass/0 fail; reviewer probes 0 wrong halts. Local commit; independent r6 review next. No push/stash/.53/live action. 2026-11-06 UTC | ui797 stall-guard implementation sub-agent | #797 two fixes on feat/ui797-stall-guard from 5df42478b | Adapter event monitoring for first model output and typed launch refusal backoff, with base/fix evidence and package gates under /mnt/storage/scratch/mosaic-lead/mvp3/stall-guard-evidence/; linked-worktree queue refused. Local commits authorized; independent review pending. No push, stash, protected host, live-instance, role, policy, schema or config change. Report: /mnt/storage/scratch/mosaic-lead/mvp3/stall-guard-report.md. +2026-11-06 UTC | ui797 stall-guard review-fix implementation sub-agent | #797 three corrections on feat/ui797-stall-guard-r2 from 3e754c96a | Adapter stdout parity, signal-specific child-death receipts, instance-running-only cooldown; Node 26 gates and negative controls recorded in /mnt/storage/scratch/mosaic-lead/mvp3/stall-guard-r2-report.md. Local commits only; queue refused linked worktree; independent review pending. No push, merge, deployment, live-host contact, model call, secret, role, policy, contract or schema changes. diff --git a/packages/harness/src/runner.mjs b/packages/harness/src/runner.mjs index e06206715..fed1e3770 100644 --- a/packages/harness/src/runner.mjs +++ b/packages/harness/src/runner.mjs @@ -287,7 +287,7 @@ function launchCall(path, request, timeout = 120_000) { }); } -// Serialize launches per instance, and slow repeated refusals. A launch is +// Serialize launches per instance, and slow repeated instance-running refusals. A launch is // never retried here: only a new tool call can reach the host again. export function launchBackoff(send, { now = Date.now, wait = (ms, signal) => delay(ms, undefined, { signal }) } = {}) { const instances = new Map(); @@ -313,8 +313,8 @@ export function launchBackoff(send, { now = Date.now, wait = (ms, signal) => del state.until = 0; return result; } catch (e) { - // An unknown outcome is not a refusal; do not describe it as one. - if (e.code && e.code !== 'outcome-unknown') state.until = now() + 30_000; + // A running instance needs time to finish; other refusals can be fixed immediately. + if (e.code === 'instance-running') state.until = now() + 30_000; throw e; } } finally { diff --git a/packages/harness/tests/launch-backoff.test.mjs b/packages/harness/tests/launch-backoff.test.mjs index 0ef6d2be3..b62bc7ad9 100644 --- a/packages/harness/tests/launch-backoff.test.mjs +++ b/packages/harness/tests/launch-backoff.test.mjs @@ -32,12 +32,12 @@ test('a running instance is a wait: repeated launch calls are delayed, independe assert.deepEqual(calls,['pm','coder','pm']); }); -test('other repeated launch refusals back off too, and a success clears the delay', async () => { +test('a success clears the instance-running delay', async () => { const guard = runner.launchBackoff ?? (send => send); let now=0, calls=0, refusal=true; const waits=[]; - const launch=guard(async () => {calls++; if(refusal) throw Object.assign(new Error('capacity-full'),{code:'capacity-full'}); return {run:'r1'};}, + const launch=guard(async () => {calls++; if(refusal) throw Object.assign(new Error('instance-running'),{code:'instance-running'}); return {run:'r1'};}, {now:()=>now,wait:async ms=>{waits.push(ms);now+=ms;}}); - await assert.rejects(launch({instance:'coder'}),{code:'capacity-full'}); + await assert.rejects(launch({instance:'coder'}),{code:'instance-running'}); refusal=false; assert.deepEqual(await launch({instance:'coder'}),{run:'r1'}); assert.deepEqual(waits,[30000]); @@ -45,6 +45,20 @@ test('other repeated launch refusals back off too, and a success clears the dela assert.deepEqual(waits,[30000]); assert.equal(calls,3); }); +test('no-route fails fast and starts no cooldown after the route is set', async () => { + let calls=0, routed=false; const waits=[]; + const launch=runner.launchBackoff(async () => { + calls++; + if (!routed) throw Object.assign(new Error('no-route'), {code:'no-route'}); + return {run:'r1'}; + }, {now:()=>0, wait:async ms=>waits.push(ms)}); + await assert.rejects(launch({instance:'coder'}), {code:'no-route'}); + routed=true; + assert.deepEqual(await launch({instance:'coder'}), {run:'r1'}); + assert.deepEqual(waits, []); + assert.equal(calls, 2); +}); + test('disconnecting a delayed launch cancels it before it can reach the host', async () => { const guard = runner.launchBackoff ?? (send => send); let calls=0; const controller=new AbortController();