Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
fix(runner): an ambiguous group signal retries, never drained [C7]
Corey Olson96b43ed9520a
diff --git a/src/runner-worker.js b/src/runner-worker.jsindex 0eaf63a6..bd8a6232 100644--- a/src/runner-worker.js+++ b/src/runner-worker.js@@ -1094,7 +1094,8 @@ async function stopOwnedGroup(pid, closed, tracker) {if (!pid) return;const signal = async type => {for (;;) {- const sent = tracker?.signalOwnedGroup(pid, type) ?? false;+ // Keep null (an ambiguous census, or EPERM) distinct from false, so it retries instead of passing as drained.+ const sent = tracker ? tracker.signalOwnedGroup(pid, type) : false;if (sent === true || sent === false) return sent;await new Promise(resolvePause => setTimeout(resolvePause, 250));}diff --git a/test/runner-parent-death-fixture.js b/test/runner-parent-death-fixture.jsindex 31f7d9f2..91762e83 100644--- a/test/runner-parent-death-fixture.js+++ b/test/runner-parent-death-fixture.js@@ -137,7 +137,19 @@ process.kill = (pid, signal) => {const command = ['node remote-parent-death-launcher.js', ...[childReady, childPidFile, childTerm, releaseChild, childGone].map(shellQuote)].join(' ');remoteRun = observe(startQueueController(repo, env, command,{ item: 'parent-death-remote-holder', queueMarker: null, firstItem: null }));- await waitForMarker(childReady);+ try { await waitForMarker(childReady); }+ catch (error) {+ // An early controller exit leaves the detached child unstarted; report why before cleanup erases it (#888 review).+ const ended = await Promise.race([remoteRun.closed, new Promise(done => { setTimeout(() => done(null), 5_000).unref(); })]); // budget: bounded wait for an already-failing controller to report its result.+ const tail = text => String(text ?? '').slice(-4_000);+ t.diagnostic('controller at readiness failure ' + JSON.stringify(ended+ ? { status: ended.status, signal: ended.signal, stdout: tail(ended.stdout), stderr: tail(ended.stderr) } : 'still running'));+ t.diagnostic('ssh stand-in calls ' + (existsSync(requests) ? tail(readFileSync(requests, 'utf8')) : 'none'));+ t.diagnostic('ssh stand-in phases ' + (existsSync(requests + '.phases') ? readFileSync(requests + '.phases', 'utf8').trim().split('\n').join(',') : 'none'));+ t.diagnostic('worker cleanup report ' + JSON.stringify(workerCleanupReport()));+ if (ended) remoteRun = null;+ throw error;+ }detachedPid = Number(readFileSync(childPidFile, 'utf8').trim());assert.ok(Number.isSafeInteger(detachedPid) && detachedPid > 0);assert.notEqual(detachedPid, remoteRun.child.pid, 'the committed launcher owns a separate detached child');