Skip to content

fix(bin): fold correlated decision lines and drop routine no-op wakes - #13

Merged
sanis merged 3 commits into
mainfrom
fm/fm-upstream-sync-7a
Aug 26, 2026
Merged

sanis merged 3 commits into
mainfrom
fm/fm-upstream-sync-7a

Conversation

@sanis

@sanis sanis commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Intent

Renew this fork from upstream: merge upstream/main into our main so the fork (sanis/firstmate) carries upstream's (kunchenguid/firstmate) latest work without losing any of our own.

Starting position: merge base was f7a387f (the previous renewal); our main was 47 commits ahead and 2 behind. The two commits to bring in, oldest first, were 07bf0c8 'fix: keep routine supervision noise out of captain chat (kunchenguid#3093)' and 9ce69ac 'fix(bin): stop a correlation token from hiding and stranding decisions (kunchenguid#1967)'.

Explicit requirements the user stated:

  1. Fetch upstream and merge upstream/main into the branch.
  2. Resolve every conflict so BOTH sides survive: upstream's fix keeps working AND our fork's local behavior keeps working. Neither side is automatically right. A divergence whose intent could not be determined is an escalation to the supervisor, not a coin flip.
  3. Keep the merge commit's first line in the established form: 'Merge upstream/main: fork renewal (2 commits through 9ce69ac)'.
  4. Do NOT squash, do NOT rebase our 47 commits, do NOT rewrite any history. This is a merge. The supervisor later ruled the exact scope: it protects the 47 fork commits, upstream's commits, and anything already pushed; it does NOT cover the merge commit authored on this branch that has never been pushed.
  5. Do NOT 'clean up', reformat, or otherwise change files beyond what conflict resolution genuinely requires. The absence of incidental edits is a requirement, not an oversight.

Required verification: HEAD..upstream/main empty; the four upstream-touched test scripts pass (tests/fm-classify-corr-token.test.sh, tests/fm-procevent.test.sh, tests/fm-pi-branch-extension.test.sh, tests/fm-pi-watch-extension.test.sh); every shell file touched is shellcheck-clean; git diff upstream/main...HEAD reads as our fork's intentional divergence with no accidental reverts.

The task touches firstmate's shared tracked material, so .agents/skills/firstmate-coding-guidelines/SKILL.md binds: one-owner rule, one sentence per line in tracked Markdown, plain dash never em dash, no agent co-author, bin/*.sh shellcheck-clean via bin/fm-lint.sh, colocated tests named .test.sh, and tests must exercise behavior through a public interface rather than asserting implementation-source bytes.

What was found and decided:
The brief predicted conflicts 'particularly in bin/fm-classify-lib.sh and bin/fm-procevent.sh'. That prediction was wrong, and the absence of conflicts was verified rather than assumed, because a textually-clean merge is exactly the case that hides semantic breakage. Our fork's 47 commits touch 38 files; upstream's two commits touch 15; the sets are disjoint except docs/configuration.md. git diff f7a387f HEAD is EMPTY for all 15 upstream-touched files, so the fork had zero divergence there. The earlier renewal merge commits appearing in 'git log -- ' for those paths carry upstream's own history, not fork divergence, which is what made the prediction look plausible.

So NO conflict resolution was performed and no source file was hand-edited. git merge --no-ff produced a clean two-parent merge. docs/configuration.md, the one file both sides carry, auto-merged into separate hunks: upstream's new process-event 'silent' adapter-seam section plus this fork's FM_PR_DESCRIPTION_TIMEOUT line.

Evidence the merge is correct: all 15 upstream-touched files are byte-identical to upstream/main in the merged tree; git diff --stat upstream/main...HEAD is '38 files changed, 2968 insertions(+), 30 deletions(-)', character-for-character the same stat as the pre-merge git diff f7a387f HEAD, proving zero incidental change; upstream/main and the pre-merge tip 4d32068 are both ancestors of HEAD, so nothing was rebased or squashed; and no fork file consumes status_line_verb, FM_OPEN_DECISIONS_FOLD_VERSION, fm-classify-lib, or procevent, and the fork ships no procevent adapter needing upstream's new 'silent' command, so there is no cross-file semantic coupling.

Verification results: all four upstream test scripts pass (exit=0), plus tests/fm-documentation-audiences.test.sh which covers the one merged file; bin/fm-lint.sh clean (shellcheck 0.11.0, actionlint 1.7.12); bin/fm-doc-audience-check.sh ok with 79 surfaces and 297 local links. Disclosure: tests/fm-pi-branch-extension.test.sh self-skips its harness-dependent half with 'skip: installed @earendil-works/pi-coding-agent package not found' - environmental, pre-existing, unrelated to this merge, reported rather than letting exit=0 imply full coverage.

History of this exact change, so the merge-commit body is not re-flagged: an earlier validation attempt's review step correctly caught that the merge commit body said 'FM_OPEN_DECISIONS_FOLD_VERSION goes to 3' while the code moves it 4 -> 5 (=4 at merge base f7a387f, =5 at bin/fm-classify-lib.sh:616). The wrong number came from upstream 9ce69ac's own squashed message, whose first paragraph says 'goes to 3' but whose later review round ('Seed cursor migration fixture with version four') shows 4 was already spent. The tree was never wrong; only the narrative was. The supervisor ruled FIX with two limits: correct only that number and the sentence around it, and do not touch upstream commit 9ce69ac's own message. Both limits are satisfied in the current head: the body now reads 'goes from 4 to 5', and upstream 9ce69ac is untouched and still carries its own stale 'goes to 3'.

Why this work is on branch fm/fm-upstream-sync-7a: the correction had to be an amendment of the merge commit, since a commit message cannot be corrected by adding a commit on top. The pipeline's own --action fix produced exactly the right commit but then aborted, because amending rewrites the pipeline's recorded head. After that run went terminal, custody was returned via axi sync --recover and the amendment was applied between runs with git commit --amend, reusing the pipeline fix agent's own corrected message verbatim. A fresh run on the original branch then failed at its first step, because the gate's ref for fm/fm-upstream-sync-7 is pinned at the pre-amend commit and the corrected head is an amended sibling, not a descendant, so the push was rejected non-fast-forward. The supervisor ruled to redeliver on this new branch name, which the gate has no ref for, so the push creates it cleanly with no force anywhere. The commit itself was not rebuilt: fm/fm-upstream-sync-7a points at the identical, already-verified commit object. Nothing has ever been pushed to origin for this task.

Deliberate non-changes a reviewer might flag as omissions: no AGENTS.md update, because a conflict-free renewal produced no durable project-intrinsic knowledge and that file's token cost is paid by every session of every fleet member; and no edits of any kind outside the merge and that one commit-message correction, per requirement 5. The local 'main' ref is intentionally still unmerged - moving it is the landing step and belongs to the supervisor.

What Changed

Merges upstream/main into this fork (2 commits through 9ce69ac); no conflict resolution was needed, and no file was hand-edited beyond the merge itself.

  • status_line_verb in bin/fm-classify-lib.sh now walks whole words and drops only an unbracketed, firstmate-written corr=<16 hex> token, so correlated needs-decision/resolved lines fold as the transitions they are; FM_OPEN_DECISIONS_FOLD_VERSION goes from 4 to 5 so persisted cursors rebuild from byte 0. New tests/fm-classify-corr-token.test.sh pins the token shape against the real writers.
  • bin/fm-procevent.sh gains a silent <result-file> adapter seam consulted before publishing, treating exit 0 as the only silence verdict (result recorded handled, never announced); bin/fm-procevent-lavish.sh answers it for exactly one shape - an ended session carrying no top-level prompts/feedback block - so an empty board close no longer wakes a handler.
  • scopeForUnreadWake in .pi/extensions/lib/fm-branch-dispatch.ts stops letting a main-owned check row veto a heartbeat scan; such rows are excluded from eligibleSeqs and eligibility is now read off the claim set, so routine fleet reviews stop deferring to main over unrelated check rows. Docs (docs/configuration.md, docs/pi-supervision-branch.md) and the branch/watch extension tests follow.

Risk Assessment

✅ Low: The merge introduces upstream's diff byte-for-byte with no hand edits, leaves the fork's 38-file divergence content-identical to its pre-merge state (only a hunk-line offset shifts), preserves every fork and upstream commit as an ancestor, and the one file both sides touch auto-merged into non-overlapping hunks with no cross-file semantic coupling reachable from any fork-changed file.

Testing

I verified the merge structurally and then proved both sides actually behave, rather than trusting a clean textual merge. Structurally: HEAD..upstream/main is empty, both parents are ancestors of HEAD so nothing was rebased or squashed, 15 of 16 upstream-touched files are byte-identical blobs to upstream's tip, and the fork-divergence stat is unchanged by the merge with no path touched outside upstream's set - which is the direct evidence for the no-incidental-edits requirement. Behaviorally, I reproduced upstream's correlation-token bug as a before/after regression by running the real status_open_decisions fold against the merge-base library and against HEAD's: at the merge base a tokened needs-decision is hidden from the captain's open-decisions list and a tokened resolved strands the decision open forever, while at HEAD both fold correctly and the untokened control and the corr=nothex lookalike are unchanged, so the fix is not a loosening. I drove upstream's other fix through its real adapter command, confirming an empty board close is silent while a Send & End answer, a late answer, a waiting board and unreadable output all still announce, and that adapters with no silent command are unaffected. Fork-side behavior survives: the PR description guard suite passes including its FM_PR_DESCRIPTION_TIMEOUT hang-to-warning case, and the merged docs/configuration.md carries both sides' hunks. All six targeted suites pass. One disclosure: tests/fm-pi-branch-extension.test.sh self-skips its harness-dependent half because the pi-coding-agent package is not installed locally - environmental and pre-existing, unrelated to this merge, and remote CI covers it. There is no UI, HTML, or rendered surface in this change (it is a shell, TypeScript-extension and docs merge), so the reviewer-visible evidence is CLI transcripts of the actual captain-facing behavior rather than screenshots. Working tree is clean and all temp scaffolding was removed.

Evidence: Correlation-token fix: before/after the merge, captain's open-decisions list

Source: Correlation-token fix: before/after the merge, captain's open-decisions list

SCENARIO: HIDING - an unanswered decision whose line carries the token needs-decision corr=a1b2c3d4e5f60718 [key=deploy-window]: ship tonight or hold? working corr=a1b2c3d4e5f60718: preparing the release notes BEFORE the merge (merge base f7a387f) captain's open-decisions list: (empty) AFTER the merge (HEAD e5ee8bf) captain's open-decisions list: * deploy-window needs-decision ship tonight or hold? SCENARIO: STRANDING - an untokened opener answered by a tokened closer needs-decision [key=deploy-window]: ship tonight or hold? resolved corr=a1b2c3d4e5f60718 [key=deploy-window]: hold until Monday BEFORE the merge (merge base f7a387f) captain's open-decisions list: * deploy-window needs-decision ship tonight or hold? AFTER the merge (HEAD e5ee8bf) captain's open-decisions list: (empty) SCENARIO: CONTROL - the same pair with no token at all (must not regress) BEFORE: (empty) AFTER: (empty) SCENARIO: STRICTNESS - 'corr=nothex' is not a firstmate token BEFORE: still open AFTER: still open

