Skip to content

feat(bin): sync fork onto current upstream and refuse conflicting worker account pin with Claude seat - #7

Merged
max-metaplanet merged 41 commits into
mainfrom
fm/fork-sync
Sep 24, 2026
Merged

max-metaplanet merged 41 commits into
mainfrom
fm/fork-sync

Conversation

@max-metaplanet

@max-metaplanet max-metaplanet commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Intent

keep me posted -- i need the fork firstmate updated bust still working with the claude seat switch so i can instruct team on how to use it

The fork is max-metaplanet/firstmate: upstream kunchenguid/firstmate at merge-base f5735dc plus five commits - keyed decisions stay open through a terminal done/failed line (c94c92e), crew run inventory by primary checkout with unreadable reported as unreadable (5899ac1), the opt-in usage threshold warner (7ec98fa), deployment-config path-forced dispatch (2f6758a), and Claude seat switching (8bfb7c7). Upstream is 31 commits ahead and has merged its own per-home worker account pin (config/claude-account), which also selects CLAUDE_CONFIG_DIR at launch.

Deliver: the fork on current upstream main with all five commits; seat switching demonstrated working live on that synced code - an actual switch, a new worker landing on the switched seat while a running one stays on its original seat; and teammate instructions without a third document.

Ruled: when a home configures both config/claude-account and an active seat, a spawn refuses instead of silently letting one win - before any endpoint, worktree or record exists, naming both files by path, reading as a configuration conflict that removing either file resolves. It is covered by a test of that combination and one documentation line saying the two are mutually exclusive.

Documentation: docs/claude-seats.md "Adding a second seat" points first to metaplanet-dev SETUP.md's claude-seats.sh setup for building a seat with the shared body, and says plainly that fm-seat.sh add creates a bare directory only, with none of the owner's settings, hooks, skills or agents; "Limits worth knowing" gains a platform-scope line (macOS verified, Keychain assumptions stated).

What Changed

  • Rebases the fork onto current upstream kunchenguid/firstmate main. This brings in upstream's 31 commits, including the per-home worker account pin (config/claude-account / config/pi-account), Gerrit change publishing and watching, the Devin CLI adapter, the fleet activity ledger, and a range of watcher, wake-queue, public-follow-up and Herdr fixes. The fork's five commits sit on top as re-picked versions: keyed decisions stay open until a terminal done/failed line, crew run inventory is looked up by primary checkout (unreadable reads report unreadable), the opt-in Claude usage threshold warner, routing of declared deployment-configuration paths to the careful rule, and Claude seat switching.
  • bin/fm-spawn.sh now refuses a spawn when a home has both config/claude-account and an active non-default Claude seat. The refusal happens before any endpoint, worktree or record is created, names both files by path, and says that removing either one resolves the conflict. A Claude relaunch of a task recorded on a named seat is refused when the pin points at a different configuration directory. Otherwise the pin and the seat never both set CLAUDE_CONFIG_DIR. tests/fm-seat.test.sh, tests/fm-worker-account.test.sh and tests/fm-control-relaunch.test.sh cover these cases.
  • In docs/claude-seats.md, "Adding a second seat" now points first to metaplanet-dev's claude-seats.sh setup (from its SETUP.md) for building a seat with the shared body. It states that fm-seat.sh add creates only a bare directory, with none of the owner's settings, hooks, skills or agents. "Limits worth knowing" gains a platform-scope note: verified on macOS only, Keychain assumptions stated, Linux unverified, Windows out of scope. docs/configuration.md notes that the pin and seats are mutually exclusive.

Risk Assessment

✅ Low: The last fix round replaced the special cases with one rule: a relaunch is refused only when the directory recorded on the task and the directory the pin selects resolve to different places. That rule is checked right after the pin is resolved and before any endpoint, worktree or record is touched. It covers the pin-only, pin-at-a-seat and conflicting-seat relaunch cases, the tests exercise real spawns and relaunches, and the documentation line was updated in place.

Testing

Baseline: tests/fm-seat.test.sh passed all 36 cases, including the pin/seat conflict and the three relaunch-guard cases. Live: against the real seats in ~/.claude-seats, read-only in a throwaway home, list showed every seat logged in, and both switch seat-max and switch --next worked. I then set up an isolated Herdr lab with a throwaway FM_HOME and two synthetic apiKeyHelper seats. A small quota-axi shim reported only those synthetic seats as OAuth-signed-in, so no real account or token was used. The real probe first refused the synthetic seat, which counts as an adversarial check. In the lab I switched to seat-a and spawned worker A, switched to seat-b and spawned worker B, and confirmed each live claude process's CLAUDE_CONFIG_DIR plus the task records and fm-seat.sh status. I also drove the pin+seat spawn refusal, a relaunch refusal where the pin selects a different directory, and three relaunches that must succeed. Workers were stopped, treehouse worktrees returned, the lab torn down through the helper (tripwire passed), and all temp data removed. The fork commit history and the docs changes were only checked by reading them. They have no runtime surface, so they are marked untested rather than live.

  • Live validation: ✅ go - 9 of 11 scenarios driven live against the product
Scenario Result Live Evidence
Operator switches between real logged-in seats (seat-max -> seat-max2 via switch --next) and status reports the new active seat ✅ pass live 01-real-seat-probe-and-switch.txt
Adversarial: switching to a seat with no OAuth login is refused even with --force, and no seat setting is written ✅ pass live 02-switch-refuses-not-logged-in-seat.txt
After switching to seat-a, a newly spawned Herdr worker runs Claude with CLAUDE_CONFIG_DIR=seat-a and records claude_seat=seat-a ✅ pass live 03-switch-seat-a-and-spawn-live-a.txt
Switching to seat-b while worker A runs: new worker B lands on seat-b, A's live process and task record stay on seat-a, status lists both ✅ pass live 04-switch-to-seat-b-new-worker-lands-there-old-stays.txt
Home with config/claude-account and an active seat: spawn refused (rc=1), naming both files and 'remove either file', with no pane, worktree or task record created ✅ pass live 05-pin-and-active-seat-spawn-refused.txt
Adversarial: relaunching a seat-recorded task under a pin that selects a different directory is refused before anything is touched (record byte-identical, no new process) ✅ pass live 06-relaunch-refused-when-pin-selects-a-different-dir.txt
Relaunch with no pin keeps the task's recorded seat-a even though seat-b is active ✅ pass live 07-relaunch-keeps-recorded-seat-not-active-seat.txt
Pin pointed at the task's own seat directory: relaunch succeeds on that seat ✅ pass live 08-pin-at-own-seat-and-pin-only-relaunch.txt
Pin-only home with no seat file: spawn then relaunch of a Claude task both succeed under the pinned root ✅ pass live 08-pin-at-own-seat-and-pin-only-relaunch.txt
Fork carries all five commits on current upstream main ⏸️ untested no The earlier payload only showed this by reading git history (git log 8bfb7c74..HEAD), not by running the product, and upstream was not fetched to confirm ac2ed3b is still its tip. Checking it needs…
Teammate docs: claude-seats.md points to metaplanet-dev SETUP.md claude-seats.sh setup, states that fm-seat.sh add creates a bare directory, and adds a macOS/Keychain platform-scope line; configur… ⏸️ untested no The earlier payload only showed this by reading docs/claude-seats.md and docs/configuration.md:425. Documentation has no runtime surface to run, so no live result was recorded.
Evidence: Real seats: probe, switch, rotate (throwaway home, emails redacted)

Source: Real seats: probe, switch, rotate (throwaway home, emails redacted)

$ fm-seat.sh list   (seats root = ~/.claude-seats, throwaway home)
seats root: ~/.claude-seats
* default	logged-in	<email-redacted>	(ambient default login)
  seat-max	logged-in	<email-redacted>	~/.claude-seats/seat-max
  seat-max2	logged-in	<email-redacted>	~/.claude-seats/seat-max2

$ fm-seat.sh switch seat-max
switched: default -> seat-max
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found
rc=0

$ fm-seat.sh status
active seat for NEW workers: seat-max
active profile: ~/.claude-seats/seat-max
login state: logged-in
auto-switch threshold: (unset - no automatic switching)
auto-switch watch: not armed

live workers keep the seat they launched with:
  (no task records)

$ fm-seat.sh switch --next
switched: seat-max -> seat-max2
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found
rc=0

$ fm-seat.sh status
active seat for NEW workers: seat-max2
active profile: ~/.claude-seats/seat-max2
login state: logged-in
auto-switch threshold: (unset - no automatic switching)
auto-switch watch: not armed

live workers keep the seat they launched with:
  (no task records)

$ cat config/claude-seat
seat-max2
Evidence: Switch refuses a seat with no login (real quota-axi)

Source: Switch refuses a seat with no login (real quota-axi)

$ fm-seat.sh switch seat-a   (real quota-axi: synthetic apiKeyHelper seat has no oauth login)
error: seat 'seat-a' is not logged in; run 'fm-seat.sh add seat-a' for the owner's login steps (docs/claude-seats.md)
rc=1
$ fm-seat.sh switch seat-a --force
error: seat 'seat-a' is not logged in; run 'fm-seat.sh add seat-a' for the owner's login steps (docs/claude-seats.md)
rc=1
$ ls config/claude-seat
ls: /private/var/folders/1l/gg6b5zsx0qn753wwhcmmq8cr0000gn/T/fm-seat-live.iIb9DA/home/config/claude-seat: No such file or directory
Evidence: Switch to seat-a and spawn live worker A in the Herdr lab

Source: Switch to seat-a and spawn live worker A in the Herdr lab

$ fm-seat.sh switch seat-a
switched: default -> seat-a   (earlier step)

$ fm-spawn.sh live-a <project> --backend herdr --mode no-mistakes --yolo off
warning: /private/var/folders/1l/gg6b5zsx0qn753wwhcmmq8cr0000gn/T/fm-seat-live.iIb9DA/home/data/live-a/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode no-mistakes - confirm its definition of done matches
warning: herdr presentation parent is absent or ambiguous; using the ordinary flat layout without projection
spawned live-a harness=claude kind=ship mode=no-mistakes yolo=off window=fm-lab-seat-live-9746-28597:w1:p2 worktree=~/.treehouse/project-264922/1/project
rc=0
Evidence: Switch to seat-b: new worker B on seat-b, running worker A stays on seat-a

Source: Switch to seat-b: new worker B on seat-b, running worker A stays on seat-a

live-a: claude_seat=$LAB/seats/seat-a live-b: claude_seat=$LAB/seats/seat-b pid=44168 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-a pid=72427 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-b

# live worker A after spawn on seat-a
  pid=44168 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-a
  seat-a/sessions: 44168.fb73d334625a5ca24068760848ec0bc6ebe925b782a291bf10221e890bf2c07b.key

$ fm-seat.sh switch seat-b
switched: seat-a -> seat-b
applies to NEW claude workers only; running workers keep their own seat
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
●  WATCHER DOWN - SUPERVISION IS OFF
●  1 task(s) in flight, but no watcher has a fresh beacon (last beat: 301s ago, grace 300s).
●  Trust the emitted supervision protocol for this harness; do not use shell & for watcher repair.
●  This is a supervision warning only; the guarded operation WILL still run.
●  watcher supervision needs Stop-owned automatic recovery; inspect the hook registration and startup status before ending the turn.
●━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
config-push: no live secondmate homes found
rc=0

$ grep claude_seat state/live-a.meta   (after switch, before B)
claude_seat=$LAB/seats/seat-a

$ fm-spawn.sh live-b <project> --backend herdr --mode no-mistakes --yolo off
warning: $LAB/home/data/live-b/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode no-mistakes - confirm its definition of done matches
spawned live-b harness=claude kind=ship mode=no-mistakes yolo=off window=fm-lab-seat-live-9746-28597:w2:p2 worktree=~/.treehouse/project-264922/2/project
rc=0

# task records
  live-a: claude_seat=$LAB/seats/seat-a  window=fm-lab-seat-live-9746-28597:w1:p2
  live-b: claude_seat=$LAB/seats/seat-b  window=fm-lab-seat-live-9746-28597:w2:p2

# live claude processes and their CLAUDE_CONFIG_DIR
  pid=44168 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-a
  pid=72427 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-b

$ fm-seat.sh status
active seat for NEW workers: seat-b
active profile: $LAB/seats/seat-b
login state: logged-in
auto-switch threshold: (unset - no automatic switching)
auto-switch watch: not armed

live workers keep the seat they launched with:
  live-a	$LAB/seats/seat-a
  live-b	$LAB/seats/seat-b
Evidence: Pin + active seat: spawn refused, nothing created

Source: Pin + active seat: spawn refused, nothing created

# home config: seat-b active AND an account pin
config/claude-seat=seat-b  config/claude-account=ordinary

# before
panes: ["w1:p2","w2:p2"]
treehouse slots: 1 2 treehouse-state.json treehouse-state.key treehouse-state.lock 
state metas: live-a.meta live-b.meta 

$ fm-spawn.sh live-c <project> --backend herdr --mode no-mistakes --yolo off
error: this home configures a worker account pin and an active Claude seat, and both choose a Claude worker's configuration directory:
  $LAB/home/config/claude-account
  $LAB/home/config/claude-seat
remove either file to resolve the conflict
rc=

# after
panes: ["w1:p2","w2:p2"]
treehouse slots: 1 2 treehouse-state.json treehouse-state.key treehouse-state.lock 
state metas: live-a.meta live-b.meta 
ls: $LAB/home/state/live-c.meta: No such file or directory
exit code of the refused spawn: 1
Evidence: Relaunch refused when pin selects a different dir; record untouched

Source: Relaunch refused when pin selects a different dir; record untouched

# worker A's claude process was stopped (agent-free pane); home now: no seat file, pin -> $LAB/pin-root
config/claude-account=$LAB/pin-root; config/claude-seat: absent
live-a record: claude_seat=$LAB/seats/seat-a

$ fm-spawn.sh live-a --relaunch
error: task live-a was launched on the Claude seat $LAB/seats/seat-a, and this home's worker account pin selects a different Claude configuration directory:
  $LAB/home/config/claude-account
a relaunch keeps the seat its task was launched on, so it cannot also follow the pin; relaunch it with the pin absent or pointing at that seat, or finish it and spawn the work as a new task
rc=1

# after: record unchanged? yes
# live claude processes:
  pid=72427 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-b
panes: ["w1:p2","w2:p2"]
Evidence: Relaunch keeps recorded seat-a while seat-b is active

Source: Relaunch keeps recorded seat-a while seat-b is active

# home now: no pin, active seat = seat-b; live-a record: claude_seat=$LAB/seats/seat-a

$ fm-spawn.sh live-a --relaunch
warning: $LAB/home/data/live-a/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode no-mistakes - confirm its definition of done matches
spawned live-a harness=claude kind=ship mode=no-mistakes yolo=off window=fm-lab-seat-live-9746-28597:w1:p2 worktree=~/.treehouse/project-264922/1/project
rc=0

live-a record: claude_seat=$LAB/seats/seat-a
# live claude processes:
  pid=4650 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-a
  pid=72427 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-b
Evidence: Pin at the task's own seat dir, and pin-only home, both relaunch

Source: Pin at the task's own seat dir, and pin-only home, both relaunch

# worker A stopped again; home now: no seat file, pin -> $LAB/seats/seat-a (the task's own recorded dir)
$ fm-spawn.sh live-a --relaunch
warning: $LAB/home/data/live-a/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode no-mistakes - confirm its definition of done matches
spawned live-a harness=claude kind=ship mode=no-mistakes yolo=off window=fm-lab-seat-live-9746-28597:w1:p2 worktree=~/.treehouse/project-264922/1/project account=$LAB/seats/seat-a
rc=0
live-a record: claude_seat=$LAB/seats/seat-a
# live claude processes:
  pid=22734 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-a

# pin-only home: config/claude-account -> $LAB/pin-root, no seat file; fresh task live-c, then stop and relaunch it
$ fm-spawn.sh live-c <project> --backend herdr --mode no-mistakes --yolo off
warning: $LAB/home/data/live-c/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode no-mistakes - confirm its definition of done matches
spawned live-c harness=claude kind=ship mode=no-mistakes yolo=off window=fm-lab-seat-live-9746-28597:w3:p2 worktree=~/.treehouse/project-264922/3/project account=$LAB/pin-root
rc=0
live-c record: claude_seat=$LAB/pin-root
  pid=22734 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-a
  pid=72427 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-b
  pid=45672 comm=claude CLAUDE_CONFIG_DIR=$LAB/pin-root

# stopped live-c's claude (pid 45672); relaunch with the pin unchanged
$ fm-spawn.sh live-c --relaunch
warning: $LAB/home/data/live-c/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode no-mistakes - confirm its definition of done matches
spawned live-c harness=claude kind=ship mode=no-mistakes yolo=off window=fm-lab-seat-live-9746-28597:w3:p2 worktree=~/.treehouse/project-264922/3/project account=$LAB/pin-root
rc=0
  pid=22734 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-a
  pid=72427 comm=claude CLAUDE_CONFIG_DIR=$LAB/seats/seat-b
  pid=54921 comm=claude CLAUDE_CONFIG_DIR=$LAB/pin-root
Evidence: Relaunched panes reach Claude past workspace trust

Source: Relaunched panes reach Claude past workspace trust

=== pane w1:p2
  ❯ No, disable external imports
> export GOTMPDIR=/tmp/fm-live-a/gotmp
> export COMPACT_ADVISER_DISABLE=1
> export FM_TASK_ID=live-a
> . '/tmp/fm-live-a+e2a5ece682412ea46e5c2049e2bcc0d7908164ceca8084f745ff7d61d2a3a48f/launch.s1790224272.17903.4776.sh'
  Allow external CLAUDE.md file imports?
=== pane w3:p2
  ❯ No, disable external imports
> export GOTMPDIR=/tmp/fm-live-c/gotmp
> export COMPACT_ADVISER_DISABLE=1
> export FM_TASK_ID=live-c
> . '/tmp/fm-live-c+e2a5ece682412ea46e5c2049e2bcc0d7908164ceca8084f745ff7d61d2a3a48f/launch.s1790224336.49996.12730.sh'
  Allow external CLAUDE.md file imports?
Evidence: Worker A pane (live Claude on seat-a)

Source: Worker A pane (live Claude on seat-a)

project  HEAD
> export FM_TASK_ID=live-a

project  HEAD
> . '/tmp/fm-live-a+e2a5ece682412ea46e5c2049e2bcc0d7908164ceca8084f745ff7d61d2a3a48f/launch.s1790224130.36982.32160.sh'

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Allow external CLAUDE.md file imports?

  This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party
  repositories.

  External imports:
    ~/.claude/RTK.md

  Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks
  https://code.claude.com/docs/en/security

  ❯ No, disable external imports
    Yes, allow external imports

  Enter to confirm · Esc to cancel
Evidence: Worker B pane (live Claude on seat-b)

Source: Worker B pane (live Claude on seat-b)

project  HEAD
> export FM_TASK_ID=live-b

project  HEAD
> . '/tmp/fm-live-b+e2a5ece682412ea46e5c2049e2bcc0d7908164ceca8084f745ff7d61d2a3a48f/launch.s1790224179.61090.4642.sh'

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  Allow external CLAUDE.md file imports?

  This project's CLAUDE.md imports files outside the current working directory. Never allow this for third-party
  repositories.

  External imports:
    ~/.claude/RTK.md

  Important: Only use Claude Code with files you trust. Accessing untrusted files may pose security risks
  https://code.claude.com/docs/en/security

  ❯ No, disable external imports
    Yes, allow external imports

  Enter to confirm · Esc to cancel
Evidence: Lab teardown (default-session tripwire passed)

Source: Lab teardown (default-session tripwire passed)

$ fm-herdr-lab.sh teardown fm-lab-seat-live-9746-28597
rc=0
- Outcome: ⚠️ 1 info across 1 run (13m37s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed (3) ✅
  • ⚠️ bin/fm-spawn.sh:2284 - The pin/seat conflict guard only looks at the home's active seat, so a relaunch can still hit the exact failure it is meant to prevent. Steps to reproduce: (1) seat work is active and task A spawns, so its record gets claude_seat=~/.claude-seats/work. (2) The operator follows the refusal message ('remove either file'): they delete config/claude-seat and add config/claude-account. (3) They relaunch task A. The guard passes because the active seat is now default. Line ~4074 sets SEAT_CONFIG_DIR from the recorded seat (RELAUNCH_SEAT), so fm-claude-trust.sh registers workspace trust in the seat's store. The launch branch at ~4833 prefers WORKER_ACCOUNT, so the worker starts with CLAUDE_CONFIG_DIR set to the pin root. That store has no trust entry, so the worker hangs on the trust dialog, and its record still says the old claude_seat. The comment at ~4826 ('these branches can never both want CLAUDE_CONFIG_DIR at once') is wrong for this path. Fresh spawns are not affected, because the pin exports CLAUDE_CONFIG_DIR before fm_seat_spawn_config_dir runs. Suggested fix, at the same boundary: extend the guard so it also refuses when config/claude-account exists and this is a relaunch of a claude task with a non-empty RELAUNCH_SEAT. The message should name the pin file and the task's recorded seat. Add a relaunch case next to test_account_pin_and_active_seat_refuse_the_spawn.

🔧 Fix applied.
2 issues (1 error, 1 info) still open:

  • 🚨 bin/fm-spawn.sh:2297 - The relaunch guard added in the fix round blocks relaunches in ordinary pin usage, where no seat is involved. On a fresh claude spawn under a named-root pin, line ~2319 runs export CLAUDE_CONFIG_DIR=$WORKER_ACCOUNT_ROOT before line ~4087. There fm_seat_spawn_config_dir → fm_seat_config_dir default falls back to ${CLAUDE_CONFIG_DIR}, so SEAT_RECORD becomes the pin root and line 4654 writes claude_seat=&lt;pin root&gt; into the task record. Steps: (1) home has config/claude-account naming a signed-in root and no seat file; (2) spawn claude task A, and its meta gets claude_seat=&lt;pin root&gt;; (3) the endpoint dies, and the operator or fm-control.sh relaunches A with the same pin unchanged. The new branch sees the pin file plus a non-empty RELAUNCH_SEAT and exits 1 with 'task A was launched on the Claude seat <pin root>…'. Every named-pin claude task can therefore never be relaunched, even though the recorded dir equals the pin root and there is no conflict. The same false 'seat' wording appears for a pre-pin task whose record carries firstmate's ambient CLAUDE_CONFIG_DIR. The new test only covers a real $SEATS_DIR/work seat, so it passes with this bug. Minimal fix, inside the existing guard: refuse only when the recorded dir is a real seat that differs from what the pin selects. Either run the relaunch check just after pin resolution (still before any endpoint, worktree or record exists) and skip it when RELAUNCH_SEAT equals WORKER_ACCOUNT_ROOT, or compare RELAUNCH_SEAT against the seat root (fm_seat_root). Add a test that relaunches a task spawned under a named-root pin and expects success.
  • ℹ️ docs/configuration.md:425 - The one required 'mutually exclusive' line still says only that a home with the pin 'while a named seat is active' has every spawn refused. After the fix round, a relaunch of a task recorded on a seat is also refused even when no seat is active. Operators hitting that refusal will not find it described. Consider adding a clause to the same line; do not add a new document.

🔧 Fix applied.
1 warning still open:

  • ⚠️ bin/fm-spawn.sh:2299 - The corrected relaunch check still refuses when the recorded dir is the pin's own root, if that root is also a seat directory. It decides "launched on a named seat" only by whether RELAUNCH_SEAT equals fm_seat_dir(basename). It never compares the recorded value with what the pin selects. Steps: (1) a teammate builds seats with claude-seats.sh setup, so ~/.claude-seats/work is a logged-in profile. They pin it with config/claude-account = ~/.claude-seats/work and have no config/claude-seat. This is allowed: the pin accepts any absolute, existing Claude config directory. (2) A fresh claude spawn exports CLAUDE_CONFIG_DIR as the pin root (line 2319). fm_seat_config_dir default then returns it, so the record gets claude_seat=/.claude-seats/work. (3) The endpoint dies and the task is relaunched with the pin unchanged. The recorded value equals fm_seat_dir(work), so the relaunch exits 1 with 'task X was launched on the Claude seat …'. There is no conflict: the pin and the recorded seat pick the same directory, so trust and launch agree. This is the same false-refusal pattern as the previous round's finding, for a pin that points into the seats root. Minimal fix inside the same guard: also skip the refusal when RELAUNCH_SEAT equals the pin's resolved root. Either move the relaunch branch to just after WORKER_ACCOUNT_ROOT is resolved (still before any endpoint, worktree or record exists) and add [ &#34;$RELAUNCH_SEAT&#34; != &#34;$WORKER_ACCOUNT_ROOT&#34; ], or read the root with fm_worker_account_resolve. Add a relaunch case with the pin pointed at $SEATS_DIR/work that expects success.

🔧 Fix applied.
✅ Re-checked - no issues remain.

⚠️ **Test** - 1 info
  • ℹ️ bin/fm-claude-trust.sh - In the live lab, every Claude worker got past workspace trust, both on a seat and under a pin, then stopped at Claude's separate 'Allow external CLAUDE.md file imports?' dialog. bin/fm-claude-trust.sh answers that dialog only when the launch store's project entry already has standing consent, and a newly built seat's .claude.json has none. This is existing, intended consent-gating behavior and not caused by this change. The lab project was also fresh. Still, teammates building a new seat may see their first workers on that seat wait at this dialog until consent exists in the seat's own store. That may be worth a line in the teammate instructions.
  • Live validation: ✅ go - 9 of 11 scenarios driven live against the product
Scenario Result Live Evidence
Operator switches between real logged-in seats (seat-max -> seat-max2 via switch --next) and status reports the new active seat ✅ pass live 01-real-seat-probe-and-switch.txt
Adversarial: switching to a seat with no OAuth login is refused even with --force, and no seat setting is written ✅ pass live 02-switch-refuses-not-logged-in-seat.txt
After switching to seat-a, a newly spawned Herdr worker runs Claude with CLAUDE_CONFIG_DIR=seat-a and records claude_seat=seat-a ✅ pass live 03-switch-seat-a-and-spawn-live-a.txt
Switching to seat-b while worker A runs: new worker B lands on seat-b, A's live process and task record stay on seat-a, status lists both ✅ pass live 04-switch-to-seat-b-new-worker-lands-there-old-stays.txt
Home with config/claude-account and an active seat: spawn refused (rc=1), naming both files and 'remove either file', with no pane, worktree or task record created ✅ pass live 05-pin-and-active-seat-spawn-refused.txt
Adversarial: relaunching a seat-recorded task under a pin that selects a different directory is refused before anything is touched (record byte-identical, no new process) ✅ pass live 06-relaunch-refused-when-pin-selects-a-different-dir.txt
Relaunch with no pin keeps the task's recorded seat-a even though seat-b is active ✅ pass live 07-relaunch-keeps-recorded-seat-not-active-seat.txt
Pin pointed at the task's own seat directory: relaunch succeeds on that seat ✅ pass live 08-pin-at-own-seat-and-pin-only-relaunch.txt
Pin-only home with no seat file: spawn then relaunch of a Claude task both succeed under the pinned root ✅ pass live 08-pin-at-own-seat-and-pin-only-relaunch.txt
Fork carries all five commits on current upstream main ⏸️ untested no The earlier payload only showed this by reading git history (git log 8bfb7c74..HEAD), not by running the product, and upstream was not fetched to confirm ac2ed3b is still its tip. Checking it needs…
Teammate docs: claude-seats.md points to metaplanet-dev SETUP.md claude-seats.sh setup, states that fm-seat.sh add creates a bare directory, and adds a macOS/Keychain platform-scope line; configur… ⏸️ untested no The earlier payload only showed this by reading docs/claude-seats.md and docs/configuration.md:425. Documentation has no runtime surface to run, so no live result was recorded.
  • bash tests/fm-seat.test.sh (36/36 ok)
  • fm-seat.sh list / switch seat-max / switch --next / status against real ~/.claude-seats in a throwaway home (read-only, no spawn)
  • fm-herdr-lab.sh name|provision|run|teardown for isolated session fm-lab-seat-live-9746-28597
  • fm-seat.sh switch seat-a / --force with real quota-axi on an unsigned synthetic seat (refused, rc=1)
  • fm-seat.sh switch seat-a + fm-spawn.sh live-a &lt;project&gt; --backend herdr --mode no-mistakes --yolo off; checked live claude process env via /bin/ps -E
  • fm-seat.sh switch seat-b + fm-spawn.sh live-b ...; checked both live processes, both task records, fm-seat.sh status
  • config/claude-account=ordinary with seat-b active: fm-spawn.sh live-c ... refused rc=1; pane list, treehouse slots and state records unchanged
  • pin -> different root, no seat file: fm-spawn.sh live-a --relaunch refused rc=1, meta byte-identical (cmp), no new process
  • no pin, seat-b active: fm-spawn.sh live-a --relaunch relaunched on recorded seat-a
  • pin -> $SEATS/seat-a: fm-spawn.sh live-a --relaunch succeeded on seat-a
  • pin-only home: fm-spawn.sh live-c ... then fm-spawn.sh live-c --relaunch succeeded under pin-root
  • lab pane read of relaunched panes: no workspace-trust dialog
  • git log 8bfb7c74..HEAD: the five fork commits sit on top of upstream ac2ed3b
  • read docs/claude-seats.md and docs/configuration.md:425
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.


Why this branch contains an ours merge of fork main

Fork main still carried the original five commits, while this branch carries the same five re-resolved against current upstream. The same changes existed on both sides with different patches, so a plain rebase would have applied all five features a second time, and a plain merge conflicted in ten files (verified read-only with git merge-tree).

The branch is instead merged with -s ours, which makes it a descendant of fork main while leaving its tree byte-for-byte unchanged. Nothing from main is lost: its copies of those five commits are superseded by the re-picked versions already present here, not discarded. Verified at the time of the merge:

  • git diff 3bbf7efe HEAD was empty - the merge changed no file
  • git merge-base --is-ancestor origin/main HEAD succeeded
  • the branch was 0 commits behind origin/main, so a rebase is a no-op

This keeps delivery an ordinary pull request with no force-move of main.

Conflict resolution during the sync

23 conflict hunks across 8 files, matching the rehearsal's measurement. The one genuine semantic merge is repository identity in bin/fm-nm-run-lib.sh: the candidate list tries the overview's own repo: line first (upstream's approach), then the task worktree path, then the git-computed primary checkout (the fork's fallback). The fork's Unreadable/Unsettled classing is kept. Upstream's test_capped_inventory_requires_exact_repo_path is dropped because its assertion is false under the merged fallback; the fork's test_capped_inventory_canonicalizes_the_task_copy_path already covers that scenario with the correct expectation.

In bin/fm-spawn.sh's launch construction, the separate ambient-forwarding branch is collapsed into the seat branch, because fm_seat_config_dir already falls back to the ambient CLAUDE_CONFIG_DIR when no named seat is active; keeping both would assign the same value twice in the launch string.

Live demonstration (the acceptance test)

Run on this branch's code in an isolated Herdr lab with a throwaway firstmate home, two throwaway seat profile directories, and a throwaway project. No real credentials; the owner's ~/.claude and ~/.claude-seats were never touched. Paths below are shortened to <lab>.

Both workers are real claude processes started by the real bin/fm-spawn.sh on the real Herdr backend.

Worker A starts while seat-one is active

== 3. spawn worker A while seat-one is active ==

$ spawn demo-a
spawned demo-a harness=claude kind=scout window=fm-lab-fork-sync-23637-12947:w2:p2 worktree=/Users/max/.treehouse/demoproj-a2862e/1/demoproj

== 4. worker A's record and LIVE pane ==

--- worker A, spawned while seat-one was active (demo-a) ---

(a) task record:
    window=fm-lab-fork-sync-23637-12947:w2:p2
    worktree=/Users/max/.treehouse/demoproj-a2862e/1/demoproj
    harness=claude
    claude_seat=<lab>/seats/seat-one
    backend=herdr

(b) LIVE process in pane w2:p2:
    shell_pid = 27858
    pid 32682  argv0=claude  cwd=/Users/max/.treehouse/demoproj-a2862e/1/demoproj

(c) which seat's profile store holds this worker's own copy (/Users/max/.treehouse/demoproj-a2862e/1/demoproj):
    seat-one   HOLDS IT
    seat-two   -

(d) startup identity the LIVE claude process wrote into each profile:
    seat-one   firstStartTime=2026-09-24T03:25:09.544Z userID=aa2f4cf8e5544b04
    seat-two   (no profile written yet)

Note seat-two has no profile written at all at this point.

The home switches to seat-two, then worker B starts

== 5. switch the home to seat-two (A keeps running) ==

$ seatenv /Users/max/.treehouse/firstmate-97638e/2/firstmate/bin/fm-seat.sh switch seat-two --force
switched: seat-one -> seat-two
applies to NEW claude workers only; running workers keep their own seat
config-push: no live secondmate homes found

$ seatenv /Users/max/.treehouse/firstmate-97638e/2/firstmate/bin/fm-seat.sh status
active seat for NEW workers: seat-two
active profile: <lab>/seats/seat-two
login state: unknown
auto-switch threshold: (unset - no automatic switching)
auto-switch watch: not armed

live workers keep the seat they launched with:
  demo-a	<lab>/seats/seat-one

== 6. spawn worker B after the switch ==

$ spawn demo-b
spawned demo-b harness=claude kind=scout window=fm-lab-fork-sync-23637-12947:w3:p2 worktree=/Users/max/.treehouse/demoproj-a2862e/2/demoproj

B is on seat-two; A, still running, is still on seat-one

== 7. B landed on seat-two; A, still running, is still on seat-one ==

--- worker B, spawned after the switch to seat-two (demo-b) ---

(a) task record:
    window=fm-lab-fork-sync-23637-12947:w3:p2
    worktree=/Users/max/.treehouse/demoproj-a2862e/2/demoproj
    harness=claude
    claude_seat=<lab>/seats/seat-two
    backend=herdr

(b) LIVE process in pane w3:p2:
    shell_pid = 48390
    pid 53880  argv0=claude  cwd=/Users/max/.treehouse/demoproj-a2862e/2/demoproj

(c) which seat's profile store holds this worker's own copy (/Users/max/.treehouse/demoproj-a2862e/2/demoproj):
    seat-one   -
    seat-two   HOLDS IT

(d) startup identity the LIVE claude process wrote into each profile:
    seat-one   firstStartTime=2026-09-24T03:25:09.544Z userID=aa2f4cf8e5544b04
    seat-two   firstStartTime=2026-09-24T03:25:41.935Z userID=6e78998630b325a8

--- worker A, re-read after the switch (demo-a) ---

(a) task record:
    window=fm-lab-fork-sync-23637-12947:w2:p2
    worktree=/Users/max/.treehouse/demoproj-a2862e/1/demoproj
    harness=claude
    claude_seat=<lab>/seats/seat-one
    backend=herdr

(b) LIVE process in pane w2:p2:
    shell_pid = 27858
    pid 32682  argv0=claude  cwd=/Users/max/.treehouse/demoproj-a2862e/1/demoproj

(c) which seat's profile store holds this worker's own copy (/Users/max/.treehouse/demoproj-a2862e/1/demoproj):
    seat-one   HOLDS IT
    seat-two   -

(d) startup identity the LIVE claude process wrote into each profile:
    seat-one   firstStartTime=2026-09-24T03:25:09.544Z userID=aa2f4cf8e5544b04
    seat-two   firstStartTime=2026-09-24T03:25:41.935Z userID=6e78998630b325a8

-- what each seat profile directory now holds (written by its own live worker) --

$ sh -c ls -A '<lab>/seats/seat-one' '<lab>/seats/seat-two'
<lab>/seats/seat-one:
.claude.json
backups
cache
sessions

<lab>/seats/seat-two:
.claude.json
backups
cache
sessions

Four independent reads agree, and the decisive one is (d): seat-two's profile did not exist until B launched on it, and seat-one's startup identity is unchanged by the switch. A's record, its live process, and its seat are all untouched.

Both mechanisms configured: the spawn refuses

== 8. both mechanisms configured: the spawn refuses ==
wrote <lab>/home/config/claude-account (seat-two still active)

$ spawn demo-c
error: this home configures a worker account pin and an active Claude seat, and both choose a Claude worker's configuration directory:
  <lab>/home/config/claude-account
  <lab>/home/config/claude-seat
remove either file to resolve the conflict

-- nothing was created for demo-c --

$ sh -c test -e '<lab>/home/state/demo-c.meta' && echo 'RECORD EXISTS (bad)' || echo 'no task record'
no task record

$ sh -c ls -d /Users/max/.treehouse/demoproj-*/*/demoproj 2>/dev/null | sed 's/^/ worktree: /'; echo " total: 2 (A and B only; none for demo-c)"
 worktree: /Users/max/.treehouse/demoproj-a2862e/1/demoproj
 worktree: /Users/max/.treehouse/demoproj-a2862e/2/demoproj
 total: 2 (A and B only; none for demo-c)

$ sh -c '/Users/max/.treehouse/firstmate-7bab20/2/firstmate/bin/fm-herdr-lab.sh' run 'fm-lab-fork-sync-23637-12947' pane list 2>/dev/null | wc -l | sed 's/^/ lab panes: /'
 lab panes:        1

No endpoint, no worktree, no task record.

Test results

Two separate measurements. The suites below were run by hand on the synced branch before this pipeline run, at commit 3bbf7efe, to settle which failures predate this work. The pipeline's own test step re-ran afterwards, against the code as amended by its three review fix rounds, and passed - that step is the authority on the final head; this section is the authority on whose the pre-existing failures are.

Green at 3bbf7efe (16 suites): fm-seat, fm-worker-account, fm-spawn-batch, fm-spawn-dispatch-profile, fm-spawn-worktree-settle, fm-spawn-pool-base-freshen, fm-spawn-compact-adviser-disable, fm-spawn-compact-adviser-disable-remote, fm-crew-state, fm-classify-corr-token, fm-classify-decision-key, fm-send-resolve-key, fm-fleet-snapshot-view, fm-wake-drain-open-decisions-cursor, fm-usage-warner, fm-brief.

Four suites failed at 3bbf7efe. All four were settled by base comparison, none is caused by this branch, and none is repaired here.

Suite Failing assertion Settled how Verdict
fm-bootstrap no-key use-profile diagnostic changed from main passes on this branch with TYPESAFE_API_KEY unset environment: the already-filed key leak
fm-dispatch-resolve absent key prints nothing on stdout passes on this branch with TYPESAFE_API_KEY unset environment: same key leak
fm-captain-hold-lifecycle refusal must be explicit fails identically on unmodified upstream/main ac2ed3b2 upstream
fm-control-relaunch a relaunch must not re-run a transition the row already reflects fails identically on unmodified upstream/main ac2ed3b2 host tooling

On fm-control-relaunch: the run refuses with automatic backlog transitions require tasks-axi 0.2.6 or newer. The installed tasks-axi is 0.2.5, and the floor FM_TASKS_AXI_MIN=0.2.6 is upstream's own in bin/fm-tasks-axi-lib.sh, a file this branch does not touch. The suite gates on command -v tasks-axi rather than on the version, so an installed-but-too-old tool runs the case and fails it. Upgrading the host's tasks-axi clears it; nothing in this branch is involved.

Both TYPESAFE_API_KEY suites pass on this branch once the key is out of the environment:

=== branch, with TYPESAFE_API_KEY unset ===
FM_TEST_END tests/fm-bootstrap.test.sh exit=0
FM_TEST_END tests/fm-dispatch-resolve.test.sh exit=0

Both upstream failures reproduce on the untouched base:

=== unmodified upstream/main ac2ed3b2 ===
not ok - refusal must be explicit
FM_TEST_END tests/fm-captain-hold-lifecycle.test.sh exit=1
not ok - a relaunch must not re-run a transition the row already reflects
FM_TEST_END tests/fm-control-relaunch.test.sh exit=1

Documentation

docs/claude-seats.md "Adding a second seat" now points first at the metaplanet-dev repository's claude-seats.sh setup (documented in its SETUP.md) for building a seat that carries the owner's shared body, and states plainly that fm-seat.sh add creates a bare directory only, with none of the owner's settings, hooks, skills, or agents. "Limits worth knowing" gains a platform-scope paragraph: verified on macOS, with the Keychain assumptions stated and Linux/Windows marked unverified and out of scope. No third document; the metaplanet-dev SETUP.md needs no change, as it already hands switching to firstmate.

mremond and others added 30 commits September 22, 2026 11:41
…nguid#5294)

* fix(bin): map passed-with-override to done instead of unknown

no-mistakes' axi status emits outcome: passed-with-override for a run
that finished with an explicitly approved Test or CI exception. Both
bin/fm-crew-state.sh's outcome resolver and bin/fm-teardown.sh's
pre-teardown terminal-run check only matched the literal passed and
checks-passed tokens, so this outcome fell through to unknown/parked
and a finished worker awaiting merge kept getting re-alerted as stale,
while an abort race during teardown could also leave a finished run
misreported as still parked.

Map passed-with-override to the same done/terminal handling as a
clean passed in both places.

* fix(document): Replace stale outcome mapping with authoritative pointer

* fix(ci): Fixed a pre-existing mock-clock race in tests/fm-contributions.test.sh by advancing time only during the serial issue read. Reproduced the exact CI failure before fixing it. Forced-race replay, all 38 contribution scenarios, scoped ShellCheck, Bash syntax, and diff checks pass. Only the test fixture changed; CI rerun remains with the outer executor
* fix: close landed workers from supervision in both postures and at return

During the 2026-09-22 away window every exemption worker whose pull request
had merged was left sitting for nine hours. The supervision branch received
the stale wake, the merge-landed check, and the hourly inactive-outcome row
for each of them, ran the recovery playbook, found nothing to recover, and
reported "no further action". The branch prompt granted ordinary teardown of
a confirmed-landed task without ever naming the moment or the command, and
the playbook has no landed exit, so the stale path ended at "nothing to
recover". The return brief then listed only blockers, decisions, and the
latest five routine outcomes, so the landed workers stayed invisible after
the captain came back.

- bin/fm-branch-prompt.sh: name the merge-landed wake, and any later stale,
  inactive-outcome, or heartbeat row on a done task with a merged PR, as the
  moment to claim the lease and run bin/fm-teardown.sh with no flags; a
  refusal is reported, never forced or worked around. Add teardown to the
  handling tool list.
- stuck-crewmate-recovery: a landed worker is not a recovery case; point at
  the ordinary teardown owner for each actor.
- bin/fm-afk-return.sh: render a "Landed, cleanup due" section from durable
  records only (a live task record whose recorded PR carries the
  merge-notification marker), between could-not-fix and handled, without
  holding the gate; the afk skill's return step closes each listed task
  through ordinary teardown once the check clears.
- tests: pin the prompt rule in fm-branch-supervision and the brief section
  in fm-afk-return through the real marker writer.

* no-mistakes(document): Document landed-task cleanup ownership
* fix(bin): surface a green no-mistakes PR still in ci merge monitoring

A green PR could sit unreported because neither the worker nor the
supervisor could observe checks-green while the ci step kept monitoring
for the merge.

Supervisor read: fm_nm_select_run's capped-overview inventory reader looked
the repository up by the task worktree path, but no-mistakes registers a
repository once by its main clone path and resolves every linked worktree
to it, so on every task copy of a busy repo the lookup matched no row and
each read reported "complete same-branch run inventory unreadable". Key the
lookup on the overview's own top-level `repo:` line, which every axi
release emits as the resolved working_path.

Even with a readable run, the ci-log classifier treated "base branch
advanced ..., re-arming CI monitor timeout" as not-ready. The monitor logs
a checks state only when it changes and a base advance does not clear
readiness, so a green PR read as still validating for as long as main kept
advancing. Stop treating that line as a marker, matching no-mistakes' own
ci-log parser, and name the run's PR URL in the held-for-merge reading so
the existing inactive-outcome path can act on it without a worker report.

Worker contract: `axi status` never reports checks-passed while the ci
step monitors for merge, so the definition of done no longer makes a
status poll the wait for the next gate or outcome; the drive call's own
return is the green signal, reattached with `no-mistakes axi run` after a
bounded return.

* no-mistakes(review): read the full ci log when checking checks-green

* no-mistakes(review): correct stale ci log tail wording in docs

* no-mistakes(document): Document checks-green supervisor fallback
* fix: derive Lavish polling server from its board session

* no-mistakes(document): Document session-derived Lavish polling

* no-mistakes(document): Correct Lavish routing verification claims
… vanish (kunchenguid#4900)

* fix(bin): ignore vanished state scratch files on secondmate relaunch

Relaunch refused when find(1) exited non-zero while listing a secondmate
home's state directory. A live watcher can delete scratch files between
readdir and processing, which is not evidence that child *.meta records
are unreadable.

Prove the directory is listable from its mode and keep the existing
readable-meta loop as the child-record guarantee. Fixes kunchenguid#4765.

* no-mistakes(review): Skip chmod-000 unlistable-state relaunch test when running as root
…d#4907)

* fix(bin): treat home-owned status closes as already read

Self-announced bookkeeping appends now record their exact byte ranges.
Later drains and signal scans skip those ranges, so two distinct
--resolve-key answers after an OPEN DECISIONS fold do not each wake the
supervisor. Worker-authored lines outside that ledger still signal.

* no-mistakes(review): Keep owned closes in unread status; lock ledger writes

* no-mistakes(review): Drop fold-lag wake suppression so folded worker decisions still wake

* no-mistakes(review): Require real owned growth before ledger marks status seen

* no-mistakes(document): Clarify home-appends ledger scope versus UNREAD STATUS

* no-mistakes(review): Restore fold-lag path, drop owned-range filters, fix test

* no-mistakes(review): Align ledger docs and scope ledger to wake path only

* no-mistakes(review): Restore stranded historical-annotation test comment to its function

* no-mistakes(review): Retire the home-appends lock alongside its ledger

* no-mistakes(document): Note ledger's lock-helper dependency in classify library

* no-mistakes(review): Append-and-coalesce home-appends ledger; fix stamped-line assertions

* no-mistakes(review): Drop redundant empty-span branch; make owned test pin ledger

* no-mistakes(document): Document covers' ascending-order dependency on home-appends ledger

* no-mistakes(document): Note owned-append skip in watcher signal-scan comment
…nguid#5350)

* chore(bin): raise tasks-axi, quota-axi, and lavish-axi floors to latest

Raise the minimum versions to tasks-axi 0.2.6, quota-axi 0.1.50, and
lavish-axi 0.1.77, pin CI's tasks-axi install to 0.2.6, and move the
floor-boundary test fixtures to the new versions.

tasks-axi 0.2.6 makes a failed relation deliverable for a promised-final
expecting pr-merged, so add the regression test: a bound work that ends
failed reports its honest outcome text through fm-public-followup-emit.sh,
consume marks the commitment ready, and deliver posts that text exactly
once.

Also make two hang-guard tests in fm-backlog-atomicity portable to hosts
without coreutils timeout, and stop an installed herdr from leaking into
the secondmate-liveness husk classifier test.

* no-mistakes(review): drop out-of-scope bounded_run hang-guard helper from atomicity test

* no-mistakes(review): pin quota-axi floor at 0.1.49 across fixtures

* no-mistakes(document): Document failed public-followup delivery behavior

* no-mistakes(ci): Updated quota-axi floor and all 0.1.49 fixtures to 0.1.51, corrected bootstrap boundaries to 0.1.51/0.1.52/0.1.50, and bumped the bearings lavish-axi stub to 0.1.77. Bearings, quota procevent, quota chooser, startup budget, and bootstrap floor coverage passed; the full bootstrap suite exceeded the 240-second local command limit after relevant checks passed. git diff --check passed
…rker copy (kunchenguid#4878)

* fix(bin): refuse ship done: when the named head lives only in the worker copy

A ship done: is not current-state done until that exact commit is reachable
outside the disposable copy. The check tests the named head, not whether
some branch moved.

* fix(bin): gate CI-ready ship done: on named-head reachability, not handoff

Keep no-mistakes' first done: as the pipeline handoff, apply the same shared
check when registering a PR and when a secondmate publishes ledger-first,
treat a recorded merged PR as landed after prune, and name the PR head
instead of scanning free-text SHAs.

* no-mistakes(review): Bind named-head gate to recorded PR and forge heads

* no-mistakes(review): Gate direct-PR forge heads and keep pending ledger deliveries

* no-mistakes(review): Align worker done wording, test mapping, pending-retry test

* no-mistakes(test): Raise watcher test time limit to stop load flake

* no-mistakes(document): Restore ledger-path fact and name named-head gate coverage

* ci: re-attest named-head ship-done gate for a fresh serial-3 verdict

* no-mistakes(review): Simplify local-only gate, gate keyed done lines, document recovery

* no-mistakes(document): Name fm-crew-state among named-head gate callers
…all alarm (kunchenguid#5204)

* fix(bin): ring a proven-idle secondmate before a wake-loop stall alarm

A leftover foreign-queue row on an idle, alive, ring-safe mate is still drainable in that home. Ring once, reset the observation interval, and keep the parent alarm for unknown, busy, or still-frozen rows.

* no-mistakes(review): Mark drain steer with from-firstmate fire-and-forget carrier
…unchenguid#5335)

The re-arm recovery cases judged "the watcher stayed live instead of
surfacing recovery" with fixed budgets below what a real stale-lock
recovery costs on a contended host: the arm's default 10s confirmation
deadline, a start helper that returned after about 4s whether or not the
arm had confirmed its watcher, and an 80-poll exit wait.
A changed-suite run beside other suites starves the recovery's many
short-lived processes while this suite's sleeping poll loops keep their
pace, so a watcher still surfacing its recovery read as one that stayed
live (issue kunchenguid#3793).
The original 0.25s window after confirmation was widened to 80 polls in
kunchenguid#3837, which left the same race at a larger size.

Following the CONTRIBUTING.md fixture-budget rule, the re-arm helper now
gives the arm an explicit 30s confirmation budget and waits for its
confirmation or exit within a ceiling that outlasts it, and every wait on
a re-armed watcher uses one named iteration-counted ceiling that outlasts
the same budget.
A passing case returns as soon as the arm reports or exits, and a watcher
that never surfaces its recovery still fails.

A new case delays every mktemp and readlink the re-armed watcher runs
after it publishes its beacon, so its first poll and exit take about 13s
on any host.
It fails with the reported symptom on the previous budgets and passes now.
No bin/ change.
* fix(bin): let one TERM always stop the watcher on bash 5.2

Bash 5.2 runs a pending trap from the parser entry of the next command
substitution it expands, where the trap body is parsed as the inside of
that substitution and fails ("trap: line 2: unexpected EOF while looking
for matching `)'") or is dropped silently, consuming the signal. The
watcher's `trap 'exit 1' HUP INT TERM` could therefore ignore a TERM and
keep polling while its stopper waited: the triage suite's reap waited
forever (CI jobs cancelled at 30 minutes), and the arm's signal path and
the away-mode daemon's shutdown wait for the watcher the same way.
Bash 5.3 fixed the parser; 5.2 is the stock bash on Ubuntu 24.04.

HUP and TERM now keep bash's native fatal-signal handling, which runs the
EXIT trap (watcher_cleanup) and exits on bash 3.2, 5.2, and 5.3. INT keeps
its trap because bash ignores a direct SIGINT while a child runs. The
check-spawn deferral window no longer contains a command substitution.

The triage suite's reap is now bounded and fails the case within 10s with
process evidence instead of hanging the job, and a new regression test
proves TERM stops a watcher blocked inside a poll's pane capture and still
releases its lock and records an acknowledgeable stop.

* no-mistakes(document): Clarify watcher stop-signal documentation
…id#5374)

* fix(bin): submit our own stuck doorbell instead of skipping every later ring

* no-mistakes(review): Confirm and retry Enter once on stuck-doorbell submit

* no-mistakes(document): Clarify doorbell retry and pending-composer documentation
* feat(bin): add the opt-in fleet activity ledger

Homes that create config/fleet-ledger get an append-only JSONL file,
state/fleet-ledger.jsonl, recording task.dispatched, task.status,
task.merged, and task.cleaned_up so outside tools can follow a fleet.
With the flag absent each producer does one file test and nothing else.
docs/fleet-ledger.md owns the record contract and its documented limits.

* no-mistakes(review): Record task.status text verbatim after the first colon

* no-mistakes(document): Clarify fleet ledger status and setup documentation

* no-mistakes(ci): Fixed a timing race in tests/fm-pi-branch-extension.test.sh: the replacement-wake test now waits for the prompt to start before releasing it. The focused test passed twice, and git diff --check passed
…nchenguid#5352)

* fix(bin): format, validate, and surface public-followup deliverables

brief pre-fills report_path=data/<work-id>/report.md and states the accepted
format of every value it cannot know instead of a bare <value> placeholder.
fm-public-followup-emit.sh refuses a deliverable tasks-axi would refuse, in
both the direct and staged destinations, naming the key, value, and format.
consume records the specific deliverable, outcome, or missing key behind a
tasks-axi refusal, and each refusal wakes the owning home once through the
existing relay poll.

* no-mistakes(review): refuse emits missing a required deliverable in both destinations

* no-mistakes(review): require promised deliverables and keep rejections recoverable

* no-mistakes(review): mirror tasks-axi's canonical pull request URL rule

* no-mistakes(review): keep a rejection wake whose line cannot be read

* no-mistakes(review): key emit-time rules on the promise, not the outcome

* no-mistakes(review): bound deliverable keys and values as tasks-axi does

* no-mistakes(review): state rejection wakes as at-least-once and pin it

* no-mistakes(review): enforce the promised contract tasks-axi holds at emit

* no-mistakes(review): stop inferring a staged promise from its outcome

* no-mistakes(document): Refresh public follow-up documentation

* no-mistakes(ci): Fixed both CI flakes. Watcher cleanup is now installed before singleton acquisition, preventing timeout races from leaving stale locks while preserving recovery-failure evidence. Bearings render fixtures now publish a valid isolated Lavish session store and retire each listener after rendering, eliminating false unowned-source races. Verified with checkpoint stress, fm-watch-checkpoint, fm-watcher-lock, repeated fm-bearings-board-render runs, project lint, syntax checks, and git diff checks

* Revert unrelated CI auto-fix edits to the watcher and bearings board test

The CI step's automatic repair changed bin/fm-watch.sh and
tests/fm-bearings-board-render.test.sh to chase two intermittent CI
failures that also occur on main and are not part of this change. Restore
both files so this branch carries only the public-followup deliverable fix.

* no-mistakes(review): Refuse a repeated --deliverable key at emit argument parsing

* no-mistakes(document): Clarify public-followup validation and rejection-wake documentation
* Add verified Devin CLI worker adapter

* no-mistakes(review): Drop Devin resolver refusal and launch marker

* no-mistakes(review): Verify devin in bootstrap, fold kind rule, update docs

* no-mistakes(document): Document Devin sidecar, resume, and worker-only facts

* no-mistakes(document): Document Devin interrupt, liveness anchor, composer signals

* fix(control): never pair Devin interrupt presses on an idle agent

A fast double Escape on an idle Devin opens its /revert picker, where Enter
reverts file changes. fm-control now sends the second press only after the
first renders Devin's 'esc again to interrupt' armed hint, never sooner than
0.5 s, closes a revert picker a mistimed press opened with one Escape, and
refuses to type the exit command while that picker is open. An unarmed
interrupt reports cancel=not-running and leaves the busy record untouched.

* fix(devin): disable Claude hook import and commit attribution for workers

The per-task Devin config now forces read_config_from.claude=false, so a
worker no longer runs the user's or project's Claude Code hooks (including
Herdr's Claude agent-state hook), and attribution=false, so Devin adds no
Co-Authored-By trailer or Generated-with line to commits and PRs.

* test(devin): extend live guard and record Herdr and revert-picker evidence

The credentialed live guard now fails if an imported Claude Code hook runs,
if the worker's commit carries Devin attribution, if an idle interrupt sends
more than one press or opens the revert picker, or if an open picker lets
exit through or is closed with a revert. The Devin reference, agent-control
doc, and verification records carry the 2026-09-22 tmux and Herdr lab results,
including the Herdr exit refusal.

* no-mistakes(document): Correct Devin documentation links and lifecycle guidance

---------

Co-authored-by: Denis Beliaev <[email protected]>
…id#5322)

fm-crew-state classifies the no-mistakes outcome 'passed-with-skips' as
unknown, so a finished worker awaiting merge is re-alerted as stale. The
same blind spot lets fm-teardown's pre-teardown terminal-run check refuse
a legitimate abort race that lands on this outcome.

Map passed-with-skips to done in crew-state resolution, keeping the
skipped publication/CI verification visible in the detail rather than
reporting a clean pass, and recognize it as terminal during teardown.
…nguid#5382)

* fix: refuse missing backend adapter before source

* no-mistakes(review): Gate backend precheck under stock Bash

* no-mistakes(document): Clarify adapter precheck docs

* no-mistakes(lint): Suppress intentional child Bash ShellCheck warning
…kunchenguid#5338)

* fix(test): repair tmux liveness and calm follow-up loaded_off regressions

Both self-tests fail on untouched main on a host whose coreutils are a
multicall binary and whose Chrome has no pre-warmed profile, and each failure
masks the other's file.

tests/fm-tmux-agent-liveness.test.sh - the stand-in harness processes were
symlinks to the host's `sleep`. A single-purpose `sleep` runs happily under
another name, but a multicall coreutils binary (uutils or busybox) resolves its
applet from argv[0]: `claude-link -> sleep` invoked under the harness name runs
the wrong applet and exits immediately, so no foreground process exists and
every positive case reads not-alive ("last verdict for liveness:agent was
missing (expected alive); title=sh comms=[sh ]"). Build a dedicated spinner as
the stand-in target, exactly the way the version-string case already builds its
executable, and require the fallback target to demonstrably survive the rename
before using it. Every assertion is untouched; the stand-in identity signal is
unchanged (the kernel still records the symlink name as the executable
identity).

tests/fm-calm-pi-extension.test.sh - render_export_dom pinned a brand-new
`--user-data-dir` per attempt. On Google Chrome for Testing 151.0.7922.34 that
pristine profile makes Chrome's first-run initialization never complete: the
browser and its renderers start, but --dump-dom never returns, so all three
bounded attempts end exit=0 timed_out=yes bytes=0 and the DOM assertions never
run ("could not render calm-mode HTML export DOM"). Chrome's own profile
creation under a fresh HOME renders the same document in about a second, so the
helper now gives Chrome a private per-attempt HOME instead of the explicit
profile flag. Each attempt still gets an isolated profile, and every DOM
assertion is unchanged.

Root-cause evidence: a pristine --user-data-dir with `--headless=new
--dump-dom` had not returned after 150s, while the same command with an empty
HOME and no --user-data-dir returned the full DOM in ~1s, and reusing an
already-populated profile also returned it in ~1s. The render failure masked
the rest of the file: with it repaired, the Pi follow-up loaded_off case passes
unmodified against an installed @earendil-works/pi-coding-agent package.

These two failures block downstream validation of every lane on hosts with
multicall coreutils or a fresh Chrome profile.

Verification:
- timeout 300 bash tests/fm-tmux-agent-liveness.test.sh -> exit 0, 16 assertions ok
- timeout 700 bash tests/fm-calm-pi-extension.test.sh -> exit 0, 13 assertions ok,
  including the Pi operational follow-up loaded_off case
- bash -n and shellcheck clean on both touched files
- rest of tests/: bin/fm-test-run.sh --all bounded by timeout 900 completed 17 files with 0 failures (fm-afk-contract.test.sh through fm-backend-herdr-launcher-workspace-e2e.test.sh), then the bound cut off the 18th (fm-backend-herdr-presentation-e2e.test.sh, a real-herdr-gated lab test) with no failure recorded

* fix(test): give wake-queue observation checkpoints the alerting ceiling

tests/fm-wake-queue.test.sh's secondmate stall case runs bounded foreground
watcher checkpoints whose job is to record an observation, with the alerting
checkpoint that follows asserting the stall. A checkpoint's exit publishes a
downtime marker, and the next checkpoint consumes it only by reaching the end of
the watcher's poll loop, where the recovery surfacing runs after the stall tick;
the observation itself is recorded by that same stall tick. On a loaded host a
1s ceiling sits under the cost of that iteration (which includes a pane capture
in the active-turn gate), so the observation was never recorded, the downtime
marker stayed pending, and the alerting checkpoint surfaced
`check: rearm-resurface` instead of the stall it asserts:

  not ok - a foreign queue with no progress did not alert: check: rearm-resurface
  not ok - a frozen reprovisioned queue generation was hidden: check: rearm-resurface

Give the observation checkpoints that feed a later alert the same 4s ceiling the
file already documents for alerting checkpoints. The ceiling is only a bound - a
checkpoint still returns on its first actionable wake - so no assertion is
weakened, and the quiet windows get longer, not shorter.

* no-mistakes(document): docs: correct export-DOM Chrome render root cause

* no-mistakes(review): Isolate Chrome profile on macOS, dedupe tmux CC_BIN lookup

* chore: re-trigger fork workflow approval for triage

---------

Co-authored-by: Captain <[email protected]>
Co-authored-by: kunchenguid <[email protected]>
…chenguid#5383)

* fix(bin): classify a status span without re-folding the whole log

A watcher poll could take minutes, so its liveness beacon aged past the
guard's 300s grace and the Stop auto-arm reported the watcher down. On the
main home, cycles ended with beacon_age 91-235s while healthy and 534-706s
while the laptop was CPU-starved.

Cause: whenever a newly appended status span held a keyed needs-decision
or blocked line, status_span_first_actionable_record re-read and re-folded
the ENTIRE log to decide whether that opening was still live, forking
several subshells per line. On a remote second mate's mirrored parent
channel (1.2MB, ~2300 lines) that is 13-20k subshells, about 17s per log
per classification when idle, paid by every signal and heartbeat scan.

Nothing regressed recently: subshell counts per classification were
20,272 from kunchenguid#3268 (2026-08-29, which introduced the whole-log fold) and
13,188 from kunchenguid#3753 onward through HEAD. The cost grew with log size, since
parent-channel logs only grow.

Fix: fold only the captured span. An accepted opening does not depend on
earlier lines and only later lines close or supersede it, and every later
line lies inside the span, so the span fold names the same live openings
at a cost bounded by the span. Old and new classification outputs are
byte-identical across 51 span offsets of real-shaped secondmate and ship
logs.

A real-watcher regression test records every read the classification
makes through the span-reader seam and asserts none reaches before the
classified offset; it fails on the old code (5,157 bytes read from
offset 0 to classify an 84-byte span).

* no-mistakes(document): Clarify span classification and watcher regression coverage
kunchenguid#5362 and kunchenguid#4878) (kunchenguid#5381)

* test: fix watcher timing flakes in fm-pr-check-security

The bounded watcher's hang guard now counts only the watcher's own time: a
case marks the intervals where it holds the watcher on injected work or makes
it wait on concurrent work, and those no longer count against its budget. The
budget itself stays at main's sixty seconds. The helper also stops forcing a
one-second per-check timeout, which killed a correct merged poll whenever that
poll took longer than a second, so the watcher only retried it or exited on a
later check's wake without the merge.

The concurrent-publication case pauses the guard while its arming is in
flight, and its task now sorts before the contributions observer the arming
also registers, so the watcher stops on the poll under test before running
that unrelated fleet snapshot. The case also prints the watcher's stderr when
it fails.

The replacement case pauses the guard while the re-arm runs inside the
watcher, runs that injected arming with the fixture root every other arming
here uses, and waits on the replacement merge's process instead of a
two-second cap. Merged-poll runs retire the contributions observer before the
watcher starts, since no case here exercises it.

The returned-descendant case no longer races a four-second sleep or a TERM
landing at an arbitrary point in the watcher's idle loop: its descendant holds
until killed, and a second check in the same cycle witnesses that it was
drained and stops the watcher.

* no-mistakes(ci): Reproduced the intermittent board-render failure. Its Lavish stub listed an open session but omitted the session-state record required by the listener, so the build could race the listener’s exit. Added matching fixture state; the affected suite passed three consecutive runs, and shell syntax and diff checks passed

* Revert "no-mistakes(ci): Reproduced the intermittent board-render failure. Its Lavish stub listed an open session but omitted the session-state record required by the listener, so the build could race the listener’s exit. Added matching fixture state; the affected suite passed three consecutive runs, and shell syntax and diff checks passed"

This reverts commit 6a59859.
…enguid#5385)

* feat: record task.pr_ready in the fleet ledger when a task PR is registered

* feat: record worker status lines in the fleet ledger as they are written

* no-mistakes(review): Keep worker status append failures and pass the resolved config to the ledger

* no-mistakes(review): Resolve relative config override before embedding in worker command

* no-mistakes(document): Clarify fleet ledger status capture timing
…unchenguid#5386)

* test: synchronize foreign secondmate stall legs on the watcher's recorded observation

Each leg of test_secondmate_foreign_queue_stall_tracks_progress_and_alerts_once
ran the watcher under a 1s or 4s wall-clock checkpoint, but every later leg
depends on the progress observation the previous leg's watcher recorded. Under
load the watcher was killed before its first stall tick, the observation was
never written, and the next leg treated its own sighting as the first one, so
the stall alert never fired.

Run the watcher directly and end each leg on its observable outcome: the
progress marker recording the expected observation, or the watcher's own first
wake. Also move a comment orphaned above this test back to the drain liveness
test it describes.

* no-mistakes(review): Wait for full stall reset before stopping watcher leg
kunchenguid#5391)

The listener resolves its server from that store before it polls. Without a session for this board, it exits in the gap after the build has already sampled a live claim.
…#5390)

* fix(bin): prune a torn-down task's wake rows at teardown

Prune pending durable wake rows (.wake-queue) for a task when it is torn
down, clearing stale wakes for its target window, signal wakes for its status
or turn-ended files, and task-specific check wakes.

Fixes kunchenguid#3419.
Adjacent to kunchenguid#5252.

- bin/fm-wake-lib.sh: add fm_wake_queue_prune_task
- bin/fm-teardown.sh: call fm_wake_queue_prune_task in cleanup_firstmate_home_children and main teardown
- tests/fm-wake-queue.test.sh: add test_wake_queue_prune_task

* no-mistakes(document): docs: note teardown prunes a task's wake rows

---------

Co-authored-by: Captain <[email protected]>
…ixture readiness (kunchenguid#5392)

* Make portable tests match resolved host paths

Summary:
- Match macOS full Node command paths by basename in the Gemini behavior test.
- Mirror symlink-resolved Nix PATH behavior and give the loaded-host race bounded headroom.

Testing:
- bin/fm-lint.sh
- bin/fm-test-run.sh tests/fm-on.test.sh tests/fm-gemini-harness.test.sh tests/fm-procevent.test.sh

Related:
- None

* no-mistakes(review): Mirror production PATH helper rules per directory group in tests

* no-mistakes(test): Wait for orphan runner start marker instead of fixed sleep

* no-mistakes(document): Clarify gemini ancestry test comment for versioned node comm

---------

Co-authored-by: Sandeep Salwan <[email protected]>
…ns (kunchenguid#5389)

The sibling secondmate stall cases in tests/fm-wake-queue.test.sh now wait for the watcher's recorded observation instead of a one-second wall-clock checkpoint, so they can neither fail nor pass vacuously under load. Deterministic proof with a 5s watcher launch delay: before the fix 4 cases passed vacuously and 6 failed; after it all 10 pass on the recorded observation.

Also includes a CI flake fix from validation: fm_control_harness_supported in bin/fm-control-lib.sh finishes reading the harness allowlist before returning, removing intermittent broken-pipe diagnostics. Behavior is unchanged.
… tail (kunchenguid#5336)

* fix(bin): refuse a Herdr submit that would send only a message tail

A long typed payload can sit in the composer as a suffix, or as a paste placeholder plus a remainder, and the following Enter was still reported as delivered. Prove the selected composer holds the payload before Enter, and report failure when it does not.

* no-mistakes(review): Scope Herdr payload proof to Claude, clear composer on refusal

* no-mistakes(test): Clear refused Herdr composer drafts one wrapped row per press

* no-mistakes(test): Accept Claude's multi-line paste placeholder in Herdr submit proof

* no-mistakes(review): Accept Claude read-back that drops U+2063 in Herdr proof

* no-mistakes(document): Document Herdr proof ignoring U+2063 operational mark

* no-mistakes(ci): I made a one-line test change. The failing check comes from a timing race in an existing test that this PR doesn't touch. **What failed:** `tests/fm-procevent.test.sh` failed at "the superseded paced runner invoked its stale command" (line ~3313). The PR only changes the Herdr files and their tests, and the same shard passed on main at the base commit. **Why it can fail:** the fixture starts a second runner with a 3-second launch floor (the minimum wait since the source's last launch). That runner sleeps for the rest of the floor and only then checks whether its registration was replaced (`fm_procevent_launch_floor_wait` in `bin/fm-procevent-lib.sh`). The test then waits for the claim and re-registers the source. If that takes longer than about 3 seconds after the first launch, the old runner wakes up, finds its registration still current, and runs the stale command. That produces the second log line the test reports. The CI shard was slow (this one test took 160 s). **Fix:** in `tests/fm-procevent.test.sh` I raised the superseded runner's floor from 3 to 15 seconds and added a comment explaining why. The floor now outlasts the fixture setup even on a loaded runner. Nothing else changed: the first launch and the later fresh-registration start still use a 3-second floor, and no product code changed. **Verification:** - The full test file can't give a reliable result on this machine (load average about 64 on 8 cores). It failed earlier, at the reconcile assertion around line 1680, before it reached this section. - I ran the changed section by itself (file setup plus the pacing-race block) five times with the fix: all passed, in about 9-13 s each. - The original code also passed five out of five, so the race didn't reproduce locally. The diagnosis rests on the code path and the CI log. - I haven't seen the full file or the CI shard pass with the fix yet

* no-mistakes(test): Accept Claude folder-trust prompt via down+enter in live e2e

* no-mistakes(document): Note unreadable Claude composer refusal in Herdr docs
…unchenguid#5427)

Speaking as Kun's firstmate: squash-merging — opt-in (forge=gerrit registry-gated; default project-mode stdout restored to two words), attestation MATCH, CI+NM green, safe review, MERGEABLE.
…uid#5358)

* feat(bin): add an opt-in per-home worker account pin

A home that mixes work and personal accounts for one runner had no way to
say which account its workers launch on: Claude workers inherited whatever
CLAUDE_CONFIG_DIR the supervising process had, Pi workers the pane's ambient
root, and an ambient API key outranked both, with no signal at launch.

config/claude-account and config/pi-account now pin that choice per home.
With neither file every launch is unchanged. With one, every launch of that
runner from the home (ship, scout, local secondmate, raw Claude command, and
relaunch) runs under the declared root, and the spawn refuses before any
endpoint exists when the file is malformed or the runner's own check
(claude auth status, pi auth check with a model-listing fallback) says the
pinned account is not signed in. The check runs in a cleared environment so
an ambient credential cannot answer for an empty root. A pinned Claude launch
sheds the environment credentials Claude ranks above a stored login; a pinned
Pi launch needs an explicit <provider>/<id> model for a declared provider and
also carries --provider. The chosen account is printed on the spawned line and
recorded in the task record, and relaunch checks the pin before stopping the
running agent.

* test(secondmate): give the concurrent config-push wait room for a slow host

test_config_reread_serializes_concurrent_pushes waited about two seconds for
the first fm-config-push.sh to reach its first send-keys. On a slower host
that push takes four to five seconds, so the test failed on main before the
push ever got there. The loop still leaves as soon as the marker appears, so
the larger bound costs nothing where the push is fast.

* no-mistakes(review): Refuse raw Claude account overrides under a pin
…ts (kunchenguid#5470)

* fix(bin): keep the Herdr lab session option before a -- delimiter

fm-herdr-lab.sh run appended --session <lab> after every argument, so a
command with a passthrough delimiter such as agent start ... -- <agent args>
handed the session flag to the agent and Herdr routed the call by the
caller's ambient socket instead of the lab.
The helper now inserts --session <lab> immediately before the first --
delimiter and keeps the trailing form otherwise.

* no-mistakes(document): Clarify Herdr lab session option placement
kunchenguid and others added 11 commits September 23, 2026 15:58
* feat(bin): guard the partition, harness pin, and bounded exec for a non-Pi supervision host

Lease liveness is now the pure record test in every calling context, so an
unmarked main honors a live branch lease held by a separate process, and a
lease file engages the guard's claim serialization for any caller; a home
with no lease files still takes no lock.

bin/fm-harness.sh honors FM_SUPERVISION_PRIMARY_HARNESS while
FM_SUPERVISION_ACTOR=branch, so a supervision branch running under another
harness resolves own, crew, and secondmate to the primary's harness.

fm_tasks_axi's watchdog moves into bin/fm-timeout-lib.sh as fm_exec_timed with
a separate grace: the perl watchdog is preferred, runs the command in its own
process group against wall-clock deadlines, forwards TERM/INT/HUP, and reaps
the group, so a descendant holding captured output can no longer keep the
caller waiting past the bound on a host without timeout.

The Claude Stop auto-arm header records that Claude drops the exit 2 of a hook
it terminated at the configured timeout, re-measured on Claude Code 2.1.281.

* fix(bin): state that fm_exec_timed cannot reach a descendant in its own process group

Live runs of real Claude and Pi engine turns under the bound showed both CLIs
start every tool command in a process group of its own, so those processes end
through the engine's own TERM handling rather than the group signal or reap.
Also clears the new timeout test's ShellCheck findings.

* no-mistakes(document): Clarify cross-harness lease documentation
…ne (#2)

* fix(bin): keep a decision open until its own key is resolved

A worker's `done:` line retired every open decision on a ship or scout
task. The decision stopped being listed, `fm-send.sh --resolve-key`
could no longer find its key to answer it, and `fm-captain-hold.sh`'s
completion gate saw an empty set and let the task finish with the
captain's question still owed.

The contract in every worker brief (bin/fm-brief.sh rule 6) always said
the opposite: a decision or blocker stays open until a `resolved` line
carrying its exact key lands, and a later `done:` or `working:` line
never closes it. The brief was right; the fold was wrong, so the fold
changes.

_fm_decision_fold_line is the one owner of "is this key open", and every
reader already consults it - the whole-file fold fm-send reads, the
cursor-backed fold the OPEN DECISIONS surface reads, the per-key history
read, and the decision-origin walk. Removing the terminal rule there
fixes all of them at once and removes the task-kind plumbing that existed
only to serve it. The persisted fold version is bumped so cursors folded
under the old reading are rebuilt rather than trusted.

fm-send's refusal no longer asserts "already closed or mistyped" - a
claim about the record it had not established. It now reports what the
lookup found: a key the log really closed names the verb that closed it,
and a key no line ever stated says exactly that, and says it does not
prove the decision was answered.

* test: follow the fold's contract in every downstream reader

The completion gate, the crew reading, and the fleet snapshot each had a
case asserting that a `done:` or `failed:` line clears an open decision.
Each now asserts what the fold actually promises: the decision survives
the terminal line and clears only when its own key is closed.

The fleet-snapshot case is the Lavish-103 property, and its surviving
half is unchanged - report PROSE never opens or reopens a decision. What
moved is how a finished scout stops being pending: it needs a real close
(an answer, or the durable captain-held transfer fm-captain-hold.sh
writes before completion) rather than the `done:` line discarding the
record. The clean report-pointer reading is still asserted, now behind
that close.

* fix(bin): report a transferred decision as transferred, not settled

A `captain-held` line closes the status ledger by moving the question to
a durable captain-held task; it does not answer it. The refusal lumped
that in with a genuine resolution and told the caller the decision was
"already closed", which is the same false certainty this refusal was
rewritten to stop producing - the answer may still be owed.

Wording only. No lookup was added: the search still covers the decision
slug and the legacy derived id, and a transferred row is commonly keyed
by neither. That gap is real and is left to be filed separately; what
changes here is that the message now says what it searched, says the
close was a transfer, and points at the transfer line for the task that
holds the question.

* fix(bin): report only the captain-hold lookups that actually ran

The rewritten --resolve-key refusals removed one false claim and left
another standing. Every branch asserted that no captain-held task was
open, but fm_send_hold_resolved_id returns before any lookup when
tasks-axi is not on PATH, so in a home without it - or any PATH-stripped
context - the refusal reported an empty ledger it had never read. That is
the same substitution of a fact about itself for a fact about the world
that "already closed or mistyped" made, one ledger over.

The three refusals now take that sentence from fm_send_hold_clause, which
says whether the ledger was searched and held neither id open, or could
not be read at all and its contents are unknown. No lookup behaviour is
added; the code only stops claiming a result it does not have.

The readability flag is computed in the caller's own shell, not inside
fm_send_hold_resolved_id, because that function runs in a command
substitution: a value assigned there dies with the subshell, leaving the
clause to report a search that never ran. The first attempt at this fix
did exactly that, and the new test is what caught it.

The `needs-decision | blocked` branch is removed rather than hardened. No
non-racing input reaches it - status_key_closing_verb folds a strict
subset of the lines the open-set fold reads, through the same
_fm_decision_fold_line - and its one reachable path was a race a retry
resolves, where it told the operator they had found a reader defect and
sent them chasing a bug that does not exist. The `*)` fallback already
carries the rule that an unfound key is never called settled.

docs/architecture.md stated the no-close-on-terminal rule without
exception, which this change made false: the fleet snapshot still clears
a task's published open decisions from its own lifecycle reading rather
than from the fold. The two agreed on a terminal log before the fold
stopped closing there, so the gap is pre-existing but newly visible. The
divergence is now stated rather than contradicted, and filed as
snapshot-closes-decisions; bin/fm-fleet-snapshot.sh's clearing behaviour
is deliberately unchanged here.

status_open_decisions and _fm_status_open_decision_origins drop the
kept-but-ignored <kind> parameter, and their three in-repo call sites
drop the argument. The task kind also leaves the persisted cursor
version, where it discarded an otherwise-valid cursor and forced a full
re-fold whenever a task's .meta kind changed, for no difference in the
result. An earlier commit message in this branch claimed these reads were
already deleted; they were not, and that claim is corrected here rather
than quietly made true. Removing them left _fm_status_kind referenced
nowhere in the repo, so the function goes too.

bin/fm-crew-state.sh is deliberately untouched: its stale contract header
is real but belongs to an unlanded sibling branch that owns that file.
…nreadable reads as `unreadable` (#1)

* fix(bin): read a crew's run inventory by the repository no-mistakes actually recorded

The crew-state reader answered `state: unknown - source: run-step -
unreadable runs table` for crews whose branch simply had no validation
run, so a readable state read as an unknown worker.

Root cause, established from source and reproduced live against
no-mistakes v1.72.0: `no-mistakes axi`'s runs table is capped at ten rows
by the CLI itself, which declares the cap in its own `count: <shown> of
<total> total` line. Firstmate correctly refuses to treat that window as
complete and recovers the whole same-branch inventory from the CLI's own
state database - but it looked the repository up by the TASK WORKTREE
path, and no-mistakes registers a repository under its PRIMARY CHECKOUT
path, never under a linked worktree. The lookup matched zero rows for
every crew, since every crew works in an isolated worktree, and the
reader reported the whole inventory unreadable. The same failed lookup
also lost a genuinely running validation whenever the cap hid its row.

Neither offered lead was the trigger. The cap is the CLI's own and is
declared, not hidden; the ANSI version banner goes to stderr, which every
call in this path discards.

Fix, entirely in firstmate's own code: resolve the worktree's primary
checkout from `git rev-parse --path-format=absolute --git-common-dir` and
ask for it after the worktree path, each still an exact `working_path`
match requiring exactly one recorded row. Nothing is guessed among
candidates, and a repository recorded under neither path still reports
the read as unreadable - naming both paths it asked for.

A run-step read that fails now reports `state: unreadable` rather than
`state: unknown`, and every such detail opens with what could not be read
and why. `unreadable` is the one state word that is a claim about the
reader rather than about the crew; the script header owns that contract.
Five previously indistinguishable read failures now name their own cause.
Scope is the run-step reader only - the pane, remote-endpoint and
metadata sources still report `unknown`. Consumers match `working`,
`paused`, `parked`, `done` and `failed` positively, so `unreadable` is
handled exactly as `unknown` was.

Five colocated tests, each confirmed to fail against the pre-fix code
first: a task worktree whose branch has no run reads absent; a run hidden
beyond the CLI cap is recovered; an unreadable inventory reports the read
failure and its reason; a repository recorded under neither path still
reads unreadable; and a non-canonical task copy path still reaches its
recorded repository.

* no-mistakes(review): recognize unreadable crew state in fleet snapshot and docs

* no-mistakes(review): correct unreadable contract header and undecidable detail wording

* no-mistakes(review): state one cause per unreadable detail; correct branch narrative

Two wording fixes, plus the corrected reproduction account this branch owed.

Fix 1 - the overview-failure emit spliced the ENTIRE selection reason into
its own `run ids:` field. `${run_choice##*|}` strips through the last `|`, and
the reworded reasons contain none, so a whole sentence carrying its own
`run ids:` clause landed where ids belong: one crew line asserting two
different causes, with prose sitting inside a run-id list. Reachable whenever
the bounded `no-mistakes axi` call exits non-zero after printing part of the
table. Now only the candidate ids are spliced, for every selection shape, and
an empty id list adds nothing rather than a dangling comma.

Fix 2 - `the displayed runs table names runs the state database does not have`
fires when BOTH reads succeeded and merely disagree (a run pruned between the
`axi` call and the sqlite read), yet it inherited the shared
`could not read the complete run inventory for this branch:` opening. That
contradicted the contract this branch just wrote: a read that failed says so; a
read that succeeded names the thing it could not settle. It now opens with
`could not settle ...`; the four genuine read failures keep the read wording.

=== Corrected reproduction account ===

The reproduction narrative in 44da25f is wrong and is corrected here rather
than left to stand. It opened by attributing
`state: unknown - source: run-step - unreadable runs table` to the
worktree-path repo lookup. The source disproves that: at base 8c1cdb7 the
lookup failure prints `complete same-branch run inventory unreadable; run ids: `,
while `unreadable runs table; run ids: ` comes ONLY from the awk
structural/invalid_run branches, which a well-formed `count: 10 of 11 total`
header with zero same-branch rows never reaches.

One input set - a real linked git worktree whose primary checkout is what
no-mistakes recorded, a real capped `no-mistakes axi` overview (v1.72.0)
carrying its own `count: 10 of 11 total`, and a branch with no run of its own -
run through three code generations of fm_nm_select_run:

  pre-43bf6d3 -> unknown|unreadable runs table; run ids:
  43bf6d3     -> unknown|complete same-branch run inventory unreadable; run ids:
  this change -> absent

The first line is byte-identical to the 2026-09-21 17:55 EDT capture, including
the empty run ids.

1. The captured STRING was produced by pre-43bf6d3 code. 43bf6d3 landed
   2026-09-21 03:49:53 -0700 (06:49 EDT), about eleven hours before the
   capture, and changed that wording. This change does not fix the code path
   that printed those exact words.

2. 43bf6d3 changed the wording and LEFT THE VERDICT. The same crews, in the
   same condition, still read `state: unknown - source: run-step` on
   post-43bf6d3 code; only the detail text moved. Had the observed home been
   updated before 17:55, those two crews would still have read unknown, with
   different words.

3. Two successive causes of one continuing symptom:
   - Cause 1 (pre-43bf6d3): awk's uninitialized `seen` was string-compared
     against `expected`, so a legitimately zero-row recovered inventory took
     the structural-failure branch instead of `absent`. Closed by 43bf6d3's
     `+0` coercion.
   - Cause 2 (43bf6d3 onward): the same commit switched the repo lookup from
     the overview's own `repo:` line to the task worktree path. A task worktree
     is never the recorded `working_path`, so the recovery that would establish
     `absent` fails before it starts. Closed by this change.

4. 43bf6d3 closed cause one and opened cause two. Its stated premise that the
   real CLI overview never carries a `repo: ` identity line is false: live
   `no-mistakes axi` v1.72.0 prints `repo: <primary checkout>`, verified
   read-only against a registered repository on 2026-09-21.

5. 43bf6d3's own regression test passed only because its fixture registered the
   repository at the worktree path - the shape a standalone clone has, not the
   shape a crew has. The symptom survived the test written to catch it. That
   gap is what the new linked-worktree tests in this change close.

6. Caveat, kept visible rather than tidied away: the observed home's firstmate
   revision at 17:55 cannot be read from here, so the pre-43bf6d3 attribution
   is inference from the capture plus the code - now backed by a byte-match
   reproduction rather than by resemblance.

7. Conclusion, stated rather than left to be inferred: this change fixes the
   SYMPTOM THAT WAS REPORTED, not a lookalike, because the verdict persisted
   across both causes and only the wording changed. Both things are true and
   both are said here: the fix is needed, and the fix explains what we saw.

=== Corrected consumer claim ===

44da25f also asserted that consumers match `working`, `paused`, `parked`,
`done` and `failed` positively, so `unreadable` is handled exactly as `unknown`
was. That was false. One consumer matches the unread verdict ITSELF positively:
fm-fleet-snapshot.sh's secondmate home summary selected only
`.current_state.state == "unknown"` to report `child_current_unavailable`, so
every crew reporting the new word silently dropped out of that set and the home
summary called itself valid. Review caught it; the selector now accepts BOTH
words, the sources that still emit `unknown` keep working, and the script
header names that consumer so any future one inherits the obligation.

* no-mistakes(review): stop inventory verdicts claiming causes they cannot know

Fix 1 - the sqlite reader's shell fallback asserted an inferred cause with
four reachable outcomes behind it: `the state-database reader (python3) did
not run here`. That branch is taken whenever `fm_nm_bounded` returns non-zero,
which covers no bounding tool on PATH and python3 absent (the claim is true),
but ALSO the reader being killed by the per-read budget and the reader dying
before printing - in both of which it ran. This change's own tests exercise
those two: the time-bound test installs a `python3` that sleeps past a 1s
budget, and the no-sqlite test drives an unimportable `sqlite3` through the
same line. It now reports the outcome the caller actually observed - `the
state-database reader (python3) could not be run or did not finish` - which is
true for all four. This was the change's own defect class turned on itself: a
reader must not advertise a precision it does not have.

Folded in, same strings: the shared opening clause is now `could not read this
branch's run inventory: ` (44 characters, from 59). bin/fm-bearings-snapshot.sh
renders an in-flight ship's `doing:` at 90 characters, so the WHY now survives
with 46 characters of cause instead of 31. Bearings itself is unchanged - only
these strings. The settle-class opening keeps its own verb for the reasons
where every read succeeded.

Fix 2 - the overview-failure emit guarded only the trailing side of its id
list, so an absent record id rendered `run ids: , 01A, 01B`. Empty is the
NORMAL shape for exactly the population this change targets: `axi status` for a
crew whose branch has no run of its own prints no `id:` key at all. The list is
now built from the non-empty parts on both sides, so each of the four
combinations renders cleanly and an empty list renders nothing.

Correction to 523d2b4's body: it claimed "an empty id list adds nothing rather
than a dangling comma". That was only half true - it held for an empty
OVERVIEW id list and not for an empty RECORD id, which is the commoner case.
Fix 2 above makes it true on both sides. The neighbouring `run id: ` emit one
line up renders the same empty tail, but that shape is base behaviour
(`run inventory unavailable; run id: ` at 8c1cdb7), so it is deliberately left
alone rather than widening this change.

* no-mistakes(document): name the unreadable verdict in stale crew-state doc comments

* no-mistakes(ci): The check failed because of a test count this PR left out of date, not because of a code defect. The PR adds a test to tests/fm-fleet-snapshot-view.test.sh ("home summary reports an unreadable child state as current-state-unavailable"). Under stock Bash 3.2.57, all 19 tests in that file passed, but the "Stock macOS Bash snapshot compatibility" step in .github/workflows/ci.yml requires exactly 18 passing tests, so it failed with "expected 18 ... got 19". I changed the expected count in that step and its error message from 18 to 19. I checked it locally: running the file with /bin/bash (GNU bash 3.2.57) gives 19 `ok -` lines and no other output. The Bearings count of 59 was not changed, because this PR does not touch the Bearings test file
* feat(bin): add opt-in local Claude usage threshold warner

A threshold warner, not a viewer: fm-usage-warner.sh runs quota-axi's
existing read-only --json snapshot (never a credential refresh) and
posts a macOS Notification Center banner, edge-triggered with a
de-dupe record, only when a configured window crosses a configured
percentage. Silent and inert when unconfigured; arm refuses without a
threshold or off macOS. Reuses the watcher's existing check-shim
cadence rather than a new schedule or daemon.

* no-mistakes(review): Replace usage-warner timeout knob with fixed 10s read bound

* no-mistakes(review): Cut usage-warner read bound to fit FM_CHECK_TIMEOUT

* no-mistakes(document): Point usage-warner doc at configuration.md schema owner

* no-mistakes(ci): Shard 5 (fm-usage-warner.test.sh) failed because of this PR, and that is now fixed. Shard 7 (fm-contributions.test.sh) failed for a reason outside this PR, so I left it alone. - **Shard 5:** `action_arm` refuses to run on anything but macOS before it checks for thresholds. The arm tests ran on a Linux runner without a Darwin stub. So `test_arm_refuses_without_a_configured_threshold` got "only available on macOS" when it expected "no threshold configured", and the three arm tests after it would have failed the same way. Fix: the test now makes one `uname` stub that prints Darwin (`DARWIN_BIN`) and puts it first on PATH for every `arm` call. The Linux-refusal test keeps its own stub that prints Linux. `bin/fm-usage-warner.sh` is unchanged. Checked: all 19 cases pass on macOS, all 19 pass with a fake `uname` printing Linux on PATH to stand in for the CI runner, and `shellcheck -x` is clean. - **Shard 7:** the failing assertion is `test_reservation_defers_later_url_when_fifteen_seconds_do_not_remain` ("a later PR began without the fifteen-second observation reservation"). It depends on the wall clock and a 20-second budget. This PR changes only usage-warner files (`bin/fm-usage-warner.sh`, its test, and docs) and does not touch `fm-contributions`. This looks like a timing flake on the runner, not something this change caused. The only file changed is `tests/fm-usage-warner.test.sh`, and it is not committed

* no-mistakes(ci): Shard 5 failed because of this PR, and the fix is in `tests/fm-usage-warner.test.sh`. `bin/fm-usage-warner.sh` is unchanged. The failing case was `test_arm_writes_and_binds_the_check_and_disarm_removes_it`, which reported "arm must succeed: could not write .../state/usage-warner.check.sh". The last fix round put a `uname` stub that prints Darwin in front of every `arm` call. But the stat helpers in `bin/fm-pr-lib.sh` (`fm_pr_file_device`, `fm_pr_file_mode`) also check `uname`, so the stub sent them to BSD `/usr/bin/stat -f` on the Linux runner. That call fails, so `shim_write` could never succeed. The symlink-refusal case only passed on Linux by accident, because this stat failure produces the same "could not write" message. Fix: - The Darwin stub is now used only by `test_arm_refuses_without_a_configured_threshold`. That check returns before any stat call, so the case still means something on Linux. - The three cases that go through the real shim write (arm/disarm, symlink refusal, armed shim runs a real check) no longer use the stub. They run only when the host is really Darwin. On other platforms the test prints one `ok - ... macOS-only; skipping on <os>` line, the same way `fm-stat-shadowing.test.sh` handles its Darwin-only cases. `arm` itself refuses to run anywhere but macOS, so those cases have nothing real to test on Linux. Checked: - On macOS, all cases pass. - With a `uname` stub that prints Linux first on PATH (standing in for the CI runner), every case passes or skips as expected and the exit code is 0. - `shellcheck -x` is clean. The change is not committed
…ul rule (#5)

* feat(bin): route declared deployment-configuration paths to the careful rule

Typed dispatch resolution decided every rule from Jev's reading of the brief,
so deployment-configuration work rode on rule wording alone. Measurement of
six candidate rewordings found none that beat the current text overall, while
the current text still sends vercel.json rewrites, ArgoCD application
manifests, CloudFormation templates, Kubernetes and ingress manifests, and
deploy scripts to the cheap tier.

Add a path fact ahead of the model call. A brief may state the paths it
changes or targets on a "Target paths:" line; when one of them matches the
resolver's deployment-configuration list, the rule declaring the new
"path_force": "deployment-config" field is selected in code with no request to
Jev. The rule is found by that declaration rather than by index, so a home
whose rules sit in another order routes identically. Approval, rule and
profile floors, quota evidence, and the spendPriority argmax run exactly as
they do for a model-chosen rule.

Paths come only from that explicit line, never from prose, and a brief with no
line, no matching path, or a home declaring no path_force keeps the existing
Jev call and output unchanged. A forced result reports decided_by: path-forced
with the matched path and pattern in place of the model, confidence, and
probability lines.

* no-mistakes(review): Widen CloudFormation/ArgoCD path facts and document opt-in inertness

* no-mistakes(document): Align path-force class summary with resolver fact list

* docs: keep the path-force inertness note to one sentence per line

* no-mistakes(review): Accept only the documented Target paths line form

* no-mistakes(document): Record undocumented Target paths line forms in verification doc
… ones (#4)

* feat(bin): switch Claude seats without disturbing running workers

Add a way to choose which Claude account (seat) new workers run on, with a
one-command manual switch and an optional configurable threshold.

A seat is a Claude Code profile directory named by CLAUDE_CONFIG_DIR. Claude
Code derives that profile's macOS Keychain service name from a hash of the
directory path, so each seat has its own credential store and a worker pointed
at a profile that was never logged in stops with "Not logged in" rather than
spending the default account.

The safety property: a switch changes only what the NEXT worker gets.
fm-spawn resolves the seat once per fresh spawn, pre-registers Claude workspace
trust in that same profile, and records it as claude_seat= in the task's own
record. Every relaunch reads that record instead of re-resolving the setting,
so a switch never moves a live or relaunched worker. That is a correctness
requirement, not only a billing one: a task's session history lives under its
profile directory, so moving it would strand the session.

bin/fm-seat.sh is the one command: list, status, probe, add, switch <name>,
switch --next, threshold, arm, retire. A switch to a profile with no
credentials is refused. `add` creates an empty profile directory and prints the
login command; nothing here logs in, copies a credential, or touches the
Keychain - the account owner signs a seat in personally.

The automatic path reuses the existing condition-to-action watch rather than
adding a daemon: condition `threshold-reached`, action `switch --next`. It
fires at most once, which is the edge trigger, and is off until a threshold is
configured. An unreadable quota is an error, never a crossing.

Settings are absent by default, so an unconfigured home behaves exactly as
before, and are inherited into secondmate homes.

* docs: record the seat probe's Keychain caveat and correct the relaunch wording

* fix(bin): keep automatic rotation off the default Claude profile

Rotation now covers only named seats under the seats root. The default profile
is the account owner's own interactive login: it changes account whenever they
sign in somewhere else, and nothing here can tell which account it currently
holds, so an automatic switch must never land workers on it. `switch default`
stays available as an explicit, manual choice.

The seat set is read fresh from the seats root on every step, so nothing
assumes which seats exist or that any particular one is present.

Also fix a narrow relaunch regression this change surfaced: a task recorded
before seats existed carries no claude_seat line, and its launches always took
firstmate's own ambient CLAUDE_CONFIG_DIR. Falling through to the bare default
would have moved exactly the kind of task the recorded-seat rule exists to
leave alone, so a relaunch now keeps that ambient profile. The home's active
seat is still never consulted on a relaunch.

Docs state plainly that the sign-in prompts in a fresh profile, and the effect
of a second login on the default session, are written from documented behaviour
rather than an observed sign-in, because verifying them would mean logging in.

* fix(bin): keep the reserved default name out of the seat listing

A directory literally named "default" under the seats root was listed as a
seat but refused by every switch, because that name is reserved for the ambient
login. Skip it in the listing, and refuse "add default" with the reason.

* no-mistakes(review): Align seat probes, threshold scopes, and non-claude seat recording

* no-mistakes(test): Treat rate-limited seat probes as undecided so --force switches

* no-mistakes(document): Clarify the seat Keychain approval step in docs

* no-mistakes(document): State which seat Keychain probe states are indistinguishable

* fix(bin): treat an unreadable Claude credential store as undecided

`fm_seat_logged_in` reported "not logged in" whenever every credential source
was skipped, including when the Keychain itself could not be read. That
conflates "the store says there is no login" with "the store could not be
consulted", and the second establishes nothing.

Measured read-only against the installed quota-axi on macOS, with no sign-in
performed: a profile that was never logged into and a profile that IS signed in
but whose one-time Keychain approval has not been granted produce the same
report - every source skipped, the keychain unreachable. A signed-in and
approved profile instead reports the keychain read as successful. So the
unreachable shape cannot tell the first two apart, and treating it as proof of
absence refused a correctly signed-in seat with no way through - the state an
owner is in moments after logging a seat in, and one that `--force` could not
cross because `--force` must never cross a proven-empty verdict.

A not-logged-in verdict now requires that every credential source was actually
consulted and came back empty. On macOS that is rarely reachable, because an
absent Keychain entry reads as unreadable; on a file-backed store, where an
empty profile really can be read and found empty, it is reported as before.
An undecided read is what `--force` may cross, and crossing it is safe: a forced
switch to a genuinely empty seat stops the next worker on its first message with
"Not logged in" rather than spending another account.

The docs already described this behaviour, so this brings the code up to them
and states which probe states can be told apart and which cannot.

* no-mistakes(review): Fix harness-switch relaunch seats; keep seats machine-local and propagated

* no-mistakes(review): Limit seat-switch propagation to local secondmates via --local-only

* no-mistakes(test): Refuse forced switch to a seat with no profile directory

* no-mistakes(document): Align seat docs with local-only inheritance and probe verdicts
…nd a Claude seat

A home can configure two mechanisms that each choose a Claude worker's
configuration directory: `config/claude-account` and an active seat. Composed,
the account pin's `env` launch consumes the seat's plain assignment rather than
being overridden by it, so the pin silently won while workspace trust was
pre-registered in the seat's profile - launching the worker against a store
holding no trust entry, where it meets a trust dialog it cannot answer.

Refuse that combination in `bin/fm-spawn.sh` before any endpoint, worktree, or
task record exists, naming both files by path and saying that removing either
one resolves it.

Also document the seat setup route that carries the owner's shared body, and
state this page's platform scope.
@max-metaplanet
max-metaplanet merged commit b59c9fd into main Sep 24, 2026
20 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.

9 participants