Repository navigation
ci: rebalance test shards and expand lint partitions - #54
Merged
Merged
Conversation
Serial shard 2 and lint partition 2 were finishing at 24-30 minutes, so the shared 30-minute job limit cancelled passing work. Refresh duration hints from the slow successful runs, split portable serial work across 16 runners and the proven-isolated set across 3, and split canonical lint across 3 byte-balanced partitions. Every test and lint root still runs once. The 30-minute hang tripwire is unchanged.
…sured coverage reporting
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's own CI must report real results so the open firstmate PRs (47, 50, 51) and main can go green. On 2026-11-09 jobs were cancelled at their time limits while their tests were still passing: Behavior portable serial 2 (30 min limit; 24-29 min on passing runs) on PR 47 and PR 51, and on main 8697998 Lint 2 (Lint canonical partition, 30 min) and Stock macOS Bash snapshot compatibility (20 min). Each cancellation makes Full suite fail with no real test failure.
What Changed
<k>of<n>and expand CI lint to three partitions.Risk Assessment
Testing
Both focused suites and live CLI inventory/refusal checks passed. Disposable guard experiments and workflow analysis do not establish live scenario results. Four JSON evidence artifacts were saved. No source changes or transient worktree artifacts remain. Remote CI timing awaits the outer executor.
Evidence: Live CLI partition listings and refusals
Source: Live CLI partition listings and refusals
Evidence: Baseline packing and disposable Pi relocation experiment
Source: Baseline packing and disposable Pi relocation experiment
Evidence: Former shard count exceeds packing budget
Source: Former shard count exceeds packing budget
Evidence: Normalized workflow execution plan
Source: Normalized workflow execution plan
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
bin/fm-test-run.sh:762- The serial hint table gains 39 new entries set to exactly 45000 ms. That is PORTABLE_SERIAL_DEFAULT_WEIGHT_MS, not a CI measurement. Examples: tests/fm-assertions.test.sh:762, fm-backend-hc-appdetect-smoke:765, fm-backend-rex*.test.sh:772-775, fm-capacity:801, fm-hermes-:859-862, fm-kiro-:872-873, fm-merge-local:882, fm-project-mode:919, fm-record-export*:926-927, fm-remote-*:929-935, and fm-watch-open-decisions:1031. All 39 are portable-serial members. Because they equal the default, packing does not change. What changes is the guard:--check-coveragedrops fromserial_unhinted=43at the base commit toserial_unhinted=0here. That turns off the PORTABLE_SERIAL_MAX_UNHINTED_PERCENT (15%) guard and the testtest_portable_serial_hint_coverage_is_reported_and_boundedfor about 13% of the lane, and it misreports where the numbers came from. The commit message and docs say the hints are 'the slower successful script durations from CI runs', but these are guesses. Concrete failure: new unmeasured serial tests can now take a fresh 15% of the lane before the guard trips, while 39 guessed scripts already sit in the packing. A long guessed script (for example the Rex suites) can push a shard past its cap while the guard reports zero unmeasured. Fix: delete the 39 new45000lines. Packing is unchanged, and the guard still passes, since 39/292 is about 13.4%, under 15%. The guard then reports the true unmeasured share again. The existing provisional fm-agy-primary 45000 entry is documented and is not part of this finding..github/workflows/ci.yml:190- Parallel lanes 2 and 3 now runnpm install -g @earendil-works/pi-coding-agentand--fail-on-gate-skip 'Pi extension typecheck prerequisite not found'(.github/workflows/ci.yml:190-200 and :235-246). The only script that emits that gate token is tests/fm-pi-primary-types.test.sh, and the new LPT split keeps it in list_portable_parallel_1 (bin/fm-test-run.sh:608-618). Nothing the intent requires needs these lane 2/3 steps: they add a global npm install to each of those runners only to support a possible future rebalance. Strictly, the narrower form is the Pi install on lane 1 only. Removing the lane 2/3 steps is that narrower form, but the author may prefer the rebalance-safety tradeoff, so this needs a decision..github/workflows/ci.yml:589- The intent lists 'Stock macOS Bash snapshot compatibility (20 min)' as one of the cancellations. This change does not touch the macOS job, but in source it is alreadytimeout-minutes: 30at both the base commit and 8697998 (normal tier). So no source change is needed here; whether it now finishes inside 30 minutes is up to later CI observation.🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
bin/fm-test-run.sh:762- The serial hint table gains 39 new entries set to exactly 45000 ms. That is PORTABLE_SERIAL_DEFAULT_WEIGHT_MS, not a CI measurement. Examples: tests/fm-assertions.test.sh:762, fm-backend-hc-appdetect-smoke:765, fm-backend-rex*.test.sh:772-775, fm-capacity:801, fm-hermes-:859-862, fm-kiro-:872-873, fm-merge-local:882, fm-project-mode:919, fm-record-export*:926-927, fm-remote-*:929-935, and fm-watch-open-decisions:1031. All 39 are portable-serial members. Because they equal the default, packing does not change. What changes is the guard:--check-coveragedrops fromserial_unhinted=43at the base commit toserial_unhinted=0here. That turns off the PORTABLE_SERIAL_MAX_UNHINTED_PERCENT (15%) guard and the testtest_portable_serial_hint_coverage_is_reported_and_boundedfor about 13% of the lane, and it misreports where the numbers came from. The commit message and docs say the hints are 'the slower successful script durations from CI runs', but these are guesses. Concrete failure: new unmeasured serial tests can now take a fresh 15% of the lane before the guard trips, while 39 guessed scripts already sit in the packing. A long guessed script (for example the Rex suites) can push a shard past its cap while the guard reports zero unmeasured. Fix: delete the 39 new45000lines. Packing is unchanged, and the guard still passes, since 39/292 is about 13.4%, under 15%. The guard then reports the true unmeasured share again. The existing provisional fm-agy-primary 45000 entry is documented and is not part of this finding..github/workflows/ci.yml:589- The intent lists 'Stock macOS Bash snapshot compatibility (20 min)' as one of the cancellations. This change does not touch the macOS job, but in source it is alreadytimeout-minutes: 30at both the base commit and 8697998 (normal tier). So no source change is needed here; whether it now finishes inside 30 minutes is up to later CI observation.🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
.github/workflows/ci.yml:589- The intent lists 'Stock macOS Bash snapshot compatibility (20 min)' as one of the cancellations. This change does not touch the macOS job, but in source it is alreadytimeout-minutes: 30at both the base commit and 8697998 (normal tier). So no source change is needed here; whether it now finishes inside 30 minutes is up to later CI observation.docs/fm-test-portable-shards.md:27- The change replaced about 200 serial hints in bin/fm-test-run.sh with durations from CI runs 42627283545/42599636961. Several provenance sentences in this doc, which owns hint provenance, still quote the old values as the current hint and give the old source. That is now false: the base commit's hints matched these sentences, and this change broke the match. Sites: :27 says fm-approval-failover is 'a provisional local measurement of 5410 ms', but the hint is 10103 (bin/fm-test-run.sh:758). :26 says polytoken-harness is 21090 ms, but the hint is 27135 (:884). :33 says read-repetition-live is 1110 ms, but the hint is 1212 (:900). :38 says agy-primary-live-e2e is 75 ms, but the hint is 84 (:755). :40 says wedge-cap-live is 74 ms, but the hint is 188 (:995). :42 says the wedge-cap parity suite 'packs' 27763 ms, but the hint is 47201 (:996). :46 says T3 watch-inbox-meta is 283 ms and pr-tools-live-e2e is 52 ms, but the hints are 419 (:990) and 56 (:769). :24 says the supervision-host weights are 'local duration_ms scaled by ~2.3', but fm-supervision-host.test.sh is now the CI-derived 573730 (:958). Fix: update each of these sentences to the current values and the 42627283545/42599636961 source, or reduce them to the hints that are still provisional.🔧 Fix applied.
4 issues (3 warnings, 1 info) still open:
.github/workflows/ci.yml:589- The intent lists 'Stock macOS Bash snapshot compatibility (20 min)' as one of the cancellations. This change does not touch the macOS job, but in source it is alreadytimeout-minutes: 30at both the base commit and 8697998 (normal tier). So no source change is needed here; whether it now finishes inside 30 minutes is up to later CI observation.docs/fm-test-portable-shards.md:27- The change replaced about 200 serial hints in bin/fm-test-run.sh with durations from CI runs 42627283545/42599636961. Several provenance sentences in this doc, which owns hint provenance, still quote the old values as the current hint and give the old source. That is now false: the base commit's hints matched these sentences, and this change broke the match. Sites: :27 says fm-approval-failover is 'a provisional local measurement of 5410 ms', but the hint is 10103 (bin/fm-test-run.sh:758). :26 says polytoken-harness is 21090 ms, but the hint is 27135 (:884). :33 says read-repetition-live is 1110 ms, but the hint is 1212 (:900). :38 says agy-primary-live-e2e is 75 ms, but the hint is 84 (:755). :40 says wedge-cap-live is 74 ms, but the hint is 188 (:995). :42 says the wedge-cap parity suite 'packs' 27763 ms, but the hint is 47201 (:996). :46 says T3 watch-inbox-meta is 283 ms and pr-tools-live-e2e is 52 ms, but the hints are 419 (:990) and 56 (:769). :24 says the supervision-host weights are 'local duration_ms scaled by ~2.3', but fm-supervision-host.test.sh is now the CI-derived 573730 (:958). Fix: update each of these sentences to the current values and the 42627283545/42599636961 source, or reduce them to the hints that are still provisional.docs/fm-test-portable-shards.md:12- Sibling that the round-3 provenance fix left behind. Round 3 fixed only the serial-hint sentences. The change also rewrote all 26 entries inportable_parallel_weight_hints(bin/fm-test-run.sh:566-591): fm-captain-hold-lifecycle went from 343658 to 720304, fm-pr-merge from 300199 to 598530, fm-test-run from 156781 to 395643, fm-lint from 252498 to 370014, and so on. The doc that owns hint provenance still says at :12 that 'Both hint tables were refreshed on 2026-09-30 from five Ubuntu CI runs', and nowhere names a source for the new parallel values. The only new-source sentence, :74, covers the serial table. A related stale sentence is :130, 'verifies that both parallel lanes partition the proven-isolated set'; there are now three lanes (PORTABLE_PARALLEL_SHARDS=3). Fix: at :12, say the parallel table (and the serial entries already noted) now comes from CI runs 42627283545/42599636961, or add one sentence in the Parallel lanes section (around :68) saying so. Change :130 to 'the parallel lanes'.bin/fm-test-run.sh:606- The original commit (e58494e) deleted two things: the runner comment saying 'tests/fm-pi-primary-types.test.sh runs the production-consumer typecheck here' above list_portable_parallel_1, and the doc's mention of 'lane-specific prerequisite constraints'. Round 2 then kept the Pi install and--fail-on-gate-skip 'Pi extension typecheck prerequisite not found'on parallel lane 1 only (.github/workflows/ci.yml:144-156), on the stated basis that this is 'where tests/fm-pi-primary-types.test.sh runs'. Nothing in the runner now records that this script must stay in lane 1, and no test checks it. Today it lands there only because of LPT packing over the current hints. Concrete sequence: the documented refresh procedure (docs/fm-test-portable-shards.md:68) is run, and the new hints move fm-pi-primary-types into lane 2 or 3. That lane has no gate-skip guard, so a missing prerequisite becomes a silent capability skip instead of a failure. Fix: restore the removed comment at list_portable_parallel_1, or add a one-line coverage-guard check that the script is in portable-parallel-1. Do not re-add the Pi steps to lanes 2 and 3; the user rejected that.🔧 Fix applied.
4 issues (3 warnings, 1 info) still open:
.github/workflows/ci.yml:589- The intent lists 'Stock macOS Bash snapshot compatibility (20 min)' as one of the cancellations. This change does not touch the macOS job, but in source it is alreadytimeout-minutes: 30at both the base commit and 8697998 (normal tier). So no source change is needed here; whether it now finishes inside 30 minutes is up to later CI observation.docs/fm-test-portable-shards.md:27- The change replaced about 200 serial hints in bin/fm-test-run.sh with durations from CI runs 42627283545/42599636961. Several provenance sentences in this doc, which owns hint provenance, still quote the old values as the current hint and give the old source. That is now false: the base commit's hints matched these sentences, and this change broke the match. Sites: :27 says fm-approval-failover is 'a provisional local measurement of 5410 ms', but the hint is 10103 (bin/fm-test-run.sh:758). :26 says polytoken-harness is 21090 ms, but the hint is 27135 (:884). :33 says read-repetition-live is 1110 ms, but the hint is 1212 (:900). :38 says agy-primary-live-e2e is 75 ms, but the hint is 84 (:755). :40 says wedge-cap-live is 74 ms, but the hint is 188 (:995). :42 says the wedge-cap parity suite 'packs' 27763 ms, but the hint is 47201 (:996). :46 says T3 watch-inbox-meta is 283 ms and pr-tools-live-e2e is 52 ms, but the hints are 419 (:990) and 56 (:769). :24 says the supervision-host weights are 'local duration_ms scaled by ~2.3', but fm-supervision-host.test.sh is now the CI-derived 573730 (:958). Fix: update each of these sentences to the current values and the 42627283545/42599636961 source, or reduce them to the hints that are still provisional.docs/fm-test-portable-shards.md:12- Sibling that the round-3 provenance fix left behind. Round 3 fixed only the serial-hint sentences. The change also rewrote all 26 entries inportable_parallel_weight_hints(bin/fm-test-run.sh:566-591): fm-captain-hold-lifecycle went from 343658 to 720304, fm-pr-merge from 300199 to 598530, fm-test-run from 156781 to 395643, fm-lint from 252498 to 370014, and so on. The doc that owns hint provenance still says at :12 that 'Both hint tables were refreshed on 2026-09-30 from five Ubuntu CI runs', and nowhere names a source for the new parallel values. The only new-source sentence, :74, covers the serial table. A related stale sentence is :130, 'verifies that both parallel lanes partition the proven-isolated set'; there are now three lanes (PORTABLE_PARALLEL_SHARDS=3). Fix: at :12, say the parallel table (and the serial entries already noted) now comes from CI runs 42627283545/42599636961, or add one sentence in the Parallel lanes section (around :68) saying so. Change :130 to 'the parallel lanes'.docs/fm-test-portable-shards.md:150- Doc sentences still describe the old watch-triage hints. Rounds 3 and 4 fixed the provenance sentences but left these two behind. Line 150 says 'the three watch-triage members still sum to about 26 minutes of CI test time'. That was true for the base hints (592950+466750+526980 ≈ 26.4 min). This change raised them to 1085417+487363+614407 = 2187187 ms (bin/fm-test-run.sh:993-995), about 36.5 minutes, so the latency claim is now understated by about 10 minutes. Line 109 says 'maxima from five runs do not establish a P95', but the watch-triage paragraph at :107-108 now sources these hints from two CI runs, 42627283545 and 42599636961. Fix: change :150 to about 36 minutes and :109 to 'two runs' (or 'a few runs').🔧 Fix applied.
1 info still open:
.github/workflows/ci.yml:589- The intent lists 'Stock macOS Bash snapshot compatibility (20 min)' as one of the cancellations. This change does not touch the macOS job, but in source it is alreadytimeout-minutes: 30at both the base commit and 8697998 (normal tier). So no source change is needed here; whether it now finishes inside 30 minutes is up to later CI observation.bash tests/fm-ci-workflow.test.shbash tests/fm-test-run.test.shbin/fm-test-run.sh --check-coverage,--list-lanes, and repeated--list/--list-scheduledchecks across configured lanesCI=true bin/fm-lint.sh --partition <k>of<n> --list-filesfor two- and three-way partitions; invalid and weakened modes checked without running lintDisposable runner experiments: base packing, current timings with twelve shards, and Pi relocated to lane 2Parsed workflow YAML into normalized JSON; verified final worktree cleanliness✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.