##################################################################
# Upstream 9ce69ac, end-user view. A secondmate echoes back the
# corr=<16 hex> correlation token firstmate embedded in a marked
# request, so real status lines carry it between the verb and the
# rest of the line. The captain's open-decisions list must be
# unaffected by that token.
##################################################################

==============================================================
SCENARIO: HIDING - an unanswered decision whose line carries the token
What the captain should see: the decision listed as open, because nobody has answered it yet

  the task's status log, exactly as firstmate writes it:
      needs-decision corr=a1b2c3d4e5f60718 [key=deploy-window]: ship tonight or hold?
      working corr=a1b2c3d4e5f60718: preparing the release notes

  BEFORE the merge (merge base f7a387f)
      captain's open-decisions list: (empty)
  AFTER  the merge (HEAD e5ee8bf)
      captain's open-decisions list:
          * deploy-window	needs-decision	ship tonight or hold?

==============================================================
SCENARIO: STRANDING - an untokened opener answered by a tokened closer
What the captain should see: nothing open, because the captain already answered it

  the task's status log, exactly as firstmate writes it:
      needs-decision [key=deploy-window]: ship tonight or hold?
      resolved corr=a1b2c3d4e5f60718 [key=deploy-window]: hold until Monday

  BEFORE the merge (merge base f7a387f)
      captain's open-decisions list:
          * deploy-window	needs-decision	ship tonight or hold?
  AFTER  the merge (HEAD e5ee8bf)
      captain's open-decisions list: (empty)

==============================================================
SCENARIO: CONTROL - the same pair with no token at all (must not regress)
What the captain should see: nothing open

  the task's status log, exactly as firstmate writes it:
      needs-decision [key=deploy-window]: ship tonight or hold?
      resolved [key=deploy-window]: hold until Monday

  BEFORE the merge (merge base f7a387f)
      captain's open-decisions list: (empty)
  AFTER  the merge (HEAD e5ee8bf)
      captain's open-decisions list: (empty)

==============================================================
SCENARIO: STRICTNESS - a lookalike that is NOT a firstmate token stays literal
What the captain should see: the decision still open, because 'corr=nothex' is not a correlation token

  the task's status log, exactly as firstmate writes it:
      needs-decision [key=deploy-window]: ship tonight or hold?
      resolved corr=nothex [key=deploy-window]: hold until Monday

  BEFORE the merge (merge base f7a387f)
      captain's open-decisions list:
          * deploy-window	needs-decision	ship tonight or hold?
  AFTER  the merge (HEAD e5ee8bf)
      captain's open-decisions list:
          * deploy-window	needs-decision	ship tonight or hold?
Evidence: Process-event silence seam: what reaches captain chat and what does not

Source: Process-event silence seam: what reaches captain chat and what does not

the captain closed the review board without saying anything -> SILENT: recorded as handled, the captain is NOT woken. the captain hit Send & End with a real answer -> ANNOUNCE: a check wake is published to the captain. the board closed but still carries a late answer -> ANNOUNCE the board is still open and waiting -> ANNOUNCE the result is unreadable (fail closed - never assume silence) -> ANNOUNCE Adapters with no 'silent' command are unaffected: adapter 'remote-reply' -> ANNOUNCE (unchanged by the new seam) adapter 'when' -> ANNOUNCE (unchanged by the new seam)

##################################################################
# Upstream 07bf0c8, end-user view: routine supervision noise must
# stay out of captain chat. The generic runner asks the adapter
#     bin/fm-procevent-lavish.sh silent <result>
# and exit 0 is the ONLY verdict that suppresses an announcement.
##################################################################

--------------------------------------------------------------
What happened on the captain's review board: the captain closed the review board without saying anything
  the captured Lavish result the watcher holds:
      session:
        file: /a.html
        status: ended
        ended_by: user
  runner verdict  -> SILENT: recorded as handled, the captain is NOT woken.

--------------------------------------------------------------
What happened on the captain's review board: the captain hit Send & End with a real answer
  the captured Lavish result the watcher holds:
      session:
        file: /a.html
        status: feedback
        session_ended: true
        ended_by: user
      feedback[1]{text}:
        ship it
  runner verdict  -> ANNOUNCE: a check wake is published to the captain.

--------------------------------------------------------------
What happened on the captain's review board: the board closed but still carries a late answer
  the captured Lavish result the watcher holds:
      session:
        file: /a.html
        status: ended
        ended_by: user
      prompts[1]{tag,text}:
        "choice","late answer"
  runner verdict  -> ANNOUNCE: a check wake is published to the captain.

--------------------------------------------------------------
What happened on the captain's review board: the board is still open and waiting
  the captured Lavish result the watcher holds:
      session:
        file: /a.html
        status: waiting
  runner verdict  -> ANNOUNCE: a check wake is published to the captain.

--------------------------------------------------------------
What happened on the captain's review board: the result is unreadable (fail closed - never assume silence)
  the captured Lavish result the watcher holds:
      garbage that is not a session block
  runner verdict  -> ANNOUNCE: a check wake is published to the captain.

