Repository navigation
feat: integrate upstream runtime and supervision improvements - #45
Merged
Merged
Conversation
…re, including absolute paths (kunchenguid#7307) * fix(composer): treat OpenCode >= 1.18 right-aligned cwd:branch as furniture OpenCode 1.18.31 draws the worker pane's working directory and branch right-aligned inside the left-bar composer rows above the Build footer, wrapped over up to three rail-width fragments whose final fragment continues onto the footer row's right end. The fragments are RGB 128 grey with luminance exactly on the ghost-luma ceiling, so they survive ghost stripping, and the left-bar classifier read them as unsent typed text: every idle 1.18.31 pane answered pending, which skipped the steering doorbell, the watcher's re-ring ladder, and /exit typing. _fm_composer_leftbar_cwd_start recognises the run structurally and position-gated: contiguous single-token rows immediately above the footer row whose gap after the bar exceeds half the row, whose fragments plus the footer row's gap-separated right-hand tail concatenate to a path, optionally followed by :<branch>. A path-shaped string typed at the composer's left edge is still typed text, so a wrong call can only defer, never inject. Extraction shares the same rule so extracted composer content stays user-scoped. * no-mistakes(review): drop dead footer-tail concat, add live short-cwd fixture * no-mistakes(review): accept only ~/ cwd rail; lone slash stays pending * no-mistakes(review): require footer row for leftbar cwd furniture walk * no-mistakes(review): Require topmost cwd fragment to carry ~/ prefix * no-mistakes(document): Correct cwd furniture recognition doc to topmost-fragment check * fix(composer): gate cwd rail on region width; correct version story Review round on the independent PR review: the position gate now measures the gap against the region's width (the widest trimmed plain row across first..last), so a short space-prefixed home path typed into an otherwise empty composer no longer reads empty; the right-half lone-token residual is pinned explicitly. The cwd:branch furniture is documented as present since OpenCode 1.18.0 (upstream anomalyco/opencode#36457, merged 2026-07-11), not a 1.18.31 layout change. The 1.18.30 capture comment notes it omits the directory footer, and a cropped-composer extraction assertion scopes user content to the typed row above the rail. * no-mistakes(document): correct OpenCode cwd-furniture version framing and doc typos * fix(composer): accept an absolute cwd rail outside $HOME as OpenCode furniture Refs kunchenguid#4632, builds on kunchenguid#5030. * no-mistakes(review): Harden live abs-cwd check waits and qualify rail comment * no-mistakes(review): Fix composer-lib relative path in OpenCode harness doc * no-mistakes(test): Relax live check's DONE wait for wide OpenCode panes * no-mistakes(document): Separate absolute-cwd verification output block from following prose --------- Co-authored-by: Konrad Heimel <[email protected]>
…mpt (kunchenguid#6682) * fix: name the Claude exit picker on existing stale wakes A pane parked on that picker still read as healthy quiet after Enter was refused. The existing stale and wedge reports now carry the dialog name, including through away-mode escalation. Refs kunchenguid#4754 * no-mistakes(review): fix: report exit picker on terminal-status away stales * no-mistakes(document): docs: describe exit-picker reporting in stale supervision * no-mistakes(review): fix: drop away stale marker when second-mate picker closes * fix: keep the exit-picker name off paths main does not already run A second mate stays exempt from stale capture, and a finished worker in away mode no longer ages into a wedge. The name remains on the stale and wedge wakes a worker already raises. * no-mistakes(review): name the exit picker on wedge deferral reasons * no-mistakes(review): limit exit-picker name to plain stale and wedge escalation
…uid#7308) * feat(afk): Spend-Obergrenze beim Eintritt aus der lebenden Worker-Zahl Ohne ausdrückliches --spend nimmt der Eintritt in den Away-Modus die Zahl der gerade im Home stehenden gewöhnlichen Worker als Obergrenze, damit der Modus laufende Parallelität nicht einengt. Der bisherige Default bleibt Untergrenze, 0 bleibt ausgeschlossen, und ein ausdrückliches --spend gewinnt weiterhin. Die Zählung bekommt mit `live-workers` genau eine Implementierung in bin/fm-afk-contract.sh. bin/fm-spawn.sh liest sie dort statt mit einer eigenen Schleife, sodass Eintritt und spätere Sperre nicht auseinanderlaufen können. * no-mistakes(document): Remove misplaced afk spend-cap plan --------- Co-authored-by: ladwein <[email protected]>
…ion paths (kunchenguid#6965) * fix(bin): guide supervision through completed-scout cleanup * no-mistakes(document): Document completed-scout cleanup ownership and regression coverage * no-mistakes(test): Allow confined lab overrides and verify live scout cleanup * no-mistakes(test): Clarify per-task cleanup reporting and verify live outcomes
…o the job's timeout (kunchenguid#7240) * fix: recheck a worker paused on its own background job A worker that declares `paused:` on its own background job and then misses the job's completion stays idle until the long declared-wait recheck, because the first-sight alert spends the declaration's throttle and nothing else names when the job must have ended. The worker pause instructions now say that `until` for such a job is its start plus its timeout, and the watcher already rechecks once when that time passes. The recovery playbook now tells the supervisor to verify the condition a declared wait names before reporting the wait as healthy. Fixes kunchenguid#7239 * test: give the background-job until test headroom over its quiet round The first absorb round of the until test may take four poll cycles of up to 30 s each on a loaded runner. With `until` only 15 s ahead, that time could pass during the round and fail the test although the watcher behaves correctly. Set `until` 120 s ahead so the window covers those four cycles, as CONTRIBUTING asks of fixture windows. * chore: retrigger CI * chore: retrigger CI * no-mistakes(review): Rebuild bg-job until test with passed until, no sleep * no-mistakes(review): Restore bg-job absorb checks and assert due recheck marker --------- Co-authored-by: pedromuller-del <[email protected]>
…dapter (kunchenguid#6679) * feat: add Command Code crewmate and scout adapter Add `commandcode` as a verified worker runtime for crewmate and scout work only, so Firstmate can dispatch workers on Command Code models such as deepseek/deepseek-v4.1-flash. - Detection: the anchored `command-code` process title identifies the adapter in fm-harness.sh and the shared liveness classifier. - Launch: fm-spawn passes --yolo, --trust, --skip-onboarding, the model, an effort only where the model's accepted set is verified, and the typed launch brief after --; taste-learning state is kept out of git. - Busy state: a tracked mod, bin/fm-commandcode-mod.ts, is loaded per process with --mod and --mod-option, writing run_start/run_end/session end through fm-busy-event.sh; no user or project settings are edited (Command Code's --config persists globally, so it is never used). - Control: one Escape interrupts; the idle double-Escape Rewind picker is a recognized hazard that exit refuses and interrupt dismisses; /quit exits. - Composer: the bright truecolor placeholder is read with an identity-scoped ghost ceiling, and the tmux adapter supplies the identity for a cursor parked below the footer; Herdr reports it natively as `cmd`. - Attribution: the fleet commit-msg strip removes the CommandCodeBot trailer. - Docs, harness reference, verification record, portable regressions, and the FM_COMMANDCODE_SIGNALS_LIVE live guard. * no-mistakes(review): Drop flash-fast effort pairs; correct identity-probe cost comments * no-mistakes(ci): I fixed both Greptile findings the way you asked. Both new regression tests fail on the old code and pass now. The changes are not committed. **ci-1: Command Code on zellij, cmux and orca.** The rule that must hold is that a Command Code worker only runs on a backend that tells Firstmate the pane is Command Code. Without that, its idle placeholder never reads as an empty composer, so steering stalls. `bin/fm-spawn.sh` now refuses `--harness commandcode` unless the backend is tmux or herdr. The error reads: `commandcode is verified on the tmux and herdr backends only; backend=<b> cannot prove its composer empty. Select backend tmux or herdr.` - The check runs after both the harness and the backend are known, so it covers fresh spawns and `--relaunch`. - It runs before any pane, worktree, task record or busy state is created. - New test in `tests/fm-commandcode-harness.test.sh`: tries a scout spawn on each of zellij, cmux and orca (with a fake `orca` that reports ready). It checks for the refusal and that nothing was launched, no task record was written and busy state was not armed. It needs no real backend installed. - Documented in `docs/configuration.md`, the Command Code adapter reference and the `fm-spawn.sh` header. **ci-2: an old process signalling its replacement.** The rule is that the `turn-ended` notification may only be raised under the same generation check as the idle write. The mod used to touch the file itself after the writer returned, which left a gap for a relaunch to slip in. - `bin/fm-busy-event.sh apply` takes a new `--turn-ended` flag. It touches `state/<id>.turn-ended` while still holding the writer lock, after the generation check passes. A stale generation is refused with no touch, and the flag is rejected on any subcommand other than `apply`. - `bin/fm-commandcode-mod.ts` no longer touches files itself. On `run_end` it passes `--turn-ended` unless the turn was interrupted. - New test in `tests/fm-commandcode-harness.test.sh`: a fake writer accepts the idle write and then arms a replacement before the mod continues. It asserts no notification appears. - New test in `tests/fm-busy-state.test.sh`: the notification is raised for the current generation, not for a stale one, and not outside `apply`. **Checks run:** - Passing: `fm-commandcode-harness`, `fm-busy-state`, `fm-busy-adapter-wiring`, `fm-backend`, `fm-documentation-audiences`, and `bash -n` on the changed shell files. - `fm-bootstrap.test.sh` fails one case ("backend=herdr must fail closed on its own missing session CLI"). It fails the same way on an untouched copy of the branch, because herdr is installed at `/usr/bin/herdr` on this machine. - `bin/fm-lint.sh` could not run because ShellCheck 0.11.0 is not on PATH, so the changed shell files have not been linted. **Not changed:** Devin's hook does the same thing outside this PR: it runs `apply ... && touch` in `bin/fm-devin-config.sh`. That predates this PR and is not in the changed area, so I left it alone * no-mistakes(ci): I fixed ci-sc2016. ShellCheck is not installed on this machine, so I could not confirm that the lint warning is gone. **The rule that was broken:** the repo lints with ShellCheck at its default severity, which also fails on info-level notes. Any single-quoted `$` that is meant to stay literal needs a scoped disable comment that says why. Only one place in the changed area needed this: the racing-writer `printf` in `tests/fm-commandcode-harness.test.sh`. Its format string writes `"$2" "$3"` on purpose, so the generated fake writer reads its own arguments when it runs. **The fix:** I added one line just above that `printf`: `# shellcheck disable=SC2016 # positional params expand in the generated writer.` The repo already does this the same way, for example in `tests/fm-afk-launch.test.sh` and `tests/fm-ask-user-authority.test.sh`. Nothing else changed, so the test behaves exactly as before. **Checks run:** - `bash -n tests/fm-commandcode-harness.test.sh` passes. - `bash tests/fm-commandcode-harness.test.sh` passes all six cases, including the busy-mod case with the racing writer. **Not run:** `bin/fm-lint.sh` stops with "ShellCheck not found" because ShellCheck 0.11.0 is not on PATH and there is no copy in the repo. I did not install it, since installs outside the worktree are off limits here. The upstream lint run will be the first ShellCheck pass on this change. The change is not committed * no-mistakes(review): Hard-code Command Code ghost luma ceiling at 160 * no-mistakes(review): Test commandcode relaunch refusal off tmux/herdr before stop * no-mistakes(document): Note Command Code fixed ghost luma ceiling in config docs
Claude spills a hook output over 10,000 characters and shows only the first 2,000 plus a saved-file path. The re-emit prints captain.md and learnings.md last, so they never reached the session. Print a short cue first that names the saved file and the memory files, and document the cap. Refs kunchenguid#6303
…kunchenguid#7302) * fix: retry transient contribution reads once * fix: classify contribution read errors safely Address review findings for kunchenguid#7262 by parsing only gh status forms, recognizing real DNS errors, refusing GraphQL not-found retries, clearing per-URL diagnostics, and restoring exit-137 handling. * fix: recognize bare gh HTTP errors Complete kunchenguid#7262 review fixes by accepting bodyless gh status lines and keeping all GraphQL errors out of transient network classification. * no-mistakes(review): Classify gh network errors by Go error tokens * no-mistakes(document): Note why contribution 404 reads are never retried * no-mistakes(review): Retry message-less GraphQL HTTP 5xx on closing read * fix: retry transient contribution reads once * fix: classify contribution read errors safely Address review findings for kunchenguid#7262 by parsing only gh status forms, recognizing real DNS errors, refusing GraphQL not-found retries, clearing per-URL diagnostics, and restoring exit-137 handling. * fix: recognize bare gh HTTP errors Complete kunchenguid#7262 review fixes by accepting bodyless gh status lines and keeping all GraphQL errors out of transient network classification. * no-mistakes(review): Classify gh network errors by Go error tokens * no-mistakes(document): Note why contribution 404 reads are never retried * no-mistakes(review): Retry message-less GraphQL HTTP 5xx on closing read
…tion (kunchenguid#7338) * fix(bin): let a backlog captain hold bound the watcher's wedge escalation A stuck worker whose task was held for the captain through bin/fm-captain-hold.sh kept wedge-escalating every STALE_ESCALATE_SECS, because wedge_wait_evidence only read the status line. It now also reads the open backlog captain call (task_captain_call_open) and defers to the existing captain-facing long recheck, silent while the away record exists. * no-mistakes(review): Publish no wait age for backlog captain holds * no-mistakes(review): Let an elapsed paused-until line fall through to backlog hold * no-mistakes(document): Document backlog captain hold in wedge wait-evidence contract
…guid#5404) * fix(bin): parse Lavish list-form results and refuse unparsed blocks Lavish emits its queued prompts in TOON list form instead of table form as soon as the items stop being uniform, for example when some annotations carry a nested target object or a message carries an attachments table. The adapter only recognized the table header, so read reported a complete, empty result and answers closed nothing. Move the result parsing into one shared reader used by read, answers, and reconciles that accepts both forms, keeps only column-zero headers, skips nested structures only beneath the field that opened them, and counts anything it cannot account for as malformed. An unrecognized header naming the block is now malformed rather than an empty result, answers and reconciles exit nonzero when the result is not fully accounted for, and the queued-content check treats a list header as content. Refs kunchenguid#4726 * no-mistakes(document): Document Lavish capture formats and incomplete-result handling * test: expect captain_message_count for the open-board list-form capture
…uid#5835) * fix(pi): let the supervision branch claim Orca stale wakes The watcher keys Orca endpoints by terminal=, but the branch dispatcher only indexed window=, so every Orca stale row vetoed the wake scan and went to main. Index both endpoint fields. Local hotfix ahead of upstream; refs kunchenguid#5623. * test(pi): cover terminal-keyed Orca stale rows in branch dispatch Pins the terminal= endpoint lookup: a terminal-keyed stale row queued with another eligible row must resolve to its task in both routine and heartbeat scans, instead of vetoing the wake to main. * no-mistakes(document): Update supervision dispatch doc for Orca terminal-keyed stale rows * fix(pi): reject conflicting wake endpoint ownership Index task keys and window/terminal aliases through one ownership check. Ambiguous records must leave the wake on MAIN instead of selecting the last task and possibly bypassing another owner's open decision. Cover duplicate terminals and collisions with window and task keys in both record orders while preserving unique terminal routing. * no-mistakes(document): Document conflicting alias ownership as scope corruption * fix(pi): retain ownership claims from incomplete task records Check endpoint and task alias ownership before project eligibility so a projectless record cannot lose its open decision to another terminal owner. Require project context before decision filtering can grant routing scope. Cover missing and empty project fields in both record orders, and preserve refusal for a uniquely mapped terminal without project context. * no-mistakes(review): Fix canonical routing ownership and custom SDK event handling * no-mistakes(review): Preserve dedicated custom processing run ownership * no-mistakes(document): Clarify Pi event handling and fail-closed routing documentation
…anches (kunchenguid#7368) * feat(bin): add a forge=external review rail that never pushes task branches A project whose review tool uploads its own snapshot of the worker's local commits can now be registered [direct-PR forge=external]. Workers on such a project never need to push a branch to publish, and must never push a task branch to the shared origin. - fm-project-mode.sh: external joins the closed forge set; never detected, refused on local-only, and +yolo reports yolo=off with a refusal. - fm-dod-lib.sh: external ships direct-PR only; its first rule forbids origin and task-prefixed pushes, its Definition of done renders the home's config/external-review.md adapter verbatim, and the ready-report gate accepts `done: review <url> uploaded for review` on the URL alone or, with a recorded backup remote, once HEAD is on the backup namespace. - fm-git-push-guard.sh (new): per-task pre-push guard refusing pushes to origin or a URL matching origin's, task-branch and task-prefixed refs on any remote, and refs outside the backup prefix on the backup remote. - fm-git-strip-ai-trailers.sh: install gains --push-guard and --no-strip. - fm-spawn.sh: refuses yolo, a missing adapter, and an unusable backup remote before launch; installs the guard even under keep-ai-trailers; and records forge=external, backup_remote=, and backup_prefix=. - fm-review-check.sh (new): records review= and review_head= with no merge watch, and publishes the child's ready line in a secondmate home. - fm-promote.sh refuses promotion onto forge=external, because a scout launches without the guard. - Docs: docs/external-review-forge.md (design), configuration.md's new "External review tool" section, scripts.md, and the ship-landing and project-management skills. * no-mistakes(review): Drop string-grep hook assertion from external-review spawn test * no-mistakes(document): Note forge=external contract token and direct-PR-only composition
…uid#7387) Ein Lauf, den sendCustomMessage startet, traegt eine Custom-Nachricht und keinen prompt. Das Lesen des prompt an dieser Stelle warf, womit jeder solche Lauf mit einem Fehler auftauchte statt zu starten. Die Verengung dagegen steht seit 8c9c67d im Zweig, ein Test, der sie benennt, fehlte: die einzige Abdeckung lag beilaeufig in einem Abbruch-Fall der Abwesenheits-Haltung und verschwindet mit ihm. Der neue Fall erweitert den bestehenden Mirror-Test und prueft, dass ein solcher Lauf weder wirft noch als Dialog gespiegelt wird. Gegenprobe: ohne die Verengung wirft genau dieser Fall mit "Cannot read properties of undefined (reading 'trim')". Co-authored-by: thelad-dev <[email protected]>
…nchenguid#7409) * fix(tmux): verify exact endpoint membership * fix(tmux): preserve exact target forms * test(tmux): align endpoint fixture lifecycles * test(tmux): guard isolated cleanup and shell reader * no-mistakes(review): Limit tmux .pane target split to window indexes
… plain row (kunchenguid#7395) * fix(bin): stop misreading opencode's own footer as pending composer text An idle OpenCode composer classified as `pending`, and that verdict gates every typed-plane action firstmate owns: fm-send skips the doorbell, and fm-control refuses both relaunch and exit. A firstmate operator lost a full session to it and had to type into worker panes by hand three times. Root cause: opencode 1.19 draws the mode/model footer's identifying cells de-emphasised (mode word RGB 67;133;190, middle-dot separators 111;110;105, luminances ~119.8 and ~109.7, both under fm_composer_strip_ghost's 128 threshold). That helper exists to answer "what did the human type?", so it deleted exactly the cells that identify the footer. The `^(Build|Plan)` anchor then became unreachable on every styled backend - tmux, Herdr, and Zellij - not just one pane, because the unstyled row keeps its styling bytes everywhere. The fix proves the footer from both forms of that row: the ghost-stripped content and the ANSI-stripped plain row. Proving it on the form ghost stripping cannot reach is the whole repair. What makes that safe, and why the previous argument was not: the earlier draft argued safety by noting that on a plain capture the two forms collapse to one string, so the verdict is unchanged. That is true and carries no weight, because styled=0 is the only configuration where the new proof does nothing. The exemption is safe because a row reaches the plain form only when the ghost-stripped row still fails the pattern, which means the stripped content is non-empty while its own leading Build/Plan cell was deleted as ghost. Nothing opencode draws de-emphasises a typed row's leading cells - only its furniture is drawn dimmed - so the only rows the plain form admits beyond the stripped one are de-emphasised furniture, and the mode footer is the only furniture opencode draws that opens with a mode word. That is self-confirming rather than asserted, and it is the argument to recheck when a new opencode release moves a colour. A review also caught a second change riding along in the same diff: the footer pattern had been widened from `[[:space:]]+` to `[[:space:]]*`, admitting `Build ·x` and a bare `Build ·`. Both read as more typeable than the footer, so they moved the verdict in exactly the direction this rule exists to prevent. No recorded opencode footer ends at the dot, so the original `+` matches every real capture and the widening is reverted. Verification: - fm-lint.sh exit 0 on pinned shellcheck 0.11.0 and actionlint 1.7.12. - fm-doc-audience-check.sh ok across 119 surfaces and 757 local links. - tests/fm-composer-lib.test.sh green via bin/fm-test-run.sh. - The new regression case fails on exactly one assertion when this change is reverted: "opencode 1.19.0 de-emphasised footer row: expected empty, got 'pending'", which is the reported symptom. - Confirmed end to end against live panes rather than only fixtures: a real idle opencode 1.19.0 worker classified empty after the change and pending before, and firstmate reached the worker over the steer channel afterwards. * no-mistakes(review): fix(bin): apply leftbar footer rule in content extractor; correct cursorless claim * no-mistakes(document): document opencode 1.19 footer furniture and extractor coverage * no-mistakes(document): document ghost-luma knob coupling to opencode footer furniture * no-mistakes(document): document opencode de-emphasised footer recognition invariant * no-mistakes(review): fix(docs,bin): correct ghost-luma knob direction, gate plain-row extraction * no-mistakes(review): fix(docs,bin,tests): correct ghost-luma knob wording, share plain-content helper, cover Herdr/Zellij idle * no-mistakes(document): narrow overstated backend coverage claim in runtime-backends.md * no-mistakes(document): document leftbar footer override and opencode 1.19 pointer
…7406) Der Kopf des Tests sagt, jedes Programm werde so gestartet, wie bin/fm-spawn.sh es startet. Im codex-Zweig von launch_cmd fehlte dabei --disable hooks, das fm-spawn im crewmate- und scout-Pfad setzt. Ohne den Schalter parkt codex auf dem Hook-Vertrauensdialog ("N hooks are new or changed"), dessen Auswahl auf "Review hooks" aufsetzt und der mit der Tastenebene dieses Werkzeugs nicht beantwortbar ist. Der Lauf meldet dann die Tuerklingel als nicht befolgt, obwohl er ueber die Tuerklingel gar nichts ausgesagt hat - und das auf jedem Checkout, weil schon die projekteigene .codex/hooks.json den Dialog aufzieht. Dazu eine knappe Zusicherung am Startrezept, damit der Schalter beim naechsten Umbau nicht wieder still ausfaellt. Co-authored-by: ladwein <[email protected]>
…kunchenguid#7096) * fix(bin): store only classified review fields in contribution records A pull observation stored GitHub's raw reviews payload, so a PR with a few hundred reviews wrote a record past the 1 MiB read cap and every pending, verdict and ack read then refused the whole home. Project each stored review to id, state, submitted_at, commit_id and user.login, the only fields the classifier reads, and add a many-review regression. * no-mistakes(document): clarify contribution record read cap in script header
…7216) * fix(pi): retain custom-event handling and processing cancellation * fix(pi): identify custom triggers before legacy prompt narrowing * no-mistakes(test): Correct branch fixture retirement and verify real notification ownership * no-mistakes(document): Clarify Pi event boundaries and verification scope * fix(pi): retain custom-event handling and processing cancellation * fix(pi): identify custom triggers before legacy prompt narrowing * no-mistakes(test): Correct branch fixture retirement and verify real notification ownership * no-mistakes(document): Clarify Pi event boundaries and verification scope * no-mistakes(review): Fix SDK1.1 prompt staging and verify branch context * no-mistakes(document): Clarify SDK prompt compatibility and branch-context verification * no-mistakes(test): Require dual-SDK compiler checks; execution remains pending * no-mistakes(document): Correct SDK typecheck documentation and stale dependency claims * no-mistakes(document): Correct stale Pi typecheck documentation and ownership pointers * no-mistakes(ci): Fixed SC2329 in tests/fm-pi-primary-types.test.sh by inlining EXIT cleanup. Also fixed a reproduced macOS npm-prefix/lockfile path failure without changing dependency pins or assertions. Canonical targeted lint, strict TypeScript 5.9.3 checks against Pi 1.1.0 and 1.2.0, and success/failure cleanup checks pass. Both behavior-shard failures were upstream npm ETARGET errors in workflow steps unchanged from base; no workflow/runtime changes warranted. Hosted CI remains for the outer executor * fix(test): reconcile queued processing probes after rebase * no-mistakes(document): Correct Pi compiler-phase documentation and stale CI comments
…guid#6380) * fix(cursor): verify cursor-agent by running it, not by name Cursor's installer writes its `cursor` IDE shim through the ~/.local/bin/cursor -> cursor-agent symlink, which can replace a versioned cursor-agent with a script that only prints "No Cursor IDE installation found" and exits non-zero. That file keeps Cursor's own name and install-tree path, so the name shortcut (and the structural check alone) accepted it and every Cursor spawn launched the broken file instead of the working agent alias. A launch candidate now has to print Cursor's CLI identity under the bounded probe, or carry the structural evidence and run --help successfully. Hosts without a bounded runner keep the structural verdict, as before. * no-mistakes(document): Align cursor launch-verify docs with runtime * no-mistakes: apply CI fixes * test: restore fm-watch-triage ack_stopped_cycle assertion The CI fix round loosened ack_stopped_cycle so a drain that prints no acknowledgement command and exits zero counts as success. That test is unrelated to the Cursor executable verification this branch changes, so restore its original assertion rather than mask a watcher failure here. * no-mistakes: apply CI fixes * no-mistakes: apply CI fixes * no-mistakes: apply CI fixes * fix(bin): restore fm-afk-contract clock sampling A CI fix round changed how fm_afk_contract_cmd_enter samples its epoch. That away-mode behavior is unrelated to the Cursor executable verification this branch changes, so restore it here and leave any fix to its own change. * fix(cursor): load the timeout library only when a probe runs Sourcing bin/fm-timeout-lib.sh at load time made every consumer of fm-cursor-lib.sh, including the session-lock and turn-end hook paths that never probe, depend on that file being next to it. Load it lazily from the probe instead. * no-mistakes: apply CI fixes * no-mistakes: apply CI fixes * no-mistakes: apply CI fixes * test: restore herdr focus-flash e2e test A CI fix round edited this Herdr end-to-end test, which is unrelated to the Cursor executable verification this branch changes. Restore it here and leave any fix to its own change. --------- Co-authored-by: ladwein <[email protected]>
…#7422) * fix(dod): require a PR reference in CI-ready notes * no-mistakes(review): Recognize Forgejo plural pull request URLs
…ts view (kunchenguid#7434) * feat(herdr): opt-in project groups with status tags and a sorted agents view Add config/herdr-project-groups (absent or off: unchanged behavior). When on, Firstmate tags each Herdr task pane, and its own projected workspace, with display-only fm_group/fm_state/fm_task/fm_sort tokens, sets a Herdr agents view sorted by group then status (needs-captain, problem, running, done), and places a new projected task at the end of its own group inside the parent block with the same single verified move as before. The watcher reconciles tags once per poll and a spawn tags its task at once; bin/fm-herdr-groups.sh also previews (plan), clears, and prints or appends suggested sidebar rows with a backup. The agents view helper needs python3. The only test-runner change is the serial weight hint for the new suite. * docs(herdr): record the live lab check of project groups The four hand checks for tags, the sorted agents view, placement at the end of the group, and clear passed against a real Herdr 0.9.5 server (protocol 22) in a guarded lab session. * docs(herdr): align project group verification notes with the live check
…guid#7410) ps -o lstart= renders in the caller's locale, so a lock or claim owner recorded under one locale (de_DE renders "Di Okt 13 ...") failed identity verification under another, was declared dead, and a second worker split the queue: two serve loops reclaimed and reaped each other's live jobs, which vanished mid-claim and failed staged jobs with exit 125 and no output. Pin LC_ALL=C in fm_remote_job_process_start and pin the cross-locale invariant with a regression test. Co-authored-by: researchworldwide2026 <[email protected]>
* Guard fm-crew-state overrides by task-name basename bin/fm-crew-state.sh honours FM_CREW_STATE_META_OVERRIDE and FM_CREW_STATE_STATUS_OVERRIDE only when the override's basename is the requested task's own .meta or .status file name. An override naming a different task, for example one inherited through a server started inside another task's snapshot child, falls through to the task's own records under the state directory. A snapshot's own override, which names the task it was captured for, is still honoured. This is complementary to kunchenguid#5622, which keeps the overrides out of the Herdr server launch: whatever path leaks an override, the reader never trusts one that names a different task. Regression tests cover a mismatched override being ignored and a matching one being honoured. * no-mistakes(review): Make metadata override tests behaviorally distinct
…kunchenguid#7415) * fix(bin): re-anchor a Claude session's lock so /clear keeps ownership A same-session confirmation over a live lock line 1 outside the current harness ancestry now rewrites line 1 to the session's CLAUDE_PID anchor under the claim lock, so a later /clear re-key in the same process is still proven by ancestry instead of being refused as a foreign owner. Fixes kunchenguid#6820 * fix(bin): move task leases with a session-lock re-anchor A same-session re-anchor rewrote lock line 1 off a live pid while task leases still named that pid, so a lease held by main or the supervision branch read as stale and the other actor could claim the task. The re-anchor now takes the lease-command lock after the claim lock and, in the same critical section as the line-1 write, rewrites leases recorded against the old pid to the new anchor (fm_lease_rekey_holder). If the lease-command lock stays busy past a short bound, the confirmation keeps line 1 as before and a later acquisition re-anchors. The foreign-owner reproduction now asserts the re-anchor contract: the same trusted id from a live process outside the owner's ancestry moves line 1 onto that process's CLAUDE_PID, and a different id is refused against it afterwards. The ancestry membership loop is shared through one session-lock lib helper. The earlier commit dropped the ancestry suite's dead-front-end reclaim phase; that coverage lives in the existing reclaim tests (test_verified_reclaim_keeps_new_sidecar and the Stop auto-arm's test_reclaims_stale_session_lock_before_arming). * fix(bin): record the lock holder for a lease pinned before a re-anchor The supervision host pins FM_LEASE_HOLDER_PID to lock line 1 at the start of each engine turn. A same-session re-anchor inside that turn moved line 1 to a new pid while the pinned holder stayed alive, so a later claim or same-actor refresh in the turn recorded the old pid and the lease read stale, letting main claim the branch's task. A claim now records the live line 1 when the pinned holder is alive but is no longer line 1. Another session takes the lock only from a dead owner, so that state comes from a re-anchor; a dead pin is still recorded as before and its lease stays stale. * no-mistakes(review): Move auto-arm rewake session pid with lock re-anchor * no-mistakes(review): Align startup-network downgrade test and lock-rewrite comment * no-mistakes(review): Correct lock takeover and re-anchor signal-window comments * no-mistakes(review): Record re-anchor rewake and pinned-claim verification evidence * no-mistakes(document): Update network-checks diagnostic for re-anchored lock holder
* feat(bin): watch a tool's published version through version_url A watched tool whose CLI never announces its own updates can name a version_url; the document is fetched read-only inside the probe bound, its first dotted number is the published version, and an update is reported when that is newer than the version PATH resolves. Claude Code is the shipped example entry. * no-mistakes(review): Compare published versions against newest installed tool copy * no-mistakes(document): Clarify watched-tool version URL documentation
…mand loads them (kunchenguid#7287) * fix(pi): keep a live session's extension markers when a nested Pi command loads them A short-lived Pi command started from inside a live session, such as the `pi --help` capability probe, auto-loads the two primary extensions. Both treated the session lock as owned because an ancestor holds it, so the child rewrote `.pi-watch-extension-loaded` and `.pi-turnend-extension-loaded` with its own pid and exited. Session start then rejected the markers and printed a false `PI_WATCH_EXTENSION: not loaded` alarm. Before writing, each extension now reads the marker's pid and leaves the marker untouched when that pid is a live strict ancestor of the current process. A missing marker, a dead pid, the current pid, or a live pid outside the ancestry still writes as before, so a fresh start and a relaunch over a dead session bind unchanged. Lock ownership and the reader are untouched. Fixes kunchenguid#5202. * fix(tests): drop apostrophes from the nested-load marker heredocs so stock Bash 3.2 parses them
* fix(bin): supersede an orphaned Claude auto-arm claim after a session restart
An auto-arm claim is open only while its owner still descends from the session-lock pid.
A hook whose session exited mid-cycle stays alive with no parent to receive its exit 2, so deferring to its claim left the home unsupervised until the next session turn.
The replacement session's first Stop now takes the next generation, attaches to the running watcher, and delivers the wake itself, while the orphan goes silent.
A claim with no readable numeric session lock is never open.
* no-mistakes(review): accept pid-1 ancestor and session-id-matched autoarm claims
* no-mistakes(review): pin autoarm session-id claim signal to lock holder pid
* no-mistakes(review): exercise real lock recovery in orphan supersession tests
* no-mistakes(review): record lock-holder pid-identity instead of bare pid
* no-mistakes(document): complete autoarm claim-open coverage list
* no-mistakes(ci): Greptile finding ci-1 (hidden session-lock dependency in bin/fm-wake-lib.sh) fixed. Invariant: every function fm-wake-lib.sh calls must either be defined in that file or explicitly loaded by it before the call, so a caller sourcing only the wake library cannot silently degrade. Violating sites in the changed area: fm_autoarm_claim_open's fm_session_lock_recorded_session_id call, and the sibling writer fm_autoarm_claim_next's fm_session_lock_trusted_session_id call (which would otherwise silently omit the two new ledger fields). Both fixed at one shared boundary: a new lazy loader _fm_wake_require_session_lock (bin/fm-wake-lib.sh:38), matching the file's existing _fm_wake_require_classify/_fm_wake_require_timeout idiom, invoked immediately before each call. Lazy rather than top-level source so the ~40 scripts sourcing the wake library pay no harness-identity machinery cost; no circularity (fm-session-lock-lib.sh sources only fm-cursor-lib.sh). No new behaviour, state, or fallback. Verification: sourcing only fm-wake-lib.sh, a claim with broken ancestry plus matching sidecar id and matching recorded lock-holder identity now reads OPEN and the session-lock library is loaded on demand; ordinary descent path unaffected. Suites tests/fm-claude-stop-autoarm.test.sh, tests/fm-turnend-guard.test.sh, tests/fm-wake-queue.test.sh all pass; shellcheck -S warning reports only the pre-existing SC2034 present on HEAD. tests/fm-session-lock-ancestry.test.sh fails its final case ("the pty-host was not reparented to init after the daemon ended") identically with the change reverted, so that failure is a pre-existing WSL environment behaviour, not caused by this fix
* no-mistakes(document): Clarify auto-arm claim documentation
) * wip: polytoken worker adapter (detection, launch, wiring, control, composer; tests mid-iteration) * feat: verify the polytoken worker adapter (crewmate + scout) Add polytoken 0.8.19 as a verified crewmate/scout adapter on the captain-approved TUI-pane-plus-REST hybrid: the pane keeps inspection and backend parity while the control verbs ride the session daemon's typed REST API. Detection is ancestry alone on the anchored polytoken comm (a tool subprocess's parent is the session daemon, verified live), with the launch boundary clearing every foreign ORCA_/FM_ marker plus the fixed harness-identity set. The launch generates the per-task worker config dir (mirrored operator config with the unattended permission posture enforced, because a project config.yaml fully replaces the global config), the worker role-contract facet (no model pin, delegation and facet switching denied at the tool registry), and the worktree hook layer binding the verified busy pair - pre_user_prompt and pre_model_turn open, stop closes - to a no-argv generated writer. The readiness gate binds the session id, port, and credential into task metadata through sessions --format json and fails loudly on any first-start dialog, because the license terms are a blocker by captain decision and --accept-license-terms is never passed. Interrupt is POST /turn/cancel with its typed settle (the TUI has no interrupt chord, so no key is ever improvised), exit is /quit, and a cancelled turn's busy close is written by the control plane because no stop hook fires. The composer is the verified separated shape with polytoken as its second owner, and Enter mid-turn queues, so the busy-queued conversion applies. Crewmate and scout only: a secondmate launch is refused, and a project's own .polytoken/hooks.json is refused rather than clobbered. * no-mistakes(review): Fix polytoken launch flag order, token argv, live guard * no-mistakes(document): Correct polytoken REST doc comment and token-on-stdin invariant * no-mistakes(lint): Silence intentional SC2016 in polytoken live guard treehouse shim * no-mistakes(review): Retire polytoken pool wiring, drop FIFO config, test env clearing * no-mistakes(review): Scope polytoken teardown wiring removal to untracked polytoken files * no-mistakes(review): Refuse existing polytoken hook layer before writing any wiring * no-mistakes(document): Note teardown as consumer of harness wiring-path table * no-mistakes(review): Retire only firstmate-generated polytoken worktree wiring * no-mistakes(review): Guard polytoken hook layer before relaunch cleanup arms * no-mistakes(document): Note relaunch also skips git-tracked wiring paths * test: stub polytoken in the refused-relaunch fixture The refused relaunch onto polytoken resolves the polytoken binary before its hook-layer refusal, so the case failed on CI hosts without the real CLI installed. A no-op stub on the fixture PATH stands in; it is never launched. * no-mistakes(review): Guard polytoken interrupt close; refuse whitespace hook paths * no-mistakes(review): Snapshot busy record after cancel settles before idle close * no-mistakes(review): Guard interrupt close with pre-cancel snapshot and sync recheck * no-mistakes(test): Clear inherited AGENT at the polytoken launch boundary * no-mistakes(document): Document guarded polytoken interrupt close and whitespace refusal * test: preserve Polytoken hook refusal coverage with explicit pins * no-mistakes(review): Refuse invalid Polytoken relaunch profiles before stopping the worker * no-mistakes(document): Document Polytoken relaunch refusals before stopping the worker * fix: scope worker wiring cleanup to Polytoken * fix(bin): point Polytoken workers away from tool_flow for the task directory Polytoken 0.9.0 offers no launch-time path grant: tool_flow's file_read refuses the Firstmate task directory while the direct file tools reach it under the generated bypass matcher. The worker facet now says so, and the verification record carries the live evidence. * fix(bin): leave the pool as found when a fresh spawn fails A fresh spawn that fails and leaves no task record now closes the endpoint it opened before its launch was delivered, so the shell whose treehouse get leases the slot ends and the pool gets the slot back. It also removes the harness wiring, task temp root, and staged launch file it wrote, and drops its slot claim under a retaken project lock after metadata publication. * no-mistakes(review): Stop pre-launch refusals pointing at windows abort cleanup closes * fix(bin): scope failed-spawn cleanup and the Running-for busy row to Polytoken The failed-spawn pool cleanup and the Running-for busy row now apply only to Polytoken, so every other harness keeps main's abort behavior, header text, operator messages, and harness-less busy union. Tests prove the Polytoken path cleans up and a non-Polytoken refused launch behaves as on main. * no-mistakes(review): Scope submit-core busy reads to Polytoken pane identity * no-mistakes(review): Stop polytoken treehouse isolation refusal pointing at closed window * test: track the spawned window in the Polytoken harness tmux stand-in Main now requires exact tmux window membership before sending keys (aa9ab04), and the Polytoken harness stand-in listed no windows, so the merged spawn could never deliver Enter. Record the created window, list it, and forget it on kill, as tests/fixtures.sh does. * no-mistakes(document): Scope fresh-endpoint abort comment to Polytoken spawns * no-mistakes(ci): Lint 1 (ci-3) was caused by this PR, and I fixed it. Commit d18014e added the in_polytoken_submit_pane() subshell helper to tests/fm-polytoken-harness.test.sh. That helper sources bin/fm-tmux-lib.sh without the `# shellcheck source=/dev/null` line that every other source in the file carries (lines 55-63 and 200). With --external-sources, ShellCheck followed the library into the subshell and flagged `local pid=$!` at line 690 as SC2031. The fix is that one missing line, added above the source at line 318. After the fix, `shellcheck -x` reports nothing on the file, `bin/fm-lint.sh tests/fm-polytoken-harness.test.sh` passes with full extended analysis, and the Polytoken harness test passes. Behavior portable serial 2 (ci-1) and serial 5 (ci-2) failed in timing-sensitive tests this PR does not touch, so I made no code change for them. I reran both test files in full on this branch on macOS, and both passed (rc=0, no failures). tests/fm-supervision-host.test.sh passed, including the 'host-only transition veto changed Pi's existing offer rule' check that failed in CI. tests/fm-remote-secondmate-lifecycle-e2e.test.sh passed, including 'watch liveness: a dead remote secondmate is auto-relaunched on its own host with one wake'. Main's own recent CI runs (38950070853, 38719784765) also failed on different timing assertions in these serial shards. Together that points to runner flakes rather than a defect in this change * no-mistakes(review): Retake per-id spawn lock before Polytoken abort deletions * no-mistakes(document): Document per-id lock guard on Polytoken abort cleanup --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
…uid#6330) * fix: update green behind PR before merge * no-mistakes(review): Update behind PRs for any method; await UNKNOWN * no-mistakes(review): Cap update-branch wait under merge locks * no-mistakes(review): Fix stale update-wait header comment * docs: clarify branch update authority * fix(merge): require branch-update consent and stop on failure * no-mistakes(review): Await UNKNOWN after waivers; report unreadable post-update state * fix(merge): pin branch update to checked head Send expected_head_sha with the REST update so a concurrent push cannot advance an unchecked replacement head. Refuse a head mismatch without retrying against the new head. * no-mistakes(document): Clarify branch-update consent, head pinning, and polling guidance * fix(bin): stop waits on non-check refusals Pending or missing checks must not mask draft, state, conflict, or required-check read refusals after a branch update. * no-mistakes(review): Refuse blockers while awaiting updated pull request heads * no-mistakes(document): Document immediate refusals during branch update polling
* fix: reap Perl timeout groups when callers are interrupted * no-mistakes(review): Preserve caller signal handlers after timeout runner cleanup * no-mistakes(review): Prevent startup interrupt loss and remove parent-death cancellation * no-mistakes(document): Correct timeout fallback comments and remove stale duplication * fix: preserve interruption status and use monotonic timeout clocks * no-mistakes(document): Correct timeout contract references and document monotonic timing * no-mistakes(review): Preserve active traps in Perl timeout cleanup * no-mistakes(document): Clarify Perl timeout trap restoration
…#7923) * Preserve independent watcher history for distinct endpoints * no-mistakes(review): Complete shared watcher-marker key migration * no-mistakes(document): Document shared watcher marker identity * no-mistakes(ci): Fixed SC1091 by adding the daemon’s missing ShellCheck source annotation. Focused full-analysis lint, bash syntax validation, and git diff --check passed. Tier 2: the existing lint gate enforces this correction; no runtime redesign was needed * no-mistakes(ci): Implemented bounded SHA-256 endpoint keys and a failing-first long-endpoint regression, which now passes. ci-1 remains unchanged as unrelated. Incomplete: focused lint reports SC2030/SC2031 in fixture setup. The command guard rejected focused testing as indirect execution. Stopped without bypassing or retrying. Pipeline must resolve lint and finish verification * test: scope watcher fixture environment to child commands * docs: explain watcher key upgrade reset and cache cleanup * no-mistakes(test): Confirm six required scenarios pass; exclude optional Codex probe * chore: remove accidental validation scratch * no-mistakes(document): Replace obsolete watcher-key comment with owner pointer * no-mistakes(review): Use shared keys in Pi-stream fixtures * no-mistakes(document): Deduplicate watcher marker cleanup guidance
* test: wait for recovered orphan-readiness runners instead of a fixed marker poll The lifecycle-orphan-readiness section polled each recovered source's handled marker for a fixed 10s after reconcile. Reconcile only confirms each launch; each runner then polls, captures, takes a silent verdict and a terminal verdict, and the two runners take their verdicts in turn under the home's extension lifecycle lock. On a CPU-starved host that chain of short host and fixture processes can exceed 10s, so the section flaked. Wait for the recorded runner process groups to exit, bounded by the coordinator's section-lane deadline, then assert the handled markers, retirement and claim release. On timeout, kill the recorded runner groups and sweep the home before failing, and track the home so any exit sweeps it. * no-mistakes(review): Bound recovered-runner wait to coordinator deadline
… (kunchenguid#8192) * test: cover TypeSafe dispatch base URL configuration * test: compare the recorded TypeSafe endpoint argument * feat: allow an explicit TypeSafe dispatch base URL * no-mistakes(review): Use literal TypeSafe endpoint test expectations * no-mistakes(document): Correct TypeSafe base URL documentation * no-mistakes(ci): Implemented ci-2 and ci-3: malformed TypeSafe addresses fail before credential lookup, and both curl paths disable URL globbing. Added focused regressions. Tier 1 fixes address the shared boundaries. Configured local lint passed. Required ci-box tests and the documentation audience check remain unverified. The command guard rejected the inspection/preflight command as “Privilege escalation in chained command.” No retry or bypass was attempted * fix: reject brackets in TypeSafe base paths * no-mistakes(review): Narrow TypeSafe host validation * no-mistakes(document): Clarify TypeSafe base URL documentation * test: isolate dispatch base from exported settings
…rk (kunchenguid#8030) * fix(teardown): refresh remote refs before refusing work as unlanded Teardown read landed work from the task copy's remote-tracking refs, so work pushed from another checkout was refused until someone fetched by hand. Refresh each remote, bounded and without pruning, when the refs do not show the work. A failed refresh leaves the refs as they were, still refuses, and names the remote in the refusal. * no-mistakes(review): Use fixed 30-second fetch bound, removing timeout override * no-mistakes(ci): Final state, replacing the earlier reports: the fix is in the worktree, uncommitted. The full run of tests/fm-teardown.test.sh did NOT complete: it was stopped at the 20-minute background limit after about 126 of 156 tests. All 126 passed with no failures, including the new test. The remaining ~30 did not run, so the outer test phase must run the full file. Change: validate_worktree_teardown_safety re-runs the dirty check through read_worktree_dirt right after refresh_remote_refs and refuses the same way if it fails or finds work. Added one test, test_edit_saved_during_refresh_refuses, covering local-only, direct-PR and no-mistakes modes. Kept the timed-out agent's code change; removed its extra second test and fake-git hook, per the one-test instruction. Verified: the new test failed with the recheck removed and passed with it restored. bash -n on bin/fm-teardown.sh passed. Not verified: shellcheck is not on PATH, so it did not run. The path where the recheck itself cannot read the copy has no test, per the one-test instruction. Partial log: /tmp/fm-teardown-full.log
Take upstream through bf05a4f. Drop the six-column bearings board and its GitHub fleet-board sync. Keep Jobs page, away-mode, composer, Codex launch, treehouse lease, and stopped-helper behavior where upstream has not already replaced it.
Restore procevent_surface_queued and procevent_surface_after_output, and keep the inbox-row skip inside them. Drop the stale supervision-host split selection test. Give the single-pin account spawn its own worktree so the durable Treehouse lease on the first spawn does not block it. Record duration hints for the three fork suites that pushed the serial unmeasured share over the coverage guard.
The spawn-slot suite's serial hint was 218000 ms, below its 284000 ms local sample. With that measured weight, eleven serial shards pack every bin above the 1200000 ms budget. Twelve shards bring the heaviest bin back under that budget, and the normal-tier job timeout stays the hang tripwire.
…and archive leftovers
…107-s1 # Conflicts: # .agents/skills/afk/SKILL.md # bin/fm-supervision-host.sh # docs/supervision-host.md # docs/supervision-protocols/supervision-host.md # tests/fm-remote-secondmate-lifecycle-e2e.test.sh # tests/fm-supervision-host.test.sh
Ordinary and Herdr spawns follow upstream treehouse get again, and the JSON lease preflight stays on t3code. Teardown matches the current task's slot claim to FM_HOME when its state directory is overridden.
The t3code CLI probe runs after the project-policy refusals, so a tracked config refusal still happens before any treehouse call. A herdr pool lease held by the same task satisfies a retained record that has no JSON lease. Teardown of an unclaimed t3code record still removes the env files it wrote and returns the slot. The test treehouse treats an unconditional return of an unlisted path as a no-op, and a conditional lease return of a missing path still fails.
Slot lease helpers and the spawn steps that acquire them move to bin/fm-treehouse-slot-lib.sh. Wake still loads them, and that file is its own lint root. Source-aware shellcheck of bin/fm-spawn.sh no longer parses that body, which crossed the 8G resident cap.
Herdr records the task id as the pool lease holder and writes no treehouse_lease lines. Teardown treated that held copy as an unverified reservation and refused. A holder that matches this task is that reservation. A holder that does not match still refuses.
Queued-check delivery markers use process substitution. Parsing them inside the source-aware check of bin/fm-spawn.sh crosses the 8G resident cap. They now live in their own lint root, and the reservation preflight lives with the other slot helpers.
The presentation abort fixture's treehouse get exits empty, so it takes no slot and leaves no allocation.json. Requiring that journal conflicts with the upstream lease. An orphaned herdr record likewise has no lease fields, and retiring it no longer demands them.
Herdr leases with treehouse get --lease and writes no acquisition journal. Abort cleanup was still calling the journal return, so a clean aborted lease stayed taken. It now uses treehouse return --force, which is what upstream does.
The 8G resident cap still kills the source-aware check of bin/fm-spawn.sh after the earlier splits. The fork-only brief pointer, lease probe, journal retain, and closing-epoch watch now live in their own lint roots. The followed graph is smaller than upstream, which passes this partition.
A bare call to the lease helper makes the source-aware check of bin/fm-spawn.sh exhaust the 8G resident cap. Repeating the path the helper already stored, through a command substitution, brings that check back in line with upstream.
A source-aware check of bin/fm-spawn.sh exhausts the 8G resident cap on this branch and on upstream. Upstream passes because that memory failure is retried once without source following. The merge kept the retry behind FM_LINT_MEMORY_FALLBACK, so the same exhaustion failed the lint partition. The lint test and the portable-shard note now expect that default retry. The 16 GiB address-space default stays.
This was referenced Nov 9, 2026
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
Q1873 (2026-11-07): "Start the upstream update job? Y = start the update job: a worker merges upstream into our copy keeping our local fixes, a check by the other model family, then a firstmate PR for your merge word". Answer: "q1873 y can we safely use deepseek & grok for that? also we can drop six-column board - i don't use it anymore".
Context: upstream kunchenguid/firstmate main (head bf05a4f, 2026-11-06) has about 188 changes since this fork's last sync (PR #29, 2026-10-20): wake and supervision fixes (resurfaced wakes from handling successors, overdue worker decisions, fewer repeat stale alarms), supervision-host idle compaction, PR safety (no-CI PR is unverified, expected PR head on merge), teardown safety, Herdr fixes. This fork carries its own changes (PRs #20-#44: Jobs page and away-mode fixes, Grok and Codex composer/launch fixes, treehouse pool fixes, PR poll auth, contribution snapshot limits) that must survive, except the six-column bearings board and its GitHub fleet-board sync overlay, which the captain no longer uses.
What Changed
Risk Assessment
🚨 High: The round-4 bounded wait is correct and cannot deadlock, because every other holder of the project lock uses a non-blocking try-acquire. But the branch is still an 88k-line upstream merge whose conflict resolution in spawn, teardown and Treehouse lease locking produced regressions in each of the previous four review rounds, so it needs explicit human approval before merge.
Testing
Targeted lease, notification, and contribution checks passed after setup corrections; contention failed before the fix and passed afterward, including timeout retention. Live CLI, Codex, Herdr, Treehouse, GitHub-read, and browser checks produced evidence. Trust prompts and unavailable disposable backend/forge authority prevented complete live coverage.
Evidence: Generated Bearings page
Source: Generated Bearings page
Evidence: Real Herdr adapter lifecycle
Source: Real Herdr adapter lifecycle
Evidence: Real Treehouse ownership guards
Source: Real Treehouse ownership guards
Evidence: Codex live composer classification
Source: Codex live composer classification
Evidence: Recovered completion notification
Source: Recovered completion notification
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed (4) ✅
bin/fm-spawn.sh:6086- The merge put back upstream's Herdr-only lease path (spawn_lease_herdr_slot, fm-spawn.sh:5542-5549). It runstreehouse get --lease --lease-holder "$ID"but never sets TREEHOUSE_LEASE_ID or TREEHOUSE_LEASE_HOLDER, so the meta written at fm-spawn.sh:7348 has notreehouse_lease_*lines. The fork's lease checks, which the merge kept, treat a leased copy with no recorded identity as unverifiable and refuse it. In the fork base (25c1d6a), Herdr went through the genericfm_treehouse_lease_getjournal path, so this is a new regression.Concrete sequence on a real Treehouse pool:
fm_treehouse_records_reservedreaches bin/fm-wake-lib.sh:2225 for A's record:fm_treehouse_record_leasefails, there is notreehouse_lease_line, andfm_treehouse_legacy_unleasedis false because the copy is leased. Result: "REFUSED: retained task A names pool copy ... without a verified matching durable lease". Only one Herdr worker per project can exist at a time.The same gap applies to upstream's t3code lease (fm-spawn.sh:5426, holder=$ID, no meta fields). A sibling issue: the Herdr/t3code claim block (fm-spawn.sh ~6219) now uses the fork's refuse-if-any-claim
fm_treehouse_slot_owner_claim, while upstream's abort path relied on the next spawn replacing a stale claim.Fix: send Herdr (and t3code) through the fork's journaled
fm_treehouse_lease_get/ structured-holder path and record treehouse_lease_id/holder in meta, keeping upstream's explicit cd into the leased copy. Alternatively, record the Treehouse lease_id and holder from these gets so the shared checks can verify them.bin/fm-watch.sh:4455- Resolving the terminal-stale branch kept the fork's olderrm -f "$ssf"and dropped upstream'swedge_episode_end "$key" 0 1. Upstream's header calls that function the single place that ends a wedge episode: it clears the cap markers and, when a cap is configured, the escalation count.Concrete sequence with FM_WEDGE_MAX_ESCALATIONS>0:
done:. A new hash surfaces the bare terminal stale at :4455 and wakes, but the cap marker stays.[ -e "$ssf" ] || { cap>0 && -e .wedge-permanent }) sends a genuinely finished crew intowedge_timer_checkon every poll. The leftover cap also keeps silencing that window's future wedges.The fork's delivered-terminal absorb at :4440 has the same gap. Its own comment says it removes $ssf so the next poll does not go through
wedge_timer_check, but a standing cap marker still sends it there with the pane hash, which defeats the once-per-identity absorb.Fix: call
wedge_episode_end "$key" 0 1instead ofrm -f "$ssf"at both :4440 and :4455. With the default cap of 0 the behavior is unchanged.bin/fm-captain-hold.sh:444- Upstream's archived-entry resolution (task_show_archived/archived_entry) replaced the fork's PR fix: allow scout cleanup after answered calls are archived #31 archive reader, but the merge kept that reader's helpers, and now nothing calls them:task_show_inventory(:444-484)captain_archive_path(:411), whose only caller istask_show_inventoryTASK_SHOW_ARCHIVEDglobal, which is set at :394/:397/:483 and never read[reader]parameter ofresolve_entry(:873), which every caller leaves at its defaultRemove these leftovers so the archived lookup has a single owner. This does not change behavior.
🔧 Fix applied.
3 issues (2 errors, 1 warning) still open:
bin/fm-spawn.sh:6086- The merge put back upstream's Herdr-only lease path (spawn_lease_herdr_slot, fm-spawn.sh:5542-5549). It runstreehouse get --lease --lease-holder "$ID"but never sets TREEHOUSE_LEASE_ID or TREEHOUSE_LEASE_HOLDER, so the meta written at fm-spawn.sh:7348 has notreehouse_lease_*lines. The fork's lease checks, which the merge kept, treat a leased copy with no recorded identity as unverifiable and refuse it. In the fork base (25c1d6a), Herdr went through the genericfm_treehouse_lease_getjournal path, so this is a new regression.Concrete sequence on a real Treehouse pool:
fm_treehouse_records_reservedreaches bin/fm-wake-lib.sh:2225 for A's record:fm_treehouse_record_leasefails, there is notreehouse_lease_line, andfm_treehouse_legacy_unleasedis false because the copy is leased. Result: "REFUSED: retained task A names pool copy ... without a verified matching durable lease". Only one Herdr worker per project can exist at a time.The same gap applies to upstream's t3code lease (fm-spawn.sh:5426, holder=$ID, no meta fields). A sibling issue: the Herdr/t3code claim block (fm-spawn.sh ~6219) now uses the fork's refuse-if-any-claim
fm_treehouse_slot_owner_claim, while upstream's abort path relied on the next spawn replacing a stale claim.Fix: send Herdr (and t3code) through the fork's journaled
fm_treehouse_lease_get/ structured-holder path and record treehouse_lease_id/holder in meta, keeping upstream's explicit cd into the leased copy. Alternatively, record the Treehouse lease_id and holder from these gets so the shared checks can verify them.bin/fm-spawn.sh:1952- Bug introduced by round 1's herdr-lease-identity fix. That fix sent Herdr and t3code throughspawn_lease_treehouse_slot(fm-spawn.sh:1725), which createsstate/<id>.treehouse-acquireand keeps it after any failure. It left upstream's unguarded abort returns in place, so an abort can now hand the copy back while still keeping the journal that names it.Concrete t3code sequence:
freshen_spawn_worktree_basefails with exit 1, or thread creation fails with a code other than 1. The abort trap prints "retaining Treehouse lease recovery journal" (:2034), and theT3CODE_LEASEDblock (:1952-1966) runstreehouse return --force $WT, which succeeds.$STATE/A.treehouse-acquire/allocation.jsonstill names it.fm_treehouse_records_reserved(fm-wake-lib.sh:2229-2259). The journal's path is a pool slot andfm_treehouse_lease_matchesfails, so the spawn is refused with "unresolved Treehouse acquisition journal … reconcile its lease". A retry of A is refused at :4328. The project stays blocked until someone removes the journal by hand.Before round 1, t3code kept no journal, so it did not fail this way.
The same class appears at:
test_abort_returns_a_clean_lease_once_the_pane_is_gone(tests/fm-spawn-herdr-lease.test.sh) asserts onlyreturnedand never checks the journal, so it passes with this defect.treehouse return --force $WT. That leaves the same blocking journal.Fix: when
TREEHOUSE_ACQUIRE_JOURNALis set, make these abort returns usetreehouse return --if-lease-id "$TREEHOUSE_LEASE_ID" --if-lease-holder "$TREEHOUSE_LEASE_HOLDER". Remove the journal only after that return succeeds. Point the hints atspawn_treehouse_recovery_steps. The alternative is to skip these returns for journaled leases, as the fork's header contract at :227-236 describes. Either way, update the header and the Herdr test to assert the journal state.tests/fm-backend-t3code.test.sh:124- Round 1 moved the t3code lease ontofm_treehouse_lease_get. That runstreehouse get --lease --lease-holder <home>/<id>/a… --jsonand parses.pathand.lease_idwith jq (fm-spawn.sh:1745-1749). Round 1 did not update this suite's fake.make_treehouse_fakebinstill prints a bare path forgetand keeps no lease state, so jq fails and every t3code worker spawn test that builds this fake aborts before the thread is created. The assertion at :1533 also still expectsget --lease --lease-holder $idwith the bare task id.The abort-return expectations at :1898-1906, :1988, :2007, :2027 and :2064 assume the pre-journal behavior. They should follow whatever fix the journaled-lease-abort-return finding settles on.
Fix: switch the fake to
fm_test_fake_treehouse(as round 1 did in tests/fm-spawn-herdr-lease.test.sh), or emit the JSON and lease state the journaled path verifies. Then update the holder assertion.🔧 Fix applied.
3 errors still open:
bin/fm-spawn.sh:6086- The merge put back upstream's Herdr-only lease path (spawn_lease_herdr_slot, fm-spawn.sh:5542-5549). It runstreehouse get --lease --lease-holder "$ID"but never sets TREEHOUSE_LEASE_ID or TREEHOUSE_LEASE_HOLDER, so the meta written at fm-spawn.sh:7348 has notreehouse_lease_*lines. The fork's lease checks, which the merge kept, treat a leased copy with no recorded identity as unverifiable and refuse it. In the fork base (25c1d6a), Herdr went through the genericfm_treehouse_lease_getjournal path, so this is a new regression.Concrete sequence on a real Treehouse pool:
fm_treehouse_records_reservedreaches bin/fm-wake-lib.sh:2225 for A's record:fm_treehouse_record_leasefails, there is notreehouse_lease_line, andfm_treehouse_legacy_unleasedis false because the copy is leased. Result: "REFUSED: retained task A names pool copy ... without a verified matching durable lease". Only one Herdr worker per project can exist at a time.The same gap applies to upstream's t3code lease (fm-spawn.sh:5426, holder=$ID, no meta fields). A sibling issue: the Herdr/t3code claim block (fm-spawn.sh ~6219) now uses the fork's refuse-if-any-claim
fm_treehouse_slot_owner_claim, while upstream's abort path relied on the next spawn replacing a stale claim.Fix: send Herdr (and t3code) through the fork's journaled
fm_treehouse_lease_get/ structured-holder path and record treehouse_lease_id/holder in meta, keeping upstream's explicit cd into the leased copy. Alternatively, record the Treehouse lease_id and holder from these gets so the shared checks can verify them.bin/fm-spawn.sh:1952- Bug introduced by round 1's herdr-lease-identity fix. That fix sent Herdr and t3code throughspawn_lease_treehouse_slot(fm-spawn.sh:1725), which createsstate/<id>.treehouse-acquireand keeps it after any failure. It left upstream's unguarded abort returns in place, so an abort can now hand the copy back while still keeping the journal that names it.Concrete t3code sequence:
freshen_spawn_worktree_basefails with exit 1, or thread creation fails with a code other than 1. The abort trap prints "retaining Treehouse lease recovery journal" (:2034), and theT3CODE_LEASEDblock (:1952-1966) runstreehouse return --force $WT, which succeeds.$STATE/A.treehouse-acquire/allocation.jsonstill names it.fm_treehouse_records_reserved(fm-wake-lib.sh:2229-2259). The journal's path is a pool slot andfm_treehouse_lease_matchesfails, so the spawn is refused with "unresolved Treehouse acquisition journal … reconcile its lease". A retry of A is refused at :4328. The project stays blocked until someone removes the journal by hand.Before round 1, t3code kept no journal, so it did not fail this way.
The same class appears at:
test_abort_returns_a_clean_lease_once_the_pane_is_gone(tests/fm-spawn-herdr-lease.test.sh) asserts onlyreturnedand never checks the journal, so it passes with this defect.treehouse return --force $WT. That leaves the same blocking journal.Fix: when
TREEHOUSE_ACQUIRE_JOURNALis set, make these abort returns usetreehouse return --if-lease-id "$TREEHOUSE_LEASE_ID" --if-lease-holder "$TREEHOUSE_LEASE_HOLDER". Remove the journal only after that return succeeds. Point the hints atspawn_treehouse_recovery_steps. The alternative is to skip these returns for journaled leases, as the fork's header contract at :227-236 describes. Either way, update the header and the Herdr test to assert the journal state.bin/fm-spawn.sh:1765- Round 2'sspawn_return_treehouse_slotreturns a Herdr or t3code copy to the pool and deletes its acquisition journal without first making sure this task's slot claim (.fm-slot-owner) is gone. Round 1 brought back upstream's abort returns and created this problem. Round 2 added the lease-ID guard but did not close it.Concrete t3code sequence:
SPAWN_SLOT_CLAIMED=1).fm_backend_t3code_turn_startis refused (:8015) and the spawn exits 1.spawn_abort_cleanup, the thread is archived and the T3CODE_LEASED block (:1973) callsspawn_return_treehouse_slot. The copy is now unleased and the journal is deleted.The pool now holds an unleased copy whose claim names A. The fork's refuse-if-any-claim rule makes that message false. The next spawn that gets this copy leases it, then
spawn_lease_treehouse_slotrefuses it (:1757-1760, "carries an existing slot claim"). That spawn keeps a new live lease and journal, so an operator has to reconcile by hand. That is the stale-claim state the user said must not be repaired by replacement.The Herdr block (:2046-2057) has the same gap. For example: Herdr with rovo, hermes or opencode2, a launch gate fails after the record is published,
rovo_endpoint_cleanupcloses the pane, the rollback removes the meta, and the clean copy is returned while the project lock is not held. For polytoken the claim is released only iffm_lock_try_acquiresucceeds (:2082). If it fails, the same state remains.A related ordering problem: the t3code return at :1973 runs before
spawn_fresh_commit_rollback(:1980). If the rollback fails, a retained record still names a copy that was already returned.Neither test catches this. Neither suite runs the claim path:
test_spawn_abort_returns_lease_only_after_archive,test_abort_returns_a_clean_lease_once_the_pane_is_gone, and the other tests round 2 added assert onlyreturnedand that the journal is gone. None checks.fm-slot-owner.Fix: in
spawn_return_treehouse_slot, the helper both abort sites share, do these steps whenSPAWN_SLOT_CLAIMED=1:SPAWN_TREEHOUSE_PROJECT_LOCKfor any harness, not only polytoken.Also run the t3code return only after the record rollback has succeeded and no meta exists, as the Herdr block already does. Correct the stale "next spawn's claim replaces it" warning and comment at :2069-2087, and add an assertion that the claim file is absent after a successful abort return.
🔧 Fix applied.
4 issues (3 errors, 1 warning) still open:
bin/fm-spawn.sh:6086- The merge put back upstream's Herdr-only lease path (spawn_lease_herdr_slot, fm-spawn.sh:5542-5549). It runstreehouse get --lease --lease-holder "$ID"but never sets TREEHOUSE_LEASE_ID or TREEHOUSE_LEASE_HOLDER, so the meta written at fm-spawn.sh:7348 has notreehouse_lease_*lines. The fork's lease checks, which the merge kept, treat a leased copy with no recorded identity as unverifiable and refuse it. In the fork base (25c1d6a), Herdr went through the genericfm_treehouse_lease_getjournal path, so this is a new regression.Concrete sequence on a real Treehouse pool:
fm_treehouse_records_reservedreaches bin/fm-wake-lib.sh:2225 for A's record:fm_treehouse_record_leasefails, there is notreehouse_lease_line, andfm_treehouse_legacy_unleasedis false because the copy is leased. Result: "REFUSED: retained task A names pool copy ... without a verified matching durable lease". Only one Herdr worker per project can exist at a time.The same gap applies to upstream's t3code lease (fm-spawn.sh:5426, holder=$ID, no meta fields). A sibling issue: the Herdr/t3code claim block (fm-spawn.sh ~6219) now uses the fork's refuse-if-any-claim
fm_treehouse_slot_owner_claim, while upstream's abort path relied on the next spawn replacing a stale claim.Fix: send Herdr (and t3code) through the fork's journaled
fm_treehouse_lease_get/ structured-holder path and record treehouse_lease_id/holder in meta, keeping upstream's explicit cd into the leased copy. Alternatively, record the Treehouse lease_id and holder from these gets so the shared checks can verify them.bin/fm-spawn.sh:1952- Bug introduced by round 1's herdr-lease-identity fix. That fix sent Herdr and t3code throughspawn_lease_treehouse_slot(fm-spawn.sh:1725), which createsstate/<id>.treehouse-acquireand keeps it after any failure. It left upstream's unguarded abort returns in place, so an abort can now hand the copy back while still keeping the journal that names it.Concrete t3code sequence:
freshen_spawn_worktree_basefails with exit 1, or thread creation fails with a code other than 1. The abort trap prints "retaining Treehouse lease recovery journal" (:2034), and theT3CODE_LEASEDblock (:1952-1966) runstreehouse return --force $WT, which succeeds.$STATE/A.treehouse-acquire/allocation.jsonstill names it.fm_treehouse_records_reserved(fm-wake-lib.sh:2229-2259). The journal's path is a pool slot andfm_treehouse_lease_matchesfails, so the spawn is refused with "unresolved Treehouse acquisition journal … reconcile its lease". A retry of A is refused at :4328. The project stays blocked until someone removes the journal by hand.Before round 1, t3code kept no journal, so it did not fail this way.
The same class appears at:
test_abort_returns_a_clean_lease_once_the_pane_is_gone(tests/fm-spawn-herdr-lease.test.sh) asserts onlyreturnedand never checks the journal, so it passes with this defect.treehouse return --force $WT. That leaves the same blocking journal.Fix: when
TREEHOUSE_ACQUIRE_JOURNALis set, make these abort returns usetreehouse return --if-lease-id "$TREEHOUSE_LEASE_ID" --if-lease-holder "$TREEHOUSE_LEASE_HOLDER". Remove the journal only after that return succeeds. Point the hints atspawn_treehouse_recovery_steps. The alternative is to skip these returns for journaled leases, as the fork's header contract at :227-236 describes. Either way, update the header and the Herdr test to assert the journal state.bin/fm-spawn.sh:1765- Round 2'sspawn_return_treehouse_slotreturns a Herdr or t3code copy to the pool and deletes its acquisition journal without first making sure this task's slot claim (.fm-slot-owner) is gone. Round 1 brought back upstream's abort returns and created this problem. Round 2 added the lease-ID guard but did not close it.Concrete t3code sequence:
SPAWN_SLOT_CLAIMED=1).fm_backend_t3code_turn_startis refused (:8015) and the spawn exits 1.spawn_abort_cleanup, the thread is archived and the T3CODE_LEASED block (:1973) callsspawn_return_treehouse_slot. The copy is now unleased and the journal is deleted.The pool now holds an unleased copy whose claim names A. The fork's refuse-if-any-claim rule makes that message false. The next spawn that gets this copy leases it, then
spawn_lease_treehouse_slotrefuses it (:1757-1760, "carries an existing slot claim"). That spawn keeps a new live lease and journal, so an operator has to reconcile by hand. That is the stale-claim state the user said must not be repaired by replacement.The Herdr block (:2046-2057) has the same gap. For example: Herdr with rovo, hermes or opencode2, a launch gate fails after the record is published,
rovo_endpoint_cleanupcloses the pane, the rollback removes the meta, and the clean copy is returned while the project lock is not held. For polytoken the claim is released only iffm_lock_try_acquiresucceeds (:2082). If it fails, the same state remains.A related ordering problem: the t3code return at :1973 runs before
spawn_fresh_commit_rollback(:1980). If the rollback fails, a retained record still names a copy that was already returned.Neither test catches this. Neither suite runs the claim path:
test_spawn_abort_returns_lease_only_after_archive,test_abort_returns_a_clean_lease_once_the_pane_is_gone, and the other tests round 2 added assert onlyreturnedand that the journal is gone. None checks.fm-slot-owner.Fix: in
spawn_return_treehouse_slot, the helper both abort sites share, do these steps whenSPAWN_SLOT_CLAIMED=1:SPAWN_TREEHOUSE_PROJECT_LOCKfor any harness, not only polytoken.Also run the t3code return only after the record rollback has succeeded and no meta exists, as the Herdr block already does. Correct the stale "next spawn's claim replaces it" warning and comment at :2069-2087, and add an assertion that the claim file is absent after a successful abort return.
bin/fm-spawn.sh:1771- Round 3 added this code (abort-return-leaves-slot-claim fix). It closes the stale-claim path when nothing else holds the project lock. When another spawn holds the lock, it swaps that failure for a project-wide block that needs manual recovery.spawn_return_treehouse_slottakesSPAWN_TREEHOUSE_PROJECT_LOCKagain with a single non-blockingfm_lock_try_acquire(fm-wake-lib.sh:1453), so ordinary contention makes the return give up.Concrete sequence:
freshen_spawn_worktree_base, harness setup and publish (:4306-7521), which can take tens of seconds.fm_backend_t3code_turn_startis refused. Inspawn_abort_cleanupthe thread is archived, the rollback removes the meta, and the T3 block (:2004) callsspawn_return_treehouse_slot. The try-acquire at :1771 fails and the function returns 1..fm-slot-ownerclaim andstate/A.treehouse-acquirejournal remain, and the trap prints the manual recovery steps. After B finishes, every later fresh spawn in P is refused byfm_treehouse_records_reserved(unresolved acquisition journal) until an operator reconciles by hand.The same path exists at the Herdr abort return (:2075), for example when several polytoken or rovo spawns in one project start together.
Fix: in
spawn_return_treehouse_slot, replace the single try with the existing bounded wait (fm_lock_acquire_wait_max "$SPAWN_TREEHOUSE_PROJECT_LOCK" <seconds>, fm-wake-lib.sh:1605). This is safe: at both call sites the abort no longer holds a lock the main flow takes before the project lock, becauseSPAWN_TASK_LOCKis released first and the per-id meta lock comes after the project lock in normal order. Keep the current skip-and-retain behaviour when the bounded wait times out.🔧 Fix applied.
✅ Re-checked - no issues remain.
⏭️ **Test** - skipped
bash tests/fm-spawn-herdr-lease.test.shbefore and after adding the contention regressionbash tests/fm-wake-drain-outcome-backstop.test.shbash tests/fm-contributions.test.sh; re-ran its three setup-affected cases with normal temporary directoriesExecuted the contention regression against62c15fadand confirmed failure before the fixExecuted a focused 60-second contention-timeout checkFM_PR_STATE_LIVE_E2E=1 bash tests/fm-pr-state-live-e2e.test.shDrove disposable Herdr sessions exclusively throughbin/fm-herdr-lab.sh, including Firstmate adapter creation, command delivery, capture, and cleanupDrove real Treehouse allocation, claim-conflict refusal, mismatched-return refusal, and matching returnLaunched real Codex, Grok, and Claude in disposable private tmux sessions with 160×45 gridsClassified real Codex worker captures before and after typing an unsent draftBuilt Bearings with real Lavish, exercised selection in Chromium, and captured desktop/mobile screenshotsDrove notification drains and Bearings snapshot generation through production CLIsStopped disposable sessions and servers; removed transient worktree files✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.