Repository navigation
fix(bin): detect child-process work during supervision (land of upstream #1676) - #44
Merged
Merged
Conversation
Supervision's absorb rule consulted only semantic sources: the no-mistakes run step, the status log, and the harness busy signal. All three correctly report "not working" the moment an agent backgrounds a long command and ends its turn, so a crew doing real work in a child process reads as a wedge. Measured 2026-08-03: one crew running the portable suite in the background produced seven consecutive false wedge escalations across 42 minutes, each demanding a deep inspection, and at least three other crews hit the same pattern while pipeline stages ran underneath them. Add descendant CPU advancement as a third source of positive evidence, alongside the existing ones rather than in place of them. The agent is resolved from kernel facts, never a vendor process name: its working directory is the task's recorded worktree, and it is the leader of the foreground process group on its pane's terminal. The CPU of everything below it - live descendants plus already-reaped ones through the leader's cutime/cstime - is compared against a sample from the previous poll. Two rules keep it from becoming a blindfold. Each sample is bound to fm_pid_identity of the agent it came from, so a reused pid is never compared across the identity change. And only ADVANCEMENT counts: a descendant that merely exists proves nothing, so a crew whose child is hung, dead, or absent still escalates on the unchanged schedule. The agent's own utime/stime is excluded, so a looping wedged agent cannot vouch for itself. The stale threshold, escalation ladder, and deep-inspection demand are untouched. The new evidence folds into the same work_now gate a busy pane uses, so it inherits the BUSY_TURN_MAX_SECS completed-turn bound: a child that churns forever can delay an escalation, never cancel one. A definite parked, done, failed, or blocked run-step verdict is never overridden. Where /proc is unavailable the probe reports no evidence, which is exactly today's behaviour. Verified in all four directions against real processes, and each guarantee was witnessed failing first under a deliberate breakage: existence instead of advancement, the agent's own CPU counted, identity ignored, the freshness bound removed, a definite verdict overridden, and the completed-turn bound not applied to the new evidence.
sbracewell64
force-pushed
the
fork-land/wedge
branch
from
August 6, 2026 02:11
cb40ab2 to
2582c15
Compare
sbracewell64
added a commit
that referenced
this pull request
Aug 9, 2026
…eam kunchenguid#1676) (#44) * fix(bin): see a crewmate's work when it happens in a child process Supervision's absorb rule consulted only semantic sources: the no-mistakes run step, the status log, and the harness busy signal. All three correctly report "not working" the moment an agent backgrounds a long command and ends its turn, so a crew doing real work in a child process reads as a wedge. Measured 2026-08-03: one crew running the portable suite in the background produced seven consecutive false wedge escalations across 42 minutes, each demanding a deep inspection, and at least three other crews hit the same pattern while pipeline stages ran underneath them. Add descendant CPU advancement as a third source of positive evidence, alongside the existing ones rather than in place of them. The agent is resolved from kernel facts, never a vendor process name: its working directory is the task's recorded worktree, and it is the leader of the foreground process group on its pane's terminal. The CPU of everything below it - live descendants plus already-reaped ones through the leader's cutime/cstime - is compared against a sample from the previous poll. Two rules keep it from becoming a blindfold. Each sample is bound to fm_pid_identity of the agent it came from, so a reused pid is never compared across the identity change. And only ADVANCEMENT counts: a descendant that merely exists proves nothing, so a crew whose child is hung, dead, or absent still escalates on the unchanged schedule. The agent's own utime/stime is excluded, so a looping wedged agent cannot vouch for itself. The stale threshold, escalation ladder, and deep-inspection demand are untouched. The new evidence folds into the same work_now gate a busy pane uses, so it inherits the BUSY_TURN_MAX_SECS completed-turn bound: a child that churns forever can delay an escalation, never cancel one. A definite parked, done, failed, or blocked run-step verdict is never overridden. Where /proc is unavailable the probe reports no evidence, which is exactly today's behaviour. Verified in all four directions against real processes, and each guarantee was witnessed failing first under a deliberate breakage: existence instead of advancement, the agent's own CPU counted, identity ignored, the freshness bound removed, a definite verdict overridden, and the completed-turn bound not applied to the new evidence. * no-mistakes(review): Captain, preserve semantic verdicts over child liveness * no-mistakes(review): Captain, prevent double-probing child CPU evidence * no-mistakes(document): Document descendant CPU supervision
sbracewell64
added a commit
that referenced
this pull request
Aug 10, 2026
…eam kunchenguid#1676) (#44) * fix(bin): see a crewmate's work when it happens in a child process Supervision's absorb rule consulted only semantic sources: the no-mistakes run step, the status log, and the harness busy signal. All three correctly report "not working" the moment an agent backgrounds a long command and ends its turn, so a crew doing real work in a child process reads as a wedge. Measured 2026-08-03: one crew running the portable suite in the background produced seven consecutive false wedge escalations across 42 minutes, each demanding a deep inspection, and at least three other crews hit the same pattern while pipeline stages ran underneath them. Add descendant CPU advancement as a third source of positive evidence, alongside the existing ones rather than in place of them. The agent is resolved from kernel facts, never a vendor process name: its working directory is the task's recorded worktree, and it is the leader of the foreground process group on its pane's terminal. The CPU of everything below it - live descendants plus already-reaped ones through the leader's cutime/cstime - is compared against a sample from the previous poll. Two rules keep it from becoming a blindfold. Each sample is bound to fm_pid_identity of the agent it came from, so a reused pid is never compared across the identity change. And only ADVANCEMENT counts: a descendant that merely exists proves nothing, so a crew whose child is hung, dead, or absent still escalates on the unchanged schedule. The agent's own utime/stime is excluded, so a looping wedged agent cannot vouch for itself. The stale threshold, escalation ladder, and deep-inspection demand are untouched. The new evidence folds into the same work_now gate a busy pane uses, so it inherits the BUSY_TURN_MAX_SECS completed-turn bound: a child that churns forever can delay an escalation, never cancel one. A definite parked, done, failed, or blocked run-step verdict is never overridden. Where /proc is unavailable the probe reports no evidence, which is exactly today's behaviour. Verified in all four directions against real processes, and each guarantee was witnessed failing first under a deliberate breakage: existence instead of advancement, the agent's own CPU counted, identity ignored, the freshness bound removed, a definite verdict overridden, and the completed-turn bound not applied to the new evidence. * no-mistakes(review): Captain, preserve semantic verdicts over child liveness * no-mistakes(review): Captain, prevent double-probing child CPU evidence * no-mistakes(document): Document descendant CPU supervision
sbracewell64
added a commit
that referenced
this pull request
Aug 11, 2026
…eam kunchenguid#1676) (#44) * fix(bin): see a crewmate's work when it happens in a child process Supervision's absorb rule consulted only semantic sources: the no-mistakes run step, the status log, and the harness busy signal. All three correctly report "not working" the moment an agent backgrounds a long command and ends its turn, so a crew doing real work in a child process reads as a wedge. Measured 2026-08-03: one crew running the portable suite in the background produced seven consecutive false wedge escalations across 42 minutes, each demanding a deep inspection, and at least three other crews hit the same pattern while pipeline stages ran underneath them. Add descendant CPU advancement as a third source of positive evidence, alongside the existing ones rather than in place of them. The agent is resolved from kernel facts, never a vendor process name: its working directory is the task's recorded worktree, and it is the leader of the foreground process group on its pane's terminal. The CPU of everything below it - live descendants plus already-reaped ones through the leader's cutime/cstime - is compared against a sample from the previous poll. Two rules keep it from becoming a blindfold. Each sample is bound to fm_pid_identity of the agent it came from, so a reused pid is never compared across the identity change. And only ADVANCEMENT counts: a descendant that merely exists proves nothing, so a crew whose child is hung, dead, or absent still escalates on the unchanged schedule. The agent's own utime/stime is excluded, so a looping wedged agent cannot vouch for itself. The stale threshold, escalation ladder, and deep-inspection demand are untouched. The new evidence folds into the same work_now gate a busy pane uses, so it inherits the BUSY_TURN_MAX_SECS completed-turn bound: a child that churns forever can delay an escalation, never cancel one. A definite parked, done, failed, or blocked run-step verdict is never overridden. Where /proc is unavailable the probe reports no evidence, which is exactly today's behaviour. Verified in all four directions against real processes, and each guarantee was witnessed failing first under a deliberate breakage: existence instead of advancement, the agent's own CPU counted, identity ignored, the freshness bound removed, a definite verdict overridden, and the completed-turn bound not applied to the new evidence. * no-mistakes(review): Captain, preserve semantic verdicts over child liveness * no-mistakes(review): Captain, prevent double-probing child CPU evidence * no-mistakes(document): Document descendant CPU supervision
sbracewell64
added a commit
that referenced
this pull request
Aug 11, 2026
…eam kunchenguid#1676) (#44) * fix(bin): see a crewmate's work when it happens in a child process Supervision's absorb rule consulted only semantic sources: the no-mistakes run step, the status log, and the harness busy signal. All three correctly report "not working" the moment an agent backgrounds a long command and ends its turn, so a crew doing real work in a child process reads as a wedge. Measured 2026-08-03: one crew running the portable suite in the background produced seven consecutive false wedge escalations across 42 minutes, each demanding a deep inspection, and at least three other crews hit the same pattern while pipeline stages ran underneath them. Add descendant CPU advancement as a third source of positive evidence, alongside the existing ones rather than in place of them. The agent is resolved from kernel facts, never a vendor process name: its working directory is the task's recorded worktree, and it is the leader of the foreground process group on its pane's terminal. The CPU of everything below it - live descendants plus already-reaped ones through the leader's cutime/cstime - is compared against a sample from the previous poll. Two rules keep it from becoming a blindfold. Each sample is bound to fm_pid_identity of the agent it came from, so a reused pid is never compared across the identity change. And only ADVANCEMENT counts: a descendant that merely exists proves nothing, so a crew whose child is hung, dead, or absent still escalates on the unchanged schedule. The agent's own utime/stime is excluded, so a looping wedged agent cannot vouch for itself. The stale threshold, escalation ladder, and deep-inspection demand are untouched. The new evidence folds into the same work_now gate a busy pane uses, so it inherits the BUSY_TURN_MAX_SECS completed-turn bound: a child that churns forever can delay an escalation, never cancel one. A definite parked, done, failed, or blocked run-step verdict is never overridden. Where /proc is unavailable the probe reports no evidence, which is exactly today's behaviour. Verified in all four directions against real processes, and each guarantee was witnessed failing first under a deliberate breakage: existence instead of advancement, the agent's own CPU counted, identity ignored, the freshness bound removed, a definite verdict overridden, and the completed-turn bound not applied to the new evidence. * no-mistakes(review): Captain, preserve semantic verdicts over child liveness * no-mistakes(review): Captain, prevent double-probing child CPU evidence * no-mistakes(document): Document descendant CPU supervision
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
The already-reviewed fix from upstream PR kunchenguid#1676, moved onto the reconciled fork trunk so it can take effect here. No behaviour was redesigned and nothing was re-reviewed.
It adds process-level evidence (advancement of descendant CPU) alongside the existing semantic sources, so supervision stops raising false alarms when a worker's real work is happening in a child process.
Provenance, stated exactly
This content was pipeline-validated at upstream commit
22f2f2683d83a246be7a044c652e4c92c63b9d5e, which is the exact head of upstream PR kunchenguid#1676. Rebasing its four own commits onto fork trunkad53e97producedcb40ab2. The change content is unchanged.That last clause is proven, not asserted. Comparing the originally-validated diff (
e5e8a67..22f2f26) against the delivered diff (ad53e97..cb40ab2), the contributed+/-lines are byte-identical: 871 lines on each side, zero delta.No attestation
This shipped without no-mistakes and carries NO attestation marker. The genuine
Updates from [git push no-mistakes]marker on upstream PR kunchenguid#1676 binds to head22f2f26and does not bind tocb40ab2. It has not been copied, carried forward, or implied here.Three commit subjects begin with
no-mistakes(review):andno-mistakes(document):. Those are the original pipeline's own commits from the upstream run, preserved because rewriting them would alter validated content. They describe history and attest nothing about this rebased head.The expected teardown conflict did not occur, and here is why
This landing was expected to hit a semantic conflict in
bin/fm-teardown.shagainst the worktree-guard change that introducedbin/fm-landed-lib.shand replaced commit-reachability with a tree-containment landed test. It rebased clean, with zero conflicts across all four commits.The reason is worth recording, because the earlier expectation was reasonable against the trunk that existed at the time:
"$STATE/$ID.childcpu"to two cleanup lists. It never touches the landed test, so descendant-CPU liveness and the tree-containment landed test do not actually compete.remote_secondmate_teardown(). On the pre-reconciliation fork trunk9f914d1that function had been deleted, which is what made the conflict look semantic. The reconciled basead53e97restores it from the upstream side, so both hunks have live targets again.Verified on the delivered branch: both
.childcpucleanups are present, andbin/fm-teardown.shstill referencesfm-landed-libthree times. Both behaviours coexist; neither was reverted.One observation, deliberately not acted on: the local secondmate child-teardown list will not remove
.childcpu. That gap exists in the originally-validated content too, and adding a cleanup there would be new, unvalidated content in a change whose whole premise is that its content is unchanged. Flagging it rather than silently widening scope.Verification, measured on this delivery base
Suite: 22 scripts covering supervision, wake handling, teardown, spawn and brief, including this fix's own
tests/fm-watch-triage.test.sh, plusbin/fm-lint.sh.bin/fm-lint.shexits 0 on this branch and on base.This fix's own test passes:
tests/fm-watch-triage.test.shexits 0 (169s, real processes).Failures are reported as failures. This branch has 3 failing assertions:
tests/fm-pi-watch-extension.test.sh- "Pi extension must surface an external healthy watcher as an owned-wake failure"tests/fm-turnend-guard.test.sh- "Pi guard must inject once for no-tool and multi-tool logical runs"tests/fm-watcher-lock.test.sh- "restart did not attach to the verified healthy peer"All three pre-exist on base
ad53e97, measured by running the identical script set on unmodifiedad53e97in the same session. Base fails exactly the same three. The failure set on this branch is identical to the failure set on base.Net: this branch introduces no new failure and reverts nothing.
Negative control witnessed first. With
bin/fm-classify-lib.shandbin/fm-watch.shreverted to base and the new test kept,tests/fm-watch-triage.test.shfails on "active run-step semantic class was not working" (exit 1). Restored, it passes (exit 0). The regression test genuinely exercises the fix.Merge
Not merged. Merge authority is the captain's.