Repository navigation
fix(bin): merge upstream firstmate fixes into the fork - #4
Merged
Merged
Conversation
…ting server (kunchenguid#6920) * fix(bin): keep herdr composer probes observable-only without autostarting server - Refuse bare pane identifiers lacking session prefix in fm_backend_herdr_parse_target - Add fm_backend_herdr_target_observable to passively verify server liveness without autostarting - Route visible viewport captures through fm_backend_herdr_target_observable - Detach stdin with </dev/null on background server launch in fm_backend_herdr_server_ensure - Add unit and regression tests in tests/fm-backend-herdr.test.sh * fix(bin): drop parse_target colon restriction to preserve existing fixtures Revert the fm_backend_herdr_parse_target colon check so that single-colon session targets like sess:p1 in secondmate liveness and other fixtures parse properly. The probe path remains observable-only via fm_backend_herdr_target_observable.
…kunchenguid#6956) * test: clear inherited Git repository location in fixture helper An absolute GIT_DIR inherited from the caller (a linked-worktree hook exports one) overrides the discovery that git -C implies, so fixture setup moved the caller's branches and registered fixture worktrees in it. tests/git-config-helpers.sh now unsets GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE and GIT_COMMON_DIR alongside the config isolation. Fixes kunchenguid#6953 * no-mistakes(document): Document fixture Git location isolation in CONTRIBUTING
…nchenguid#6830) * fix(bin): stage contribution-input JSON via temp files The contribution-input branch passed the whole canonical backlog document to jq as a single --argjson argv argument. A large fleet's backlog JSON exceeds Linux MAX_ARG_STRLEN (128 KiB), so jq fails with E2BIG (Argument list too long) and the contribution-input snapshot emits empty output, breaking the bearings contribution path. Write both the backlog and task documents to a temp directory and hand them to jq with --slurpfile, matching how the full snapshot path already stages the same pair. Output is unchanged for any backlog that fits in argv. * no-mistakes(document): Correct contribution cleanup trap comment
) * fix(bin): arm the busy contract on secondmate launches A tmux-backed secondmate's active-turn gate can only see a busy verdict from the parent home's record, and those launches never armed it. * no-mistakes(review): Reopen secondmate busy on blocked Claude Stop; drop muse guard * no-mistakes(review): Make Claude secondmate Stop guard the sole Stop-state writer * no-mistakes(review): Record live rewake UserPromptSubmit evidence and add regression * docs: record Claude secondmate Stop guard as busy writer * no-mistakes(review): Keep Stop idle hook for older secondmate guards * no-mistakes(document): Correct stale omp secondmate -e rationale in supervision verification * no-mistakes(document): Fix skill-relative turnend-guard link in Claude harness reference * no-mistakes(ci): Root cause: in shard 9, the pure-contract-unit family ran two scripts, tests/fm-rovo-harness.test.sh (14712 ms) and tests/fm-omp-harness.test.sh (10335 ms). Those two durations add up exactly to the failing family's 25047 ms. The failing one was tests/fm-omp-harness.test.sh. Its test_secondmate_launch_relies_on_discovery still asserted the old contract: that an omp secondmate launch names no -e and gets no state/<id>.omp-ext.ts. This PR (issue kunchenguid#4268) deliberately changed that. bin/fm-spawn.sh now arms the busy contract for omp secondmates, so their launch names `-e state/<id>.omp-ext.ts` and writes that extension. The primary extensions are still left to auto-discovery. The harness reference docs were updated to match, but the test was not. The fix is test-only and touches just tests/fm-omp-harness.test.sh. The test now asserts that the secondmate launch names exactly one -e and that it points at the parent-home state/sm.omp-ext.ts. Because only one -e is allowed, the tracked .omp/extensions files are not named a second time, which would load them twice. The test also asserts that the extension file exists, and the header comment for contract 3 was updated. The posture overlay, --cwd, marker, and supervision-model assertions are unchanged. Verification: the host's load average was about 140 on 8 cores, and the full script timed out locally after 590 s having finished only its first 2 tests. So I ran the one affected test function on its own through the real fm-spawn path, and it passed (`ok - fm-spawn: a real omp secondmate launch loads only the busy -e and auto-discovers its primary extensions`). The remaining omp tests were not re-run locally. shellcheck on the file reports only existing info-level notices. The change is left uncommitted for the outer executor * test: keep the secondmate busy stall gate visible after main's liveness probe The merged watcher treats a window-name inventory miss as a missing endpoint and exits a later checkpoint on the previous quiet run's recovery wake. The fake pane now answers both list-windows formats, and each observation starts without a leftover downtime marker, so a busy mate still defers the stall and an idle mate still surfaces it. * no-mistakes(review): Align fm-spawn secondmate comments with omp -e and devin refusal * no-mistakes(document): Document secondmate busy extensions in configuration reference * no-mistakes(test): Make live busy-contract guard clean up read-only lab dirs * fix(bin): pass Claude secondmate busy hooks through --settings Rewriting a persistent mate home's settings.local.json drops the captain's saved permissions. The hooks now live in a parent-state file Claude Code loads for that session only. * no-mistakes(review): skip busy arm for raw secondmate launch commands * no-mistakes(review): retire earlier busy arm on raw secondmate respawn * no-mistakes(review): retire Stop pointer on relaunch, load --settings in live guard * no-mistakes(document): Document secondmate Claude settings file and raw-launch exception * no-mistakes(ci): The check "Behavior portable serial 9" failed because of this PR, and I fixed it with a test-only change; `tests/fm-spawn-dispatch-profile.test.sh` now passes locally in full. Cause: the one failing test was "claude secondmate launch settings JSON does not disable Claude attribution" in `tests/fm-spawn-dispatch-profile.test.sh`. This PR makes a claude secondmate launch pass `--settings` as a file path (`state/<id>.claude-settings.json`) instead of inline JSON. The test helper `claude_settings_json_arg` handed that path string to jq as if it were JSON, so jq reported a parse error. The product behavior is correct: the file does carry `feedbackDrafts` and the attribution-off policy. Invariant: a test that checks the Claude launch settings must read the settings Claude would load, whichever form `--settings` takes (inline JSON or a file path). The only place this must hold is `claude_settings_json_arg`, the single reader of the `--settings` value in the tests. Its two callers, `assert_attribution_policy` and `assert_attribution_policy_absent`, both go through it. Fix: `claude_settings_json_arg` now prints the value when it starts with `{` and prints the file contents otherwise. No product code changed. Verification: I ran `bash tests/fm-spawn-dispatch-profile.test.sh` in the worktree. It ended with "all fm-spawn-dispatch-profile tests passed", including the previously failing secondmate case and the crewmate and keep-ai-trailers cases that use the inline form. I did not run the other tests of shard 9; they passed in the CI run and this change touches only this test file. The change is uncommitted in the worktree (one file modified)
…ailures (kunchenguid#7036) The large-backlog regression already proved the json and secondmate home-summary modes stay within exec limits. It now also runs the contribution-input mode on the same 1200-record backlog, which is the path kunchenguid#6830 moved off argv. With that fix reverted the test fails with the field error jq Argument list too long at the contribution-input call.
…urn (kunchenguid#5843) * fix(teardown): scrub nested repos before return Treehouse return uses git clean -fd, which leaves a nested git repository in the pool slot. Scout and forced teardown run git clean -ffdq first. A return that stays dirty names the lost slot instead of reporting a clean return. * no-mistakes(review): Report lost pool slots early and scrub forced child copies * no-mistakes(review): Drop misleading no-rerun clause from lost-slot message * no-mistakes(document): Note failed status read in teardown dirty-return header * no-mistakes(ci): I fixed ci-1 and ci-2 in bin/fm-teardown.sh, and I added tests in tests/fm-teardown.test.sh. Invariant (ci-1): a lost-slot finding must only warn. It must never change the teardown exit status. Two places must obey this: the final status block, and the remote success path that a forced remote retirement uses. - The final block no longer runs `exit 1`. When a slot is lost, teardown writes a lost-slot line to stderr instead of the clean "teardown X complete" line. Then backlog_refresh_reminder runs and teardown exits with its normal status. - Before this change, remote_secondmate_teardown discarded the remote output when the remote run succeeded. Now it sends that output to stderr. Without this, the remote lost-slot warning would not reach the operator once the remote side exits 0. - I updated the header comment to match. Invariant (ci-2): after a return that succeeds, teardown must verify every returned copy, or it must warn that it could not. This invariant is enforced inside teardown_note_dirty_return, which both return sites call (the main WT return and the forced-secondmate child return). Before, a copy that was missing or not a readable git worktree caused a silent `return 0`. Now it sets the lost flag and gives the same warning, with the text "cannot verify: the copy is missing or not a readable git worktree after return". Both call sites run only for a copy that existed before the return. The exit status does not change. Tests: - The dirty-return test now expects exit 0 and the warning. - New test (z3d): a forced secondmate teardown whose child return leaves residue. This is the same command that `retire --force` runs on the remote host. The test expects exit 0 and the warning, and it checks that the task record and the home are removed. - New test (z3e): a return that removes the copy's .git. The test expects exit 0, the "cannot verify" warning that names the copy, and no clean completion line. Verification: - I ran the new and updated tests against the old script. Three failed as expected (exit 1, or no warning). With the fix, all of them pass. - The full tests/fm-teardown.test.sh suite passes: 117 ok, 0 not ok. - shellcheck shows no new warnings. - tests/fm-remote-secondmate-lifecycle-e2e.test.sh is still running. It covers the remote success path that now relays output. Up to now it has no failures, but it has not finished, so I cannot report a final result for it * no-mistakes(ci): I fixed ci-1 and ci-2 as one exit contract, as the user asked. The changes are in bin/fm-teardown.sh, tests/fm-teardown.test.sh, and tests/fm-remote-secondmate-lifecycle-e2e.test.sh. Invariant (ci-1): when a returned slot is dirty or cannot be verified, teardown must finish every cleanup step and then exit with exit code 4. Exit 4 is used for nothing else. It must hold in two places: the final status of a local teardown, and the remote secondmate retirement caller. - Local: the existing lost-slot flag now leads to `exit 4` (TEARDOWN_LOST_SLOT_EXIT). This exit comes after the task record is removed, the warning is printed, and backlog_refresh_reminder runs. A clean return still exits 0. Refusals and errors exit 1, and an invalid request exits 2. The header documents all of these codes. Exit 3 is only an internal "not remote" return. The ssh transport uses 255. - Remote caller: remote_secondmate_teardown treats a remote exit 4 as "retired with a lost-slot warning". It does the full local retirement (route, registry line, reply source, records, summary refresh), prints the normal completion line on stdout, and then returns 4. The remote control script runs fm-teardown.sh as its last command, and fm-on.sh execs ssh, so the remote 4 reaches the local side unchanged. Invariant (ci-2): remote output goes to local stderr only when it is a lost-slot warning. - After a clean remote retirement (exit 0), the caller no longer prints the captured remote output. - After exit 4, the caller forwards only the lost-slot warning header and the remaining-path lines. To make those lines easy to find, teardown_note_dirty_return now indents each remaining path by two spaces. Tests: - The dirty-return (z3), forced-secondmate dirty-child (z3d), and copy-removed (z3e) tests now expect exit 4 after cleanup. The clean scout return (z1) still expects 0. - The final remote retirement in the e2e test now uses a fake-ssh mode, retire-lost-slot. In this mode the real remote retire runs, and then the fake reports a lost child slot with exit 4. The test checks the following: exit 4; the remote home, parent metadata, and route are removed; stdout has "teardown ios complete (remote"; stderr has the warning and the remaining path; and stderr does not contain the remote completion text. The remote side producing exit 4 is covered by z3d. Verification: - tests/fm-teardown.test.sh: 117 ok, 0 not ok. - tests/fm-remote-secondmate-lifecycle-e2e.test.sh: ALL TESTS PASSED. - shellcheck shows the same warning count as before on all three files. - Against the previous script, both suites fail as expected. In the local suite, dirty-return expected 4 but got 0. In the e2e test, the stdout local-completion check fails * no-mistakes(ci): Both CI failures came from the lost-slot check that this PR added. Shard 3: tests/fm-secondmate-safety.test.sh "force teardown failed to discard child work". Shard 7: tests/fm-teardown-endpoint-safety.test.sh exited 4. The check ran after the return of every copy. Treehouse return removes a copy that is not a pool slot, so the check reported "cannot verify" and teardown exited 4. Before the fix, both failures happened on my machine. Invariant: only a Treehouse pool slot can be lost by the pool, so the check runs only for a copy that was a pool slot before the return. Fix in bin/fm-teardown.sh: both return sites (the main WT return and the forced-secondmate child return) now run fm_treehouse_pool_slot before the return. They call teardown_note_dirty_return only when the copy was a pool slot. teardown_note_dirty_return lost its pool-slot branch and its unused proj argument; the slot label still comes from the path of the copy. Test fix: in tests/fm-teardown.test.sh, the z3d child copy was not a pool slot. It is now a real pool slot (pool/6/repo plus treehouse-state.json), and the test still expects exit 4 and the warning. Verification: endpoint-safety 27 ok, exit 0. secondmate-safety 79 ok, exit 0. fm-teardown 117 ok, 0 not ok. remote-secondmate-lifecycle-e2e ALL TESTS PASSED. shellcheck count is unchanged (17) --------- Co-authored-by: Nova Agent B <novaagentb@gmail.com>
…nguid#7047) * fix(tests): keep backlog suites hermetic against a local .tasks.toml Fixture homes now write the tracked markdown defaults through a fm_test_tasks_toml helper instead of copying the checkout's .tasks.toml, which an operator may override with a beads backend at a live backlog. The backlog handoff and receive moves pin --backend markdown, because they already name their markdown files and otherwise resolve the backend from the caller's working directory. The atomicity suite runs from its scratch root so its direct tasks-axi fixture calls cannot read the checkout config. * no-mistakes(review): Add decoy-cwd .tasks.toml regressions for handoff and receive * no-mistakes(lint): Reuse sha256_file helper to fix SC2015 in remote handoff test
…nchenguid#7076) * fix(bin): parse whole project name in home seed registry queries Parse the full project name after the dash in fm-home-seed.sh registry lookups. This matches the round-3 bootstrap mirror check parser so spaced names resolve. Cover both the project-less seed refusal guard and registry line lookups in tests. * no-mistakes(review): Match registry rows by name prefix plus separator * no-mistakes(document): Note shared registry row-match rule in fm-home-seed
Brings in the 8 upstream commits since the last common commit (e0d95ac at the tip): home-seed registry parsing, markdown backend pinning in backlog handoff and receive, nested-repo scrub before a treehouse return, fleet-snapshot argument-size fixes, the secondmate busy contract, the fixture-helper Git location reset, and observable-only herdr composer probes. Upstream commits: - e0d95ac fix(bin): parse whole project names in home seed registry queries (kunchenguid#7076) - 4cca7d0 fix(bin): pin markdown backend in backlog handoff and receive (kunchenguid#7047) - b675126 fix(bin): scrub nested repos from scratch copies before treehouse return (kunchenguid#5843) - 072a7da test: guard fleet snapshot contribution input against argument-size failures (kunchenguid#7036) - 4735ddc fix(bin): arm the busy contract on secondmate launches (kunchenguid#5342) - 1a86871 fix: avoid argument-size failures in fleet contribution snapshots (kunchenguid#6830) - fb75c1f fix(tests): clear inherited Git repository location in fixture helper (kunchenguid#6956) - b75658b fix(bin): keep herdr composer probes observable-only without autostarting server (kunchenguid#6920) Conflicts, each resolved by keeping both sides: - bin/fm-spawn.sh launch template: upstream's __CLAUDESETTINGS__ token now feeds the fork's executor `claude -p` line and the interactive line, which keeps __CLAUDEAUTOCOMPACT__. - bin/fm-spawn.sh busy-arm block: upstream's WIRING_HARNESS structure replaces the fork's `not secondmate and not executor` wrapper; an executor gets an empty wiring harness, so it still arms nothing. - bin/fm-spawn.sh substitution site: the autocompact substitution stays ahead of upstream's per-kind settings expansion. - docs/verification/runtime-backends.md: both new sections kept. - tests/fm-secondmate-harness.test.sh: the three claude secondmate launch assertions now expect the settings file path and the --autocompact window together. Integration fixes git did not flag: - tests/fm-secondmate-harness.test.sh C2c: the fork's crew-autocompact secondmate assertion expected the inline settings JSON before --autocompact; a secondmate now gets upstream's settings file, so the assertion pins that path directly before the window instead. - The __CLAUDESETTINGS__ header comment names executors, whose expansion is byte-identical to the inline JSON they used before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the fork up to date with upstream
kunchenguid/firstmatemain.Upstream had 8 commits the fork lacked (since the last common commit,
e0d95ac7at the tip), and the fork keeps its own commits (executor lane, bounded Claude auto-compact window, orphan-reparenting test fixes).Upstream commits brought in
e0d95ac7fix(bin): parse whole project names in home seed registry queries (fix(bin): parse whole project names in home seed registry queries kunchenguid/firstmate#7076)4cca7d07fix(bin): pin markdown backend in backlog handoff and receive (fix(bin): pin markdown backend in backlog handoff and receive kunchenguid/firstmate#7047)b675126afix(bin): scrub nested repos from scratch copies before treehouse return (fix(bin): scrub nested repos from scratch copies before treehouse return kunchenguid/firstmate#5843)072a7da3test: guard fleet snapshot contribution input against argument-size failures (test: guard fleet snapshot contribution input against argument-size failures kunchenguid/firstmate#7036)4735ddc6fix(bin): arm the busy contract on secondmate launches (fix(bin): arm the busy contract on secondmate launches kunchenguid/firstmate#5342)1a868710fix: avoid argument-size failures in fleet contribution snapshots (fix: avoid argument-size failures in fleet contribution snapshots kunchenguid/firstmate#6830)fb75c1f9fix(tests): clear inherited Git repository location in fixture helper (fix(tests): clear inherited Git repository location in fixture helper kunchenguid/firstmate#6956)b75658b6fix(bin): keep herdr composer probes observable-only without autostarting server (fix(bin): keep herdr composer probes observable-only without autostarting server kunchenguid/firstmate#6920)Conflicts and resolutions
Every conflict keeps both sides' intent; no fork feature was dropped.
bin/fm-spawn.sh, Claude launch template.Upstream replaced the inline
--settingsJSON with a__CLAUDESETTINGS__token (a settings-file path for secondmates); the fork added the executor's one-shotclaude -pline and__CLAUDEAUTOCOMPACT__on the interactive line.Both launch lines now take
__CLAUDESETTINGS__, and the interactive line keeps__CLAUDEAUTOCOMPACT__.bin/fm-spawn.sh, busy-contract arming block.Upstream restructured arming around
WIRING_HARNESSso secondmates are armed; the fork wrapped the whole block in "not a secondmate and not an executor".Resolution takes upstream's structure and sets an empty wiring harness for an executor, so an executor still arms no busy or turn-end wiring, while secondmates now get upstream's busy contract.
bin/fm-spawn.sh, placeholder substitution.The fork's
__CLAUDEAUTOCOMPACT__substitution stays, followed by upstream's per-kind__CLAUDESETTINGS__expansion.docs/verification/runtime-backends.md.Both new sections kept: the fork's "Claude auto-compact window" and upstream's "Secondmate busy contract".
tests/fm-secondmate-harness.test.sh.Three Claude secondmate launch assertions now expect upstream's settings-file path and the fork's
--autocompact 200000window together.Auto-merged files checked for coherence:
bin/fm-control-lib.sh(upstream's optionalkindargument and secondmate wiring paths beside the fork's executor checks),bin/fm-teardown.sh(upstream's scratch scrub and dirty-slot exit beside the fork's task-branch drop),bin/fm-test-run.sh,docs/configuration.md.Integration fixes git did not flag
tests/fm-secondmate-harness.test.shC2c.The fork's crew-autocompact secondmate assertion expected the inline settings JSON directly before
--autocompact 400000.A secondmate now gets upstream's settings file, so the assertion pins that path directly before the window; it is no weaker.
The executor launch line now uses
__CLAUDESETTINGS__, so one owner expands settings; for a non-secondmate it expands to the byte-identical inline JSON the executor used before (tests/fm-spawn-executor.test.shpins it).The
__CLAUDESETTINGS__header comment now names executors.Local verification
bin/fm-lint.shandshellcheckon every changedbin/script: clean.bin/fm-doc-audience-check.sh: ok.LC_NUMERICbreaksEPOCHREALTIMEarithmetic; that, and thecommand${#}locale sensitivities seen under other overrides, exist on both sides and are not merge changes.bin/fm-lint.sh(its timing arithmetic garbled the worker command lines, so ShellCheck was handed its own manifest files); it was approved afterLC_NUMERIC=C bin/fm-lint.shpassed on this exact head in both changed-file mode and full extended analysis of the 10 changedbin/scripts.CI lints again in a clean locale.
The no-mistakes pipeline's generated report follows.
Intent
Bring the fork (prekabreki/firstmate) up to date with upstream kunchenguid/firstmate: upstream main has 8 commits the fork lacks (fixes since the last common commit of 2026-10-08, e0d95ac at the tip), and the fork has 23 commits of its own (executor lane, bounded Claude auto-compact window, orphan-reparenting test fixes). The previous sync of this kind hit 4 conflicts and one genuine integration break.
Constraints set for the work: a real
git merge upstream/mainas a two-parent merge commit (no rebase, no cherry-picks); conflicts resolved by keeping both intents and never dropping a fork feature; semantic breaks git did not flag looked for and fixed; the PR targets the fork's main (prekabreki/firstmate), never upstream; the PR must land as a merge commit, not a squash, so the branch history must stay a merge commit on top of fork main.Decisions made: in bin/fm-spawn.sh the fork's executor
claude -pline and interactive line both take upstream's CLAUDESETTINGS token, the interactive line keeps the fork's CLAUDEAUTOCOMPACT; upstream's WIRING_HARNESS busy-arm structure is adopted, with an executor given an empty wiring harness so it still arms no busy or turn-end wiring while secondmates now get upstream's busy contract; the autocompact substitution stays ahead of upstream's per-kind settings expansion. docs/verification/runtime-backends.md keeps both the fork's "Claude auto-compact window" and upstream's "Secondmate busy contract" sections. tests/fm-secondmate-harness.test.sh assertions combine upstream's secondmate settings-file path with the fork's --autocompact window; test C2c (crew-autocompact for a secondmate) was a genuine integration break and now asserts the settings path directly before --autocompact 400000 instead of the inline JSON, with no loss of strength. Local runs on this host need a C numeric locale (sv_SE LC_NUMERIC breaks EPOCHREALTIME arithmetic); those locale sensitivities are pre-existing on both sides and out of scope.What Changed
kunchenguid/firstmatemain into the fork as a two-parent merge commit. It brings in upstream's 8 fixes:state/<id>.claude-settings.jsonpassed via--settings.bin/fm-spawn.shso both sides' features survive:claude -plaunch line and its interactive launch line both take upstream's__CLAUDESETTINGS__token.__CLAUDEAUTOCOMPACT__, and the autocompact substitution still runs before the per-kind settings expansion.WIRING_HARNESSstructure is adopted, with executors given an empty wiring harness so they still arm no busy or turn-end wiring.docs/verification/runtime-backends.mdkeeps the fork's "Claude auto-compact window" section and upstream's "Secondmate busy contract" section.tests/fm-secondmate-harness.test.sh(including C2c) now asserts the secondmate settings-file path directly before--autocompact 400000, instead of the old inline JSON.Risk Assessment
✅ Low: This is a real two-parent merge (1937db4 + e0d95ac), and every conflict resolution matches the recorded decisions. The executor and interactive Claude templates both use CLAUDESETTINGS, and the interactive line keeps CLAUDEAUTOCOMPACT. The executor gets an empty WIRING_HARNESS, so no busy arm, hook or turn-end wiring branch matches it. The autocompact substitution runs before the per-kind settings expansion. Both docs sections are kept. The secondmate test assertions combine the settings-file path with the --autocompact window. Tracing the clean upstream merges (relaunch wiring retirement with kind, teardown lost-slot exit, the turn-end guard pointer) turned up no semantic break with the fork's executor or autocompact features.
Testing
I ran the six targeted suites that drive the real bin/fm-spawn.sh, all with LC_ALL=C: secondmate harness, executor spawn, dispatch profile, the live autocompact guard, the live secondmate busy-contract guard and the live executor headless-flags guard. All passed. I also ran one live lab of my own: a Claude secondmate spawned through fm-spawn.sh on a private tmux socket with crew-autocompact=400000. The pane launchedclaude --dangerously-skip-permissions --add-dir <inbox> --settings <state>/sm-ac.claude-settings.json --autocompact 400000. The settings file merged feedbackDrafts, attribution and the busy hooks, and the parent busy record was armed (state=busy source=fm-spawn). The real claude 2.1.296 accepted that exact argv and rendered its startup screen. pi-signed, omp and grok are not installed on this host, so the live guard skipped them. This is a CLI/TUI change with no web UI, so the evidence is pane captures and transcripts, not screenshots. The lab dirs and tmux servers were removed and the worktree is clean. The executor-wiring, crewmate-launch and merge-shape scenarios were checked only with fake-pane suites and repository inspection, so they are marked untested rather than live passes.claude -p ... --settings <inline JSON>and arms no busy-state or turn-end wiring (empty WIRING_HARNESS)claude -pexecutor was not run end to end because that needs a real issue/PR flow and model spend. The spawn-side wiring was checked only by…git log -1 --format=%P HEAD= 1937db4 e0d95ac, and the doc has '## Claude aut…Evidence: Live secondmate spawn argv, merged settings file and busy record
Source: Live secondmate spawn argv, merged settings file and busy record
Evidence: Real claude pane started with the spawned secondmate argv (settings path + --autocompact 400000)
Source: Real claude pane started with the spawned secondmate argv (settings path + --autocompact 400000)
Evidence: Secondmate busy contract live guard transcript
Source: Secondmate busy contract live guard transcript
Evidence: Claude autocompact live guard transcript
Source: Claude autocompact live guard transcript
Evidence: Executor headless flags live guard transcript
Source: Executor headless flags live guard transcript
Evidence: Secondmate harness suite (incl. C2c)
Source: Secondmate harness suite (incl. C2c)
Evidence: Executor spawn suite
Source: Executor spawn suite
Evidence: Dispatch profile suite (crewmate autocompact)
Source: Dispatch profile suite (crewmate autocompact)
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.
claude -p ... --settings <inline JSON>and arms no busy-state or turn-end wiring (empty WIRING_HARNESS)claude -pexecutor was not run end to end because that needs a real issue/PR flow and model spend. The spawn-side wiring was checked only by…git log -1 --format=%P HEAD= 1937db4 e0d95ac, and the doc has '## Claude aut…LC_ALL=C bash tests/fm-secondmate-harness.test.sh(includes C2c crew-autocompact for a Claude secondmate)LC_ALL=C bash tests/fm-spawn-executor.test.sh(executor claude -p line with inline CLAUDESETTINGS, no busy/hook wiring)LC_ALL=C bash tests/fm-spawn-dispatch-profile.test.sh(crewmate launch: inline settings + --autocompact window/off)LC_ALL=C bash tests/fm-claude-autocompact-live-e2e.test.sh(real claude accepts/refuses the --autocompact range)LC_ALL=C FM_SECONDMATE_BUSY_LIVE=1 bash tests/fm-secondmate-busy-contract-live-e2e.test.sh(real fm-spawn --secondmate on private tmux; real claude/opencode/pi started beside the wiring; codex stays unarmed)LC_ALL=C bash tests/fm-executor-headless-flags-live-e2e.test.sh(installed claude/codex/opencode advertise every executor-template flag)Manual live lab: fm-spawn.sh sm-ac <home> claude --secondmate with config/crew-autocompact=400000 on a private fm-lab-smac tmux socket, argv captured from the pane, then the real claude started with that argv (brief dropped) and its pane capturedChecked that docs/verification/runtime-backends.md keeps both the 'Claude auto-compact window' and the 'Secondmate busy contract' sections, and that HEAD has two parents✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.