Repository navigation
Conversation
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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideRestructures 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 executionsequenceDiagram
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
Flow diagram for coverage and pool-budget validationflowchart 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
Flow diagram for duration-balanced lint partitioningflowchart 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
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.ymlnow starts 20 jobs. The two portable parallel shard jobs are replaced by oneBehavior portable pooljob, which runsbin/fm-test-run.sh --lane portable-pool --jobs 4over 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 standaloneTest coverage guardjob now runs as the first step of the pool job. TheRepo invariantsjob now runs on lint partition 1, with its checks unchanged.bin/fm-test-run.shreplaces the hand-packedportable-parallel-1/2lane lists with aportable-poollane, whose members are exactly the proven-isolated set. New constants own the pool settings:PORTABLE_POOL_WORKERS=4andPORTABLE_POOL_TIMEOUT_MINUTES=50;PORTABLE_SERIAL_SHARDSis now 13.--check-coveragenow 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.shpacks 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 byFM_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 hostedubuntu-latestrun 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
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.
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)
Evidence: Runner lane refusals and 4-way lint partition coverage/refusals
Source: Runner lane refusals and 4-way lint partition coverage/refusals
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
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
Evidence: Folded repo-invariant scripts on HEAD and four broken fixtures
Source: Folded repo-invariant scripts on HEAD and four broken fixtures
Evidence: Isolation-proof contract test run
Source: Isolation-proof contract test run
Evidence: Live four-worker portable-pool run log (stopped incomplete)
Source: Live four-worker portable-pool run log (stopped incomplete)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
.github/workflows/ci.yml:121- The newBehavior portable pooljob 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.shalone 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. Meanwhiletest_portable_pool_stays_fully_hinted_and_bounded(tests/fm-test-run.test.sh:2002) only assertspool_modeled_ms <= 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=4is documented as the proven worker bound for the portable-pool lane ('Raise it only with a fresh proof'), but nothing enforces it. The explicit--jobsvalidation (bin/fm-test-run.sh:2510-2528) refuses--jobsonly 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 6would run unproven concurrency with every guard green, and the constant would only change the modeled estimate. The serial shard count works differently: itsofNmismatch is refused by the runner. Fix: in the explicit---jobsblock, refuseMODE=lane LANE=portable-poolwhen JOBS > PORTABLE_POOL_WORKERS, and have tests/fm-ci-workflow.test.sh check that the pool step's --jobs matches the runner-reportedpool_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.coverageis a substring match of--check-coverageover a step's run text, and the code never checks that this step comes before theRun portable poolstep, even though the workflow comment says it 'still runs ahead of the suite'. The invariants check only counts lint steps whoseifcontainsmatrix.partition == 1(folded.length < 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 foldedrunscripts from the parsed YAML against a fixture checkout and assert they fail on a symlinked CLAUDE.md and on a trackeddata/path.CONTRIBUTING.md:47- This change removes required check contextsTest coverage guard,Repo invariants,Behavior portable parallel 1/2and addsLint 4,Behavior portable pool, andBehavior 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 inportable_pool_weight_hintsis 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 inrun_coverage_guardcan never fail.select_lane portable-poolcallsselect_proven_isolated, which readslist_proven_isolated, the same list used to build$tmp/proven, so the comparison is identity. The comment says it checks against 'the proof owner', butbin/fm-test-isolation-proof.sh --listis never consulted here. That cross-owner check actually lives in tests/fm-test-isolation-proof.test.shtest_pool_lane_consumes_the_proven_set. Either drop the dead missing/extra block and keep$tmp/poolfor 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_weightshard-codestests/fm-captain-hold-lifecycle.test.shas 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-isolatedequals--list-scheduled --lane portable-poolinstead; both read the same pool hint table.bin/fm-lint.sh:344-fm_lint_root_duration_hintsis already missing two canonical roots,bin/fm-launch-mise-env-lib.shandtests/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*_unhintedfields.🔧 Fix applied.
7 issues (3 warnings, 4 infos) still open:
bin/fm-test-run.sh:230-PORTABLE_POOL_WORKERS=4is documented as the proven worker bound for the portable-pool lane ('Raise it only with a fresh proof'), but nothing enforces it. The explicit--jobsvalidation (bin/fm-test-run.sh:2510-2528) refuses--jobsonly 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 6would run unproven concurrency with every guard green, and the constant would only change the modeled estimate. The serial shard count works differently: itsofNmismatch is refused by the runner. Fix: in the explicit---jobsblock, refuseMODE=lane LANE=portable-poolwhen JOBS > PORTABLE_POOL_WORKERS, and have tests/fm-ci-workflow.test.sh check that the pool step's --jobs matches the runner-reportedpool_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.coverageis a substring match of--check-coverageover a step's run text, and the code never checks that this step comes before theRun portable poolstep, even though the workflow comment says it 'still runs ahead of the suite'. The invariants check only counts lint steps whoseifcontainsmatrix.partition == 1(folded.length < 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 foldedrunscripts from the parsed YAML against a fixture checkout and assert they fail on a symlinked CLAUDE.md and on a trackeddata/path.CONTRIBUTING.md:47- This change removes required check contextsTest coverage guard,Repo invariants,Behavior portable parallel 1/2and addsLint 4,Behavior portable pool, andBehavior 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 inportable_pool_weight_hintsis 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 inrun_coverage_guardcan never fail.select_lane portable-poolcallsselect_proven_isolated, which readslist_proven_isolated, the same list used to build$tmp/proven, so the comparison is identity. The comment says it checks against 'the proof owner', butbin/fm-test-isolation-proof.sh --listis never consulted here. That cross-owner check actually lives in tests/fm-test-isolation-proof.test.shtest_pool_lane_consumes_the_proven_set. Either drop the dead missing/extra block and keep$tmp/poolfor 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_weightshard-codestests/fm-captain-hold-lifecycle.test.shas 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-isolatedequals--list-scheduled --lane portable-poolinstead; both read the same pool hint table.bin/fm-lint.sh:344-fm_lint_root_duration_hintsis already missing two canonical roots,bin/fm-launch-mise-env-lib.shandtests/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*_unhintedfields.⏭️ **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.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-pooldiffed againstbin/fm-test-isolation-proof.sh --listbin/fm-test-run.sh --list-scheduled --lane portable-poolUnion of--list --lane portable-serial-{1..13}of13compared with--list --lane portable-serialUnion of portable-pool + portable-serial +--family real-herdr-gatedcompared withls tests/*.test.shRefusals:--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.shBudget guard on disposablegit archive HEADcopies with PORTABLE_POOL_TIMEOUT_MINUTES=20, PORTABLE_POOL_WORKERS=1, PORTABLE_POOL_MAX_TIMEOUT_PERCENT=30bin/fm-lint.sh --partition {1..4}of4 --list-filesunion compared withCI=true bin/fm-lint.sh --list-files, plus refusals of 1of3, 3of3, 0of4, 5of4, 1of5, --fast, and an explicit pathPyYAML model of .github/workflows/ci.yml: initial job expansion and names, timeouts, pool step order, lint p1-only stepsFolded invariantrun: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.mdbin/fm-test-run.sh tests/fm-test-isolation-proof.test.shbin/fm-test-run.sh --lane portable-pool --jobs 4 --fail-on-gate-skip 'Pi extension typecheck prerequisite not found' --json …(live, stopped incomplete after the first result was submitted)bash tests/fm-pr-merge.test.shon 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:
Enhancements:
CI:
Documentation:
Tests: