Repository navigation
fix(bearings): repair board listening and decision reconciliation - #3872
Merged
Merged
Conversation
…ile path Three defects made the fleet board go quiet and then lie about what still needs the captain. Never arm a poll on a session that is not live. `lavish-axi <file>` exits 0 even when it refuses to reopen a session the captain ended from the browser, reporting `status: user-ended` with the same session id, so the build's exit-status check accepted a dead session, printed `already-armed`, and left the board reading "not listening". The build now proves the session is live from a fresh authoritative listing immediately before arming - not from the establish call's status alone, which is already stale by then - reopens once when it finds the session ended, and refuses rather than arming when it stays ended. A reopen also replaces the pre-reopen source generation before reporting success, so a runner on its way out cannot be mistaken for a listener, and a board whose source is registered but unowned gets a replacement started before the build returns. Let a dead generation's ownership actually move. Reclaiming a claim ran its capture-reservation cleanup first, and that cleanup re-verifies the recorded state-root identity, so a claim naming a pid and a process group that were both provably gone could not be cleared: reconcile reported a start while nothing attached, and retire refused with "cannot release source ownership". Reservation records are keyed by claim token and every replacement claims a fresh one, so they are hygiene, not an ownership invariant. Reclamation now additionally requires the owning process group to be absent independently, which keeps a reused pid whose poll child still runs from ever reading as a gone generation. A live owner and a crashed leader whose owned group survives are still never reclaimed. Stop carding decisions whose subject already landed. The build drops a decision card whose work item or PR appears in the payload's own landed rows, and one whose task is no longer an open captain call, naming each drop on stderr. A task whose state cannot be established is kept, because a call wrongly hidden is worse than a card wrongly shown. Add the reconcile choice, and make it structurally incapable of closing a call. Every decision card carries a standard `reconcile` option, injected by the build rather than left to the composer. The board now emits the picked option and any freeform note as separate structured fields instead of fusing them, so a reconcile selection is not expressible as an answer value at all - the defect that let `reconcile - <note>` reach the intake as an ordinary answer. The adapter routes selections from that structured field, creation of a reconcile request is bound to a verified board source rather than the shared keyed-answer intake, and the intake still refuses the reserved value on every channel. Each authorization is bound to the captain-hold generation that produced the card, so an obsolete card cannot close a later call, and both terminal outcomes require a pending request: `reconcile close` records the evidence under its own `reconciled` mode so it never reads as the captain's words, and `reconcile note` leaves the call open. Anything unprovable - an unversioned row, a missing generation, an unreadable state - refuses rather than acting. Regression coverage fails without each fix, and pins every leak path: a bare reconcile, a standalone close or note with no pending request, an any-channel reconcile, an annotated selection from a freeform card, and a generation-skewed authorization. An opt-in guard re-proves the lavish-axi shapes and the reopen against the installed tool.
shellcheck SC1010 reads the bare word as the loop keyword. The failed run never reached its lint step, so this shipped in the recovered content.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope. No blocking failure remains. Reviews (2): Last reviewed commit: "no-mistakes(ci): Stabilized the failing ..." | Re-trigger Greptile |
…ializing test-harness Treehouse allocator calls, preventing concurrent recovery spawns from claiming the same pool slot while preserving Herdr concurrency coverage. Verified with the full E2E suite on Herdr 0.8.2, bash syntax checks, ShellCheck, and git diff checks
Intent
Repair the Bearings board across three fronts (captain's evidence-backed package, 2026-09-06). Ship all three as one change.
(1) NOT-LISTENING. A rebuilt board reused an already-ended Lavish session (same session id, prior results weeks old, the session's latest state "ended by user"); the build printed "already-armed" and no poller ever attached, so the board read "not listening." Worse, the source ownership claim named a dead PID (41009) whose whole process group was also gone, yet reconcile twice refused to start a replacement and retire refused with "cannot release source ownership." Main-home verified there were zero live pollers three independent ways, deleted only the stale ownership claim plus its runner record, and reconcile then immediately started a live runner. Two fixes are required:
(2) CARD HYGIENE. When composing the Captain's Call section of the board, omit any held decision whose subject has already landed. Cross-check candidate holds against recently-landed artifacts and closed tasks at build time. Tonight's board wrongly carded the already-merged timeout/reattach work and an already-published quota-axi version (0.1.38 published while 0.1.37 was carded). Include a one-time cleanup of the current stale cards as part of landing this.
(3) RECONCILE OPTION. Every decision card gets a standard "reconcile" choice meaning: verify the latest state, and either close the call with evidence if it is now moot, or leave it open with a note if it is genuinely still active. The handler semantics must be designed first, because a reconcile value must NEVER reach the keyed-answer intake as a blind close - reconcile is "go re-check reality," not "the captain answered." Implement the composer side (offer the choice on every decision card), the handler side (the correct verify-then-close-or-annotate semantics), and tests.
What Changed
Risk Assessment
✅ Low: The changes are well-bounded, satisfy the stated board, reconciliation, hygiene, and ownership invariants, and include behavior-focused regression coverage without a substantiated remaining defect.
Testing
Completed 1 recorded test check.
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
bin/fm-test-run.sh --changed --exclude-family real-herdr-gated✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.