Skip to content

fix(bin): merge upstream firstmate fixes into the fork - #4

Merged
prekabreki merged 10 commits into
mainfrom
fm/fm-upstream-sync-u12
Oct 12, 2026
Merged

prekabreki merged 10 commits into
mainfrom
fm/fm-upstream-sync-u12

Conversation

@prekabreki

@prekabreki prekabreki commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Land this PR as a merge commit, not a squash or rebase.
It is a real two-parent merge of upstream kunchenguid/firstmate main; squashing would erase the upstream ancestry and make the next sync re-conflict.

Summary

Brings the fork up to date with upstream kunchenguid/firstmate main.
Upstream had 8 commits the fork lacked (since the last common commit, e0d95ac7 at the tip), and the fork keeps its own commits (executor lane, bounded Claude auto-compact window, orphan-reparenting test fixes).

Upstream commits brought in

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 --settings JSON with a __CLAUDESETTINGS__ token (a settings-file path for secondmates); the fork added the executor's one-shot claude -p line 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_HARNESS so 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 200000 window together.

Auto-merged files checked for coherence: bin/fm-control-lib.sh (upstream's optional kind argument 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.sh C2c.
    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.
  • Executor settings.
    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.sh pins it).
    The __CLAUDESETTINGS__ header comment now names executors.

Local verification

  • bin/fm-lint.sh and shellcheck on every changed bin/ script: clean.
  • bin/fm-doc-audience-check.sh: ok.
  • Targeted tests passed: secondmate-harness, spawn-dispatch-profile, spawn-executor, control, control-relaunch, teardown, teardown-endpoint-safety, test-run, busy-adapter-wiring, watch-triage, test-fixtures, omp-harness, gemini-harness, turnend-guard, the executor bounce/poll/crew-state/brief tests, and 21 more covering upstream's changed tests and the shared fixture helpers.
  • Local runs used a C numeric locale because this host's Swedish LC_NUMERIC breaks EPOCHREALTIME arithmetic; that, and the comm and ${#} locale sensitivities seen under other overrides, exist on both sides and are not merge changes.
  • The pipeline's lint step hit that same locale crash inside bin/fm-lint.sh (its timing arithmetic garbled the worker command lines, so ShellCheck was handed its own manifest files); it was approved after LC_NUMERIC=C bin/fm-lint.sh passed on this exact head in both changed-file mode and full extended analysis of the 10 changed bin/ 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/main as 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 -p line 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

  • Merges upstream kunchenguid/firstmate main into the fork as a two-parent merge commit. It brings in upstream's 8 fixes:
    • Secondmate launches now arm the busy contract, with a per-task state/<id>.claude-settings.json passed via --settings.
    • herdr composer probes are observable-only and no longer autostart the server.
    • Fleet contribution snapshots no longer fail on oversized arguments.
    • Teardown scrubs nested repos from scratch copies before a treehouse return.
    • Backlog handoff and receive pin the markdown backend.
    • Home seed registry queries parse whole project names.
    • The test fixture helper clears an inherited Git repository location.
  • Resolves the conflicts in bin/fm-spawn.sh so both sides' features survive:
    • The fork's executor claude -p launch line and its interactive launch line both take upstream's __CLAUDESETTINGS__ token.
    • The interactive line keeps the fork's __CLAUDEAUTOCOMPACT__, and the autocompact substitution still runs before the per-kind settings expansion.
    • Upstream's WIRING_HARNESS structure is adopted, with executors given an empty wiring harness so they still arm no busy or turn-end wiring.
  • Combines both sides in docs and tests:
    • docs/verification/runtime-backends.md keeps the fork's "Claude auto-compact window" section and upstream's "Secondmate busy contract" section.
    • The commit-attribution docs now mention the secondmate settings file.
    • 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 launched claude --dangerously-skip-permissions --add-dir &lt;inbox&gt; --settings &lt;state&gt;/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.

  • Live validation: ✅ go - 2 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Claude secondmate spawned with crew-autocompact=400000 launches claude with the state settings-file path and --autocompact 400000, and the real claude accepts it and stays up (the C2c integration brea… ✅ pass live sm-autocompact/argv.txt and sm-autocompact/real-claude-pane.txt; tests/fm-secondmate-harness.test.sh C2c
Claude secondmate spawn arms upstream's busy contract in the parent home (busy/fm-spawn record, hooks in the settings file) without touching the parent's turn-ended marker ✅ pass live fm-secondmate-busy-contract-live-e2e.log (claude, opencode and pi armed and stayed up; codex unarmed); argv.txt busy-state line
Executor spawn uses claude -p ... --settings &lt;inline JSON&gt; and arms no busy-state or turn-end wiring (empty WIRING_HARNESS) ⏸️ untested no The prior payload did not establish a live result. A real claude -p executor 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…
Crewmate claude launch keeps the inline CLAUDESETTINGS JSON plus the fork's --autocompact window (value and off) ⏸️ untested no The prior payload did not establish a live result for a crewmate launch. This was checked only against a fake pane in tests/fm-spawn-dispatch-profile.test.sh. The real CLI's acceptance of --autocompac…
Merge shape and docs: HEAD is a two-parent merge of fork main and upstream, and runtime-backends.md keeps both the fork's and upstream's sections ⏸️ untested no This is repository structure, not a runtime surface, so the prior payload had no live result for it. Inspection showed 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

# argv the spawned secondmate pane passed to claude:
  --dangerously-skip-permissions
  --add-dir
  /tmp/fm-lab-smac.139MK9/primary/state/sm-ac.inbox
  --settings
  /tmp/fm-lab-smac.139MK9/primary/state/sm-ac.claude-settings.json
  --autocompact
  400000
  :\ Firstmate\ operational\ input\ waiting:\ read\ \'/tmp/fm-lab-smac.139MK9/sm/state/operational-inbox/1791750086-e444766aee9089c0.msg\'\ and\ handle\ its\ contents\ as\ Firstmate\ operational\ input.
# settings file:
{
    "feedbackDrafts": "off",
    "attribution": {
        "commit": "",
        "pr": "",
        "sessionUrl": false
    },
    "hooks": {
        "UserPromptSubmit": [
            {
                "hooks": [
                    {
                        "type": "command",
                        "command": "'~/.no-mistakes/worktrees/4046fed7c36e/01M4P9EKZA35Y9TVQRQRFF21EY/bin/fm-busy-event.sh' apply '/tmp/fm-lab-smac.139MK9/primary/state' 'sm-ac' busy --gen 'g1791750085.4040038.11502' --source claude-hook --event user-prompt-submit 2>/dev/null || true"
                    }
                ]
            }
        ],
        "Stop": [
            {
                "hooks": [
                    {
                        "type": "command",
                        "command": "'~/.no-mistakes/worktrees/4046fed7c36e/01M4P9EKZA35Y9TVQRQRFF21EY/bin/fm-busy-event.sh' apply '/tmp/fm-lab-smac.139MK9/primary/state' 'sm-ac' idle --gen 'g1791750085.4040038.11502' --source claude-hook --event stop 2>/dev/null || true"
                    }
                ]
            }
        ],
        "StopFailure": [
            {
                "hooks": [
                    {
                        "type": "command",
                        "command": "'~/.no-mistakes/worktrees/4046fed7c36e/01M4P9EKZA35Y9TVQRQRFF21EY/bin/fm-busy-event.sh' apply '/tmp/fm-lab-smac.139MK9/primary/state' 'sm-ac' idle --gen 'g1791750085.4040038.11502' --source claude-hook --event stop-failure 2>/dev/null || true"
                    }
                ]
            }
        ],
        "SessionEnd": [
            {
                "hooks": [
                    {
                        "type": "command",
                        "command": "'~/.no-mistakes/worktrees/4046fed7c36e/01M4P9EKZA35Y9TVQRQRFF21EY/bin/fm-busy-event.sh' apply '/tmp/fm-lab-smac.139MK9/primary/state' 'sm-ac' idle --gen 'g1791750085.4040038.11502' --source claude-hook --event session-end 2>/dev/null || true"
                    }
                ]
            }
        ]
    }
}
# busy-state record: v1 gen=g1791750085.4040038.11502 seq=1 state=busy source=fm-spawn event=launch-brief ts=1791750085
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)

pane_dead=0
cmd: claude --dangerously-skip-permissions --add-dir /tmp/fm-lab-smac.139MK9/primary/state/sm-ac.inbox --settings /tmp/fm-lab-smac.139MK9/primary/state/sm-ac.claude-settings.json --autocompact 400000 
Welcome to Claude Code v2.1.296
..........................................................

     *                                       █████▓▓░
                                 *         ███▓░     ░░
            ░░░░░░                        ███▓░
    ░░░   ░░░░░░░░░░                      ███▓░
   ░░░░░░░░░░░░░░░░░░░    *                ██▓░░      ▓
                                             ░▓▓███▓▓░
 *                                 ░░░░
                                 ░░░░░░░░
                               ░░░░░░░░░░░░░░░░
       █████████                                        *
      ██▄█████▄██                        *
       █████████      *
.......█ █   █ █..........................................

 Let's get started.

 Choose the text style that looks best with your terminal
 To change this later, run /theme

     Auto (match terminal)
 ❯ ✔ Dark mode
     Light mode
     Dark mode (colorblind-friendly)
     Light mode (colorblind-friendly)
     Dark mode (ANSI colors only)
     Light mode (ANSI colors only)

 ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
  1  function greet() {
  2 -  console.log("Hello, World!");
  2 +  console.log("Hello, Claude!");
  3  }
 ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
  Syntax theme: Monokai Extended (ctrl+t to disable)
Evidence: Secondmate busy contract live guard transcript

Source: Secondmate busy contract live guard transcript

# claude 2.1.296 (Claude Code): real process stayed up; pane tail classify=busy fm-spawn
ok - claude 2.1.296 (Claude Code): a tmux secondmate spawn arms a busy verdict the active-turn gate can see
# opencode 1.18.35: real process stayed up; pane tail classify=busy fm-spawn
ok - opencode 1.18.35: a tmux secondmate spawn arms a busy verdict the active-turn gate can see
# pi 0.85.1: real process stayed up; pane tail classify=unknown launch-prompt
ok - pi 0.85.1: a tmux secondmate spawn arms a busy verdict the active-turn gate can see
# skip: pi-signed is not installed on this machine, so its secondmate busy contract is unverified here
# skip: omp is not installed on this machine, so its secondmate busy contract is unverified here
# skip: grok is not installed on this machine, so its secondmate busy contract is unverified here
ok - codex codex-cli 0.162.0: secondmate spawn stays unarmed and does not emit a parent turn-end
# checked 4 harness(es); absent: pi-signed omp grok
ok - secondmate busy contract live guard checked every installed harness
Evidence: Claude autocompact live guard transcript

Source: Claude autocompact live guard transcript

ok - claude 2.1.296 (Claude Code) accepts --autocompact 200000 and the range ends 100000 and 1000000
ok - claude 2.1.296 (Claude Code) refuses --autocompact 99999 and 1000001, so the flag is recognized with fm-spawn's range
# claude auto-compact live guard checked: claude
Evidence: Executor headless flags live guard transcript

Source: Executor headless flags live guard transcript

ok - claude 2.1.296 (Claude Code) advertises every flag of the executor template (claude -p)
ok - codex codex-cli 0.162.0 advertises every flag of the executor template (codex exec)
ok - opencode 1.18.35 advertises every flag of the executor template (opencode run)
Evidence: Secondmate harness suite (incl. C2c)

Source: Secondmate harness suite (incl. C2c)

ok - A1 fm-harness.sh secondmate resolves the fallback chain; crew mode unchanged
ok - fm-harness detects only Cursor Agent CLI's exact invocation marker
ok - C1 fm-harness.sh secondmate-model/secondmate-effort resolve the optional tokens; bare harness stays empty (backward-compat)
ok - pi-signed identity: authoritative launch selection distinguishes shared wrapper ancestry
ok - harness identity: dash-leading ps command names are basename operands, not options
ok - B1 propagate_inheritable_config: copy, idempotence, convergence, absence-mirror, exclusion, no-op, skip diagnostics
ok - B2 spawn: secondmate runs the secondmate harness; its home inherits declared config
ok - B3 spawn: an absent secondmate-harness falls back to the crew harness (backward-compat)
ok - B4 spawn: no config at all -> own harness and no propagation side effects
ok - B5 spawn: an explicit per-spawn harness arg overrides config/secondmate-harness
ok - B6 spawn: an unverified resolved secondmate harness is refused (guard intact)
skip: cursor executable not resolvable in this environment, so the launch could not be built
ok - B5b spawn: FM_BACKEND wins over inherited config/backend
ok - B5c spawn: explicit --backend wins over FM_BACKEND and inherited config/backend
ok - C2 spawn: a bare harness-only secondmate-harness file launches with no model/effort flag (backward-compat)
ok - C3 spawn: config/secondmate-harness's model token threads --model into the launch and meta
ok - C4 spawn: config/secondmate-harness's model+effort tokens thread into the launch and meta
ok - C5 spawn: an explicit --model overrides config/secondmate-harness's model token; the file's effort token still applies
ok - C6 spawn: an explicit --effort overrides config/secondmate-harness's effort token; the file's model token still applies
ok - C7 spawn: an explicit --harness starts with clean model/effort defaults
ok - C8 spawn: an explicit --harness still honors explicit model/effort flags
ok - C9 spawn: secondmate launch pins supervision to its own harness
ok - C9 spawn: the harness fallback chain still resolves with no tokens; crew/scout launches are unaffected by this feature
ok - B7 bootstrap sweep pushes, re-converges, and mirrors absence; never inherits secondmate-harness
ok - B8 bootstrap sweep propagates config even when the home's tracked files are already current
ok - B9 bootstrap sweep defers new inherited config until the home ignores it
ok - B10 bootstrap sweep materializes and inherits the startup-memory default while fast-forwarding
ok - B12b backend inheritance: present values and primary absence converge exactly
ok - C2b spawn: config/claude-permission-mode=auto reaches a Claude secondmate launch
ok - claude secondmate launches cover the parent-home steering inbox in auto and bypass modes
ok - B12c claude-permission-mode inheritance: present values and primary absence converge exactly
ok - C2c spawn: config/crew-autocompact reaches a Claude secondmate launch
ok - B12d crew-autocompact inheritance: present values and primary absence converge exactly
ok - B12c presentation inheritance: the primary default converges on, and only an explicit opt-out propagates off
ok - B11 bootstrap sweep surfaces config propagation failures
ok - B11 bootstrap rereads completed config writes after partial propagation
ok - B12 config-push propagates via shared live discovery, reports items, rereads on change only, and does not fast-forward
ok - B13 config-push reports dirty, non-allowing, and invalid homes without failing warnings-only runs
ok - B14 config-push exits nonzero on real propagation errors
ok - B14 config-push rereads completed config writes after partial propagation
ok - B15 config reread is per-home, exact-byte, ordered, and pointer-only
ok - B16 config reread isolation, ABSENT, generation safety, send failure, and retry
ok - B20 config reread publication failures retain exact generations for retry
ok - B21 config reread instruction-write failures retain exact retry generations
ok - B21 config reread preserves exact bytes when temporary adoption also fails
ok - B21 config reread serializes concurrent propagation and delivery
ok - B22 full config reread retry queues drain before new publication
ok - B23 mixed config reread delivery failures still bound sent history
ok - B26 config reread delivery stops after the oldest failed generation
ok - B17 config reread skips unchanged homes and reads destination post-write bytes
ok - B18 bootstrap config reread path works; spawn flexibility remains defaults-only
ok - B19 bootstrap respawns before inherited-config reread
ok - B25 spawn quarantines stale rereads without blocking relaunch
ok - B24 bootstrap detect-only mode remains filesystem read-only
# all fm-secondmate-harness tests passed
Evidence: Executor spawn suite

Source: Executor spawn suite

ok - executor spawn: meta, pre-created branch at its base, published poll, excluded PR body, verbatim launch brief
ok - headless templates: claude -p, codex exec, opencode run, each with the exit marker appended
ok - executor refusals: mode, kind conflicts, issue, yolo, non-headless adapters, batch, relaunch --issue
ok - brief and spawn agree on kind and issue in both directions
ok - a raw executor command receives the encoded brief last unless it places __BRIEF__ itself
ok - an executor below a stricter standing posture refuses without --accept-direct-pr and records the consent with it
ok - a stale fm/<id> is reset onto the freshened base on retry; a held branch refuses with git's reason
ok - foreman intake: a ready-for-agent issue launches and is claimed in-progress
ok - foreman intake refuses an unpromoted issue and a repository the captain does not own
ok - an exec:pro issue launches only on the --pro profile, which the task records
ok - a project with no .foreman.local runs the plain executor lane with no label traffic
Evidence: Dispatch profile suite (crewmate autocompact)

Source: Dispatch profile suite (crewmate autocompact)

ok - allowlist=absent preserves the operational floor and filters only when opted in
ok - allowlist=missing-config preserves the operational floor and filters only when opted in
ok - allowlist=enabled preserves the operational floor and filters only when opted in
ok - allowlist=empty preserves the operational floor and filters only when opted in
ok - invalid allowlist names refuse before launch or task publication
ok - inaccessible config with present allowlist refuses before launch or task publication
ok - inaccessible config with absent allowlist refuses before launch or task publication
ok - inaccessible ancestor with present allowlist refuses before launch or task publication
ok - inaccessible ancestor with absent allowlist refuses before launch or task publication
ok - secondmate launch inherits the allowlist for subsequent worker launches
ok - local inheritance preserves the allowlist on source errors and mirrors proven absence
ok - remote inheritance preserves the allowlist on source errors and mirrors proven absence
ok - fm-spawn: actual ship/scout launch commands deliver the worker role contract
ok - no --model/--effort records defaults and types the claude launch instructions
ok - a claude launch publishes the brief as an operational-inbox record and passes only the doorbell
ok - a secondmate claude launch publishes its brief record into the secondmate's own home
ok - a claude spawn whose launch-brief record cannot publish stops with a clear error and sends no launch
ok - non-cursor launches clear inherited Cursor identity markers
ok - relative home overrides ignore CDPATH and become absolute before spawn launch construction
ok - FM_HOME defaults resolve relative paths and preserve absolute spellings
ok - absolute override spellings are preserved in spawn launch paths
ok - unresolvable relative spawn overrides fail with named diagnostics
ok - active crew-dispatch profile requires an explicit harness for ship spawns
ok - active crew-dispatch profile requires an explicit harness for scout spawns
ok - active crew-dispatch profile allows an explicit resolved harness
ok - active crew-dispatch profile allows the legacy positional harness form
ok - active crew-dispatch profile allows the raw launch-command escape hatch
ok - a chained raw launch commits through the AI-trailer strip in every step
ok - claude receives --model and --effort profile flags
ok - codex receives --model and model_reasoning_effort profile flags
ok - codex Luna receives --model and model_reasoning_effort max profile flags
ok - codex omits max for models without the catalog capability
ok - a codex crewmate launches with no hook layer and keeps its turn-end signal
ok - a codex secondmate keeps the project hook layer its primary session runs on
ok - grok receives --model and --reasoning-effort profile flags
ok - grok omits unsupported max reasoning effort
ok - grok omits unsupported xhigh reasoning effort
ok - cursor receives its model-qualified reasoning class and exact task workspace
ok - cursor refuses model ids absent from its resolved binary's live catalog
ok - cursor preserves the requested model when its live catalog is unreachable
ok - opencode receives --model and the effort as its config's agent variant
ok - opencode without an effort keeps its launch config unchanged
ok - opencode emits the variant for an effort the openai family exposes
ok - opencode omits the variant for an effort outside the model family's list
ok - native effort validator checks harness and model as separate axes
ok - Ultra is explicit for native Pi and Pi-signed, including direct-PR, and refuses unsupported profiles before provisioning
ok - batch dispatch preserves native Ultra in metadata and launch flags
ok - Pi scout spawn enters the recorded worktree before launch
ok - pi receives --model and --thinking max profile flags
ok - Pi launch probing omits --tui-mode on older Pi and preserves it on supporting Pi
ok - pi-signed shares Pi launch semantics while preserving its configured and recorded identity
ok - pi-signed refuses safely and actionably when the selected executable is unavailable
ok - pi-signed is a distinct persistent secondmate runtime with shared Pi supervision semantics
ok - seeded Pi/pi-signed secondmate launches carry session --approve when advertised
ok - ordinary Pi worker launches omit --approve
ok - Pi approve probing omits --approve when help does not advertise it
ok - Pi and pi-signed ship and scout launches carry the configured tool exclusions
ok - Pi worker registries report unmatched and unverified exclusions without reporting exact matches
ok - an absent or empty exclusion list leaves every runtime unaffected
ok - a runtime that cannot hide tools, or a raw launch, refuses a non-empty exclusion list
ok - a malformed exclusion entry refuses the spawn before any launch or record
ok - Pi and pi-signed ship and scout launches refuse when the exclusion file disappears after its checks
ok - exclusions stay in the home that configured them and skip secondmate agents
ok - batch dispatch forwards shared --harness, --model, and --effort to every pair
ok - claude forwards firstmate's CLAUDE_CONFIG_DIR so the crewmate uses the same credential store
ok - the primary-owned Lavish server address reaches every worker launch
cat: /tmp/fm-spawn-dispatch-profile.sQIRKf/profile-lavish-ambient/pane.log: No such file or directory
ok - absent Lavish configuration preserves the destination environment
ok - claude omits the config-dir prefix when firstmate runs with the single-store default
ok - config/claude-permission-mode=bypass launches exactly as an absent file does
ok - config/claude-permission-mode=auto replaces --dangerously-skip-permissions with --permission-mode auto
ok - config/claude-permission-mode=auto reaches scout launches too
ok - claude worker launches cover the task-channel directories in bypass and auto modes
ok - an unrecognized config/claude-permission-mode token refuses before any endpoint or metadata
ok - config/claude-permission-mode changes claude launches only
ok - config/crew-autocompact sets the --autocompact window of a claude ship launch
ok - config/crew-autocompact=off omits --autocompact
ok - config/crew-autocompact reaches scout launches too
ok - an out-of-range or malformed config/crew-autocompact refuses before any endpoint or metadata
ok - config/crew-autocompact changes claude launches only
ok - non-claude harnesses do not receive the claude CLAUDE_CONFIG_DIR prefix
ok - a claude task launch establishes only Firstmate's task control channels through the system prompt
ok - a persistent claude secondmate keeps its supervisor contract without a task-worker authority overlay
ok - fm-spawn: a Claude launch longer than 1024 bytes is delivered intact through the staging path
ok - a claude crewmate launch carries the attribution-off policy in its own settings
ok - keep-ai-trailers omits Claude attribution settings and the pane strip hooks
ok - keep-ai-trailers is inherited so a secondmate's crew launch keeps AI trailers
ok - a claude secondmate launch carries the attribution-off policy too
ok - active crew-dispatch profile does not block secondmate launches
# all fm-spawn-dispatch-profile tests passed

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.

  • Live validation: ✅ go - 2 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Claude secondmate spawned with crew-autocompact=400000 launches claude with the state settings-file path and --autocompact 400000, and the real claude accepts it and stays up (the C2c integration brea… ✅ pass live sm-autocompact/argv.txt and sm-autocompact/real-claude-pane.txt; tests/fm-secondmate-harness.test.sh C2c
Claude secondmate spawn arms upstream's busy contract in the parent home (busy/fm-spawn record, hooks in the settings file) without touching the parent's turn-ended marker ✅ pass live fm-secondmate-busy-contract-live-e2e.log (claude, opencode and pi armed and stayed up; codex unarmed); argv.txt busy-state line
Executor spawn uses claude -p ... --settings &lt;inline JSON&gt; and arms no busy-state or turn-end wiring (empty WIRING_HARNESS) ⏸️ untested no The prior payload did not establish a live result. A real claude -p executor 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…
Crewmate claude launch keeps the inline CLAUDESETTINGS JSON plus the fork's --autocompact window (value and off) ⏸️ untested no The prior payload did not establish a live result for a crewmate launch. This was checked only against a fake pane in tests/fm-spawn-dispatch-profile.test.sh. The real CLI's acceptance of --autocompac…
Merge shape and docs: HEAD is a two-parent merge of fork main and upstream, and runtime-backends.md keeps both the fork's and upstream's sections ⏸️ untested no This is repository structure, not a runtime surface, so the prior payload had no live result for it. Inspection showed 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 captured
  • Checked 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.

⚠️ **Lint** - 1 warning
  • ⚠️ linter found issues (exit code 2)
✅ **Push** - passed

✅ No issues found.

viky-01 and others added 10 commits October 9, 2026 07:44
…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.
@prekabreki
prekabreki merged commit d1d2978 into main Oct 12, 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.

7 participants