Skip to content

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.

fix(land): retain custody for an already-signalled group [E27]

Corey Olson02b2d5f2a8b5
diff --git a/src/runner-custody.js b/src/runner-custody.js
index ef5ea3ae..70739bc1 100644
--- a/src/runner-custody.js
+++ b/src/runner-custody.js
@@ -446,7 +446,9 @@ export function createDescendantTracker(directory, { census: processCensusHook =
const row = current.get(identity.pid);
if (!row || row.birth !== identity.birth || retired.has(`${identity.pid}:${identity.birth}`) || /^Z/u.test(row.state)) continue;
const ownedGroup = identity.group;
- if (Number.isSafeInteger(ownedGroup) && row.pgid === ownedGroup && !signaledGroups.has(ownedGroup)) {
+ if (Number.isSafeInteger(ownedGroup) && row.pgid === ownedGroup) {
+ // Another live member of an already-signalled group still has group custody, not a PID-only fallback.
+ if (signaledGroups.has(ownedGroup)) continue;
const result = signalOwnedGroup(ownedGroup, 'SIGTERM');
if (result === null) { censusFailure = true; break; }
if (result) signaledGroups.add(ownedGroup);
@@ -468,7 +470,8 @@ export function createDescendantTracker(directory, { census: processCensusHook =
const row = current.get(identity.pid);
if (!row || row.birth !== identity.birth || retired.has(`${identity.pid}:${identity.birth}`) || /^Z/u.test(row.state)) continue;
const ownedGroup = identity.group;
- if (Number.isSafeInteger(ownedGroup) && row.pgid === ownedGroup && !killedGroups.has(ownedGroup)) {
+ if (Number.isSafeInteger(ownedGroup) && row.pgid === ownedGroup) {
+ if (killedGroups.has(ownedGroup)) continue;
const result = signalOwnedGroup(ownedGroup, 'SIGKILL');
if (result === null) { censusFailure = true; break; }
if (result) killedGroups.add(ownedGroup);