Repository navigation
feat(bin): carry the status boundary as a typed event with derived blocking_on (CFVC-06) - #71
Merged
Merged
Conversation
…ocking_on (CFVC-06) The worker-to-supervisor boundary's control facts were prose. bin/fm-classify-lib.sh classified wakes by grepping a crew's own sentence against `PR ready|checks green|ready in branch|merged`, so "working: rebased onto merged #76" escalated as a terminal event and had to be defended by a rule excluding nonterminal verbs - a guard around a guess. Each event is now a typed `fm-status-event.v1` envelope carrying verb, key, phase, repeatable evidence references and one bounded summary. New bin/fm-status-event-lib.sh owns the format; bin/fm-classify-lib.sh remains the single owner of what a verb MEANS and reads that field instead of a regex. The default classification path runs no regex at all, so the free-text arm and the collision class it created are gone rather than caught after the fact. What a task is waiting on is derived, never declared. status_event_blocking_on combines the verb, the keyed open-decision fold and bin/fm-crew-state.sh's typed verdict, so proof that a run is advancing overrules a stale blocked claim, and a decision left open earlier is not masked by a later unrelated event. A worker cannot write the field: the envelope's field set is closed, and an event carrying blocking_on= is refused whole and surfaced as malformed rather than silently stripped and half believed. Compatibility is the three shared parsers. Every consumer in bin/ already reads status lines through status_line_verb, status_line_note and the decision-key parser, so teaching those the envelope taught the fleet at once and a log part way through the migration reads correctly. Prose remains the human note. bin/fm-brief.sh teaches the typed form to every reporting scaffold, including the rule that blocking_on is derived. bin/fm-fleet-snapshot.sh projects the envelope and the derived field, reusing the crew read it already paid for. bin/fm-wake-lib.sh renders a typed event to its prose projection before the drain annotation's byte budget, so evidence references cannot truncate away the summary. Retired: FM_CLASSIFY_CAPTAIN_RE_DEFAULT's free-text arm, and the nonterminal verb rule as a defence against it. That rule survives as declared policy and still applies on the opt-in FM_CAPTAIN_RE path, where prose matching is what the home asked for. A bare verbless line such as "merged" is no longer captain-relevant, and tests/fm-daemon.test.sh records that change of behavior. Tests assert the retirement with a negative control that requires each collision line to match the retired arm as a bare regex before requiring it not to classify; that a typed event classifies with the default pattern blanked, so no regex fallback remains; that a worker-written blocking_on is refused with its own reason and cannot reach the answer even through summary prose; that the derived answer changes with crew state while the status line is held constant; that both derivation helpers are total over the declared crew-verdict vocabulary; and that every reporting scaffold teaches the typed form.
…elope key, add conformance test
…ped status events
…ture bin/fm-wake-lib.sh and bin/fm-classify-lib.sh source the sibling bin/fm-status-event-lib.sh eagerly, so every fixture that builds a synthetic bin/ from a hand-maintained manifest must carry that sibling too. Three did not, and under `set -eu` the missing source aborts the script under test: - tests/fm-gotmp.test.sh symlinks the libraries into a fake FM_ROOT (two sites). - tests/fm-backend.test.sh copies OLD_BIN_UNCHANGED_SIBLINGS into the synthetic pre-refactor tree, whose own header already records that a sourced sibling must be a real reachable file there or the source aborts. - tests/fm-remote-backlog-handoff.test.sh copies a fixed list into a fake remote root. The eager source is deliberately left hard rather than made conditional. The classifier's dependency is a correctness contract: a silently absent parser would let a sandbox read a typed event as prose, which is the failure this increment removes. Softening it to keep a manifest short would trade a loud fixture break for a quiet wrong answer. Red before and green after on the same tree: each of the three suites failed with the missing-sibling abort and now passes (3, 28 and 10 assertions).
sbracewell64
added a commit
that referenced
this pull request
Aug 10, 2026
…ocking_on (CFVC-06) (#71) * feat(bin): carry the status boundary as a typed event with derived blocking_on (CFVC-06) The worker-to-supervisor boundary's control facts were prose. bin/fm-classify-lib.sh classified wakes by grepping a crew's own sentence against `PR ready|checks green|ready in branch|merged`, so "working: rebased onto merged #76" escalated as a terminal event and had to be defended by a rule excluding nonterminal verbs - a guard around a guess. Each event is now a typed `fm-status-event.v1` envelope carrying verb, key, phase, repeatable evidence references and one bounded summary. New bin/fm-status-event-lib.sh owns the format; bin/fm-classify-lib.sh remains the single owner of what a verb MEANS and reads that field instead of a regex. The default classification path runs no regex at all, so the free-text arm and the collision class it created are gone rather than caught after the fact. What a task is waiting on is derived, never declared. status_event_blocking_on combines the verb, the keyed open-decision fold and bin/fm-crew-state.sh's typed verdict, so proof that a run is advancing overrules a stale blocked claim, and a decision left open earlier is not masked by a later unrelated event. A worker cannot write the field: the envelope's field set is closed, and an event carrying blocking_on= is refused whole and surfaced as malformed rather than silently stripped and half believed. Compatibility is the three shared parsers. Every consumer in bin/ already reads status lines through status_line_verb, status_line_note and the decision-key parser, so teaching those the envelope taught the fleet at once and a log part way through the migration reads correctly. Prose remains the human note. bin/fm-brief.sh teaches the typed form to every reporting scaffold, including the rule that blocking_on is derived. bin/fm-fleet-snapshot.sh projects the envelope and the derived field, reusing the crew read it already paid for. bin/fm-wake-lib.sh renders a typed event to its prose projection before the drain annotation's byte budget, so evidence references cannot truncate away the summary. Retired: FM_CLASSIFY_CAPTAIN_RE_DEFAULT's free-text arm, and the nonterminal verb rule as a defence against it. That rule survives as declared policy and still applies on the opt-in FM_CAPTAIN_RE path, where prose matching is what the home asked for. A bare verbless line such as "merged" is no longer captain-relevant, and tests/fm-daemon.test.sh records that change of behavior. Tests assert the retirement with a negative control that requires each collision line to match the retired arm as a bare regex before requiring it not to classify; that a typed event classifies with the default pattern blanked, so no regex fallback remains; that a worker-written blocking_on is refused with its own reason and cannot reach the answer even through summary prose; that the derived answer changes with crew state while the status line is held constant; that both derivation helpers are total over the declared crew-verdict vocabulary; and that every reporting scaffold teaches the typed form. * no-mistakes(review): copy status-event lib into fixtures, project envelope key, add conformance test * no-mistakes(document): align classification docs and comments with typed status events * fix(tests): carry the status-event library into every sandbox bin fixture bin/fm-wake-lib.sh and bin/fm-classify-lib.sh source the sibling bin/fm-status-event-lib.sh eagerly, so every fixture that builds a synthetic bin/ from a hand-maintained manifest must carry that sibling too. Three did not, and under `set -eu` the missing source aborts the script under test: - tests/fm-gotmp.test.sh symlinks the libraries into a fake FM_ROOT (two sites). - tests/fm-backend.test.sh copies OLD_BIN_UNCHANGED_SIBLINGS into the synthetic pre-refactor tree, whose own header already records that a sourced sibling must be a real reachable file there or the source aborts. - tests/fm-remote-backlog-handoff.test.sh copies a fixed list into a fake remote root. The eager source is deliberately left hard rather than made conditional. The classifier's dependency is a correctness contract: a silently absent parser would let a sandbox read a typed event as prose, which is the failure this increment removes. Softening it to keep a manifest short would trade a loud fixture break for a quiet wrong answer. Red before and green after on the same tree: each of the three suites failed with the missing-sibling abort and now passes (3, 28 and 10 assertions).
sbracewell64
added a commit
that referenced
this pull request
Aug 11, 2026
…ocking_on (CFVC-06) (#71) * feat(bin): carry the status boundary as a typed event with derived blocking_on (CFVC-06) The worker-to-supervisor boundary's control facts were prose. bin/fm-classify-lib.sh classified wakes by grepping a crew's own sentence against `PR ready|checks green|ready in branch|merged`, so "working: rebased onto merged #76" escalated as a terminal event and had to be defended by a rule excluding nonterminal verbs - a guard around a guess. Each event is now a typed `fm-status-event.v1` envelope carrying verb, key, phase, repeatable evidence references and one bounded summary. New bin/fm-status-event-lib.sh owns the format; bin/fm-classify-lib.sh remains the single owner of what a verb MEANS and reads that field instead of a regex. The default classification path runs no regex at all, so the free-text arm and the collision class it created are gone rather than caught after the fact. What a task is waiting on is derived, never declared. status_event_blocking_on combines the verb, the keyed open-decision fold and bin/fm-crew-state.sh's typed verdict, so proof that a run is advancing overrules a stale blocked claim, and a decision left open earlier is not masked by a later unrelated event. A worker cannot write the field: the envelope's field set is closed, and an event carrying blocking_on= is refused whole and surfaced as malformed rather than silently stripped and half believed. Compatibility is the three shared parsers. Every consumer in bin/ already reads status lines through status_line_verb, status_line_note and the decision-key parser, so teaching those the envelope taught the fleet at once and a log part way through the migration reads correctly. Prose remains the human note. bin/fm-brief.sh teaches the typed form to every reporting scaffold, including the rule that blocking_on is derived. bin/fm-fleet-snapshot.sh projects the envelope and the derived field, reusing the crew read it already paid for. bin/fm-wake-lib.sh renders a typed event to its prose projection before the drain annotation's byte budget, so evidence references cannot truncate away the summary. Retired: FM_CLASSIFY_CAPTAIN_RE_DEFAULT's free-text arm, and the nonterminal verb rule as a defence against it. That rule survives as declared policy and still applies on the opt-in FM_CAPTAIN_RE path, where prose matching is what the home asked for. A bare verbless line such as "merged" is no longer captain-relevant, and tests/fm-daemon.test.sh records that change of behavior. Tests assert the retirement with a negative control that requires each collision line to match the retired arm as a bare regex before requiring it not to classify; that a typed event classifies with the default pattern blanked, so no regex fallback remains; that a worker-written blocking_on is refused with its own reason and cannot reach the answer even through summary prose; that the derived answer changes with crew state while the status line is held constant; that both derivation helpers are total over the declared crew-verdict vocabulary; and that every reporting scaffold teaches the typed form. * no-mistakes(review): copy status-event lib into fixtures, project envelope key, add conformance test * no-mistakes(document): align classification docs and comments with typed status events * fix(tests): carry the status-event library into every sandbox bin fixture bin/fm-wake-lib.sh and bin/fm-classify-lib.sh source the sibling bin/fm-status-event-lib.sh eagerly, so every fixture that builds a synthetic bin/ from a hand-maintained manifest must carry that sibling too. Three did not, and under `set -eu` the missing source aborts the script under test: - tests/fm-gotmp.test.sh symlinks the libraries into a fake FM_ROOT (two sites). - tests/fm-backend.test.sh copies OLD_BIN_UNCHANGED_SIBLINGS into the synthetic pre-refactor tree, whose own header already records that a sourced sibling must be a real reachable file there or the source aborts. - tests/fm-remote-backlog-handoff.test.sh copies a fixed list into a fake remote root. The eager source is deliberately left hard rather than made conditional. The classifier's dependency is a correctness contract: a silently absent parser would let a sandbox read a typed event as prose, which is the failure this increment removes. Softening it to keep a manifest short would trade a loud fixture break for a quiet wrong answer. Red before and green after on the same tree: each of the three suites failed with the missing-sibling abort and now passes (3, 28 and 10 assertions).
sbracewell64
added a commit
that referenced
this pull request
Aug 11, 2026
…ocking_on (CFVC-06) (#71) * feat(bin): carry the status boundary as a typed event with derived blocking_on (CFVC-06) The worker-to-supervisor boundary's control facts were prose. bin/fm-classify-lib.sh classified wakes by grepping a crew's own sentence against `PR ready|checks green|ready in branch|merged`, so "working: rebased onto merged #76" escalated as a terminal event and had to be defended by a rule excluding nonterminal verbs - a guard around a guess. Each event is now a typed `fm-status-event.v1` envelope carrying verb, key, phase, repeatable evidence references and one bounded summary. New bin/fm-status-event-lib.sh owns the format; bin/fm-classify-lib.sh remains the single owner of what a verb MEANS and reads that field instead of a regex. The default classification path runs no regex at all, so the free-text arm and the collision class it created are gone rather than caught after the fact. What a task is waiting on is derived, never declared. status_event_blocking_on combines the verb, the keyed open-decision fold and bin/fm-crew-state.sh's typed verdict, so proof that a run is advancing overrules a stale blocked claim, and a decision left open earlier is not masked by a later unrelated event. A worker cannot write the field: the envelope's field set is closed, and an event carrying blocking_on= is refused whole and surfaced as malformed rather than silently stripped and half believed. Compatibility is the three shared parsers. Every consumer in bin/ already reads status lines through status_line_verb, status_line_note and the decision-key parser, so teaching those the envelope taught the fleet at once and a log part way through the migration reads correctly. Prose remains the human note. bin/fm-brief.sh teaches the typed form to every reporting scaffold, including the rule that blocking_on is derived. bin/fm-fleet-snapshot.sh projects the envelope and the derived field, reusing the crew read it already paid for. bin/fm-wake-lib.sh renders a typed event to its prose projection before the drain annotation's byte budget, so evidence references cannot truncate away the summary. Retired: FM_CLASSIFY_CAPTAIN_RE_DEFAULT's free-text arm, and the nonterminal verb rule as a defence against it. That rule survives as declared policy and still applies on the opt-in FM_CAPTAIN_RE path, where prose matching is what the home asked for. A bare verbless line such as "merged" is no longer captain-relevant, and tests/fm-daemon.test.sh records that change of behavior. Tests assert the retirement with a negative control that requires each collision line to match the retired arm as a bare regex before requiring it not to classify; that a typed event classifies with the default pattern blanked, so no regex fallback remains; that a worker-written blocking_on is refused with its own reason and cannot reach the answer even through summary prose; that the derived answer changes with crew state while the status line is held constant; that both derivation helpers are total over the declared crew-verdict vocabulary; and that every reporting scaffold teaches the typed form. * no-mistakes(review): copy status-event lib into fixtures, project envelope key, add conformance test * no-mistakes(document): align classification docs and comments with typed status events * fix(tests): carry the status-event library into every sandbox bin fixture bin/fm-wake-lib.sh and bin/fm-classify-lib.sh source the sibling bin/fm-status-event-lib.sh eagerly, so every fixture that builds a synthetic bin/ from a hand-maintained manifest must carry that sibling too. Three did not, and under `set -eu` the missing source aborts the script under test: - tests/fm-gotmp.test.sh symlinks the libraries into a fake FM_ROOT (two sites). - tests/fm-backend.test.sh copies OLD_BIN_UNCHANGED_SIBLINGS into the synthetic pre-refactor tree, whose own header already records that a sourced sibling must be a real reachable file there or the source aborts. - tests/fm-remote-backlog-handoff.test.sh copies a fixed list into a fake remote root. The eager source is deliberately left hard rather than made conditional. The classifier's dependency is a correctness contract: a silently absent parser would let a sandbox read a typed event as prose, which is the failure this increment removes. Softening it to keep a manifest short would trade a loud fixture break for a quiet wrong answer. Red before and green after on the same tree: each of the three suites failed with the missing-sibling abort and now passes (3, 28 and 10 assertions).
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.
Intent
CFVC-06: make the worker-to-supervisor event boundary carry typed fields instead of free prose, without introducing a worker self-report.
Each status event is now a typed
fm-status-event.v1envelope carryingverb,key,phase, repeatableevidencereferences and one boundedsummary. Newbin/fm-status-event-lib.showns the wire format;bin/fm-classify-lib.shremains the single owner of what a verb MEANS and reads that field instead of a regex.What a task is waiting on is derived, never declared.
status_event_blocking_oncombines the verb, the keyed open-decision fold andbin/fm-crew-state.sh's typed verdict, so proof that a run is advancing overrules a staleblocked:claim. A worker cannot write the field at all: the envelope's field set is closed, and an event carryingblocking_on=is refused whole and surfaced as malformed rather than silently stripped and half believed.Retired:
FM_CLASSIFY_CAPTAIN_RE_DEFAULT's free-text arm (PR ready|checks green|ready in branch|merged). That arm matched a crew's own prose, soworking: rebased onto merged #76escalated as a terminal event and had to be defended by a rule excluding nonterminal verbs - a guard around a guess. The default classification path now runs no regex at all. The nonterminal-verb rule survives as declared policy and still applies on the opt-inFM_CAPTAIN_REpath, where prose matching is what the home asked for.Consequence, intentional: a bare verbless legacy line such as
mergedis no longer captain-relevant. Prose lines carrying a verb (done: ...,blocked: ...) remain fully readable and fully classified - that is the migration compatibility guarantee, achieved through the three shared parsers every consumer inbin/already uses.Provenance - read this before merging
This branch was hand-cut and is not the head the no-mistakes pipeline validated. Disclosing that plainly:
01KZMB71PC5EE21WVC3PTDA6E6) pushed to a head based on a pre-hotfix upstream base and opened its PR at the upstream venue rather than this fork. That head still carried the committedAGENTS.mdconflict markers, because its base predated theef1ff03hotfix that resolved them.93f67a3, which does includeef1ff03and its conflict-marker CI guard.Merge screen
93f67a3strict ancestorCommit fidelity was checked with
git range-diffagainst the validated commits. The document commit is byte-identical; the other two differ only in context lines belonging to the two different bases (bin/fm-brief.shuses a$RULE4_PHASESvariable upstream versus the literal phrase on the fork trunk;docs/architecture.mdhas newer surrounding prose upstream; the newdocs/scripts.mdrow lands beside a different neighbouring entry). No changed line of the contribution itself differs.Verification on this base
Because the base differs from the one the pipeline validated, the pipeline's verdict does not carry and everything below was re-run against
93f67a3.bin/fm-lint.sh(pinned ShellCheck 0.11.0): clean, exit 0. Negative control performed separately: an injected violation makes it go red.ad2a9ba): 13 of 14 checks pass. Every behaviour shard, the Herdr suite, the stock-macOS-Bash snapshot, repo invariants, lint, coverage guard and the Windows launcher bridge are green.PR must be raised via no-mistakes- the structural attestation red disclosed above. It is expected and unavoidable for a hand-cut head.A regression this branch's first head had, now fixed
The first pushed head failed three behaviour shards, and those failures were caused by this change, not pre-existing. They are fixed in
ad2a9ba.bin/fm-wake-lib.shandbin/fm-classify-lib.shsource the new siblingbin/fm-status-event-lib.sheagerly, so every fixture that builds a syntheticbin/from a hand-maintained manifest must carry that sibling too. The review gate caught four such fixtures; three more used shapes the follow-up search missed:tests/fm-gotmp.test.sh- symlinks the libraries into a fakeFM_ROOT(two sites).tests/fm-backend.test.sh- a variable manifest,OLD_BIN_UNCHANGED_SIBLINGS. That file's own header already records that a sourced sibling must be a real reachable file in the synthetic tree or the source aborts underset -eu.tests/fm-remote-backlog-handoff.test.sh- a fixed multi-file copy into a fake remote root.The eager source was deliberately left hard rather than made conditional. Two of the three break through
fm-classify-lib.sh, whose dependency is a correctness contract: a silently absent parser would let a sandbox read a typed event as prose, which is the exact failure this increment removes. Softening it to keep a manifest short would trade a loud fixture break for a quiet wrong answer.Attribution was established both directions: all three suites pass in a clean detached worktree at bare
93f67a3with none of these commits applied, and all three failed on this branch before the fix. Red before, green after on the same tree (3, 28 and 10 assertions).Separately, one genuinely pre-existing failure
tests/fm-turnend-guard.test.sh- "Pi guard must inject once for no-tool and multi-tool logical runs" - fails locally on bare93f67a3with none of these commits applied, producing an identical 43-passing-then-one-failure result. This branch neither introduces nor repairs it. It does not fail in CI, which lacks the local Pi harness.Pipeline findings that were fixed during the run
The review gate caught three real misses in the original commit, all fixed and carried here:
fm-wake-lib.sh/fm-classify-lib.shinto a temporarybin/without the new sibling library, which the eager source needs (fm-turnend-guard,fm-claude-stop-autoarm,fm-session-lock-ancestry,fm-afk-return).FM_STATUS_EVENT_FIELDSwas read by a conformance gate that did not exist. It now is: a test asserts the parser's accepted field set equals that constant, so the closed-set claim is enforced rather than asserted.docs/scripts.md's library index had no row for the new file.A fourth finding added
keyto the snapshot'slast_event.envelopeprojection, so a consumer correlating a typed event with the open-decision set never has to re-parse raw prose.Known follow-up, out of scope here
bin/fm-crew-state.sh'slog_reports_ci_readystill reads note prose forchecks green. Its behaviour is unchanged by this work, and CFVC-06's completion criteria name onlyfm-classify-lib.sh's free-text arm, so it is left for its own increment.