Skip to content

ci: run portable tests as one four-worker pool, 13 serial shards, and 4 lint partitions - #53

Closed
twilwa wants to merge 4 commits into
mainfrom
fm/fm-ci-pool-layout
Closed

twilwa wants to merge 4 commits into
mainfrom
fm/fm-ci-pool-layout

Conversation

@twilwa

@twilwa twilwa commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Intent

firstmate ci is a slog

and we can do 4 yeah

Context: option 4 was speeding firstmate CI up where it runs, on GitHub-hosted runners, because Boat runners are blocked for public repositories. The investigation report is data/fm-ci-velocity-pass/report.md; its section 7 lists ordered, bounded follow-ups and section 3 names the file seams.

The referenced follow-ups in substance: first prove the pooled portable test scheduler with four workers on hosted Linux (Bash 5 + tmux) for the 26-file individually proven-isolated set using the existing isolation proof with CPU/RSS telemetry, then ship a 20-initial-job CI layout - one pooled portable test job running that proven set under bounded worker concurrency, 13 duration-balanced serial shards for the stateful remainder, four duration-balanced lint partitions preserving source-aware ShellCheck and memory bounds, the existing Herdr and macOS jobs kept, and the two tiny standalone guard jobs (repo invariants, test coverage guard) folded into existing jobs. No shared slot broker, no coverage reduction, no weaker lint semantics, no extra test skips; required check names stay consistent with the review policy and contract tests.

What Changed

  • .github/workflows/ci.yml now starts 20 jobs. The two portable parallel shard jobs are replaced by one Behavior portable pool job, which runs bin/fm-test-run.sh --lane portable-pool --jobs 4 over all 26 proven-isolated scripts, requires tmux, and has a new 50-minute portable timeout tier. The serial remainder goes from 11 to 13 shards and lint from 3 to 4 partitions. The standalone Test coverage guard job now runs as the first step of the pool job. The Repo invariants job now runs on lint partition 1, with its checks unchanged.
  • bin/fm-test-run.sh replaces the hand-packed portable-parallel-1/2 lane lists with a portable-pool lane, whose members are exactly the proven-isolated set. New constants own the pool settings: PORTABLE_POOL_WORKERS=4 and PORTABLE_POOL_TIMEOUT_MINUTES=50; PORTABLE_SERIAL_SHARDS is now 13. --check-coverage now reports a modeled four-worker makespan (pool_modeled_ms), plus a wall estimate and budget. It fails when the modeled wall plus a setup allowance is above 80% of the pool timeout.
  • bin/fm-lint.sh packs its canonical CI partitions using measured per-root duration hints, falling back to a conservative default for roots with no measurement. The partition count is owned by FM_LINT_CI_PARTITIONS=4, and any --partition <k>of<N> that doesn't match it is refused. ShellCheck behavior is unchanged. docs/fm-test-isolation-proof.{md,json} records the hosted ubuntu-latest run with --jobs 4 (26 candidates, 0 failures, with CPU and RSS telemetry) and a two-worker control run. The shard docs, CONTRIBUTING.md, and the workflow, lint, runner, and isolation-proof contract tests are updated to match the new layout.

🤖 Generated with Claude Code

Risk Assessment

⚠️ Medium: The layout matches the intent (4 lint + 1 pool + 13 serial + Herdr + macOS = 20 initial jobs, guards folded in, coverage preserved), but the pool job runs about 21 of its 30 minutes against a guard that can't detect overrun, its proven worker bound is unenforced, and the renamed required checks need an external ruleset update before merge.

Testing

I exercised the new layout through its real command-line consumers in disposable checkouts. Coverage and partition proofs, lane refusals, the pool budget guard with good and bad configs, the 4-way lint split, the 20-job workflow expansion, and the folded invariant scripts (on the real checkout and on broken fixtures) all passed, and the changed isolation-proof contract test passed. The live four-worker pool run was stopped incomplete after three files: fm-lint passed, fm-pr-merge failed (it fails identically on the base commit), and fm-backend-t3code failed because this host's mise node shim has no version set. I could not run tests/fm-ci-workflow.test.sh because ruby is not on PATH, so I checked the workflow's meaning with a PyYAML model instead. The change has no UI surface, so there are no screenshots.

  • Live validation: ✅ go - 9 of 11 scenarios driven live against the product
