Skip to content

test: centralize shared shell fixtures - #3296

Merged
kunchenguid merged 6 commits into
mainfrom
fm/fm-shared-test-fixtures-r1
Aug 29, 2026
Merged

kunchenguid merged 6 commits into
mainfrom
fm/fm-shared-test-fixtures-r1

Conversation

@kunchenguid

Copy link
Copy Markdown
Owner

Intent

Create a shared test-fixture library for Firstmate's bash test suite and start migrating to it, so future test files start from a shared world instead of rebuilding one. This is a test-only, low-risk refactor: do not change bin/ production script behavior.

Promote the common fake-toolchain and spawn-world builders into tests/fixtures.sh (the existing helper convention: wake-helpers.sh and secondmate-helpers.sh source tests/lib.sh; lib.sh stays generic reporters/temp/git and does not own behavior-specific fakes). At minimum centralize: a fake no-mistakes binary with the version string behind ONE shared constant so a version-floor bump is a one-line change; fake gh and gh-axi builders; fake tmux and ssh builders; the spawn-world builders (make_spawn_fakebin, make_stubs, run_spawn) and the ubiquitous cleanup/fail helpers de-duplicated into one definition each (fail/cleanup already live in tests/lib.sh; fixtures.sh sources that rather than copying them). Keep each helper's behavior identical to the current copies; where copies drifted, converge on the most-complete behavior (spawn tmux pane path uses ${FM_FAKE_PANE_PATH:-} like 8 of 9 copies, not the one :? variant).

Migration is incremental, not a big-bang rewrite of all ~30+ files. This PR builds the shared library and migrates a first coherent batch of spawn-world test files (the make_spawn_fakebin / run_spawn cluster) enough to prove the seam end to end and delete real duplication while staying reviewable. Leave remaining files on their local copies for opportunistic future migration. The PR must note which files were migrated and which remain. EXCLUSION: do not touch tests/fm-pr-check-security.test.sh; a concurrent task owns that file's deletion. Every migrated test must still pass and still assert the same observable behavior through the same real interfaces; a migration that changes what a test proves is a bug. One concept per PR: shared fixtures plus the first migration batch only, no unrelated cleanup.

What Changed

  • Add tests/fixtures.sh with shared fake-toolchain, version, tmux/SSH, and spawn-world builders, plus behavioral fixture tests and test-runner mapping.
  • Migrate fm-busy-adapter-wiring, fm-gate-refuse, fm-grok-harness, fm-spawn-dispatch-profile, fm-spawn-pool-base-freshen, and fm-tangle-guard tests to the shared fixtures.
  • Document fixture ownership; leave fm-backend, fm-kimi-harness, fm-muse-harness, fm-trace-context-spawn, and other suite-specific copies for later migration, with fm-pr-check-security untouched.

Risk Assessment

✅ Low: The change is a well-bounded test-only fixture refactor, preserves migrated test behavior, documents deferred migrations, and the prior stdin-blocking issue is correctly fixed.

Testing

Exercised the shared fake binaries directly, then ran every migrated spawn-world suite through the real test runner and real Firstmate executable interfaces, including observable spawn success/refusal and persisted Git-state evidence. Changed-file selection recognized the new fixture library, all targeted behavior succeeded, and testing left the worktree clean.

Evidence: Shared fixtures and migrated spawn-world end-to-end transcript

Source: Shared fixtures and migrated spawn-world end-to-end transcript

Firstmate shared-fixture end-to-end validation
Commit: 522348f65b79ce69696b46833a6a1a61f3ee3f44

===== tests/fm-test-fixtures.test.sh =====
FM_TEST_BEGIN 2026-08-29T19:19:07Z tests/fm-test-fixtures.test.sh family=unclassified expected_gate_skip=none
ok - fake no-mistakes --version is the shared constant and overridable
ok - init/doctor no-mistakes stub touches markers and refuses other verbs
ok - fake gh authenticates and fake gh-axi reports the shared version
ok - spawn fakebin answers pane path, logs -l payloads, and installs extra tools
ok - send stubs log typed text and fake ssh records argv with a controllable exit
ok - spawn-home layout writes harness pin, beat, and brief
FM_TEST_END 2026-08-29T19:19:08Z tests/fm-test-fixtures.test.sh exit=0 duration_ms=967 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=1030
FM_TEST_SUMMARY_FAMILY family=unclassified count=1 duration_ms=967 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-test-fixtures.test.sh duration_ms=967

===== tests/fm-busy-adapter-wiring.test.sh =====
FM_TEST_BEGIN 2026-08-29T19:19:08Z tests/fm-busy-adapter-wiring.test.sh family=unclassified expected_gate_skip=none
ok - pi extension reports agent_start busy, settles idle only via ctx.isIdle(), and keeps turn_end a notification
ok - pi extension awaits agent_settled before the next agent_start without a test delay
ok - pi extension events from a superseded incarnation are rejected as stale
ok - kimi and grok install no unverified semantic wiring and classify through their own gates
ok - opencode plugin classifies from session.status, scoped to the latched worker session
ok - claude hooks open on UserPromptSubmit and close on Stop, StopFailure, and SessionEnd
ok - claude hook events from a superseded incarnation are rejected without breaking the hook
ok - codex classifies unknown until a semantic source is verified, never idle or footer-matched
all fm-busy-adapter-wiring tests passed
FM_TEST_END 2026-08-29T19:19:34Z tests/fm-busy-adapter-wiring.test.sh exit=0 duration_ms=25370 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=25438
FM_TEST_SUMMARY_FAMILY family=unclassified count=1 duration_ms=25370 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-busy-adapter-wiring.test.sh duration_ms=25370

===== tests/fm-gate-refuse.test.sh =====
FM_TEST_BEGIN 2026-08-29T19:19:34Z tests/fm-gate-refuse.test.sh family=session-bootstrap expected_gate_skip=none
ok - fm-gate-refuse-lib: refuses when NO_MISTAKES_GATE is set
ok - fm-gate-refuse-lib: refuses when NO_MISTAKES_GATE is set empty
ok - fm-gate-refuse-lib: refuses from a gate worktree via git-common-dir (marker unset)
ok - fm-gate-refuse-lib: no-op for a normal session (neither signal, set -eu clean)
ok - fm-spawn: refuses on marker and gate-worktree backstop; a normal crew spawn is unaffected
ok - fm-send: refuses on marker and gate-worktree backstop; a normal steer uses the inbox
ok - fm-teardown: refuses on marker and gate-worktree backstop; a normal teardown is unaffected
FM_TEST_END 2026-08-29T19:19:42Z tests/fm-gate-refuse.test.sh exit=0 duration_ms=8568 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=8636
FM_TEST_SUMMARY_FAMILY family=session-bootstrap count=1 duration_ms=8568 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-gate-refuse.test.sh duration_ms=8568

===== tests/fm-grok-harness.test.sh =====
FM_TEST_BEGIN 2026-08-29T19:19:43Z tests/fm-grok-harness.test.sh family=pure-contract-unit expected_gate_skip=none
ok - grok global hook requires a firstmate registry token
ok - grok teardown removes pointer and token state
ok - fm-lock recognizes grok harness processes
FM_TEST_END 2026-08-29T19:19:51Z tests/fm-grok-harness.test.sh exit=0 duration_ms=8897 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=8974
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=1 duration_ms=8897 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-grok-harness.test.sh duration_ms=8897

===== tests/fm-spawn-dispatch-profile.test.sh =====
FM_TEST_BEGIN 2026-08-29T19:19:52Z tests/fm-spawn-dispatch-profile.test.sh family=backend-dispatch expected_gate_skip=none
ok - no --model/--effort records defaults and types the claude launch instructions
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 - claude receives --model and --effort profile flags
ok - codex receives --model and model_reasoning_effort profile flags
ok - codex omits unsupported max effort instead of passing a bad config value
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 omits the unsupported effort axis
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 - 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 - claude omits the config-dir prefix when firstmate runs with the single-store default
ok - non-claude harnesses do not receive the claude CLAUDE_CONFIG_DIR prefix
ok - active crew-dispatch profile does not block secondmate launches
# all fm-spawn-dispatch-profile tests passed
FM_TEST_END 2026-08-29T19:21:18Z tests/fm-spawn-dispatch-profile.test.sh exit=0 duration_ms=86804 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=86869
FM_TEST_SUMMARY_FAMILY family=backend-dispatch count=1 duration_ms=86804 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-spawn-dispatch-profile.test.sh duration_ms=86804

===== tests/fm-spawn-pool-base-freshen.test.sh =====
FM_TEST_BEGIN 2026-08-29T19:21:18Z tests/fm-spawn-pool-base-freshen.test.sh family=unclassified expected_gate_skip=none
# observed spawn: spawned pool-current-base-r1 harness=codex kind=ship mode=no-mistakes yolo=off window=firstmate:fm-pool-current-base-r1 worktree=/var/folders/0k/bf8mwt2n5qddzk24r20gfk0c0000gn/T//fm-spawn-pool-base-freshen.ZKHCTV/current-base/pool
# observed base: HEAD=4d66118e8b2e9eb25e0cd9570c03d232baf7fc01 origin/main=4d66118e8b2e9eb25e0cd9570c03d232baf7fc01 advanced-main=must survive a newly spawned branch
ok - a stale pooled worktree refreshes to current origin/main before a crew branch is created
ok - a stale pooled worktree resolves and refreshes a non-main default branch
# observed direct-pr spawn: spawned pool-direct-pr-r3 harness=codex kind=ship mode=direct-PR yolo=off window=firstmate:fm-pool-direct-pr-r3 worktree=/var/folders/0k/bf8mwt2n5qddzk24r20gfk0c0000gn/T//fm-spawn-pool-base-freshen.ZKHCTV/direct-pr/pool
# observed scout spawn: spawned pool-scout-r3 harness=codex kind=scout window=firstmate:fm-pool-scout-r3 worktree=/var/folders/0k/bf8mwt2n5qddzk24r20gfk0c0000gn/T//fm-spawn-pool-base-freshen.ZKHCTV/scout/pool
ok - direct-PR ships and scouts both refresh stale pooled worktrees before launch
# observed dirty refusal: error: pooled worktree '/var/folders/0k/bf8mwt2n5qddzk24r20gfk0c0000gn/T//fm-spawn-pool-base-freshen.ZKHCTV/dirty-refusal/pool' is not clean; refusing to discard uncommitted work while refreshing its base; preserved=keep this local work
ok - a dirty pooled worktree is refused without discarding its local work
# observed unresolved-default refusal: error: could not resolve origin's current default branch for pooled worktree '/var/folders/0k/bf8mwt2n5qddzk24r20gfk0c0000gn/T//fm-spawn-pool-base-freshen.ZKHCTV/unresolved-default/pool'; refusing to launch from a potentially stale base
ok - an unresolved remote default branch refuses the pooled worktree
# observed unreachable-origin refusal: error: could not fetch origin for pooled worktree '/var/folders/0k/bf8mwt2n5qddzk24r20gfk0c0000gn/T//fm-spawn-pool-base-freshen.ZKHCTV/unreachable-origin/pool'; refusing to launch from a potentially stale base
ok - an unreachable origin refuses a potentially stale pooled worktree
# observed stale-pin refusal: error: submodule 'ui' is checked out at cf1788937bc0a8e8e7760f7e3c0ecfc8ba90d86c, but this base records fc9d6b36ec6d6251e773e22e94ce105e1083c0c1
ok - two consecutive spawns across a moved submodule pin end in a refusal naming both pins and no remedy
ok - an unpushed submodule commit keeps the uncommitted-work refusal and survives it
ok - work inside a submodule is still refused as uncommitted work, not called stale
ok - a stale pin carrying real work is refused conservatively, never called stale
ok - a stale pin beside other dirt yields the conservative refusal alone, with no stale-pin line
# all fm-spawn-pool-base-freshen tests passed
FM_TEST_END 2026-08-29T19:22:07Z tests/fm-spawn-pool-base-freshen.test.sh exit=0 duration_ms=48673 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=48725
FM_TEST_SUMMARY_FAMILY family=unclassified count=1 duration_ms=48673 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-spawn-pool-base-freshen.test.sh duration_ms=48673

===== tests/fm-tangle-guard.test.sh =====
FM_TEST_BEGIN 2026-08-29T19:22:07Z tests/fm-tangle-guard.test.sh family=session-bootstrap expected_gate_skip=none
ok - fm_primary_tangle_branch: feature branch alarms; default/detached/non-git stay silent
ok - fm-guard: bordered tangle banner fires only for a feature branch and suppresses repair commands in read-only mode
ok - fm-bootstrap: TANGLE problem line fires only for a feature branch and suppresses repair commands in detect-only mode
ok - fm-brief: ship brief asserts worktree isolation before the branch step
ok - fm-spawn: aborts unless the resolved worktree is a genuine, isolated worktree
ok - fm-spawn: appends windows by session-colon, pins the name, and targets the window id
FM_TEST_END 2026-08-29T19:22:20Z tests/fm-tangle-guard.test.sh exit=0 duration_ms=12989 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=13047
FM_TEST_SUMMARY_FAMILY family=session-bootstrap count=1 duration_ms=12989 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-tangle-guard.test.sh duration_ms=12989
Evidence: Changed-file test selection recognizing shared fixtures

Source: Changed-file test selection recognizing shared fixtures

Changed-file test selection for shared fixtures:
tests/fm-arm-pretool-check.test.sh
tests/fm-ask-user-authority.test.sh
tests/fm-bearings-board.test.sh
tests/fm-brief.test.sh
tests/fm-calm-pi-extension.test.sh
tests/fm-captain-hold-lifecycle.test.sh
tests/fm-cd-pretool-check.test.sh
tests/fm-classify-decision-key.test.sh
tests/fm-composer-ghost.test.sh
tests/fm-composer-lib.test.sh
tests/fm-crew-state.test.sh
tests/fm-documentation-audiences.test.sh
tests/fm-ensure-agents-md.test.sh
tests/fm-grok-harness.test.sh
tests/fm-harness-adapter-references.test.sh
tests/fm-herdr-lab.test.sh
tests/fm-kimi-harness.test.sh
tests/fm-lint-workflows.test.sh
tests/fm-lint.test.sh
tests/fm-muse-harness.test.sh
tests/fm-operational-input.test.sh
tests/fm-pi-primary-types.test.sh
tests/fm-send-popup-settle.test.sh
tests/fm-send-settle.test.sh
tests/fm-subagent-pretool-check.test.sh
tests/fm-supervision-instructions.test.sh
tests/fm-task-delivery.test.sh
tests/fm-test-isolation-proof.test.sh
tests/fm-test-run.test.sh
tests/fm-tmux-submit-busy.test.sh
tests/fm-trace-context-lib.test.sh
tests/fm-transition-lib.test.sh
tests/fm-vendor-auth-probe.test.sh
tests/fm-backend-herdr-focus-flash-e2e.test.sh
tests/fm-branch-supervision.test.sh
tests/fm-busy-adapter-wiring.test.sh
tests/fm-busy-state.test.sh
tests/fm-classify-corr-token.test.sh
tests/fm-claude-stop-autoarm-live-e2e.test.sh
tests/fm-claude-stop-autoarm.test.sh
tests/fm-cursor-harness.test.sh
tests/fm-gitignore-config.test.sh
tests/fm-no-mistakes-required.test.sh
tests/fm-peek-remote.test.sh
tests/fm-pending-reply.test.sh
tests/fm-pi-branch-extension.test.sh
tests/fm-procevent-when.test.sh
tests/fm-procevent.test.sh
tests/fm-project-origin.test.sh
tests/fm-public-followup.test.sh
tests/fm-remote-entrypoint.test.sh
tests/fm-remote-secondmate-parent-binding.test.sh
tests/fm-send-remote-delivery.test.sh
tests/fm-spawn-pool-base-freshen.test.sh
tests/fm-test-fixture-cleanup.test.sh
tests/fm-test-fixtures.test.sh
tests/fm-voice-relay.test.sh
tests/fm-wake-drain-open-decisions-cursor.test.sh
tests/fm-wake-drain-open-decisions.test.sh
tests/fm-bootstrap-network-parallel.test.sh
tests/fm-bootstrap.test.sh
tests/fm-fleet-sync.test.sh
tests/fm-gate-refuse.test.sh
tests/fm-gotmp.test.sh
tests/fm-session-start.test.sh
tests/fm-sessionstart-nudge.test.sh
tests/fm-startup-network.test.sh
tests/fm-tangle-guard.test.sh
tests/fm-update.test.sh
tests/fm-backend-herdr.test.sh
tests/fm-backend-tmux-smoke.test.sh
tests/fm-backend.test.sh
tests/fm-control-relaunch.test.sh
tests/fm-control.test.sh
tests/fm-herdr-session-cleanup.test.sh
tests/fm-send-inbox.test.sh
tests/fm-send-resolve-key.test.sh
tests/fm-send-strict.test.sh
tests/fm-spawn-batch.test.sh
tests/fm-spawn-dispatch-profile.test.sh
tests/fm-spawn-worktree-settle.test.sh
tests/fm-teardown-endpoint-safety.test.sh
tests/fm-tmux-agent-liveness.test.sh
tests/fm-trace-context-spawn.test.sh
tests/fm-afk-inject-herdr-e2e.test.sh
tests/fm-afk-launch.test.sh
tests/fm-backend-autodetect-smoke.test.sh
tests/fm-backend-herdr-eventwait-smoke.test.sh
tests/fm-backend-herdr-launcher-workspace-e2e.test.sh
tests/fm-backend-herdr-presentation-e2e.test.sh
tests/fm-backend-herdr-prune-safety-e2e.test.sh
tests/fm-backend-herdr-respawn-idem-e2e.test.sh
tests/fm-backend-herdr-smoke.test.sh
tests/fm-backend-herdr-workspace-per-home-e2e.test.sh
tests/fm-control-herdr-smoke.test.sh
tests/fm-herdr-session-cleanup-e2e.test.sh
tests/fm-afk-pi-herdr-return-e2e.test.sh
tests/fm-cmux-claude-composer-live-e2e.test.sh
tests/fm-codex-continuity-live-e2e.test.sh
tests/fm-composer-matrix-live-e2e.test.sh
tests/fm-cursor-primary-live-e2e.test.sh
tests/fm-grok-continuity-live-e2e.test.sh
tests/fm-grok-stop-live-e2e.test.sh
tests/fm-harness-adapter-instructions-live-e2e.test.sh
tests/fm-harness-liveness-drift-live-e2e.test.sh
tests/fm-herdr-submit-confirm-live-e2e.test.sh
tests/fm-herdr-version-floor-live-e2e.test.sh
tests/fm-muse-signals-live-e2e.test.sh
tests/fm-opencode-primary-live-e2e.test.sh
tests/fm-pi-branch-live-e2e.test.sh
tests/fm-pi-primary-live-e2e.test.sh
tests/fm-quota-array-dispatch-live-e2e.test.sh
tests/fm-send-inbox-doorbell-live-e2e.test.sh
tests/fm-send-secondmate-marker-herdr-e2e.test.sh
tests/fm-sessionstart-hook-live-e2e.test.sh
tests/fm-sessionstart-instruction-refresh-live-e2e.test.sh
tests/fm-afk-inject-e2e.test.sh
tests/fm-afk-return.test.sh
tests/fm-backend-cmux-smoke.test.sh
tests/fm-backend-cmux.test.sh
tests/fm-backend-orca.test.sh
tests/fm-backend-zellij-smoke.test.sh
tests/fm-backend-zellij.test.sh
tests/fm-backlog-handoff.test.sh
tests/fm-on.test.sh
tests/fm-remote-backlog-handoff.test.sh
tests/fm-remote-doctor.test.sh
tests/fm-remote-job-orphan-reap.test.sh
tests/fm-remote-job.test.sh
tests/fm-remote-reply.test.sh
tests/fm-remote-secondmate-lifecycle-e2e.test.sh
tests/fm-remote-secondmate-trace-context.test.sh
tests/fm-remote-transport-lanes.test.sh
tests/fm-secondmate-harness.test.sh
tests/fm-secondmate-lifecycle-e2e.test.sh
tests/fm-secondmate-liveness.test.sh
tests/fm-secondmate-reconcile.test.sh
tests/fm-secondmate-safety.test.sh
tests/fm-secondmate-sync.test.sh
tests/fm-send-secondmate-marker.test.sh
tests/fm-shared-captain-inheritance.test.sh
tests/fm-startup-memory-budget.test.sh
tests/fm-stow-cascade.test.sh
tests/fm-bearings-board-render.test.sh
tests/fm-bearings-snapshot.test.sh
tests/fm-fleet-snapshot-view.test.sh
tests/fm-home-summary-refresh.test.sh
tests/fm-cursor-primary.test.sh
tests/fm-daemon.test.sh
tests/fm-guard-stale-banner.test.sh
tests/fm-inactive-reconcile.test.sh
tests/fm-pi-watch-extension.test.sh
tests/fm-session-lock-ancestry.test.sh
tests/fm-supervision-events.test.sh
tests/fm-task-inbox.test.sh
tests/fm-tool-update-check.test.sh
tests/fm-turnend-guard.test.sh
tests/fm-wake-daemon-lifecycle-e2e.test.sh
tests/fm-wake-drain-unread-status.test.sh
tests/fm-wake-queue.test.sh
tests/fm-watch-arm.test.sh
tests/fm-watch-checkpoint.test.sh
tests/fm-watch-recovery-loop.test.sh
tests/fm-watch-triage.test.sh
tests/fm-watcher-lock.test.sh
tests/fm-pr-check-security.test.sh
tests/fm-pr-merge.test.sh
tests/fm-review-diff.test.sh
tests/fm-teardown.test.sh
tests/fm-x-mode.test.sh

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • 🚨 tests/fm-test-fixtures.test.sh:109 - This invocation inherits stdin, while fake-ssh runs cat > /dev/null before returning. Under the documented interactive test-runner path, it waits for terminal EOF and eventually times out instead of asserting exit 7. Redirect stdin from /dev/null for this invocation.

🔧 Fix: Prevent fake SSH test from blocking on stdin
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • FM_TEST_EVIDENCE=1 bin/fm-test-run.sh tests/fm-test-fixtures.test.sh
  • FM_TEST_EVIDENCE=1 bin/fm-test-run.sh tests/fm-busy-adapter-wiring.test.sh
  • FM_TEST_EVIDENCE=1 bin/fm-test-run.sh tests/fm-gate-refuse.test.sh
  • FM_TEST_EVIDENCE=1 bin/fm-test-run.sh tests/fm-grok-harness.test.sh
  • FM_TEST_EVIDENCE=1 bin/fm-test-run.sh tests/fm-spawn-dispatch-profile.test.sh
  • FM_TEST_EVIDENCE=1 bin/fm-test-run.sh tests/fm-spawn-pool-base-freshen.test.sh
  • FM_TEST_EVIDENCE=1 bin/fm-test-run.sh tests/fm-tangle-guard.test.sh
  • bin/fm-test-run.sh --list --changed --base c731c36c381ea0886fa5aabf6a3be761534d3f30
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Future tests can start from tests/fixtures.sh instead of copying stubs, and a
no-mistakes version-floor bump is one constant rather than a multi-file edit.

Migrated this round: fm-busy-adapter-wiring, fm-spawn-pool-base-freshen,
fm-grok-harness, fm-tangle-guard, fm-gate-refuse, fm-spawn-dispatch-profile.
Left for opportunistic migration: remaining make_spawn_fakebin copies
(trace-context, kimi, muse, backend), the make_stubs send cluster, and the
fake no-mistakes version banners in bootstrap/session-start/secondmate suites.
Did not touch tests/fm-pr-check-security.test.sh.
@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Reviews (4): Last reviewed commit: "no-mistakes(ci): Added behavioral covera..." | Re-trigger Greptile

… startup-sensitive timer-repair wait from 3s to 10s, matching existing loaded-runner budgets. Verified with the full tests/fm-watch-triage.test.sh suite, bash syntax validation, and git diff checks
…ve-reconcile fixture to prime status through the public fm_wake_status_mark_current API, ensuring classifier helpers load correctly and preventing the idle watcher from exiting. Verified the test three consecutive times, ran fm-test-fixtures, ShellCheck, bash syntax checks, and git diff checks. The outer no-mistakes executor can now bind a fresh attestation to the new head
…mux fixture defaults an unset FM_FAKE_PANE_PATH to empty. Verified the fixture suite, ShellCheck, syntax/diff checks, and all six migrated test suites; all passed. The outer executor can now bind a fresh no-mistakes attestation to the updated head
@kunchenguid
kunchenguid merged commit 0ace60a into main Aug 29, 2026
13 of 14 checks passed
@kunchenguid
kunchenguid deleted the fm/fm-shared-test-fixtures-r1 branch August 29, 2026 20:59
timbarreto added a commit to timbarreto/firstmate that referenced this pull request Sep 1, 2026