==================================================================
Adapters that have no notion of a no-op are unaffected: an adapter
with no 'silent' command must keep announcing everything.
  adapter 'lib' -> ANNOUNCE (unchanged by the new seam)
  adapter 'remote-reply' -> ANNOUNCE (unchanged by the new seam)
  adapter 'when' -> ANNOUNCE (unchanged by the new seam)
Evidence: Merge shape: no rebase, no squash, no incidental edits

Source: Merge shape: no rebase, no squash, no incidental edits

=== Files changed by the merge that upstream did NOT touch (must be empty) === (end) === Fork divergence stat, before and after the merge (must be identical) === pre-merge f7a387f..4d32068 : 38 files changed, 2968 insertions(+), 30 deletions(-) post-merge upstream...HEAD : 38 files changed, 2968 insertions(+), 30 deletions(-) === History shape (no squash, no rebase) === * e5ee8bf Merge upstream/main: fork renewal (2 commits through 9ce69ac) |&#10;| * 9ce69ac fix(bin): stop a correlation token from hiding and stranding decisions (#1967) | * 07bf0c8 fix: keep routine supervision noise out of captain chat (#3093) * | 4d32068 Merge pull request #12 from sanis/fm/fm-upstream-sync-6 === HEAD..upstream/main (9ce69ac) commit count: 0 ===