Scenario Result Live Evidence
Coverage guard on the new layout reports a 26-file pool at 4 workers, 13 serial shards, and the pool budget figures, and passes ✅ pass live runner-cli-coverage.txt: FM_TEST_COVERAGE ok total=304 pool=26 pool_workers=4 pool_wall_ms=971795 pool_budget_ms=2400000 pool_timeout_min=50 serial_shards=13
The portable-pool lane lists exactly the isolation-proof candidate set and schedules it longest-hint-first ✅ pass live runner-cli-coverage.txt: diff against fm-test-isolation-proof.sh --list is identical (26 files); --list-scheduled starts with captain-hold
No coverage reduction: pool + 13 serial shards + Herdr equals all 304 tests/*.test.sh exactly once, same total as base ✅ pass live runner-cli-coverage.txt: union=304 uniq=304 inventory=304; the 13 shards give 262 unique files equal to portable-serial; base coverage total=304
Adversarial: stale lane names, wrong shard counts, out-of-range shards, --jobs on the serial lane, and --jobs on unproven stateful scripts are all refused ✅ pass live runner-and-lint-refusals.txt and pool-budget-guard.txt: exit=2 with named reasons for portable-parallel-1, 1of11, 14of13, 0of13, portable-serial --jobs 4, and fm-afk-launch under --jobs 4
Adversarial: the budget guard fails when the modeled pool wall exceeds 80% of the pool timeout, and its message carries the figures ✅ pass live pool-budget-guard.txt: timeout=20, workers=1, and percent=30 each exit 1 with the modeled wall, makespan, setup allowance, budget, and timeout in the message; the shipped config exits 0
Four lint partitions cover the canonical inventory exactly once with full source-aware mode; weakened modes and wrong counts are refused ✅ pass live runner-and-lint-refusals.txt: 4x140 = 560 unique roots, equal to the canonical list; 1of3, 3of3, 0of4, 5of4, 1of5, --fast, and an explicit path all exit 2
The CI workflow expands to 20 initial jobs with the expected names; the coverage guard runs before the pool suite ✅ pass live ci-workflow-model.txt (PyYAML parse of the real ci.yml): initial jobs = 20; coverage step index 1 < pool run index 7; pool runs --lane portable-pool --jobs 4
Adversarial: the folded repo-invariant checks on lint partition 1 still catch a symlinked or drifted CLAUDE.md, a retargeted .claude/skills, and a tracked data/ path ✅ pass live folded-invariants.txt: the scripts taken from the parsed YAML exit 0 on HEAD and exit 1 with ::error:: on each of the four fixtures
The changed isolation-proof contract test (the pool lane consumes the proven set) passes ✅ pass live isolation-proof-contract.log: exit=0, including 'ok - pool lane consumes the proven-isolated set only'
The real portable-pool lane runs all 26 proven files under --jobs 4 to completion with a timing JSON ⏸️ untested no The prior payload did not establish a live result for this scenario: the local four-worker run was stopped incomplete after the first result was submitted, so it never completed all 26 files or produc…
tests/fm-ci-workflow.test.sh holds the four timeout tiers, the pool tier/runner agreement, and the matrix contracts ⏸️ untested no The test needs ruby to parse ci.yml, and ruby is not on PATH; the workspace rules forbid installing it. Remote CI, which has ruby, runs this test.
Evidence: Runner coverage, pool membership, serial-shard and inventory partition proofs (HEAD vs base)

Source: Runner coverage, pool membership, serial-shard and inventory partition proofs (HEAD vs base)

$ bin/fm-test-run.sh --check-coverage
FM_TEST_COVERAGE ok total=304 pool=26 pool_hint_ms=2489010 pool_modeled_ms=671795 pool_workers=4 pool_unhinted=0 pool_wall_ms=971795 pool_budget_ms=2400000 pool_timeout_min=50 serial=262 serial_shards=13 serial_unhinted=0 serial_max_ms=974095 serial_budget_ms=1200000 herdr=16
exit=0

$ bin/fm-test-run.sh --list --lane portable-pool | wc -l
26

$ diff <(bin/fm-test-run.sh --list --lane portable-pool | sort) <(bin/fm-test-isolation-proof.sh --list | sort)
identical

$ bin/fm-test-run.sh --list-scheduled --lane portable-pool
tests/fm-captain-hold-lifecycle.test.sh
tests/fm-pr-merge.test.sh
tests/fm-lint.test.sh
tests/fm-test-run.test.sh
tests/fm-backend-t3code.test.sh
tests/fm-crew-state.test.sh
tests/fm-x-mode.test.sh
tests/fm-backend-herdr.test.sh
tests/fm-arm-pretool-check.test.sh
tests/fm-t3-mcp.test.sh
tests/fm-composer-lib.test.sh
tests/fm-pi-primary-types.test.sh
tests/fm-brief.test.sh
tests/fm-herdr-lab.test.sh
tests/fm-cd-pretool-check.test.sh
tests/fm-send-strict.test.sh
tests/fm-send-popup-settle.test.sh
tests/fm-grok-harness.test.sh
tests/fm-review-diff.test.sh
tests/fm-spawn-batch.test.sh
tests/fm-send-settle.test.sh
tests/fm-tmux-submit-busy.test.sh
tests/fm-composer-ghost.test.sh
tests/fm-supervision-instructions.test.sh
tests/fm-ensure-agents-md.test.sh
tests/fm-transition-lib.test.sh

$ union of 13 serial shards vs portable-serial lane
shard lines=262 unique=262 serial=262
13 shards partition portable-serial exactly

$ pool + serial + herdr == tests/*.test.sh
union=288 uniq=288 inventory=304
2a3,4
> tests/fm-afk-inject-herdr-e2e.test.sh
> tests/fm-afk-launch.test.sh
9a12
> tests/fm-backend-autodetect-smoke.test.sh
11a15,24
> tests/fm-backend-herdr-agent-exit-shell-e2e.test.sh
> tests/fm-backend-herdr-eventwait-smoke.test.sh
> tests/fm-backend-herdr-focus-flash-e2e.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-stale-active-tab-e2e.test.sh
> tests/fm-backend-herdr-workspace-per-home-e2e.test.sh
67a81
> tests/fm-control-herdr-smoke.test.sh
103a118
> tests/fm-herdr-attached-viewer-live-e2e.test.sh
106a122
> tests/fm-herdr-session-cleanup-e2e.test.sh
$ pool + serial + real-herdr-gated == tests/*.test.sh
union=304 uniq=304 inventory=304
union equals inventory: no coverage reduction

--- base commit e0cf954a coverage line for comparison ---
FM_TEST_COVERAGE ok total=304 parallel=26 parallel_max_ms=1259287 parallel_imbalance_ms=29564 parallel_unhinted=0 serial=262 serial_shards=11 serial_unhinted=0 serial_max_ms=1151204 serial_budget_ms=1200000 herdr=16
Evidence: Runner lane refusals and 4-way lint partition coverage/refusals

Source: Runner lane refusals and 4-way lint partition coverage/refusals

$ bin/fm-test-run.sh --lane portable-parallel-1 --list
fm-test-run: unknown lane 'portable-parallel-1' (see --list-lanes)
exit=2

$ bin/fm-test-run.sh --lane portable-serial-1of11 --list
fm-test-run: lane 'portable-serial-1of11' asks for 11 portable serial shards but this runner is configured for 13 (see --list-lanes)
exit=2

$ bin/fm-test-run.sh --lane portable-serial-14of13 --list
fm-test-run: lane 'portable-serial-14of13' shard index is outside 1..13 (see --list-lanes)
exit=2

$ bin/fm-test-run.sh --lane portable-serial-0of13 --list
fm-test-run: lane 'portable-serial-0of13' shard index is outside 1..13 (see --list-lanes)
exit=2

$ bin/fm-test-run.sh --lane portable-serial --jobs 4
fm-test-run: --jobs 4 refused: portable serial lanes stay serial; use --jobs 1
exit=2

--- lint partitions ---
$ bin/fm-lint.sh --partition 1of4 --list-files | wc -l
140
$ bin/fm-lint.sh --partition 2of4 --list-files | wc -l
140
$ bin/fm-lint.sh --partition 3of4 --list-files | wc -l
140
$ bin/fm-lint.sh --partition 4of4 --list-files | wc -l
140
partition roots=560 unique=560 canonical=560
4 partitions cover canonical inventory exactly once
$ bin/fm-lint.sh --partition 1of3 --list-files
fm-lint.sh: --partition asks for 3 canonical partitions but this script owns 4, got 1of3.
exit=2
$ bin/fm-lint.sh --partition 3of3 --list-files
fm-lint.sh: --partition asks for 3 canonical partitions but this script owns 4, got 3of3.
exit=2
$ bin/fm-lint.sh --partition 0of4 --list-files
fm-lint.sh: --partition must be <k>of4, got 0of4.
exit=2
$ bin/fm-lint.sh --partition 5of4 --list-files
fm-lint.sh: --partition must be <k>of4, got 5of4.
exit=2
$ bin/fm-lint.sh --partition 1of5 --list-files
fm-lint.sh: --partition asks for 5 canonical partitions but this script owns 4, got 1of5.
exit=2
$ bin/fm-lint.sh --partition 1of4 --fast --list-files
fm-lint.sh: --partition requires full canonical lint; omit --fast and explicit paths.
exit=2
$ bin/fm-lint.sh --partition 1of4 bin/fm-lint.sh --list-files
fm-lint.sh: --partition requires full canonical lint; omit --fast and explicit paths.
exit=2
Evidence: Pool budget guard: shipped config passes, three bad configs refused with figures

Source: Pool budget guard: shipped config passes, three bad configs refused with figures

# Disposable copy of HEAD at a temp dir; only the named constant is changed per case.

$ (PORTABLE_POOL_TIMEOUT_MINUTES=50) bin/fm-test-run.sh --check-coverage
FM_TEST_COVERAGE ok total=304 pool=26 pool_hint_ms=2489010 pool_modeled_ms=671795 pool_workers=4 pool_unhinted=0 pool_wall_ms=971795 pool_budget_ms=2400000 pool_timeout_min=50 serial=262 serial_shards=13 serial_unhinted=0 serial_max_ms=974095 serial_budget_ms=1200000 herdr=16
exit=0

$ (PORTABLE_POOL_TIMEOUT_MINUTES=20) bin/fm-test-run.sh --check-coverage
fm-test-run: coverage guard: portable pool models 971795ms (671795ms 4-worker makespan + 300000ms setup) above 960000ms (80% of the 20-minute pool job timeout)
fm-test-run: refresh pool hints and move work out of the pool; do not raise the job timeout: docs/fm-test-portable-shards.md
exit=1

$ (PORTABLE_POOL_WORKERS=1) bin/fm-test-run.sh --check-coverage
fm-test-run: coverage guard: portable pool models 2789010ms (2489010ms 1-worker makespan + 300000ms setup) above 2400000ms (80% of the 50-minute pool job timeout)
fm-test-run: refresh pool hints and move work out of the pool; do not raise the job timeout: docs/fm-test-portable-shards.md
exit=1

$ (PORTABLE_POOL_MAX_TIMEOUT_PERCENT=30) bin/fm-test-run.sh --check-coverage
fm-test-run: coverage guard: portable pool models 971795ms (671795ms 4-worker makespan + 300000ms setup) above 900000ms (30% of the 50-minute pool job timeout)
fm-test-run: refresh pool hints and move work out of the pool; do not raise the job timeout: docs/fm-test-portable-shards.md
exit=1

# Pool lane cannot silently absorb stateful work: --jobs on a selection with an unproven script
$ bin/fm-test-run.sh --jobs 4 tests/fm-lint.test.sh tests/fm-afk-launch.test.sh
fm-test-run: --jobs 4 refused: tests/fm-afk-launch.test.sh is not in the proven-isolated set (see bin/fm-test-isolation-proof.sh --list) and its family has no recorded concurrent proof. Unproven stateful scripts stay serial.
exit=2
Evidence: Parsed ci.yml model: 20 initial jobs, names, timeouts, pool step order, folded lint steps

Source: Parsed ci.yml model: 20 initial jobs, names, timeouts, pool step order, folded lint steps

initial jobs (no needs:) = 20
  lint                         'Lint 1'                                      timeout=30
  lint                         'Lint 2'                                      timeout=30
  lint                         'Lint 3'                                      timeout=30
  lint                         'Lint 4'                                      timeout=30
  tests-portable-pool          'Behavior portable pool'                      timeout=50
  tests-portable-serial        'Behavior portable serial 1'                  timeout=30
  tests-portable-serial        'Behavior portable serial 2'                  timeout=30
  tests-portable-serial        'Behavior portable serial 3'                  timeout=30
  tests-portable-serial        'Behavior portable serial 4'                  timeout=30
  tests-portable-serial        'Behavior portable serial 5'                  timeout=30
  tests-portable-serial        'Behavior portable serial 6'                  timeout=30
  tests-portable-serial        'Behavior portable serial 7'                  timeout=30
  tests-portable-serial        'Behavior portable serial 8'                  timeout=30
  tests-portable-serial        'Behavior portable serial 9'                  timeout=30
  tests-portable-serial        'Behavior portable serial 10'                 timeout=30
  tests-portable-serial        'Behavior portable serial 11'                 timeout=30
  tests-portable-serial        'Behavior portable serial 12'                 timeout=30
  tests-portable-serial        'Behavior portable serial 13'                 timeout=30
  tests-herdr                  'Behavior tests (Herdr)'                      timeout=75
  macos-stock-bash             'Stock macOS Bash snapshot compatibility'     timeout=30
dependent jobs: [('tests-timing-aggregate', 'Behavior timing aggregate', ['tests-portable-pool', 'tests-portable-serial', 'tests-herdr'])]
pool steps: ['actions/checkout@v6', 'Prove complete regression partition', 'Install pinned ShellCheck', 'Install pinned actionlint', 'Require tmux for e2e tests', 'Install tasks-axi', 'Install the Pi package for the Pi extension tests', 'Run portable pool', 'Upload pool timing artifact']
coverage step index 1 < pool run index 7: True
pool run: set -eu | mkdir -p "$RUNNER_TEMP/fm-test" | bin/fm-test-run.sh --lane portable-pool --jobs 4 \ |   --fail-on-gate-skip 'Pi extension typecheck prerequisite not found' \ |   --json "$RUNNER_TEMP/fm-test/fm-test-timing-portable-pool.json"
lint matrix: {'partition': [1, 2, 3, 4]} fail-fast: False
lint p1-only step: Compatibility pointers must stay intact
lint p1-only step: Personal fleet paths must not be tracked
Evidence: Folded repo-invariant scripts on HEAD and four broken fixtures

Source: Folded repo-invariant scripts on HEAD and four broken fixtures

== real checkout (HEAD) ==
pointers:
exit=0
fleet:
exit=0

== fixture: CLAUDE.md is a symlink ==
::error::CLAUDE.md must be a real @AGENTS.md pointer file, not a symlink
exit=1

== fixture: CLAUDE.md content drifted ==
::error::CLAUDE.md must be the canonical @AGENTS.md pointer
exit=1

== fixture: .claude/skills points elsewhere ==
::error::.claude/skills must be a symlink to ../.agents/skills
exit=1

== fixture: data/leak.md tracked ==
::error::Personal fleet paths are tracked in git:
data/leak.md
exit=1
Evidence: Isolation-proof contract test run

Source: Isolation-proof contract test run

FM_TEST_BEGIN 2026-10-29T04:51:16Z tests/fm-test-isolation-proof.test.sh family=pure-contract-unit expected_gate_skip=none
ok - unknown candidate pools are refused
ok - family pool JSON scopes jobs admission to proven concurrency
ok - candidate --list is non-empty, sorted, unique, and real
ok - serial classes remain excluded from the parallel candidate set
ok - audited fake-backend and stub-network extras are candidates
ok - exclusion list documents serial reasons
ok - isolation-proof contract test is family-mapped
ok - pool lane consumes the proven-isolated set only
ok - fixture repositories pin their initial branch to main
FM_TEST_END 2026-10-29T04:51:24Z tests/fm-test-isolation-proof.test.sh exit=0 duration_ms=7630 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=7761
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=1 duration_ms=7630 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-test-isolation-proof.test.sh duration_ms=7630
FM_TEST_LISTENERS found=0
Evidence: Live four-worker portable-pool run log (stopped incomplete)

Source: Live four-worker portable-pool run log (stopped incomplete)

FM_TEST_BEGIN 2026-10-29T04:43:42Z tests/fm-captain-hold-lifecycle.test.sh family=pure-contract-unit expected_gate_skip=none
FM_TEST_BEGIN 2026-10-29T04:43:42Z tests/fm-pr-merge.test.sh family=pr-forge expected_gate_skip=none
FM_TEST_BEGIN 2026-10-29T04:43:42Z tests/fm-lint.test.sh family=pure-contract-unit expected_gate_skip=none
FM_TEST_BEGIN 2026-10-29T04:43:42Z tests/fm-test-run.test.sh family=pure-contract-unit expected_gate_skip=none
not ok - github-zero-exit-queue-required: refusal did not name the concrete observed state
FM_TEST_END 2026-10-29T04:43:53Z tests/fm-pr-merge.test.sh exit=1 duration_ms=10269 gate_skip=false
FM_TEST_BEGIN 2026-10-29T04:43:53Z tests/fm-backend-t3code.test.sh family=backend-dispatch expected_gate_skip=none
fm-afk-launch: away-posture record archived at /tmp/fm-test-run.k2H87W/w5/tmp/fm-backend-t3code-tests.lKmptY/restart-unknown-completed/home/state/afk-contracts/1793249033.afk-contract
fm-afk-launch: away mode stopped; no daemon terminal was running, .afk cleared, and the posture record archived
fm-afk-launch: away-posture record archived at /tmp/fm-test-run.k2H87W/w5/tmp/fm-backend-t3code-tests.lKmptY/restart-unknown-failed/home/state/afk-contracts/1793249041.afk-contract
fm-afk-launch: away mode stopped; no daemon terminal was running, .afk cleared, and the posture record archived
ok - native restart re-arms discarded T3 stale warnings exactly once and preserves delivered suppression
ok - away housekeeping preserves unknown stale rechecks and reports possible wedges until work resumes
ok - away daemon on T3: a stall reported while unknown is not reported again once T3 reads idle
ok - T3 stale watcher: harness=codex status=failed turn=fresh -> dead
ok - t3code: a failed thread read reports unknown busy state, submits no away-mode injection, and keeps stale rechecks uncertain
ok - T3 stale lookup honors paused and captain-held declarations
ok - T3 stale watcher: harness=codex status=running turn=fresh -> absorb
ok - T3 stale watcher: harness=claude status=running turn=fresh -> absorb
ok - T3 stale watcher: harness=codex status=waiting turn=fresh -> absorb
ok - T3 stale watcher: harness=codex status=starting turn=fresh -> surface
ok - T3 stale watcher: harness=codex status=completed turn=fresh -> surface
ok - T3 stale watcher: harness=codex status=failed turn=fresh -> dead
ok - T3 stale watcher: harness=codex status=running turn=hung -> surface
ok - fm_backend_t3code_runtime_check: a missing credential names the sign-in
ok - fm_backend_t3code_runtime_check: a 401 names the fresh sign-in
warning: T3 telemetry at http://127.0.0.1:35493 is on; run the server that hosts Firstmate workers with T3CODE_TELEMETRY_ENABLED=false (docs/t3code-backend.md)
ok - fm_backend_t3code_runtime_check: the tools/list gate and environment pin refuse control and teardown without a mutation
ok - fm_backend_t3code_project_ensure: matches by realpath, otherwise creates with the fm- title
ok - fm_backend_t3code_model_selection: T3's catalog decides driver, model, and effort; overrides keep other options; default handling, instances file
ok - fm_backend_t3code_thread_create/turn_start: verified t3_thread_launch and t3_thread_send payloads
ok - fm_backend_t3code_thread_create: a lost reply is uncertain and never retried; a mis-bound thread is archived and refused
ok - fm_backend_t3code_thread_for_home: zero, one, ambiguous, and unreachable
ok - T3 requires explicit selection and does not query the server during runtime detection
ok - fm_backend_t3code_capture: renders the activity tail and the thread's status line
ok - fm_backend_t3code_send_key: Escape and C-c interrupt, Enter no-ops, others refuse
ok - fm_backend_t3code_send_text_submit: empty on accept, send-failed on rejection
ok - t3code send: a reply lost after commit is unconfirmed through the adapter and fm-send, and the resend lands once
ok - t3code send: a held request id stays unconfirmed when the next attempt fails locally, and the retry lands once
ok - t3code send: a lost reply to a secondmate names its armed correlation instead of advising a resend
ok - t3code status table: every V2 thread status, a pending request, archived, archived-but-draining, missing, unreachable, and unreadable rows
ok - t3code push wait: a pending question wakes the supervisor once with how to answer it, approvals are named apart, and answering clears it
ok - fm-t3-answer.sh: lists a T3 worker's pending questions and answers one by request id
ok - secondmate liveness backend=t3code: a failed run is resumed on its own thread, never archived and replaced
ok - secondmate liveness backend=t3code: a missing thread re-proves its archive before replacement, and an unproved close spawns nothing
ok - away daemon on T3: an unconfirmed digest is frozen and retried verbatim; a later event goes in the next digest, each event once
ok - away daemon on T3: a delivered frozen digest leaves the items behind it with the first one's undelivered age
ok - away daemon on T3: a supervisor thread waiting on a pending request defers digests until it is answered
ok - t3code helper: runs through a symlinked Firstmate root, and a kill that cannot read the thread fails closed
ok - secondmate liveness backend=t3code: an archived thread whose run still drains is left in place, not replaced
ok - fm_backend_t3code_kill: interrupt then archive with a proven close, idempotent on archived and missing, loud on failure
ok - fm-backend dispatcher: routes every t3code primitive, validates and resolves t3_thread_id records, and joins the push wait
ok - T3 harness admission refuses every non-T3 adapter and launch-time typing refuses without a thread read
ok - fm_busy_classify: t3code native busy, idle, and unknown are trusted without a record
ok - fm-control-lib: t3code key set, state-verified, no-exit, and no-replacement membership
ok - fm-control.sh backend=t3code: exit refuses before any call (V2 has no session stop); interrupt ends the turn natively
ok - fm-control.sh relaunch backend=t3code: refused before anything is stopped, by the control plane and by the launch owner
ok - fm-spawn.sh --backend t3code: leases the slot, launches the thread on it, records metadata, sends the launch brief
ok - t3code Claude PR-tool clause: dropped only at or past the verified T3 build, kept for older or unreadable servers
ok - codex-cli 0.164.0: project config retained; shell FM_TASK_ID=t3codextrk25f28d0fae
ok - fm-spawn.sh backend=t3code: compatible tracked Codex config launches, stays out of commits, and survives cleanup
ok - tracked Codex overlay: edited files survive refusal, interrupted restoration recovers, quoted and dotted policy keys refuse
ok - fm-spawn.sh --backend t3code codex: refuses to overwrite a project's tracked .codex/config.toml before any mutation
ok - fm-spawn.sh --backend t3code claude: refuses to overwrite a project's tracked CLAUDE.local.md before any mutation
ok - Claude channel refuses a symlink in the leased worktree without following it
ok - untracked Codex config is preserved unless Firstmate's marker owns it
ok - fm-t3code-codex-env.sh cleanup: without an installed overlay it needs no Python and never refuses
ok - fm-spawn.sh --backend t3code codex: an untracked Codex config in the main checkout does not refuse a worker
ok - fm-spawn.sh --backend t3code codex: writes .codex/config.toml with GOTMPDIR, FM_TASK_ID, and TRACEPARENT
ok - fm-spawn.sh --backend t3code codex: warns once, and still launches, unless the Codex configuration trusts the launch directory's main checkout
ok - fm-spawn.sh --backend t3code --secondmate: project on the home, root-strategy thread, charter message, launch prefix as settings env
ok - fm-spawn.sh --backend t3code --secondmate codex: launch prefix as .codex/config.toml shell_environment_policy
ok - fm-spawn.sh --backend t3code: refuses before mutation when the credential is rejected
ok - fm-teardown.sh backend=t3code: interrupts and archives the thread with a proven close, then returns the slot
ok - fm-teardown.sh backend=t3code secondmate: interrupts and archives, then ends the home's lingering provider process before the home is removed; an unprovable scan keeps the home
ok - fm-teardown.sh backend=t3code secondmate: interrupts and archives, then ends the home's lingering provider process before the home is removed; an unprovable scan keeps the home
ok - fm-teardown.sh backend=t3code pooled secondmate: the slot returns only after the provider ended, without the T3 environment the spawn wrote
ok - fm-teardown.sh backend=t3code: an unreachable or gate-refused server keeps the slot a live thread still points at
ok - fm-spawn.sh --backend t3code claude: refuses config/claude-permission-mode=auto it cannot honor before any mutation
ok - fm-spawn.sh --backend t3code codex: refuses config/codex-approval-mode=approve-for-me it cannot honor before any mutation
ok - fm-spawn.sh --backend t3code codex: refuses config/codex-permission-mode=restricted it cannot honor before any mutation
ok - fm-spawn.sh --backend t3code codex: config/codex-approval-mode=bypass still launches
ok - fm-spawn.sh --backend t3code claude: refuses config/launch-env-allowlist=HOME it cannot honor before any mutation
ok - fm-spawn.sh --backend t3code: refuses a raw launch command before any mutation
ok - fm-spawn.sh --backend t3code: an abort archives the thread, then returns the lease
ok - fm-spawn.sh --backend t3code: an abort that cannot archive the thread keeps the lease
ok - fm-spawn.sh --backend t3code: a launch whose response was lost keeps the lease
ok - fm-spawn.sh --backend t3code: inherited Git config values never reach the env file, which carries only Firstmate's hook entry
ok - fm-spawn.sh --backend t3code --secondmate: a symlinked .claude/settings.local.json is refused, never written through
not ok - a launch whose gate failed must abort spawn
warning: T3 telemetry at http://127.0.0.1:35493 is on; run the server that hosts Firstmate workers with T3CODE_TELEMETRY_ENABLED=false (docs/t3code-backend.md)
mise ERROR No version is set for shim: node
Set a global default version with one of the following:
mise use -g node@24.22.2
mise ERROR Version: 2026.10.19 linux-x64 (2026-10-24)
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information
spawned t3gatez5f28d0fae harness=claude kind=scout window=fm-t3gatez5f28d0fae worktree=/tmp/fm-test-run.k2H87W/w5/tmp/fm-backend-t3code-tests.lKmptY/spawn-launch-gate-down/spawn-wt: expected exit 1, got 0
FM_TEST_END 2026-10-29T04:51:15Z tests/fm-backend-t3code.test.sh exit=1 duration_ms=442410 gate_skip=false
FM_TEST_BEGIN 2026-10-29T04:51:15Z tests/fm-crew-state.test.sh family=pure-contract-unit expected_gate_skip=none
ok - fm-lint.sh --help reports the complete executable interface
ok - fm-lint.sh --list-files reports the complete shell inventory
ok - four canonical lint partitions preserve complete source-aware coverage and reject weakened modes
ok - fm-lint.sh --fast disables ShellCheck extended analysis
ok - fm-lint resolves external ShellCheck and Perl binaries past exported functions
ok - fm-lint.sh keeps full ShellCheck analysis by default in CI
ok - fm-lint.sh rejects explicit --fast mode in CI
ok - fm-lint.sh --fast catches an ordinary shell lint defect
ok - fm-lint.sh pins an explicit ShellCheck version (0.11.0)
ok - ShellCheck installer retries a transient download failure
ok - ShellCheck installer selects the official archive, URL, and checksum per OS/arch
ok - ShellCheck installer rejects a wrong checksum
ok - ShellCheck installer falls back to shasum -a 256 when sha256sum is absent
ok - ShellCheck installer prefers sha256sum when both hashers are present
ok - ShellCheck installer rejects an unsupported OS or architecture
ok - missing ShellCheck fails closed
ok - fm-lint.sh refuses to lint under a non-pinned ShellCheck version
ok - fm-lint.sh catches a real lint defect the old no-op gate passed
ok - fm-lint.sh rejects direct Beads CLI invocations in firstmate core
ok - fm-lint.sh enforces backend purity for explicit core paths
ok - fm-lint.sh ignores ambient ShellCheck options
ok - fm-lint.sh passes a clean fixture
ok - jobs=1 and jobs=2 preserve deterministic diagnostics, failures, cleanup bounds, and quiet telemetry
ok - jobs=1 and jobs=2 stop complete worker trees with and without telemetry
ok - a root pinned at the wall deadline fails by name, reaps its tree, and leaves the sentinel alive
ok - a root refused by its enforced memory limit fails by name with a memory reason
ok - memory failures retry without source following, exclude cross-file codes, and preserve a real fallback finding
ok - a memory fallback runs only within the time left in its root's original deadline
ok - explicit memory evidence outranks findings and signal reasons (modes: 0 1)
ok - OOM words in a source excerpt or a root path never classify a root as memory
ok - FM_LINT_REQUIRE_BOUNDS refuses missing enforcement and proceeds when enforceable
ok - the pinned ShellCheck both respects and survives under the memory envelope
ok - the roots sidecar and telemetry record the run's final exit status
ok - the retained sidecar records each root's lifecycle with a mode, reason, and duration
ok - seeded dispatcher, adapter, production-owner, and test-local diagnostics preserve parity
ok - fm-lint.sh changed mode lints only the changed canonical file
ok - fm-lint.sh forces a full lint in CI even when the local diff would be empty
ok - fm-lint.sh forces a full lint when HEAD is on main
ok - fm-lint.sh explicit paths bypass changed-file mode selection
ok - fm-lint.sh exits 0 with a note when the local branch has no changed lint targets
ok - fm-lint.sh --list-files reports the would-be changed set in changed mode
ok - fm-lint.sh changed mode drops source following and excludes cross-file codes
ok - fm-lint.sh changed mode invokes ShellCheck once per root
ok - fm-lint.sh CI keeps source following without the local exclusion list
ok - fm-lint.sh on main keeps source following without the local exclusion list
ok - fm-lint.sh without a merge-base keeps source following without the local exclusion list
ok - fm-lint.sh explicit paths keep source following
ok - fm-lint.sh --fast on a local branch keeps source following
ok - fm-lint.sh changed mode excludes cross-file codes that explicit paths still report
ok - local exclusion list covers every no-external-sources ShellCheck code
FM_TEST_END 2026-10-29T04:54:01Z tests/fm-lint.test.sh exit=0 duration_ms=619043 gate_skip=false
FM_TEST_BEGIN 2026-10-29T04:54:01Z tests/fm-x-mode.test.sh family=pr-forge expected_gate_skip=none
rm: cannot remove '/tmp/fm-test-run.k2H87W/w1/tmp': Directory not empty
# stopped by test agent after result submission; incomplete run
- Outcome: ⏭️ skipped across 1 run (12m45s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

⚠️ **Review** - 7 issues (3 warnings, 4 infos)
  • ⚠️ .github/workflows/ci.yml:121 - The new Behavior portable pool job has only about 7 minutes of headroom under its 30-minute Normal-tier cap, and the guard meant to watch that budget can't detect a problem. The hosted proof this layout relies on measured 1,250,469 ms (20.8 min) of test wall time at --jobs 4 (docs/fm-test-isolation-proof.md:25). tests/fm-captain-hold-lifecycle.test.sh alone took 1,216,727 ms under contention. On top of that the job installs ShellCheck, actionlint, tasks-axi and the Pi npm package and runs the coverage guard. The serial samples for captain-hold already vary 455–672 s between runs (docs/fm-test-portable-shards.md:14) and inflated roughly 1.8–2.7x under 4-way CPU saturation, so a slow hosted runner can plausibly push the job past 30 min and get it cancelled. Meanwhile test_portable_pool_stays_fully_hinted_and_bounded (tests/fm-test-run.test.sh:2002) only asserts pool_modeled_ms &lt;= 1200000. The modeled value is 671,795 ms, essentially captain-hold's serial hint, so it passes even though the measured proof already exceeds 1,200,000 ms. The doc itself calls the model 'a floor, not a forecast'. The pool also now sets the critical path (~21 min vs serial max modeled ~16 min), so it is no faster than the old worst parallel lane (914–1261 s). The intent requires this one-pool layout, so the remedy is a policy choice and needs the author's call: give the pool job a different tier cap, contention-calibrated hints, or a bound tied to the measured proof wall.
  • ⚠️ bin/fm-test-run.sh:230 - PORTABLE_POOL_WORKERS=4 is documented as the proven worker bound for the portable-pool lane ('Raise it only with a fresh proof'), but nothing enforces it. The explicit --jobs validation (bin/fm-test-run.sh:2510-2528) refuses --jobs only for portable-serial lanes and unproven scripts, so --lane portable-pool --jobs 8 (up to JOBS_MAX) is accepted. The CI value is a separate literal (--jobs 4, .github/workflows/ci.yml:162) with no test tying it to the constant. Editing ci.yml to --jobs 6 would run unproven concurrency with every guard green, and the constant would only change the modeled estimate. The serial shard count works differently: its ofN mismatch is refused by the runner. Fix: in the explicit---jobs block, refuse MODE=lane LANE=portable-pool when JOBS > PORTABLE_POOL_WORKERS, and have tests/fm-ci-workflow.test.sh check that the pool step's --jobs matches the runner-reported pool_workers.
  • ⚠️ tests/fm-ci-workflow.test.sh:444 - The new fold assertions don't show that the folded guards actually run where the comments say. coverage is a substring match of --check-coverage over a step's run text, and the code never checks that this step comes before the Run portable pool step, even though the workflow comment says it 'still runs ahead of the suite'. The invariants check only counts lint steps whose if contains matrix.partition == 1 (folded.length &lt; 2), so any two partition-1 steps pass even if the CLAUDE.md pointer and tracked-fleet-path checks are deleted or turned into no-ops. Under the test-quality rule this is a source-content proxy. Refine it to assert step order (coverage index < pool run index). For the invariants, execute the two folded run scripts from the parsed YAML against a fixture checkout and assert they fail on a symlinked CLAUDE.md and on a tracked data/ path.
  • ⚠️ CONTRIBUTING.md:47 - This change removes required check contexts Test coverage guard, Repo invariants, Behavior portable parallel 1/2 and adds Lint 4, Behavior portable pool, and Behavior portable serial 12/13. Required status checks live in the GitHub repository ruleset, outside the source tree. Until an admin updates that ruleset, the removed contexts will never report, so this PR and every later one stay pending/blocked, and the new jobs are not enforced. Confirm who updates the ruleset, and when relative to the merge.
  • ℹ️ docs/fm-test-isolation-proof.md:28 - The doc says captain-hold ran 1216727 ms 'against its ~343658 ms serial hint'. The actual hint in portable_pool_weight_hints is 671795 ms (bin/fm-test-run.sh:579), and docs/fm-test-portable-shards.md:14 gives its measured range as 454829–671795 ms. 343658 does not appear anywhere else, so the stated ~3.5x contention inflation is overstated (it is about 1.8x against the hint). Correct the figure.
  • ℹ️ bin/fm-test-run.sh:1168 - The new pool-vs-proven comparison in run_coverage_guard can never fail. select_lane portable-pool calls select_proven_isolated, which reads list_proven_isolated, the same list used to build $tmp/proven, so the comparison is identity. The comment says it checks against 'the proof owner', but bin/fm-test-isolation-proof.sh --list is never consulted here. That cross-owner check actually lives in tests/fm-test-isolation-proof.test.sh test_pool_lane_consumes_the_proven_set. Either drop the dead missing/extra block and keep $tmp/pool for the overlap and union checks, or fix the comment. (Its failure path also returns without restoring SCRIPTS, unlike its sibling at line 1192.)
  • ℹ️ tests/fm-test-run.test.sh:1904 - test_list_scheduled_proven_isolated_uses_pool_weights hard-codes tests/fm-captain-hold-lifecycle.test.sh as the first scheduled script. The removed comment in this same file warned against exactly this: naming the current longest script is what let a lane duration go stale unnoticed. A routine hint refresh that reorders the top members would break the test without any behavior change. Assert --list-scheduled --proven-isolated equals --list-scheduled --lane portable-pool instead; both read the same pool hint table.
  • ℹ️ bin/fm-lint.sh:344 - fm_lint_root_duration_hints is already missing two canonical roots, bin/fm-launch-mise-env-lib.sh and tests/fm-launch-mise-env.test.sh (added by fix(spawn): pre-trust worktree mise configs for every harness #49). They pack on the 15000 ms default. The current 4-way split still balances at about 708 s per partition, so there is no impact today. It does show the hint table goes stale with no guard reporting unhinted lint roots, unlike the test runner's *_unhinted fields.

🔧 Fix applied.
7 issues (3 warnings, 4 infos) still open:

  • ⚠️ bin/fm-test-run.sh:230 - PORTABLE_POOL_WORKERS=4 is documented as the proven worker bound for the portable-pool lane ('Raise it only with a fresh proof'), but nothing enforces it. The explicit --jobs validation (bin/fm-test-run.sh:2510-2528) refuses --jobs only for portable-serial lanes and unproven scripts, so --lane portable-pool --jobs 8 (up to JOBS_MAX) is accepted. The CI value is a separate literal (--jobs 4, .github/workflows/ci.yml:162) with no test tying it to the constant. Editing ci.yml to --jobs 6 would run unproven concurrency with every guard green, and the constant would only change the modeled estimate. The serial shard count works differently: its ofN mismatch is refused by the runner. Fix: in the explicit---jobs block, refuse MODE=lane LANE=portable-pool when JOBS > PORTABLE_POOL_WORKERS, and have tests/fm-ci-workflow.test.sh check that the pool step's --jobs matches the runner-reported pool_workers.
  • ⚠️ tests/fm-ci-workflow.test.sh:444 - The new fold assertions don't show that the folded guards actually run where the comments say. coverage is a substring match of --check-coverage over a step's run text, and the code never checks that this step comes before the Run portable pool step, even though the workflow comment says it 'still runs ahead of the suite'. The invariants check only counts lint steps whose if contains matrix.partition == 1 (folded.length &lt; 2), so any two partition-1 steps pass even if the CLAUDE.md pointer and tracked-fleet-path checks are deleted or turned into no-ops. Under the test-quality rule this is a source-content proxy. Refine it to assert step order (coverage index < pool run index). For the invariants, execute the two folded run scripts from the parsed YAML against a fixture checkout and assert they fail on a symlinked CLAUDE.md and on a tracked data/ path.
  • ⚠️ CONTRIBUTING.md:47 - This change removes required check contexts Test coverage guard, Repo invariants, Behavior portable parallel 1/2 and adds Lint 4, Behavior portable pool, and Behavior portable serial 12/13. Required status checks live in the GitHub repository ruleset, outside the source tree. Until an admin updates that ruleset, the removed contexts will never report, so this PR and every later one stay pending/blocked, and the new jobs are not enforced. Confirm who updates the ruleset, and when relative to the merge.
  • ℹ️ docs/fm-test-isolation-proof.md:28 - The doc says captain-hold ran 1216727 ms 'against its ~343658 ms serial hint'. The actual hint in portable_pool_weight_hints is 671795 ms (bin/fm-test-run.sh:579), and docs/fm-test-portable-shards.md:14 gives its measured range as 454829–671795 ms. 343658 does not appear anywhere else, so the stated ~3.5x contention inflation is overstated (it is about 1.8x against the hint). Correct the figure.
  • ℹ️ bin/fm-test-run.sh:1168 - The new pool-vs-proven comparison in run_coverage_guard can never fail. select_lane portable-pool calls select_proven_isolated, which reads list_proven_isolated, the same list used to build $tmp/proven, so the comparison is identity. The comment says it checks against 'the proof owner', but bin/fm-test-isolation-proof.sh --list is never consulted here. That cross-owner check actually lives in tests/fm-test-isolation-proof.test.sh test_pool_lane_consumes_the_proven_set. Either drop the dead missing/extra block and keep $tmp/pool for the overlap and union checks, or fix the comment. (Its failure path also returns without restoring SCRIPTS, unlike its sibling at line 1192.)
  • ℹ️ tests/fm-test-run.test.sh:1904 - test_list_scheduled_proven_isolated_uses_pool_weights hard-codes tests/fm-captain-hold-lifecycle.test.sh as the first scheduled script. The removed comment in this same file warned against exactly this: naming the current longest script is what let a lane duration go stale unnoticed. A routine hint refresh that reorders the top members would break the test without any behavior change. Assert --list-scheduled --proven-isolated equals --list-scheduled --lane portable-pool instead; both read the same pool hint table.
  • ℹ️ bin/fm-lint.sh:344 - fm_lint_root_duration_hints is already missing two canonical roots, bin/fm-launch-mise-env-lib.sh and tests/fm-launch-mise-env.test.sh (added by fix(spawn): pre-trust worktree mise configs for every harness #49). They pack on the 15000 ms default. The current 4-way split still balances at about 708 s per partition, so there is no impact today. It does show the hint table goes stale with no guard reporting unhinted lint roots, unlike the test runner's *_unhinted fields.
⏭️ **Test** - skipped
  • ⚠️ tests/fm-pr-merge.test.sh:1989 - fm-pr-merge.test.sh fails at 'github-zero-exit-queue-required: refusal did not name the concrete observed state'. It reproduces on HEAD (three runs, including with NO_MISTAKES_GATE unset) and identically on the base commit e0cf954. This change does not touch the file, so the failure is pre-existing. The file is a portable-pool member, so if it also fails on hosted Linux it will turn the new 'Behavior portable pool' job red.
  • ℹ️ The local four-worker portable-pool run was stopped incomplete. fm-backend-t3code failed on this host because the mise node shim has no version set, which is a host setup problem unrelated to the change. Full pool timing on hosted runners is left to CI and the recorded hosted proof (docs/fm-test-isolation-proof.md).
  • Live validation: ✅ go - 9 of 11 scenarios driven live against the product
Scenario Result Live Evidence
Coverage guard on the new layout reports a 26-file pool at 4 workers, 13 serial shards, and the pool budget figures, and passes ✅ pass live runner-cli-coverage.txt: FM_TEST_COVERAGE ok total=304 pool=26 pool_workers=4 pool_wall_ms=971795 pool_budget_ms=2400000 pool_timeout_min=50 serial_shards=13
The portable-pool lane lists exactly the isolation-proof candidate set and schedules it longest-hint-first ✅ pass live runner-cli-coverage.txt: diff against fm-test-isolation-proof.sh --list is identical (26 files); --list-scheduled starts with captain-hold
No coverage reduction: pool + 13 serial shards + Herdr equals all 304 tests/*.test.sh exactly once, same total as base ✅ pass live runner-cli-coverage.txt: union=304 uniq=304 inventory=304; the 13 shards give 262 unique files equal to portable-serial; base coverage total=304
Adversarial: stale lane names, wrong shard counts, out-of-range shards, --jobs on the serial lane, and --jobs on unproven stateful scripts are all refused ✅ pass live runner-and-lint-refusals.txt and pool-budget-guard.txt: exit=2 with named reasons for portable-parallel-1, 1of11, 14of13, 0of13, portable-serial --jobs 4, and fm-afk-launch under --jobs 4
Adversarial: the budget guard fails when the modeled pool wall exceeds 80% of the pool timeout, and its message carries the figures ✅ pass live pool-budget-guard.txt: timeout=20, workers=1, and percent=30 each exit 1 with the modeled wall, makespan, setup allowance, budget, and timeout in the message; the shipped config exits 0
Four lint partitions cover the canonical inventory exactly once with full source-aware mode; weakened modes and wrong counts are refused ✅ pass live runner-and-lint-refusals.txt: 4x140 = 560 unique roots, equal to the canonical list; 1of3, 3of3, 0of4, 5of4, 1of5, --fast, and an explicit path all exit 2
The CI workflow expands to 20 initial jobs with the expected names; the coverage guard runs before the pool suite ✅ pass live ci-workflow-model.txt (PyYAML parse of the real ci.yml): initial jobs = 20; coverage step index 1 < pool run index 7; pool runs --lane portable-pool --jobs 4
Adversarial: the folded repo-invariant checks on lint partition 1 still catch a symlinked or drifted CLAUDE.md, a retargeted .claude/skills, and a tracked data/ path ✅ pass live folded-invariants.txt: the scripts taken from the parsed YAML exit 0 on HEAD and exit 1 with ::error:: on each of the four fixtures
The changed isolation-proof contract test (the pool lane consumes the proven set) passes ✅ pass live isolation-proof-contract.log: exit=0, including 'ok - pool lane consumes the proven-isolated set only'
The real portable-pool lane runs all 26 proven files under --jobs 4 to completion with a timing JSON ⏸️ untested no The prior payload did not establish a live result for this scenario: the local four-worker run was stopped incomplete after the first result was submitted, so it never completed all 26 files or produc…
tests/fm-ci-workflow.test.sh holds the four timeout tiers, the pool tier/runner agreement, and the matrix contracts ⏸️ untested no The test needs ruby to parse ci.yml, and ruby is not on PATH; the workspace rules forbid installing it. Remote CI, which has ruby, runs this test.
  • bin/fm-test-run.sh --check-coverage (HEAD, compared with the base commit e0cf954a in a disposable checkout)
  • bin/fm-test-run.sh --list --lane portable-pool diffed against bin/fm-test-isolation-proof.sh --list
  • bin/fm-test-run.sh --list-scheduled --lane portable-pool
  • Union of --list --lane portable-serial-{1..13}of13 compared with --list --lane portable-serial
  • Union of portable-pool + portable-serial + --family real-herdr-gated compared with ls tests/*.test.sh
  • Refusals: --lane portable-parallel-1, portable-serial-1of11, 14of13, 0of13, --lane portable-serial --jobs 4, --jobs 4 tests/fm-lint.test.sh tests/fm-afk-launch.test.sh
  • Budget guard on disposable git archive HEAD copies with PORTABLE_POOL_TIMEOUT_MINUTES=20, PORTABLE_POOL_WORKERS=1, PORTABLE_POOL_MAX_TIMEOUT_PERCENT=30
  • bin/fm-lint.sh --partition {1..4}of4 --list-files union compared with CI=true bin/fm-lint.sh --list-files, plus refusals of 1of3, 3of3, 0of4, 5of4, 1of5, --fast, and an explicit path
  • PyYAML model of .github/workflows/ci.yml: initial job expansion and names, timeouts, pool step order, lint p1-only steps
  • Folded invariant run: scripts extracted from the parsed YAML, run on HEAD and on fixtures with a symlinked CLAUDE.md, drifted CLAUDE.md content, a retargeted .claude/skills, and a tracked data/leak.md
  • bin/fm-test-run.sh tests/fm-test-isolation-proof.test.sh
  • bin/fm-test-run.sh --lane portable-pool --jobs 4 --fail-on-gate-skip &#39;Pi extension typecheck prerequisite not found&#39; --json … (live, stopped incomplete after the first result was submitted)
  • bash tests/fm-pr-merge.test.sh on HEAD (three runs, including with NO_MISTAKES_GATE unset) and on the base commit e0cf954a
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Summary by Sourcery

Speed up CI by replacing split portable parallel jobs with a bounded four-worker pool and rebalancing the remaining test and lint workloads without reducing coverage.

New Features:

  • Consolidate the proven portable test suite into a four-worker pool while preserving complete regression coverage.
  • Expand CI to four lint partitions and thirteen serial test shards while retaining Herdr and macOS validation.

Enhancements:

  • Add modeled pool-budget validation and measured-duration-based lint partitioning.
  • Fold coverage and repository invariant checks into existing CI jobs to maintain a 20-job layout.
  • Update isolation proofs, workflow contracts, runner behavior, documentation, and required-check guidance for the revised CI structure.

CI:

  • Restructure the workflow around one portable pool, thirteen serial shards, four lint partitions, and folded guard checks.

Documentation:

  • Document the hosted four-worker isolation proof, pool scheduling and budget policy, updated shard layout, and revised timeout tiers.

Tests:

  • Update runner, lint, workflow, and isolation-proof tests to validate the new pool, partition counts, coverage, scheduling, and budget contracts.

devin-ai-integration Bot and others added 4 commits October 29, 2026 05:21
Clean workflow_dispatch run on ubuntu-latest (Bash 5.2, tmux 3.4):
26 candidates, 0 failures, per-worker mode-0700 roots and private
TMPDIRs intact, global git config unchanged. Whole-runner telemetry:
peak RSS 5.6 GiB, 90% mean CPU busy, load1 peak 9.04 on 4 vCPU -
memory headroom is ample, CPU is the saturated resource as intended.
The two-worker control also passed clean (26/0, 1562807 ms), so the
makespan is bounded by the heaviest member, not worker count. This
satisfies the hosted-Linux gate the 2026-10-23 record required
before the pooled CI lane could ship.
…and 4 lint partitions

One 'Behavior portable pool' job runs the complete proven-isolated
set under --jobs 4 through the production runner, replacing the two
serially-executing 'parallel' jobs and freeing one slot. The serial
remainder now packs across 13 duration-balanced shards. Lint packs
canonical roots into four partitions by measured per-root duration
hints (fm_lint_root_duration_hints, from fm-lint-telemetry roots.tsv
sidecars) instead of byte weight. 'Repo invariants' folds into lint
partition 1 and 'Test coverage guard' into the head of the pool job,
keeping the initial fan-out at exactly 20 jobs. Required-check names
and the workflow contract tests are updated to match.
@sourcery-ai

sourcery-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Sorry @twilwa, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 6 days and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T05:03:07.790758Z 5a152e5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sourcery-ai

sourcery-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Reviewer's Guide

Restructures firstmate CI into a 20-job layout with one four-worker portable test pool, 13 serial shards, four duration-balanced lint partitions, and folded guard checks; the runner and contract tests now enforce coverage, partitioning, scheduling, and modeled pool-budget invariants, backed by updated hosted isolation telemetry and documentation.

Sequence diagram for the portable pool test execution

sequenceDiagram
    participant Workflow as GitHub Actions workflow
    participant Runner as fm-test-run.sh
    participant Proof as Isolation proof
    participant Workers as Four tmux workers
    participant Tests as 26 proven test scripts

    Workflow->>Runner: --lane portable-pool --jobs 4
    Runner->>Runner: --check-coverage
    Runner->>Proof: select proven-isolated set
    Proof-->>Runner: 26 approved scripts
    Runner->>Workers: Schedule longest-hint-first
    Workers->>Tests: Execute scripts concurrently
    Tests-->>Workers: Results and CPU/RSS telemetry
    Workers-->>Runner: Aggregate timing JSON
    Runner-->>Workflow: Pass or fail within pool budget
Loading

Flow diagram for coverage and pool-budget validation

flowchart LR
    INVENTORY[304 test inventory]
    PARTITION[Pool 26 + serial 262 + Herdr 16]
    COVERAGE[--check-coverage]
    MODEL[Four-worker makespan + setup allowance]
    BUDGET{Within 80% of 50-minute timeout?}
    PASS[Run portable pool]
    FAIL[Refuse configuration]

    INVENTORY --> PARTITION
    PARTITION --> COVERAGE
    COVERAGE --> MODEL
    MODEL --> BUDGET
    BUDGET -->|yes| PASS
    BUDGET -->|no| FAIL
Loading

Flow diagram for duration-balanced lint partitioning

flowchart LR
    ROOTS[Canonical lint roots]
    HINTS[Measured duration hints]
    PACK[Stable largest-first packing]
    PARTITIONS[Four disjoint partitions]
    LINT[Full source-aware ShellCheck]
    REFUSE[Refuse wrong count or weakened mode]

    ROOTS --> HINTS
    HINTS --> PACK
    PACK --> PARTITIONS
    PARTITIONS --> LINT
    ROOTS -->|--partition k of N| REFUSE
Loading

File-Level Changes

Change Details Files
Replaces the two portable parallel CI jobs with a bounded four-worker pool over the proven-isolated test set, while expanding the serial remainder to 13 shards and folding standalone guards into existing jobs.
  • Adds the portable-pool lane and schedules all 26 proven-isolated tests using pool duration hints.
  • Adds a 50-minute portable timeout tier, tmux prerequisite, timing artifact upload, and an in-job coverage guard.
  • Expands portable serial CI from 11 to 13 shards and updates timing aggregation dependencies.
  • Moves repository invariants into lint partition 1 while preserving their checks.
.github/workflows/ci.yml
bin/fm-test-run.sh
CONTRIBUTING.md
docs/fm-test-portable-shards.md
docs/fm-test-isolation-proof.md
docs/fm-test-isolation-proof.json
Adds modeled pool-budget validation and updates the test runner’s lane, coverage, scheduling, and concurrency contracts for the new layout.
  • Defines pool worker, timeout, setup allowance, and timeout-percentage constants.
  • Reports pool hint totals, modeled four-worker makespan, wall estimate, and budget; refuses over-budget configurations.
  • Removes hand-maintained parallel shard membership in favor of the proven-isolated set and rejects stale lane/shard usage.
  • Updates scheduling and coverage checks to distinguish pool, serial, and Herdr partitions.
bin/fm-test-run.sh
tests/fm-test-run.test.sh
tests/fm-test-isolation-proof.test.sh
Changes lint partitioning from three to four canonical CI partitions using duration-based largest-first packing while retaining full source-aware lint and resource safeguards.
  • Adds an owned four-partition contract and rejects mismatched partition counts or weakened lint modes.
  • Uses measured per-root duration hints with a conservative fallback for unmeasured roots.
  • Updates partition coverage and refusal tests.
bin/fm-lint.sh
tests/fm-lint.test.sh
Updates CI policy and contract tests to validate the four-tier timeout model and the expanded workflow layout.
  • Adds portable timeout-tier assertions and checks agreement with the runner’s configured pool timeout.
  • Updates expected lint and serial matrices and job-count/layout assumptions.
  • Records the hosted four-worker isolation proof with CPU and RSS telemetry.
tests/fm-ci-workflow.test.sh
docs/fm-test-isolation-proof.md
docs/fm-test-isolation-proof.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@twilwa

twilwa commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #55 (same change rebased onto main after #51); branch kept.

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.

1 participant