Skip to content

fix: ignore secondmate home marker during sync - #417

Merged
kunchenguid merged 3 commits into
mainfrom
fm/fm-secondmate-marker-ignore
Jul 10, 2026
Merged

kunchenguid merged 3 commits into
mainfrom
fm/fm-secondmate-marker-ignore

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Intent

Make the .fm-secondmate-home marker stop reading as a dirty secondmate home to firstmate's sync machinery. bin/fm-home-seed.sh writes an untracked, unignored .fm-secondmate-home marker into every seeded home; because a home is a worktree/clone of the firstmate repo, any plain 'git status --porcelain' dirtiness check counted it, so a home read as dirty forever (fleet-sync reported STUCK). Fix: add .fm-secondmate-home to the tracked .gitignore - the uniform root-cause fix that makes the marker invisible to every dirtiness check at once, WITHOUT broadening fleet-sync's deliberate untracked-counting for project clones and WITHOUT switching the ff-skip to a blanket --untracked-files=no (which would weaken the leave-a-home's-genuine-untracked-in-flight-work-untouched guarantee); the pre-existing marker-specific ignore_seed_marker tolerance stays as the convergence bridge. Convergence of existing pre-fix homes is SCOPED BY HOME TYPE and this scope is INTENDED and already documented on this branch (the no-mistakes(review) commit 'document standalone-clone update path' narrowed the T13 test comment; this resolves the earlier standalone-clone-migration review finding, which the captain approved): a linked-worktree home - the canonical treehouse-lease case that shares the primary's object store - advances past the fix commit on its next bootstrap or spawn sweep via the marker-tolerant local-HEAD fast-forward, after which .gitignore takes over with no hand intervention; a standalone-clone home instead receives the fix commit via /updatefirstmate's origin fetch, since the local-HEAD sweep deliberately never fetches a commit absent from a clone - and origin fetch via /updatefirstmate is a standalone clone's only firstmate-update path anyway - so no home is left permanently marker-dirty. Verified the linked-worktree interaction: the marker is per-working-tree, no cross-worktree object-store interference, and runtime marker reads via [ -f ]/cat are unaffected by gitignore. Four colocated tests in tests/fm-secondmate-sync.test.sh cover: a freshly seeded home reads clean to the exact plain-porcelain signal fleet-sync uses and to the ff sweep; an existing linked-worktree marker-only-dirty home converges then reads clean; a genuinely dirty home (a real tracked edit alongside the marker) still skips; and a guard test pinning the shipped .gitignore entry. Out of scope: tests/fm-session-start.test.sh (a pi-harness fake-ps supervision-block check) fails pre-existing and unrelated on the base tree with these changes stashed.

What Changed

Captain,

  • Ignore the required .fm-secondmate-home marker so seeded secondmate homes no longer register as dirty to porcelain-based sync checks.
  • Preserve marker-only migration tolerance while continuing to skip homes with real uncommitted work, and clarify linked-worktree versus standalone-clone update paths.
  • Add sync coverage for clean seeding, migration, real-dirt protection, and the shipped ignore rule.

Risk Assessment

✅ Low: Captain, the change is narrowly scoped to ignoring the seeded marker and the reviewed convergence coverage preserves genuine-dirtiness handling.

Testing

The supplied full-suite baseline passed. Focused secondmate-sync coverage passed, and a real-script CLI transcript confirmed fresh seeded homes are porcelain-clean and fleet-sync clean, marker-only linked worktrees fast-forward through bootstrap then become clean, and a real tracked edit still causes the sync to skip and preserves the edit. This CLI-only change has transcript evidence rather than visual UI evidence.

Evidence: End-to-end secondmate marker behavior transcript
$ bash run-marker-e2e.sh <target-root> 31afb8c6e349576f5553e3a372b45ed9bd430e3d 9abb0ac839650d35e3fbb176aad55b2ac67bc343

== fresh actual fm-home-seed produces a clean secondmate home ==
$ git clone --quiet /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KX5WD1GPQQ3YQPJ06D0P3D8C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-root
exit_code=0
$ git -C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-root checkout -q -B main 9abb0ac839650d35e3fbb176aad55b2ac67bc343
exit_code=0
$ make_main_default /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-root 9abb0ac839650d35e3fbb176aad55b2ac67bc343
exit_code=0
$ FM_ROOT_OVERRIDE=/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-root FM_HOME=/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-primary FM_SECONDMATE_CHARTER=review\ marker\ handling FM_SECONDMATE_SCOPE=firstmate\ self-development /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-root/bin/fm-home-seed.sh clean /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/fresh-home --no-projects
scaffolded: /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-primary/data/clean/brief.md (secondmate charter)
home=/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/fresh-home
exit_code=0
marker_contents=clean
$ git -C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/fresh-home check-ignore -v .fm-secondmate-home
.gitignore:6:.fm-secondmate-home	.fm-secondmate-home
exit_code=0
git_status_porcelain_first_line=<empty>
$ FM_ROOT_OVERRIDE=/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-root FM_HOME=/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-primary /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/seed-root/bin/fm-fleet-sync.sh /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/fresh-home
/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/fresh-home: already current
exit_code=0

== existing linked worktree marker-only dirt converges through actual bootstrap sweep ==
$ git clone --quiet /Users/kunchen/.no-mistakes/worktrees/016d88035d58/01KX5WD1GPQQ3YQPJ06D0P3D8C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary
exit_code=0
$ git -C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary checkout -q -B main 31afb8c6e349576f5553e3a372b45ed9bd430e3d
exit_code=0
$ make_main_default /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary 31afb8c6e349576f5553e3a372b45ed9bd430e3d
exit_code=0
$ git -C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary worktree add -q --detach /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-home 31afb8c6e349576f5553e3a372b45ed9bd430e3d
exit_code=0
before_bootstrap_git_status_porcelain_first_line=?? .fm-secondmate-home
$ git -C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary merge --ff-only 9abb0ac839650d35e3fbb176aad55b2ac67bc343
Updating 31afb8c..9abb0ac
Fast-forward
 .gitignore                       |   1 +
 tests/fm-secondmate-sync.test.sh | 109 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+)
exit_code=0
$ make_main_default /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary 9abb0ac839650d35e3fbb176aad55b2ac67bc343
exit_code=0
$ FM_ROOT_OVERRIDE=/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary FM_HOME=/private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary FM_FLEET_PRUNE=0 /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary/bin/fm-bootstrap.sh
TASKS_AXI: available
SECONDMATE_LIVENESS: secondmate linked-sm: skipped: liveness probe inconclusive (backend=tmux)
exit_code=0
after_bootstrap_git_status_porcelain_first_line=<empty>
linked_head=9abb0ac839650d35e3fbb176aad55b2ac67bc343
primary_main=9abb0ac839650d35e3fbb176aad55b2ac67bc343

== marker tolerance still preserves a genuine tracked edit ==
$ git -C /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/linked-primary worktree add -q --detach /private/var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/marker-e2e-world/dirty-home 31afb8c6e349576f5553e3a372b45ed9bd430e3d
exit_code=0
before_dirty_sync_git_status_porcelain_first_line= M AGENTS.md
$ bash -c source-target-ff-target-dirty-home
secondmate dirty-sm: skipped: dirty working tree
exit_code=0
dirty_head_before=31afb8c6e349576f5553e3a372b45ed9bd430e3d
dirty_head_after=31afb8c6e349576f5553e3a372b45ed9bd430e3d
tracked_edit_preserved=yes

E2E_RESULT=pass
script_exit_code=0
Evidence: Focused secondmate-sync test output
$ bash tests/fm-secondmate-sync.test.sh
ok - T1 updated: a behind home fast-forwards to the primary's local HEAD
ok - T2 current: an already-current home is a no-op and reports no instruction change
ok - T3 dirty: an uncommitted home is skipped, its edit preserved
ok - T4 diverged: a home that is not an ancestor of the primary's HEAD is skipped
ok - T5 in-flight: a home on a feature branch is skipped, its work preserved
ok - T6 no fetch: the local-HEAD sync never invokes git fetch
ok - T7 sweep nudges on a real instruction change only, but still fast-forwards
ok - T8 bootstrap sweeps live homes, nudges only the running real-instruction-change secondmate
ok - T8b nudge selectors stay fm-<id> when liveness respawn rotates herdr endpoint
ok - T9 bootstrap surfaces a skipped dirty live secondmate home
ok - T10 spawn fast-forwards a secondmate worktree to the primary's local HEAD before launch
ok - T11 spawn warns when pre-launch sync is skipped
ok - T12 gitignored marker: a freshly seeded home reads clean to fleet-sync and the ff sweep
ok - T13 gitignored marker: an existing marker-only-dirty home converges, then reads clean
ok - T14 marker tolerance does not mask a genuinely dirty home
ok - T15 the firstmate repo gitignores the secondmate seed marker
# all fm-secondmate-sync tests passed
exit_code=0

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"
  • Baseline previously run successfully: command -v tmux &gt;/dev/null || { echo &#34;tmux is required for e2e tests&#34; &gt;&amp;2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo &#34;== $t ==&#34;; bash &#34;$t&#34; || rc=1; done; exit &#34;$rc&#34;
  • bash tests/fm-secondmate-sync.test.sh
  • bash /var/folders/5x/4nqprlbx0518k3ybcb1sz6gr0000gn/T/no-mistakes-evidence/01KX5WD1GPQQ3YQPJ06D0P3D8C/run-marker-e2e.sh "$PWD" 31afb8c6e349576f5553e3a372b45ed9bd430e3d 9abb0ac839650d35e3fbb176aad55b2ac67bc343
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

bin/fm-home-seed.sh writes an untracked .fm-secondmate-home marker into
every seeded secondmate home. A secondmate home is a worktree of the
firstmate repo, so any plain `git status --porcelain` dirtiness check
counted the untracked marker and the home read as dirty forever:
fleet-sync reported it STUCK and the local fast-forward convergence
sweeps risked leaving it stale on firstmate updates.

Add .fm-secondmate-home to the tracked .gitignore so the marker is
invisible to every dirtiness check uniformly, without weakening
fleet-sync's deliberate untracked-counting for project clones.

Convergence chicken-and-egg: existing homes predate the fix and it only
arrives by fast-forward. The already-present marker-tolerant ff-skip
(ignore_seed_marker=yes, used by the bootstrap sweep, /updatefirstmate,
and spawn pre-launch) advances such a home past the fix commit, after
which .gitignore takes over - no hand intervention.

Tests in tests/fm-secondmate-sync.test.sh cover a freshly seeded home
reading clean, an existing marker-only home converging then reading
clean, and a genuinely dirty home still skipping.
@kunchenguid
kunchenguid merged commit 171207c into main Jul 10, 2026
4 checks passed
@kunchenguid
kunchenguid deleted the fm/fm-secondmate-marker-ignore branch July 10, 2026 12:05
Keigyoku pushed a commit to Keigyoku/firstmate that referenced this pull request Jul 11, 2026
* fix: gitignore the secondmate home marker

bin/fm-home-seed.sh writes an untracked .fm-secondmate-home marker into
every seeded secondmate home. A secondmate home is a worktree of the
firstmate repo, so any plain `git status --porcelain` dirtiness check
counted the untracked marker and the home read as dirty forever:
fleet-sync reported it STUCK and the local fast-forward convergence
sweeps risked leaving it stale on firstmate updates.

Add .fm-secondmate-home to the tracked .gitignore so the marker is
invisible to every dirtiness check uniformly, without weakening
fleet-sync's deliberate untracked-counting for project clones.

Convergence chicken-and-egg: existing homes predate the fix and it only
arrives by fast-forward. The already-present marker-tolerant ff-skip
(ignore_seed_marker=yes, used by the bootstrap sweep, /updatefirstmate,
and spawn pre-launch) advances such a home past the fix commit, after
which .gitignore takes over - no hand intervention.

Tests in tests/fm-secondmate-sync.test.sh cover a freshly seeded home
reading clean, an existing marker-only home converging then reading
clean, and a genuinely dirty home still skipping.

* no-mistakes(review): Captain: document standalone-clone update path

* no-mistakes(document): Document secondmate marker migration

(cherry picked from commit 171207c)
Keigyoku added a commit to Keigyoku/firstmate that referenced this pull request Jul 11, 2026
…, kunchenguid#435 deferred) (#8)

* feat: add harness-aware supervision (kunchenguid#367)

* Add harness-aware supervision

* no-mistakes(review): Captain, harden watcher supervision regressions

* no-mistakes(review): Captain, harden watcher supervision cadence

* no-mistakes(review): Harden watcher supervision ownership

* no-mistakes(review): Captain, harden Pi extension marker

* no-mistakes(review): Captain, harden Pi supervision restart checks

* no-mistakes(review): Harden watcher ownership checks

* no-mistakes(review): Captain, harden Pi supervision loading

* no-mistakes(review): Captain, require Pi guard extension loading

* no-mistakes(review): Captain, harden watcher supervision recovery

* no-mistakes(test): Fix fm-send baseline log filtering

* no-mistakes(document): Sync harness supervision docs

* no-mistakes: apply CI fixes

(cherry picked from commit 090483e)

* fix: split X-mode replies by platform (kunchenguid#369)

* fix: make x replies split by platform

* no-mistakes(review): Captain: preserve Discord recovery relink context

* no-mistakes(test): Captain: keep split markers outside fences

* no-mistakes(document): Sync X-mode reply docs

(cherry picked from commit 4790bc5)

* fix: make stow memory writes inspect before update (kunchenguid#372)

* docs: make stow inspect-then-update

* no-mistakes(review): Remove unsupported archive-body guidance

* no-mistakes(review): Clarify stow read-before-write exception

* no-mistakes(test): Require archive-body for stow task notes

* no-mistakes(document): Sync stow memory docs

* no-mistakes(lint): Silence ShellCheck source warning

(cherry picked from commit af5361e)

* fix(watcher): wait when arm attaches to a healthy watcher (kunchenguid#375)

* fix: attach-and-wait when arm finds a healthy watcher

Grok and Claude re-arm after every turn with work in flight. When a
watcher was already healthy, fm-watch-arm exited immediately with
watcher: healthy, which completed the harness background task and
injected an empty false wake.

Attach to the live identity-matched holder instead, stay until that
cycle ends, then exit 0 so notify fires for a real end-of-cycle. The
peer-startup-race path uses the same contract. --restart and the
started path are unchanged.

* no-mistakes(review): Gate restart watcher peer attach

* no-mistakes(document): Sync watcher arm docs

(cherry picked from commit 7302a95)

* feat(pi): simplify primary session launch (kunchenguid#386)

* docs(readme): reformat Quick Start and recommend Grok equally with Claude Code

* no-mistakes(review): Captain: align harness launch guidance

* no-mistakes(review): Captain, clarify Pi supervised launch

* no-mistakes(review): Captain, document Pi first-launch bridge

* feat(pi): track primary watcher extension for plain-pi launch

Move Pi's primary watcher bridge from a generated state/ file to a
tracked .pi/extensions/fm-primary-pi-watch.ts, matching how the turn-end
guard extension already works: self-hashing version, project-local
auto-discovery after one-time Pi trust. This drops the state/-generation
step and dual -e requirement from the happy path, so Pi's Quick Start
launch becomes plain 'pi', the same friction class as 'claude' and
'grok --trust'.

- bin/fm-pi-watch-extension.sh is removed; nothing generates the
  extension anymore since it is committed.
- fm-session-start.sh and fm-supervision-instructions.sh resolve the
  watcher extension path from FM_ROOT instead of state/, and the
  session-start diagnostic now points at restarting plain pi after
  trust, with -e as a documented fallback.
- fm-spawn.sh points Pi secondmate launches at the tracked extension
  path in the secondmate home instead of generating a state/ copy.
- README Quick Start Pi block is now just 'pi' plus a trust note.
- Tests, docs, and the harness-adapters skill updated to match.

* fix(pi): drop backticks from session-start diagnostic to satisfy shellcheck SC2016

(cherry picked from commit 1b5a9f5)

* feat(supervision): prevent unsafe watcher-arm commands (kunchenguid#387)

* feat(supervision): add PreToolUse seatbelt against watcher-arm anti-patterns

Adds bin/fm-arm-pretool-check.sh, a shared PreToolUse-style checker that
denies a primary shell command backgrounding, piping, or bundling the
watcher arm/checkpoint, or force-killing the watcher process broadly -
the exact shapes that silently took Grok's supervision down. Wires it
into all five verified harnesses (grok, claude, codex, opencode, pi),
each validated empirically against the real harness.

Also fixes a grok 0.2.93 regression discovered during that validation: the
existing turnend-guard Stop hook's bare root variable broke grok's own
variable pre-substitution and silently no-op'd the hook.

* no-mistakes(review): Harden watcher arm validation

* no-mistakes(review): Harden arm guard metacharacter checks

* no-mistakes(review): Harden nested shell arm guard

* fix(lint): rewrite SC2015 guards in fm-arm-pretool-check.sh as if/then

A && B || C is not if-then-else; C can run when A is true. Replace both
occurrences of the quote-state early-continue with an explicit if/then.

(cherry picked from commit 766f772)

* fix(pi): restore primary watcher supervision lifecycle (kunchenguid#397)

* fix Pi primary supervision lifecycle

* no-mistakes(document): Synchronize Pi primary extension documentation

(cherry picked from commit 80ecc8d)

* fix: keep persistent secondmates out of the main backlog (kunchenguid#398)

* fix secondmate backlog guidance

* no-mistakes(review): Require reasons for captain backlog holds

* no-mistakes(test): Document secondmate handoff skill requirement

* fix secondmate teardown reminder

* no-mistakes(document): sync teardown reminder docs to work-items-only backlog contract

(cherry picked from commit 7525a37)

* fix(backlog-handoff): move full item blocks including indented bodies (kunchenguid#401)

* fix(backlog-handoff): move full item blocks including indented bodies

fm-backlog-handoff only moved the checklist header line, so multi-line
item bodies were left orphaned in the source backlog and never reached
the secondmate. Move the full block (header plus indented body lines)
atomically, treating body membership by indentation so lines like
## Intent stay with the item, and add regression coverage.

* no-mistakes(review): Captain: preserve EOF handoff terminators

* no-mistakes(review): treat blank lines inside item bodies as movable body

* no-mistakes(document): sync backlog-handoff docs with full-block move behavior

(cherry picked from commit 600075e)

* feat(herdr): make Herdr lab lifecycle safety deterministic for briefs (kunchenguid#402)

* guard Herdr lab lifecycle in briefs

* no-mistakes(review): Fix Herdr lab helper and provisioning safety

* no-mistakes(review): Captain, harden Herdr lab lifecycle safety

* no-mistakes(review): fix Herdr lab test cleanup ordering and brief help range

* no-mistakes(review): reject leading options in Herdr lab run guard

* no-mistakes(review): strip leading non-alnum in Herdr lab name generator

* no-mistakes(document): document Herdr lab helper and --herdr-lab brief flag

* no-mistakes(lint): add shellcheck disable for deliberate SC2016 literals in fm-brief herdr-lab

* no-mistakes: apply CI fixes

(cherry picked from commit 4bc0824)

* fix(watcher): classify arm-command seatbelt by execution position (kunchenguid#403)

* fix watcher arm command policy

* no-mistakes(review): Harden watcher command policy parsing

* no-mistakes(review): Captain: harden watcher policy parsing

* no-mistakes(review): harden watcher policy for expanded paths, direct-watch, and sound prefilter

* no-mistakes(review): close prefilter and classifier locale/ANSI-C watcher-path decode gaps

* no-mistakes(review): fail closed on loop-wrapped broad watcher kills

* no-mistakes(document): sync docs for watcher-arm command-position policy

(cherry picked from commit