=== What the merge changed relative to our pre-merge fork tip 4d32068 ===
(must be exactly upstream's 16 touched paths and nothing else)
 .agents/skills/process-event-sources/SKILL.md |   1 +
 .pi/extensions/fm-branch-supervision.ts       |  21 +-
 .pi/extensions/lib/fm-branch-dispatch.ts      |  70 ++--
 bin/fm-classify-lib.sh                        |  86 +++-
 bin/fm-crew-state.sh                          |   2 +-
 bin/fm-procevent-lavish.sh                    |  74 +++-
 bin/fm-procevent.sh                           |  58 ++-
 bin/fm_voice_records.py                       |  14 +-
 docs/configuration.md                         |   8 +
 docs/pi-supervision-branch.md                 |  16 +-
 docs/verification/process-event-sources.md    |  15 +
 docs/watcher-continuity.md                    |   1 +
 tests/fm-classify-corr-token.test.sh          | 543 ++++++++++++++++++++++++++
 tests/fm-pi-branch-extension.test.sh          |  95 ++++-
 tests/fm-pi-watch-extension.test.sh           | 125 +++++-
 tests/fm-procevent.test.sh                    | 131 +++++++
 16 files changed, 1169 insertions(+), 91 deletions(-)

=== Files changed by the merge that upstream did NOT touch (must be empty) ===
(end)

=== Fork divergence stat, before and after the merge (must be identical) ===
pre-merge   f7a387f..4d32068 :  38 files changed, 2968 insertions(+), 30 deletions(-)
post-merge  upstream...HEAD  :  38 files changed, 2968 insertions(+), 30 deletions(-)

=== History shape (no squash, no rebase) ===
*   e5ee8bf Merge upstream/main: fork renewal (2 commits through 9ce69ac)
|\  
| * 9ce69ac fix(bin): stop a correlation token from hiding and stranding decisions (#1967)
| * 07bf0c8 fix: keep routine supervision noise out of captain chat (#3093)
* |   4d32068 Merge pull request #12 from sanis/fm/fm-upstream-sync-6
|\ \  
| * | 21322f8 Merge upstream/main: fork renewal (6 commits through f7a387f)
|/| | 
| |/  
| * f7a387f feat(pi): let /supervision-model pick branch reasoning effort (#3079)

=== HEAD..upstream/main (9ce69ac) commit count: 0 ===
Evidence: Targeted test run summary (upstream suites + fork suites)

Source: Targeted test run summary (upstream suites + fork suites)

Upstream-touched suites (upstream's fixes must keep working): tests/fm-classify-corr-token.test.sh exit=0 (12 assertions) tests/fm-procevent.test.sh exit=0 (53 assertions) tests/fm-pi-branch-extension.test.sh exit=0 (24 assertions) tests/fm-pi-watch-extension.test.sh exit=0 (37 assertions) Fork-side suites (our own behavior must keep working): tests/fm-documentation-audiences.test.sh exit=0 (6 assertions) tests/fm-pr-description-guard.test.sh exit=0 (23 assertions) Disclosed skip (environmental, pre-existing, unrelated to this merge): tests/fm-pi-branch-extension.test.sh: skip: installed @earendil-works/pi-coding-agent package not found

Targeted test run on the merged tree (HEAD e5ee8bf)

Upstream-touched suites (upstream's fixes must keep working):
  tests/fm-classify-corr-token.test.sh exit=0  (12 assertions)
  tests/fm-procevent.test.sh       exit=0  (53 assertions)
  tests/fm-pi-branch-extension.test.sh exit=0  (24 assertions)
  tests/fm-pi-watch-extension.test.sh exit=0  (37 assertions)

Fork-side suites (our own behavior must keep working):
  tests/fm-documentation-audiences.test.sh exit=0  (6 assertions)
  tests/fm-pr-description-guard.test.sh exit=0  (23 assertions)

Disclosed skip (environmental, pre-existing, unrelated to this merge):
  tests/fm-pi-branch-extension.test.sh: skip: installed @earendil-works/pi-coding-agent package not found
Evidence: Full log: tests/fm-procevent.test.sh (includes the new silence-seam assertions)

Source: Full log: tests/fm-procevent.test.sh (includes the new silence-seam assertions)

ok - no configured source means no generated state and no process
ok - one blocking completion yields exactly one bounded normalized event
not-autohandled: direct-src (left for the handler; still unacknowledged)
ok - public start owns the process group recorded by its claim
ok - public start never claims an inherited caller process group
ok - an unhandled result survives restart and repeat drains, and only explicit acknowledgement stops its re-announcement
ok - publication cannot race a handled acknowledgement
ok - handled acknowledgement creation is private and fails safely
ok - automatic application waits for durable publication and failed publication remains recoverable
ok - a self-announcing adapter applies quietly and still publishes what it could not apply
not-autohandled: ends-src (left for the handler; still unacknowledged)
ok - an adapter-classified terminal result is captured once, announced, and retires its source automatically
not-autohandled: open-src (left for the handler; still unacknowledged)
ok - a source stays armed unless its own adapter classifies the result terminal
not-autohandled: replace-src (left for the handler; still unacknowledged)
ok - terminal retirement preserves and releases a concurrently replaced registration
ok - failed terminal retirement is fail-closed and idempotently recoverable
ok - one Send & End yields exactly one captured result, automatic retirement, and no recurring poll
ok - an empty board close is captured and recorded handled without ever waking the captain
ok - a board close carrying the captain's real answer is still announced
ok - a transient Lavish poll interruption is retried quietly and never announced
not-autohandled: lavish-14a6fe50d7f5f864 (left for the handler; still unacknowledged)
ok - an interruption that outlives the bounded retries is captured and announced
not-autohandled: lavish-71ab74e10afcfa96 (left for the handler; still unacknowledged)
ok - only the exact interruption is retried; an unrelated SERVER_ERROR still surfaces
not-autohandled: lavish-e6ca4a53b94731cb (left for the handler; still unacknowledged)
ok - only the literal two-line interruption enters the quiet retry policy
ok - arm rejects malformed and out-of-range retry delays before registration
ok - poll cleanup safely handles an apostrophe-containing TMPDIR
ok - Lavish classification staging stays bounded while nonmatches stream
ok - a drained-but-unhandled result survives a replacement session and is retired only by explicit handling, never twice
ok - pending results preserve numeric order and distinct wake identity
ok - one owner per canonical source across homes
ok - retiring a never-completing source stops its runner and its blocked child
ok - reconcile reaps a runner whose source registration is gone
not-autohandled: stale-src (left for the handler; still unacknowledged)
ok - stale-owner recovery removes abandoned output without displacing a live owner
not-autohandled: cross-home-src (left for the handler; still unacknowledged)
ok - cross-home stale recovery removes abandoned output from the old state directory
not-autohandled: race-src (left for the handler; still unacknowledged)
not-autohandled: race-src (left for the handler; still unacknowledged)
not-autohandled: race-src (left for the handler; still unacknowledged)
ok - concurrent stale-claim replacement starts exactly one runner
ok - a crashed runner leader never lets a live owned group be reclaimed as stale
ok - a truly dead generation with no surviving group is still safely reclaimed
ok - claim replacement cannot produce a torn ownership snapshot
ok - retirement and start share one serialized lifecycle boundary
ok - PID reuse cannot signal an unrelated process
ok - transient identity failure preserves the live source for retry
ok - bounded home sweep preflights then retires every locally owned source
ok - home sweep leaves foreign-home claims and runners untouched
ok - home sweep refuses safely until runner identity is readable
ok - healthy runtime behavior remains registration-only
ok - registration rejects unrepresentable newline arguments
ok - nonzero exit with no output stays armed and silent
ok - oversized output is bounded rather than published whole or dropped
ok - live output stays bounded and retirement reaps the whole source group
ok - invalid output bounds fail closed
ok - the adapter derives physical identity without newline path corruption
ok - source-only homes trigger the general supervision guard
ok - the adapter classifies published poll output safely
ok - the adapter owns which Lavish results end a source, and payload text cannot forge one
ok - the adapter owns which Lavish results are silent, and fails closed on everything else
ok - an adapter with no silence verdict keeps announcing every result
ok - the published interfaces state the loss limitation and claim no lossless delivery

all procevent tests passed
exit=0
Evidence: Full log: tests/fm-classify-corr-token.test.sh

Source: Full log: tests/fm-classify-corr-token.test.sh

ok - a correlation token between the verb and the key breaks neither opening nor closing
ok - the token is read through before the key, after it, doubled, bracketed, and unkeyed
ok - the untokened opener/closer pair behaves exactly as before
ok - prose, malformed, wrong-length and unknown name=value tokens stay non-transitions
ok - a token-first line cannot impersonate any opening or closing verb
ok - untokened captain-relevance, pause, terminal-verb and captain-held verdicts are unchanged
ok - captain-relevance, terminal-verb, pause and captain-held all read through the token
ok - the daemon and crew-state verb case arms read through the token
ok - reading through the token does not weaken the reserved-key namespace rule
ok - the cursor-backed fold and the whole-file fold agree on every correlated transition
ok - a cursor persisted under the previous reading is discarded and refolded
ok - both real correlation-token writers produce lines this classifier reads through
exit=0
Evidence: Full log: tests/fm-pi-branch-extension.test.sh (contains the disclosed skip)

Source: Full log: tests/fm-pi-branch-extension.test.sh (contains the disclosed skip)

skip: installed @earendil-works/pi-coding-agent package not found
ok - branch owns accepted wakes with a stable prefix contract and verdict-driven merge delivery
ok - scopeForUnreadWake excludes every main-only class without vetoing eligible task-local rows, and writes the eligible snapshot
ok - branch prompt_cache_key is stable per home across sessions and distinct between homes
ok - branch default-on eligibility (task-scoped, heartbeat, afk) binds and a broken branch falls back to main
ok - a heartbeat review survives a check row arriving before its drain
ok - pre-drain eligibility re-check excludes a newly main-owned row without deferring eligible work
ok - a settled branch turn releases an unacknowledged grant for main replay
ok - a stale main claim cannot silently suppress later wake delivery
ok - pre-drain eligibility re-check no-ops an already-drained wake
ok - dialog mirror filters tool and operational traffic, lands before wakes, and keeps a durable cursor
ok - branch session persists across process restarts through the recorded pointer
ok - the current pin state binds every branch create and reopen, and clearing it returns the branch to main's model
ok - unpinned branches follow main model changes live while pinned branches stay fixed
ok - supervision-model command persists the captain's pick and rebinds the live branch
ok - the effort pin binds every branch create and reopen, and clearing it returns the branch to main's effort
ok - unpinned branches follow main effort changes live while pinned branches stay fixed
ok - supervision-model runs an effort picker after the model picker and persists both independently
ok - an unusable model pin falls back to main and an unparseable one is treated as no pin
ok - replacement activation cleans old branch leases and retries failed cleanup
ok - branch activates on a cold start once the lock is acquired, never before
ok - queued wakes and mirrors stop mutating branch state after lock ownership is lost
ok - stale reports, shells, mirrors, cursors, leases, and prompts perform no side effects
ok - a Pi session that does not own the lock accepts nothing and mutates no branch state
ok - an extension rebind re-mirrors undelivered dialog instead of dropping it
exit=0
Evidence: Full log: tests/fm-pi-watch-extension.test.sh

Source: Full log: tests/fm-pi-watch-extension.test.sh

ok - Pi extension reports external healthy watcher output
ok - Pi custom tool exposes repair-only metadata and returns automatic-continuation guidance
ok - Pi redundant tool call returns ownership guidance and spawns no second child
ok - Pi scheduled retry remains extension-owned after another tool call
ok - Pi actionable close starts one successor before wake delivery settles
ok - Pi dispatcher branch offer owns accepted wakes and falls back to main
ok - Pi dispatcher flags a fleet-wide heartbeat offer as branch-eligible
ok - a co-present check row neither vetoes nor rides a heartbeat into main
ok - every main-only check class still reaches main, never the supervision branch
ok - heartbeat restoration failure stays on main
ok - watcher-failure repair stays with main even with a live, accepting branch listener
ok - Pi refused handling handshake is classified and not swallowed
ok - Pi hung successor falls back to one typed actionable wake
ok - Pi unretired successor falls back without an overlapping retry
ok - Pi late unretired closes resume classified supervision
ok - Pi clean empty close triggers a bounded continuity retry
ok - Pi established clean closes stop at the configured retry limit
ok - Pi close handler verifies session-lock ownership before successor launch
ok - Pi watcher arm distinguishes all session lock ownership states
ok - Pi session transitions use a generation owner across /new /resume /fork, stale callbacks, and quit
ok - Pi process-exit cleanup listener remains singular across session replacement
ok - Pi process-exit cleanup stops the attached arm child
ok - OpenCode plugins have an explicit ESM boundary even under a typeless parent package
ok - OpenCode watcher plugin uses the effective FM_HOME state
ok - OpenCode watcher plugin sources the effective config
ok - OpenCode watcher plugin requires session lock ownership
ok - OpenCode watcher coordinator respects primary scope
ok - OpenCode watcher plugin starts one successor before wake prompt delivery settles
ok - OpenCode pre-ready actionable close preserves its successor
ok - OpenCode hung successor falls back to one typed actionable wake
ok - OpenCode unretired successor falls back without an overlapping retry
ok - OpenCode late unretired closes resume classified supervision
ok - OpenCode clean empty close triggers a bounded continuity retry
ok - OpenCode established clean closes stop at the configured retry limit
ok - OpenCode close handler verifies session-lock ownership before successor launch
ok - OpenCode watcher plugin coordinates with the turn-end guard
ok - OpenCode healthy arm output does not suppress the turn-end guard
exit=0
Evidence: Full log: tests/fm-pr-description-guard.test.sh (fork-side FM_PR_DESCRIPTION_TIMEOUT)

Source: Full log: tests/fm-pr-description-guard.test.sh (fork-side FM_PR_DESCRIPTION_TIMEOUT)

ok - !1333: seven screenshot paths refused, its relative shots/ index untouched
ok - !1325: three YAML/JSON evidence paths refused, fenced or not
ok - !1331: JSON transcript and PHP capture script both refused
ok - !1328: a clean description and correct /uploads/ links pass
ok - !703: quoted CI install commands under /tmp pass
ok - a shared scratch root refuses only when stamped or delivered
ok - attribute-shaped bytes deliver only inside an open tag
ok - a user home or file:// URL is refused with no second signal
ok - a root named in prose is not a delivery, a path under it still is
ok - a /home or /tmp segment inside a URL is not a local path
ok - a /private twin decides as its canonical root, and nothing else does
ok - a refused twin path is named exactly as the description wrote it
ok - a refusal names every path, points at the recipes, and changes nothing
ok - both forges are checked, each with its own wording
ok - the GitLab fetch addresses the task's own instance, not glab's default
ok - the GitHub fetch addresses the task's own URL, not gh's default instance
ok - a rejected --jq attempt contributes nothing to the measured description
ok - the plain view's header is dropped, its description is not
ok - an absent glab is reported once, as the missing CLI
ok - a clean description arms exactly as before
ok - an unreadable description degrades to a warning and the report proceeds
ok - a forge that never answers times out to a warning and the report arms
ok - the merge path records metadata without re-litigating the description
exit=0
Evidence: Full log: tests/fm-documentation-audiences.test.sh (covers the merged docs/configuration.md)

Source: Full log: tests/fm-documentation-audiences.test.sh (covers the merged docs/configuration.md)

ok - documentation inventory classifies every maintained prose surface exactly once
ok - the set of links hidden by code awareness is exactly the pinned samples
ok - classification, setup routing, and maintained-prose scope fail safely
ok - required documentation owner pointers cannot silently disappear
ok - local links resolve while dates, versions, commands, and incident prose remain semantically reviewed
ok - code targets are ignored while an indented list continuation stays validated
exit=0

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 1 info
  • ℹ️ The merge commit body states "This fork's 47 commits of divergence touch none of the files these two commits change; the one file both sides carry, docs/configuration.md, took upstream's new process-event silence section and this fork's FM_PR_DESCRIPTION_TIMEOUT line in separate hunks." The first clause is factually wrong and is contradicted by the second clause in the same sentence: the fork does touch one of the 16 files upstream changed (docs/configuration.md), which is precisely why that file needed a two-hunk auto-merge. The tree is correct - only the narrative overstates. Reported at info because the exception is disclosed in the same breath so no reader is actually misled, and because correcting it would require a second git commit --amend on the merge commit, whose known cost (a non-fast-forward gate ref and a branch rename to fm/fm-upstream-sync-7a) the captain already paid once for the FOLD_VERSION correction. Whether that trade is worth making again is the captain's call, not a merge blocker.
✅ **Test** - passed

✅ No issues found.

  • git log --oneline HEAD..9ce69ac (upstream tip) - 0 commits; git merge-base --is-ancestor confirms both 9ce69ac and pre-merge tip 4d32068 are ancestors of HEAD
  • Per-file blob comparison git rev-parse HEAD:&lt;f&gt; vs 9ce69ac:&lt;f&gt; across all 16 upstream-touched paths - 15 identical, only docs/configuration.md differs (by the fork's one added line)
  • git diff --shortstat f7a387f 4d32068 vs git diff --shortstat 9ce69ac...HEAD - identical stat, proving no incidental change
  • comm -23 &lt;(git diff --name-only 4d32068 HEAD) &lt;(upstream-touched paths) - empty, so the merge touched nothing outside upstream's set
  • git diff 9ce69ac HEAD -- docs/configuration.md and git diff 4d32068 HEAD -- docs/configuration.md - both sides' hunks present in the merged file
  • bash tests/fm-classify-corr-token.test.sh (12 assertions, exit=0)
  • bash tests/fm-procevent.test.sh (53 assertions, exit=0)
  • bash tests/fm-pi-branch-extension.test.sh (24 assertions, exit=0)
  • bash tests/fm-pi-watch-extension.test.sh (37 assertions, exit=0)
  • bash tests/fm-documentation-audiences.test.sh (6 assertions, exit=0) - fork-side suite covering the one merged shared file
  • bash tests/fm-pr-description-guard.test.sh (23 assertions, exit=0) - fork-side suite; includes the FM_PR_DESCRIPTION_TIMEOUT hang-to-warning case
  • Manual regression demo: ran status_open_decisions through the merge-base copy of bin/fm-classify-lib.sh and through HEAD's on the same status logs, covering the hiding case, the stranding case, an untokened control, and a corr=nothex lookalike
  • Manual seam demo: bin/fm-procevent-lavish.sh silent &lt;result&gt; exit status across empty board close, Send & End with an answer, close carrying a late answer, waiting session, and unreadable garbage; plus every other fm-procevent-*.sh adapter to confirm they still announce
  • grep -n FM_OPEN_DECISIONS_FOLD_VERSION at f7a387f (=4) and at HEAD bin/fm-classify-lib.sh:616 (=5), cross-checked against the merge commit body
  • git log -1 --format=&#39;%(trailers)&#39; HEAD - no agent co-author trailer; git status --porcelain clean after testing
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

kunchenguid and others added 3 commits August 26, 2026 00:00
…3093)

* fix(supervision): silence empty board closes and decouple the heartbeat

Two unrelated sources of noise put routine supervision events in the
captain's chat.

An empty Lavish board close - the captain reads a review surface, says
nothing, and closes it - became a check wake whose entire content was
that nothing happened. Suppress it at its source instead of routing it
anywhere: the generic runner gains a `silent` adapter seam mirroring the
existing `terminal` one, and the Lavish adapter answers it for exactly
one positively-determined shape, an `ended` session carrying no queued
content block. A silenced result is recorded durably handled so it does
not return on a later reconcile. Everything else announces unchanged - a
`Send & End` close carrying the captain's real answer, an `ended` result
still carrying content, a waiting or missing session, an unreadable
result, and every adapter that implements no `silent` command at all.
The keyed-answer feed is untouched, so suppressing an announcement never
suppresses the captain's own answer.

A fleet heartbeat was deferred to main merely because some unrelated
check row happened to be sitting unread, which put a routine fleet
review in the chat for a reason that had nothing to do with the fleet. A
check row is permanently main-owned, so it is now excluded from a
heartbeat claim rather than vetoing the scan, exactly as in every other
mode. What all-or-nothing guarantees is unchanged: the branch takes
every branch-ownable unread row or none of them, and an unresolvable
task-local row, an unknown row kind, or an unreadable queue still defers
the whole review to main. Main is still woken for the check on that
check's own triggering close, so nothing starves.

Main-only classes are unchanged and now each covered by a test: Relay
mentions, credential failures, merge confirmations, real board answers,
and watcher-failure repair. The per-actor acknowledgement and
no-cross-swallow properties are untouched.

* no-mistakes(review): Fail closed on all Lavish content headers

* no-mistakes(review): Suppress false unacknowledged status for silenced results
kunchenguid#1967)

* fix(classify): read the decision fold through a correlation token

status_line_verb stripped a trailing [key=...] from a status line's prefix
but left everything else glued to the verb, so a line carrying the
correlation token bin/fm-pending-reply-lib.sh embeds and a secondmate
echoes back matched no arm of _fm_decision_fold_line. Such a line folded as
ordinary status in both directions: a needs-decision or blocked opener never
opened its key, and a resolved or captain-held closer never closed one. The
same glued verb also hid correlated done and blocked lines from
status_is_captain_relevant and status_is_terminal_verb, and let correlated
working and resolved lines leak through the free-text fallback the
nonterminal guard was meant to stop.

The verb parse now walks whole words and drops only a token of the exact
shape a firstmate library writes - corr=<16 hex>, plus the bracketed form
bin/fm-secondmate-report.sh emits - before or after the key token, unkeyed,
or doubled. An arbitrary name=value word is deliberately NOT skipped:
skipping unknown tokens would let free text carrying an equals sign reduce
to a bare verb and impersonate a transition, which is the takeover the
strict parse and _fm_decision_key_transition_allowed exist to prevent. A
prefix with no corr= substring is returned byte-for-byte as before, so every
line without a token keeps its exact historical verb.

FM_OPEN_DECISIONS_FOLD_VERSION goes to 3, because every cursor persisted
under the previous reading carries an open set computed while correlated
lines were invisible and must be rebuilt from byte 0.

Measured over a real 383-line status log: 254 lines keep byte-identical
captain-relevance, pause, terminal-verb and captain-held verdicts, and all
129 changed lines carry a valid token - 14 correlated done/blocked/
needs-decision lines become captain-visible, and 20 correlated
working/resolved lines stop being escalated on prose alone.

* fix(review): Captain, block token-first decision impersonation

* fix(document): Clarify normalized status verb ownership

* fix(classify): reconcile the correlation-token read with the tag-stop parser

Rebasing onto main put this change beside kunchenguid#2280, which made verb parsing
stop at the first "[name=value]" tag. Both edit status_line_verb with
different intents, so the resolution keeps both rules rather than letting
one overwrite the other:

- kunchenguid#2280's tag stop is kept verbatim and now owns every BRACKETED tag,
  including the "[corr=...]" form fm-secondmate-report.sh writes. The
  bracket-unwrapping arm this branch had added to the token test is
  therefore removed as unreachable.
- This branch's token walk is kept and narrowed to the UNBRACKETED token
  fm-pending-reply-lib.sh writes, which the tag stop does not reach.

Two consequences of standing beside kunchenguid#2280 rather than before it:

The fold version had collided at 4: kunchenguid#2280 spent it on the tag-stop
parser and this branch had spent it on the token read. A cursor
persisted under kunchenguid#2280's reading predates this one and must still be
rebuilt, so the version moves to 5.

A bracketed impostor is dropped from the malformed-token list. On main
today "resolved [corr=deadbeef] [key=victim]:" already reads as the bare
verb, as does "resolved [anything at all] [key=victim]:", because the tag
stop ends the parse at the opening bracket regardless of content. That is
kunchenguid#2280's reviewed contract; asserting otherwise here would narrow it. The
unbracketed impostors it owns stay strict and still fold as prose.

Adds a consumer test for the two verb-string case arms that postdate this
branch: fm-supervise-daemon.sh's transient-stale arm and
fm-crew-state.sh's map_log_state.

* fix(review): Captain: Seed cursor migration fixture with version four

* fix(document): Clarify voice status normalization ownership
Brings in two upstream fixes:

- 07bf0c8 keeps routine supervision noise out of captain chat: a `silent`
  adapter seam on the generic process-event runner, answered by the Lavish
  adapter for an `ended` session carrying no queued content, and a fleet
  heartbeat that no longer defers to main merely because a permanently
  main-owned check row sits unread.
- 9ce69ac stops a correlation token from hiding and stranding decisions:
  `status_line_verb` now walks whole words and drops only a firstmate-written
  `corr=<16 hex>` token, so correlated opener and closer lines fold as the
  transitions they are. `FM_OPEN_DECISIONS_FOLD_VERSION` goes from 4 to 5
  so persisted cursors rebuild from byte 0.

No conflict resolution was required. This fork's 47 commits of divergence
touch none of the files these two commits change; the one file both sides
carry, `docs/configuration.md`, took upstream's new process-event silence
section and this fork's `FM_PR_DESCRIPTION_TIMEOUT` line in separate hunks.
Every file upstream touched is byte-identical to `upstream/main` in this
merge, and the merged tree differs from `upstream/main` only by this fork's
own 38 files.
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 54f76c53-b91a-4db2-bba0-d38106ec37c8


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sanis
sanis merged commit 790e925 into main Aug 26, 2026
1 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants