Skip to content

fix(bin): rebalance portable parallel test lanes using CI timings - #4

Merged
karimghabra merged 1 commit into
mainfrom
fm/fm-ci-lane-rebalance
Sep 11, 2026
Merged

karimghabra merged 1 commit into
mainfrom
fm/fm-ci-lane-rebalance

Conversation

@karimghabra

@karimghabra karimghabra commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Intent

Cherry-pick upstream commit 869ae90 (kunchenguid/firstmate PR kunchenguid#4151), 'fix(bin): rebalance portable parallel test lanes using CI timings', onto this fork's main. This fork's first-ever CI run on PR #3 showed the 'Behavior portable parallel 1' check being cancelled at its 10-minute cap because lane 1 and lane 2 are unbalanced; the upstream commit rebalances the two portable-parallel test lanes using measured CI timings so lane 1 fits under the cap. It touches .github/workflows/ci.yml, bin/fm-test-run.sh, docs/fm-test-portable-shards.md, and tests/fm-test-run.test.sh. This is a mechanical, already upstream-reviewed CI configuration change with no new behavior beyond restoring the two-lane balance; nothing else should change. The fix unblocks every future pull request on this fork, not just one change. All 27 real GitHub checks on PR 4 already pass cleanly against this exact head (b92e741); a prior pipeline run on this same head produced a passed-with-override outcome only because it was reattached mid-flight while a stale compliance check event was still resolving - that override should not recur now that every check is genuinely green.

What Changed

  • bin/fm-test-run.sh rebalances the membership of portable-parallel-1 and portable-parallel-2 using a new portable_parallel_weight_hints table, which holds each script's slowest completed ubuntu-latest duration across six CI runs. For example, fm-pr-merge moves to lane 1, and fm-captain-hold-lifecycle, fm-composer-lib, fm-tmux-submit-busy and fm-transition-lib move between lanes. --list-scheduled --lane portable-parallel-{1,2} now orders scripts by these hints and falls back to serial weights when a hint is missing. Every other selection still uses serial weights, with ties broken by path.
  • --check-coverage now also reports parallel_max_ms, parallel_imbalance_ms and parallel_unhinted, all derived from the lane memberships and hints. tests/fm-test-run.test.sh adds three tests. One requires every parallel member to have a hint and the two lane sums to be within 5% of each other. One requires stored lane order to be longest-hint-first. One confirms that non-lane selections still schedule by serial weights.
  • docs/fm-test-portable-shards.md replaces the old local concurrent-proof timing table with the CI-run provenance, per-script sample counts and the steps for refreshing the hints. In .github/workflows/ci.yml, only the comments on the two parallel jobs change: the stale "~1 min" estimate is corrected. The timeout-minutes: 10 cap and the lane count stay the same.

🤖 Generated with Claude Code

Risk Assessment

✅ Low: This is a mechanical cherry-pick: its added and removed lines match upstream 869ae90 exactly. The fork's copy of bin/fm-test-run.sh differs from upstream in only two family-map entries unrelated to the parallel lanes. The rebalanced lanes still partition the fork's 24-script proven-isolated set exactly. The coverage guard puts the lanes about 30 ms apart, with the larger at about 414 s. Every moved script's prerequisites (tasks-axi, jq, Pi for fm-pi-primary-types) are installed in the lane it now runs in.

Testing

I ran the real bin/fm-test-run.sh CLI at head b92e741. Its --check-coverage guard passes and reports a 414 s worst lane, a 30 ms imbalance and no unhinted scripts. Applying the same measured hints to the base split puts lane 1 at 624 s (10.4 min), which matches PR #3's lane 1 being cancelled at 616 s. Both lanes ran end to end locally with CI's flags: lane 1 passed 11/11 in 557 s on WSL, sharing the CPU with my mutation runs, with the Pi test actually running. Lane 2 passed 13/13 in 502 s. Each lane's stored order matches --list-scheduled, and together the lanes still split exactly the same 24 proven-isolated scripts. The Pi test stays in the lane that installs Pi. Every non-lane --list-scheduled selection and every other lane is byte-identical to base. On mutated copies, --check-coverage never fails (by design) but reports the drift. The branch's lane tests reject the pre-fix split, a missing hint, a >5% imbalance and parallel hints leaking into non-lane selections, and accept a small move within 5%. The workflow parses to the same model as base (only comments changed), and the patch matches upstream 869ae90. As supporting context, PR #4's CI at this head shows both parallel lanes succeeding in 351–434 s against the 600 s cap. I produced no visual artifacts because this is a CLI and CI-configuration change with no UI. The overall result is go.

  • Live validation: ✅ go - 8 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Maintainer runs bin/fm-test-run.sh --check-coverage and sees the parallel lanes fully hinted and balanced ✅ pass live check-coverage-head.txt: exit 0, parallel_max_ms=414299, parallel_imbalance_ms=30, parallel_unhinted=0
Regression repro: the pre-fix split packs lane 1 over the 10-minute cap and the rebalanced split packs it under ✅ pass live lane-balance-base-vs-head.txt: base lane 1 624299 ms vs head 414269 ms, lane 2 414299 ms; consistent with pr3-ci-prefix-portable-parallel-job-walls.txt (lane 1 cancelled at 616 s)
CI's lane 1 command (with the Pi gate-skip made fatal) runs every member to completion ✅ pass live lane-portable-parallel-1-run.log + fm-test-timing-portable-parallel-1.json: FM_TEST_SUMMARY total=11 failed=0 skipped_gate=0, 557 s local wall
CI's lane 2 command runs every member to completion ✅ pass live lane-portable-parallel-2-run.log + fm-test-timing-portable-parallel-2.json: FM_TEST_SUMMARY total=13 failed=0 skipped_gate=0, 502 s local wall
Each lane's stored order is the runner's longest-hint-first schedule, and the lanes still split exactly the same 24 proven-isolated scripts, with the Pi test in the job that installs Pi ✅ pass live lane-order-partition-and-nonlane-scheduling.txt (S2/S3); ci-yml-semantic-parity.txt shows the Pi install step only in tests-portable-parallel-1
Adversarial: the change leaves other selections alone, so every non-lane --list-scheduled output and the other lanes are byte-identical to base ✅ pass live lane-order-partition-and-nonlane-scheduling.txt (S4): identical for proven-isolated, all, family, portable-serial, serial shard 1of5, real-herdr-gated, explicit script list, --list-lanes
Adversarial: the lane tests reject a pre-fix split, a missing hint, a >5% imbalance, and parallel hints leaking into other selections, and accept a <5% move ✅ pass live guard-mutation-drive.txt: M1/M2/M2b/M3/M3b/M4 each produce a not ok with the expected message, and the M3c boundary and M0 control pass; --check-coverage reports the drift in every case
The change is a mechanical cherry-pick of upstream 869ae90, and the workflow's semantics are unchanged (comments only) ✅ pass live upstream-cherry-pick-parity.txt (the runner's 129 changed lines match upstream; the other three blobs are identical); ci-yml-semantic-parity.txt (the parsed workflow model is the same as base)
Evidence: Evidence summary table

Source: Evidence summary table

# Portable parallel lane rebalance (b92e741) - local test evidence

| Scenario | Result | Evidence |
|---|---|---|
| Coverage guard passes and reports balanced, fully hinted lanes | pass: parallel_max_ms=414299, imbalance 30 ms, parallel_unhinted=0 | check-coverage-head.txt |
| Regression repro: base split packs lane 1 over the 10-min cap, head split is under it | base lane1 624299 ms (10.4 min) vs lane2 204269; head 414269 / 414299 | lane-balance-base-vs-head.txt, pr3-ci-prefix-portable-parallel-job-walls.txt (PR #3 lane 1 cancelled at 616 s) |
| Lane 1 runs end to end with the CI flags (Pi gate skip is fatal) | pass: 11/11, 0 failed, 0 gate skips, 557 s local wall on WSL (ran alongside the mutation drive) | lane-portable-parallel-1-run.log, fm-test-timing-portable-parallel-1.json |
| Lane 2 runs end to end | pass: 13/13, 0 failed, 502 s local wall | lane-portable-parallel-2-run.log, fm-test-timing-portable-parallel-2.json |
| Stored lane order == runner's longest-hint-first schedule; lanes partition the same 24 proven-isolated scripts; Pi test stays in the lane with the Pi install | pass | lane-order-partition-and-nonlane-scheduling.txt, ci-yml-semantic-parity.txt |
| Adversarial: other --list-scheduled selections and lanes are unchanged from base | pass: byte-identical for proven-isolated, all, family, portable-serial, serial shard, herdr, script list | lane-order-partition-and-nonlane-scheduling.txt |
| Adversarial: guard catches drift (pre-fix split, missing hint, >5% imbalance, hint leak), tolerates small <5% moves | pass | guard-mutation-drive.txt |
| Mechanical cherry-pick of upstream 869ae90; workflow semantics unchanged (comments only) | pass | upstream-cherry-pick-parity.txt, ci-yml-semantic-parity.txt |
| CI on PR #4 at this head: both parallel lanes succeed under the 600 s cap | success: lane 1 434 s / 426 s, lane 2 351 s / 414 s job wall | pr4-ci-portable-parallel-job-walls.txt |

Note: mutant copies report total=195 because the trimmed test file added to each copy is itself a new tests/*.test.sh.
Evidence: Coverage guard output at head

Source: Coverage guard output at head

FM_TEST_COVERAGE ok total=194 parallel=24 parallel_max_ms=414299 parallel_imbalance_ms=30 parallel_unhinted=0 serial=157 serial_shards=5 serial_unhinted=11 herdr=13

$ git rev-parse HEAD
b92e7412a2bf58e13bd645424796096447938107
$ bin/fm-test-run.sh --check-coverage
FM_TEST_COVERAGE ok total=194 parallel=24 parallel_max_ms=414299 parallel_imbalance_ms=30 parallel_unhinted=0 serial=157 serial_shards=5 serial_unhinted=11 herdr=13
exit=0
Evidence: Base vs head lane packing (regression repro)

Source: Base vs head lane packing (regression repro)

base 8facd7c portable-parallel-1: 11 scripts, packed_ms=624299 (10.4 min) base 8facd7c portable-parallel-2: 13 scripts, packed_ms=204269 (3.4 min) head b92e741 portable-parallel-1: 11 scripts, packed_ms=414269 (6.9 min) head b92e741 portable-parallel-2: 13 scripts, packed_ms=414299 (6.9 min)

== Lane membership sums using the measured CI hints from head b92e741 ==
base 8facd7c   portable-parallel-1: 11 scripts, packed_ms=624299 (10.4 min), unhinted=0
base 8facd7c   portable-parallel-2: 13 scripts, packed_ms=204269 (3.4 min), unhinted=0
head b92e741   portable-parallel-1: 11 scripts, packed_ms=414269 (6.9 min), unhinted=0
head b92e741   portable-parallel-2: 13 scripts, packed_ms=414299 (6.9 min), unhinted=0
CI job cap: timeout-minutes: 10 (600000 ms), including setup/installs
Evidence: Live lane 1 run log (CI flags, Pi gate enforced)

Source: Live lane 1 run log (CI flags, Pi gate enforced)

$ bin/fm-test-run.sh --lane portable-parallel-1 --fail-on-gate-skip '...Pi...' --json fm-test-timing-portable-parallel-1.json
FM_TEST_BEGIN 2026-09-11T09:21:14Z tests/fm-lint.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 - fm-lint.sh --fast disables ShellCheck extended analysis
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 - 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-09-11T09:24:24Z tests/fm-lint.test.sh exit=0 duration_ms=189951 gate_skip=false
FM_TEST_BEGIN 2026-09-11T09:24:24Z tests/fm-pr-merge.test.sh family=pr-forge expected_gate_skip=none
ok - fm-pr-merge reports exact queue retry flags after a zero-exit false success
ok - fm-pr-merge omits merge-queue retry guidance for a closed GitHub PR
ok - fm-pr-merge aggregates agreeing merge-queue rules
ok - fm-pr-merge reports ambiguity for conflicting merge-queue rules
ok - fm-pr-merge records pr= and pr_head= for a verified GitHub merge
ok - fm-pr-merge records pr= before the forge call can land the merge
ok - fm-pr-merge propagates a real merge failure without silently succeeding
ok - fm-pr-merge refuses a GitHub merge call that leaves the PR open and unqueued
ok - fm-pr-merge keeps PR bookkeeping when it cannot read a successful merge call's outcome
ok - fm-pr-merge refuses with the forge's own output quoted apart from its verdict
ok - fm-pr-merge quotes the forge output when it cannot read the outcome either
ok - fm-pr-merge does not echo back queue flags the caller already used
ok - fm-pr-merge still names retry flags when the caller used a different method
ok - fm-pr-merge names the queue requirement even when its method is unrecognised
ok - fm-pr-merge distinguishes unreadable branch rules from a base with no merge queue
ok - fm-pr-merge says nothing about a merge queue when the base branch has no queue rule
ok - fm-pr-merge says the merge queue was unobservable when only the gh-axi view answered
ok - fm-pr-merge explains an armed auto-merge that landed nothing on a queue-less base
ok - fm-pr-merge never reports auto-merge as armed when the merge command failed
ok - fm-pr-merge claims no acceptance for a failed merge command carrying queue flags
ok - fm-pr-merge falls back to the gh-axi view when gh's read fails
ok - fm-pr-merge names a landed state hiding behind a failed GitHub merge command
ok - fm-pr-merge reaches and verifies the gh-axi merge path without gh
ok - fm-pr-merge preserves bookkeeping when gh is absent and the fallback read fails
ok - fm-pr-merge verifies a genuinely merged GitHub pull request
ok - fm-pr-merge refuses to claim a merge when poll recording fails
ok - fm-pr-merge accepts and accurately reports a GitHub merge-queue entry
ok - fm-pr-merge explains how to retry with the required GitHub merge queue method
ok - fm-pr-merge forwards extra flags to gh-axi pr merge after the -- separator
ok - fm-pr-merge refuses before merging when task meta is missing
ok - fm-pr-merge refuses malformed PR URLs before calling gh-axi
ok - fm-pr-merge refuses unsafe PR URL segments before recording state
ok - fm-pr-merge refuses repo override args before recording state
ok - fm-pr-merge refuses a bundled short-option repo override and forwards other short flags
ok - fm-pr-merge does not add default --squash when the caller passes an explicit merge method
ok - fm-pr-merge respects --method=<value> as an explicit merge method
ok - fm-pr-merge parses a GitHub PR URL into gh-axi number and --repo arguments
ok - fm-pr-merge leaves GitHub extra-arg handling unchanged, including --sha
ok - fm-pr-merge merges a GitLab merge request through glab instead of refusing it
ok - fm-pr-merge takes the GitLab instance from the URL rather than assuming one
ok - fm-pr-merge imposes no merge method on GitLab, leaving the project's own one
ok - fm-pr-merge forwards extra flags to glab mr merge after the -- separator
ok - fm-pr-merge propagates a real glab merge failure without silently succeeding
ok - fm-pr-merge refuses on each GitLab pre-merge condition independently
ok - fm-pr-merge reports every failing GitLab condition, not only the first
ok - fm-pr-merge reports a stale recorded head and verifies the live one
ok - fm-pr-merge refuses an unreadable GitLab merge request state rather than merging blind
ok - fm-pr-merge refuses a GitLab head commit it cannot validate
ok - fm-pr-merge refuses before recording anything when glab or jq is absent
ok - fm-pr-merge refuses a GitLab head override before recording state
ok - a merge a secondmate home performs itself is reported upward exactly once
ok - a locally routed secondmate home reports the landed PR into its parent's own channel
ok - a landed GitLab merge request is reported upward on the same channel
ok - a queued GitLab merge stays silent and leaves confirmation to the armed poll
ok - a refused or failed merge reports no outcome
ok - a GitLab merge refused before the forge call reports no outcome
ok - a merge a main home performs itself leaves one durable wake naming the PR
ok - a queued GitHub merge stays silent and leaves confirmation to the armed poll
ok - distinct merged PRs for one task retain distinct captain-facing wakes
ok - an uncommitted marker retry preserves at least one durable outcome
ok - a secondmate home that cannot report upward says so instead of merging in silence
ok - fm-pr-merge proceeds when the home carries no backlog at all
ok - fm-pr-merge refuses when the backlog exists but cannot be read
ok - fm-pr-merge refuses when its configured backend cannot be read
ok - fm-pr-merge refuses when its user backend configuration cannot be read
ok - fm-pr-merge refuses when its user backend configuration directory cannot be traversed
ok - fm-pr-merge proceeds once when i

... [8361 bytes truncated] ...

_skip=false
FM_TEST_BEGIN 2026-09-11T09:30:22Z tests/fm-review-diff.test.sh family=pr-forge expected_gate_skip=none
ok - fm-review-diff falls back to recorded pr_head when pull head cannot be fetched
ok - fm-review-diff fetches refs/pull/<n>/head when pr_head= is absent
ok - fm-review-diff prefers freshly fetched PR head over a stale recorded pr_head=
ok - fm-review-diff without pr= keeps the worktree-branch diff
ok - fm-review-diff falls back to local branch with a warning when PR head is unreachable
FM_TEST_END 2026-09-11T09:30:24Z tests/fm-review-diff.test.sh exit=0 duration_ms=1339 gate_skip=false
FM_TEST_BEGIN 2026-09-11T09:30:24Z tests/fm-tmux-submit-busy.test.sh family=pure-contract-unit expected_gate_skip=none
ok - fm_tmux_submit_enter_core: busy pane + pending composer returns empty (message queued)
ok - fm_tmux_submit_enter_core: idle pane + pending composer stays pending (genuine swallow preserved)
ok - fm_tmux_submit_enter_core: wrapped input retains swallowed-Enter retries
ok - fm_tmux_submit_enter_core: placeholder-like bare input retains swallowed-Enter retries
ok - fm_tmux_submit_enter_core: busy pane clears composer on first Enter - returns empty
ok - fm_tmux_submit_enter_core: idle pane clears composer on first Enter - returns empty as before
ok - fm_tmux_submit_enter_core: busy conversion is limited to proven pending input
ok - fm_tmux_submit_core: failed baseline capture disables busy unknown conversion
ok - fm_tmux_submit_enter_core: pending-unproven retries without busy conversion
ok - fm_tmux_submit_enter_core: unrecognized states skip busy conversion
ok - fm_pane_is_busy: Claude spinner is scoped, multi-frame, and backward-compatible
FM_TEST_END 2026-09-11T09:30:26Z tests/fm-tmux-submit-busy.test.sh exit=0 duration_ms=2776 gate_skip=false
FM_TEST_BEGIN 2026-09-11T09:30:26Z tests/fm-composer-ghost.test.sh family=pure-contract-unit expected_gate_skip=none
ok - fm_tmux_strip_ghost drops dim/faint runs, keeps normal and bold text
ok - fm_tmux_strip_ghost handles combined SGR, ESC[22m, and reset-then-dim
ok - fm_tmux_strip_ghost keeps bright colored text with 2 payloads
ok - fm_tmux_strip_ghost drops a dark/muted truecolor foreground (grok placeholder)
ok - fm_tmux_strip_ghost keeps muse's near-threshold glyph and its typed text
ok - fm_pane_input_pending: a dim ghost-only composer is NOT pending
ok - fm_pane_input_pending: dim ghost inside a bordered composer is NOT pending
ok - fm_pane_input_pending: normal-intensity typed text is still pending
ok - fm_pane_input_pending: bright colored text with 2 payloads is still pending
ok - fm_pane_input_pending: a dark truecolor ghost-only composer (grok placeholder) is NOT pending
ok - fm_tmux_composer_state: dark truecolor shell prompts read unknown
ok - fm_pane_input_pending: real text plus a trailing ghost run is still pending
ok - fm_tmux_composer_state: text above an empty cursor row is pending
ok - fm_tmux_composer_state: a message wrapped across three rows is pending
ok - fm_tmux_composer_state: a proven titled box tolerates a bottom-border cursor
ok - fm_tmux_composer_identity: unknown busy state cannot become idle identity
ok - fm_tmux_composer_state: typed Pi and Grok busy signatures inside a box are pending
ok - fm_tmux_composer_state: a bare busy-footer row reads unknown (strict container-proof rule)
ok - fm_tmux_composer_state: an unbounded bordered box fails closed as unknown
ok - fm_tmux_composer_state: clipped and asymmetric composer edges fail closed
ok - fm_tmux_composer_state: inconsistent box geometry fails closed
ok - fm_tmux_composer_state: misaligned box bounds fail closed
ok - fm_tmux_composer_state: unproved ghost and malformed geometry stay unknown while styled placeholder-like text stays pending-unproven
ok - fm_tmux_composer_state: differing widths prefer pending or unknown, never empty
ok - fm_tmux_composer_state: emoji and CJK text remain pending under the C locale
ok - fm_tmux_composer_state: all tmux harnesses share empty and pending classification
ok - fm_pane_input_pending: unrecognized states defer by default
ok - fm_tmux_composer_state: one capture feeds the classifier; no band-capture race remains
ok - fm_tmux_composer_state: absent Pi identity preserves Claude's enclosed bare verdict
ok - fm_tmux_composer_state: only proven structural and non-bordered empty routes stay empty
ok - fm_tmux_composer_state: panes without bordered structure retain compatibility fallback
ok - fm_tmux_composer_state: interior edge glyphs retain non-bordered fallback
ok - fm-peek output is escape-free (no raw -e bytes reach firstmate context)
FM_TEST_END 2026-09-11T09:30:29Z tests/fm-composer-ghost.test.sh exit=0 duration_ms=2297 gate_skip=false
FM_TEST_BEGIN 2026-09-11T09:30:29Z tests/fm-brief.test.sh family=pure-contract-unit expected_gate_skip=none
ok - fm-brief: scaffolds leave the worker role scope to the launch boundary and keep the secondmate contract
ok - fm-brief.sh: bash -n succeeds
/tmp/fm-brief.Yd62un/heredoc-in-substitution.sh:2
ok - fm-brief.sh: no heredoc is nested inside a command substitution (Bash 3.2 parse-safe)
ok - fm-brief.sh: --help renders the complete header
ok - fm-brief.sh: no-mistakes/direct-PR/local-only briefs generate cleanly
ok - fm-brief.sh: ship --mode is required and closed-set validated
ok - fm-brief.sh: the explicit ship mode wins over the registered posture
ok - fm-brief.sh: --yolo and scout/secondmate --mode are refused, never silently dropped
ok - fm-brief.sh: faster paths use configured authority without stacked review
ok - fm-brief.sh: no-mistakes DOD keeps its apostrophe prose and bans --yes outright
ok - fm-brief.sh: no-mistakes ask-user findings use one event plus a verbatim snapshot
ok - fm-brief.sh: ship project-memory wording carries the AGENTS.md authoring bar
ok - fm-brief.sh: --herdr-lab emits the complete hard safety contract
ok - fm-brief.sh: --herdr-lab uses its quoted Firstmate-owned helper path
ok - fm-brief.sh: ship and scout scaffolds make omitted Herdr intent fail-visible
ok - fm-brief.sh: the documented {TASK} and {FIRSTMATE_SPEC} fills cannot corrupt the Herdr safety gate
ok - fm-brief.sh: Herdr lab contract covers scouts and rejects secondmate misuse
ok - fm-brief.sh: --no-projects scaffolds a project-less charter and guards misuse
ok - fm-brief.sh: marked requests avoid generic acknowledgements and preserve material reporting
ok - fm-brief.sh: relative directory inputs ignore CDPATH, render stable absolute charter paths, or fail loudly
ok - fm-brief.sh: custom pause verb renders in every scaffold
ok - fm-brief.sh: investigation and visual-review completions load the shared decision policy
ok - fm-brief.sh: data/standing-orders.md is delivered verbatim to ship and scout briefs, never to a charter, and is a no-op when absent
ok - fm-brief: scout and secondmate code paths still scaffold well-formed briefs
FM_TEST_END 2026-09-11T09:30:31Z tests/fm-brief.test.sh exit=0 duration_ms=2170 gate_skip=false
FM_TEST_SUMMARY total=11 failed=0 skipped_gate=0 duration_ms=557458
FM_TEST_SUMMARY_FAMILY family=pr-forge count=2 duration_ms=139898 failed=0
FM_TEST_SUMMARY_FAMILY family=pure-contract-unit count=9 duration_ms=417033 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-lint.test.sh duration_ms=189951
FM_TEST_SLOWEST rank=2 script=tests/fm-test-run.test.sh duration_ms=176239
FM_TEST_SLOWEST rank=3 script=tests/fm-pr-merge.test.sh duration_ms=138559
FM_TEST_SLOWEST rank=4 script=tests/fm-cd-pretool-check.test.sh duration_ms=27003
FM_TEST_SLOWEST rank=5 script=tests/fm-grok-harness.test.sh duration_ms=8557
FM_TEST_SLOWEST rank=6 script=tests/fm-composer-lib.test.sh duration_ms=6045
FM_TEST_SLOWEST rank=7 script=tests/fm-tmux-submit-busy.test.sh duration_ms=2776
FM_TEST_SLOWEST rank=8 script=tests/fm-composer-ghost.test.sh duration_ms=2297
FM_TEST_SLOWEST rank=9 script=tests/fm-brief.test.sh duration_ms=2170
FM_TEST_SLOWEST rank=10 script=tests/fm-pi-primary-types.test.sh duration_ms=1995
FM_TEST_SLOWEST rank=11 script=tests/fm-review-diff.test.sh duration_ms=1339
fm-test-run: wrote timing artifact: ~/.no-mistakes/evidence/01M27W495NAWW40J4TNSMNZMS7/fm-test-timing-portable-parallel-1.json
exit=0 wall_s=557
Evidence: Lane 1 timing artifact

Source: Lane 1 timing artifact

{
  "families": [
    {
      "count": 2,
      "duration_ms": 139898,
      "failed": 0,
      "name": "pr-forge"
    },
    {
      "count": 9,
      "duration_ms": 417033,
      "failed": 0,
      "name": "pure-contract-unit"
    }
  ],
  "finished_at": "2026-09-11T09:30:31Z",
  "run_id": "fm-test-run-1789118474029-2249309",
  "scripts": [
    {
      "duration_ms": 189951,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-lint.test.sh"
    },
    {
      "duration_ms": 138559,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pr-forge",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-pr-merge.test.sh"
    },
    {
      "duration_ms": 176239,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-test-run.test.sh"
    },
    {
      "duration_ms": 27003,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-cd-pretool-check.test.sh"
    },
    {
      "duration_ms": 1995,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-pi-primary-types.test.sh"
    },
    {
      "duration_ms": 8557,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-grok-harness.test.sh"
    },
    {
      "duration_ms": 6045,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-composer-lib.test.sh"
    },
    {
      "duration_ms": 1339,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pr-forge",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-review-diff.test.sh"
    },
    {
      "duration_ms": 2776,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-tmux-submit-busy.test.sh"
    },
    {
      "duration_ms": 2297,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-composer-ghost.test.sh"
    },
    {
      "duration_ms": 2170,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-brief.test.sh"
    }
  ],
  "selection": "lane=portable-parallel-1;fail-on-gate-skip=Pi extension typecheck prerequisite not found",
  "started_at": "2026-09-11T09:21:14Z",
  "summary": {
    "duration_ms": 557458,
    "failed": 0,
    "skipped_gate": 0,
    "total": 11
  }
}
Evidence: Lane 2 timing artifact

Source: Lane 2 timing artifact

{
  "families": [
    {
      "count": 3,
      "duration_ms": 26751,
      "failed": 0,
      "name": "backend-dispatch"
    },
    {
      "count": 1,
      "duration_ms": 37140,
      "failed": 0,
      "name": "pr-forge"
    },
    {
      "count": 9,
      "duration_ms": 437352,
      "failed": 0,
      "name": "pure-contract-unit"
    }
  ],
  "finished_at": "2026-09-11T09:38:53Z",
  "run_id": "fm-test-run-1789119031547-2609772",
  "scripts": [
    {
      "duration_ms": 377697,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-captain-hold-lifecycle.test.sh"
    },
    {
      "duration_ms": 37140,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pr-forge",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-x-mode.test.sh"
    },
    {
      "duration_ms": 32718,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-arm-pretool-check.test.sh"
    },
    {
      "duration_ms": 22997,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "backend-dispatch",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-backend-herdr.test.sh"
    },
    {
      "duration_ms": 14031,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-crew-state.test.sh"
    },
    {
      "duration_ms": 7479,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-herdr-lab.test.sh"
    },
    {
      "duration_ms": 2779,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-send-popup-settle.test.sh"
    },
    {
      "duration_ms": 2119,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "backend-dispatch",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-send-strict.test.sh"
    },
    {
      "duration_ms": 1635,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "backend-dispatch",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-spawn-batch.test.sh"
    },
    {
      "duration_ms": 1179,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-send-settle.test.sh"
    },
    {
      "duration_ms": 1030,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-ensure-agents-md.test.sh"
    },
    {
      "duration_ms": 335,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-supervision-instructions.test.sh"
    },
    {
      "duration_ms": 104,
      "exit": 0,
      "expected_gate_skip": "none",
      "family": "pure-contract-unit",
      "gate_skip": false,
      "gate_skip_reason": "",
      "path": "tests/fm-transition-lib.test.sh"
    }
  ],
  "selection": "lane=portable-parallel-2",
  "started_at": "2026-09-11T09:30:31Z",
  "summary": {
    "duration_ms": 501704,
    "failed": 0,
    "skipped_gate": 0,
    "total": 13
  }
}
Evidence: Lane order, partition, and non-lane scheduling parity

Source: Lane order, partition, and non-lane scheduling parity

== S2: stored lane order equals the runner's longest-hint-first schedule ==
portable-parallel-1: stored order == --list-scheduled (OK)
portable-parallel-2: stored order == --list-scheduled (OK)
portable-parallel-1 --list-scheduled:
  tests/fm-lint.test.sh
  tests/fm-pr-merge.test.sh
  tests/fm-test-run.test.sh
  tests/fm-cd-pretool-check.test.sh
  tests/fm-pi-primary-types.test.sh
  tests/fm-grok-harness.test.sh
  tests/fm-composer-lib.test.sh
  tests/fm-review-diff.test.sh
  tests/fm-tmux-submit-busy.test.sh
  tests/fm-composer-ghost.test.sh
  tests/fm-brief.test.sh
portable-parallel-2 --list-scheduled:
  tests/fm-captain-hold-lifecycle.test.sh
  tests/fm-x-mode.test.sh
  tests/fm-arm-pretool-check.test.sh
  tests/fm-backend-herdr.test.sh
  tests/fm-crew-state.test.sh
  tests/fm-herdr-lab.test.sh
  tests/fm-send-popup-settle.test.sh
  tests/fm-send-strict.test.sh
  tests/fm-spawn-batch.test.sh
  tests/fm-send-settle.test.sh
  tests/fm-ensure-agents-md.test.sh
  tests/fm-supervision-instructions.test.sh
  tests/fm-transition-lib.test.sh

== S3: lanes partition exactly the proven-isolated set; Pi test stays in the lane that installs Pi ==
union(lane1,lane2) == --proven-isolated (24 scripts) (OK)
duplicates across lanes: 0
same 24-script membership as base, only redistributed (OK)
tests/fm-pi-primary-types.test.sh is in portable-parallel-1 (the job with the Pi install step) (OK)
moved lane1->lane2: tests/fm-captain-hold-lifecycle.test.sh tests/fm-transition-lib.test.sh tests/fm-x-mode.test.sh 
moved lane2->lane1: tests/fm-composer-lib.test.sh tests/fm-pr-merge.test.sh tests/fm-tmux-submit-busy.test.sh 

== S4 (adversarial): non-lane --list-scheduled selections are byte-identical to base ==
identical: --list-scheduled --proven-isolated (24 lines)
identical: --list-scheduled --all (194 lines)
identical: --list-scheduled --family pure-contract-unit (35 lines)
identical: --list-scheduled --lane portable-serial (157 lines)
identical: --list-scheduled --lane portable-serial-1of5 (31 lines)
identical: --list-scheduled --lane real-herdr-gated (13 lines)
identical: --list-scheduled tests/fm-lint.test.sh tests/fm-captain-hold-lifecycle.test.sh tests/fm-brief.test.sh tests/fm-muse-harness.test.sh (4 lines)
--list-lanes identical: yes
Evidence: Upstream 869ae90 cherry-pick parity

Source: Upstream 869ae90 cherry-pick parity

bin/fm-test-run.sh: IDENTICAL changed-line set (129 lines) ci.yml, docs/fm-test-portable-shards.md, tests/fm-test-run.test.sh: blobs identical to upstream 869ae90

bin/fm-test-run.sh: added/removed lines, upstream 869ae90 patch vs this branch's patch
IDENTICAL changed-line set (129 lines)
ci.yml, docs/fm-test-portable-shards.md, tests/fm-test-run.test.sh: resulting blobs identical to upstream 869ae90 (dc681e1, 45c3a5f, 35f3a8d)
Evidence: CI workflow semantic parity

Source: CI workflow semantic parity

parsed workflow model identical between base 8facd7c and head b92e741: True
tests-portable-parallel-1: name='Behavior portable parallel 1' timeout-minutes=10 run-step='bin/fm-test-run.sh --lane portable-parallel-1 \\'
tests-portable-parallel-2: name='Behavior portable parallel 2' timeout-minutes=10 run-step='bin/fm-test-run.sh --lane portable-parallel-2 \\'
Pi install step present in: ['tests-portable-parallel-1']
Evidence: PR #4 CI portable-parallel job walls at head

Source: PR #4 CI portable-parallel job walls at head

run 34575386704 Behavior portable parallel 2 success job_wall=351s (cap 600s) run 34575386704 Behavior portable parallel 1 success job_wall=434s (cap 600s) run 34581493312 Behavior portable parallel 2 success job_wall=414s (cap 600s) run 34581493312 Behavior portable parallel 1 success job_wall=426s (cap 600s)

run 34575386704  Behavior portable parallel 2   success  job_wall=351s (cap 600s)
run 34575386704  Behavior portable parallel 1   success  job_wall=434s (cap 600s)
run 34581493312  Behavior portable parallel 2   success  job_wall=414s (cap 600s)
run 34581493312  Behavior portable parallel 1   success  job_wall=426s (cap 600s)
Evidence: PR #3 pre-fix CI portable-parallel job walls

Source: PR #3 pre-fix CI portable-parallel job walls

run 34572974900 (PR #3, pre-fix lanes) Behavior portable parallel 1 cancelled job_wall=616s (cap 600s) run 34572974900 (PR #3, pre-fix lanes) Behavior portable parallel 2 success job_wall=215s (cap 600s)

run 34572974900 (PR #3, pre-fix lanes)  Behavior portable parallel 1   cancelled  job_wall=616s (cap 600s)
run 34572974900 (PR #3, pre-fix lanes)  Behavior portable parallel 2   success    job_wall=215s (cap 600s)

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 8 of 8 scenarios driven live against the product
Scenario Result Live Evidence
Maintainer runs bin/fm-test-run.sh --check-coverage and sees the parallel lanes fully hinted and balanced ✅ pass live check-coverage-head.txt: exit 0, parallel_max_ms=414299, parallel_imbalance_ms=30, parallel_unhinted=0
Regression repro: the pre-fix split packs lane 1 over the 10-minute cap and the rebalanced split packs it under ✅ pass live lane-balance-base-vs-head.txt: base lane 1 624299 ms vs head 414269 ms, lane 2 414299 ms; consistent with pr3-ci-prefix-portable-parallel-job-walls.txt (lane 1 cancelled at 616 s)
CI's lane 1 command (with the Pi gate-skip made fatal) runs every member to completion ✅ pass live lane-portable-parallel-1-run.log + fm-test-timing-portable-parallel-1.json: FM_TEST_SUMMARY total=11 failed=0 skipped_gate=0, 557 s local wall
CI's lane 2 command runs every member to completion ✅ pass live lane-portable-parallel-2-run.log + fm-test-timing-portable-parallel-2.json: FM_TEST_SUMMARY total=13 failed=0 skipped_gate=0, 502 s local wall
Each lane's stored order is the runner's longest-hint-first schedule, and the lanes still split exactly the same 24 proven-isolated scripts, with the Pi test in the job that installs Pi ✅ pass live lane-order-partition-and-nonlane-scheduling.txt (S2/S3); ci-yml-semantic-parity.txt shows the Pi install step only in tests-portable-parallel-1
Adversarial: the change leaves other selections alone, so every non-lane --list-scheduled output and the other lanes are byte-identical to base ✅ pass live lane-order-partition-and-nonlane-scheduling.txt (S4): identical for proven-isolated, all, family, portable-serial, serial shard 1of5, real-herdr-gated, explicit script list, --list-lanes
Adversarial: the lane tests reject a pre-fix split, a missing hint, a >5% imbalance, and parallel hints leaking into other selections, and accept a <5% move ✅ pass live guard-mutation-drive.txt: M1/M2/M2b/M3/M3b/M4 each produce a not ok with the expected message, and the M3c boundary and M0 control pass; --check-coverage reports the drift in every case
The change is a mechanical cherry-pick of upstream 869ae90, and the workflow's semantics are unchanged (comments only) ✅ pass live upstream-cherry-pick-parity.txt (the runner's 129 changed lines match upstream; the other three blobs are identical); ci-yml-semantic-parity.txt (the parsed workflow model is the same as base)
  • bin/fm-test-run.sh --check-coverage at head b92e741
  • Lane sums with head hints for base 8facd7c vs head: bin/fm-test-run.sh --list --lane portable-parallel-{1,2} from both trees
  • PATH=&lt;temp pi+tsc&gt;:$PATH bin/fm-test-run.sh --lane portable-parallel-1 --fail-on-gate-skip &#39;Pi extension typecheck prerequisite not found&#39; --json … (live, timed)
  • bin/fm-test-run.sh --lane portable-parallel-2 --json … (live, timed)
  • bin/fm-test-run.sh --list --lane X vs --list-scheduled --lane X for both lanes; union vs --list --proven-isolated
  • Base vs head byte comparison of --list-scheduled for --proven-isolated, --all, --family pure-contract-unit, --lane portable-serial, --lane portable-serial-1of5, --lane real-herdr-gated, an explicit script list, and --list-lanes
  • Mutation drive on temp copies of head (pre-fix split, dropped hint, >5% imbalance, <5% boundary move, parallel-hint leak) running --check-coverage plus the four lane/scheduling tests from tests/fm-test-run.test.sh
  • Parsed .github/workflows/ci.yml at base and head with PyYAML and compared the models
  • Compared the changed lines in bin/fm-test-run.sh and the other files' blob SHAs against upstream kunchenguid/firstmate@869ae90 via gh api
  • Read PR #3 (pre-fix) and PR #4 (head) CI job walls for the portable parallel jobs via gh run view
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…nchenguid#4151)

* ci: rebalance the portable parallel lanes on measured runner durations

Both portable parallel lanes are capped at 10 minutes. Lane 1 was cancelled at
that cap on every request raised on 2026-09-10 while lane 2 finished in about
3.5 minutes, so no request could go green.

CONTRACT CLASS: RESTORE.
The workflow already promises two duration-balanced lanes and the shard
documentation already claims a measured wall; this re-establishes both against
what the lanes now cost, and changes no lane count, no cap, and no scope of what
runs. The counter-argument, so nobody has to take that on trust: two pieces here
are genuinely new rather than restored, and either could be argued to make this
a NEW-behavior change. `--list-scheduled` now ranks a parallel lane on measured
durations where it previously handed every parallel script the serial default
weight and returned an alphabetical order; and `--check-coverage` gains three
reported fields. I classify the change RESTORE because both exist only to make
the already-promised property checkable, but they are named here rather than
folded into the restoration.

=== PART 1: THE TOTAL, AND HOW IT WAS OBTAINED ===

This section stands on its own. It establishes what the parallel set costs. It
derives no packing; Part 2 does that, from this number.

THE TOTAL: 828568 ms, about 13 min 49 s of serial work across the 24 scripts.
Lane 1 held 624299 ms of it and lane 2 held 204269 ms, a 3.06:1 split.

HOW IT WAS OBTAINED. The difficulty was that lane 1 had never finished, so its
duration did not exist as a recorded figure anywhere and no timing artifact was
expected for it. It turned out to be recoverable from the real lane without
estimating, by two routes, across six CI runs on 2026-09-10 (34459949083,
34460760299, 34462530836, 34462758357, 34466966385, 34470382458):

  - Run 34462758357's lane-1 job finished its suite 18 s BEFORE the wall and
    uploaded a complete fm-test-timing-portable-parallel-1 artifact carrying all
    11 scripts, FM_TEST_SUMMARY total=11 failed=0 duration_ms=598225. The
    upload step is if: always(), so the cancellation did not suppress it. This
    is one full, untruncated lane-1 measurement.
  - The five other lane-1 jobs were cancelled mid-suite, but each logs every
    script that had already finished as an FM_TEST_END duration_ms= marker.
    Those per-script records are complete measurements of completed scripts;
    only the script in flight at cancellation is lost, and it differs by run.

Lane 2 completed in all six runs, so its scripts come from the six uploaded
fm-test-timing-portable-parallel-2 artifacts.

Every one of the 24 scripts therefore carries at least one untruncated
measurement: 20 of them measured in all six runs, two in three or four runs, and
two (fm-brief, fm-transition-lib, the tail of lane 1) in the single complete run.
Each hint is the SLOWEST value that script reached, so the total is an upper
envelope rather than an average. NO FIGURE IN IT IS DERIVED FROM A TRUNCATED
LANE, and no lower bound was ever extrapolated into a total.

THE ENVIRONMENT, AND WHETHER IT TRANSFERS. Every hint is a serial run of the
real portable parallel lane on a GitHub ubuntu-latest runner, produced by the
lane's own CI job. It transfers because it is not a proxy for the lane; it is
the lane. Nothing in the total came from this machine or from any harness of
mine.

That mattered, and here is what it would have cost. A same-day macOS
cross-check of the same scripts ran 1.7x to 5.0x slower with the ratio varying
per script (fm-test-run 157420 ms against 92944 ms, fm-x-mode 67217 ms against
31870 ms, fm-composer-ghost 10521 ms against 2120 ms). Local timings therefore
do not scale the lane, they REORDER it, so a packing derived from them would
have balanced the wrong thing while looking clean.

WHAT IT REPLACES, which is the root cause. The lanes were packed from the
2026-08-20 concurrent isolation proof: 24 candidates across four LOCAL workers.
That record answers whether the candidates are isolation-safe, not how long a
SERIAL CI lane runs, so it was structurally incapable of representing lane wall
clock even when it was fresh. It was also never refreshed while the set grew
about 3.2x. Both the wrong instrument and the staleness are fixed here: the
hints now come from the lane itself and carry their run ids and date.

=== PART 2: THE SPLIT DERIVED FROM THAT TOTAL ===

Longest-processing-time assignment over those hints gives 414269 ms and
414299 ms, 30 ms apart, against 624299/204269 before.

tests/fm-pi-primary-types.test.sh stays in lane 1 because that is the job which
installs the Pi package, so ci.yml needs no step changes.

=== PART 3: DOES THE MARGIN SURVIVE MACHINE VARIANCE ===

Stated explicitly, because 6.90 min against a 10 min cap is 69% of cap before
any variance is applied, and the cap covers the whole job rather than the suite.

  worst lane, script time                         414299 ms   6.90 min
  job overhead, measured on the real lane             ~18 s   (see below)
  expected healthy job                            ~432300 ms  7.21 min
  x1.29 on the script time, plus overhead         ~552400 ms  9.21 min
  cap                                             600000 ms  10.00 min
  room left after the multiplication                ~47.6 s   7.9% of cap

The 1.29x is the runner variance measured today on the SIBLING SERIAL lane, as
supplied; it is not this lane's own figure. This lane family does have its own,
and it is tighter: the six full lane-2 sums today span 192939 ms to 203451 ms,
a spread of 1.054x. At that figure the worst lane lands near 7.58 min with about
2.4 min of room. I have used the LARGER, borrowed 1.29x for the verdict rather
than the tighter one this lane actually shows, and note that the hints are
already per-script maxima, so 1.29x on top is conservative twice over.

THE MARGIN SURVIVES THE MULTIPLICATION, so this proceeds rather than stopping.
The 18 s overhead is measured, not assumed: in run 34462758357 the lane-1 job
ran 10 min 16 s against a 598.2 s suite, and lane 2 ran 3 min 21 s against a
192.9 s suite, a ~10 s difference that matches lane 1's extra Pi package install.

The cap is unchanged, the lane count is unchanged, and nothing in the serial
lane, its shard count, its guard or its hint table is touched.

=== PART 4: THE RECORDED FACT ===

The workflow comment no longer restates the shard wall as a literal, which is
how "~1 min of serial sum" survived a 10x change without announcing it. It now
points at bin/fm-test-run.sh --check-coverage, which prints parallel_max_ms,
parallel_imbalance_ms and parallel_unhinted derived from the hint table, so the
current number is computed on demand. The shard documentation carries the dated
run ids, which route it was taken by, and the local cross-check that shows why
local numbers are not admissible as hints.

Two regressions pin what rotted: lane membership must be stored
longest-measured-first, and the lanes must be fully hinted and packed within 5%
of each other. Both were run against the old composition and both fail on it
(420030 ms imbalance against a 624299 ms worst lane). The ordering assertion they
replace named a specific script by hand and had itself gone stale.

=== PART 5: NAMED AND LEFT, OUTSIDE THIS REBALANCE ===

tests/fm-captain-hold-lifecycle.test.sh alone is 296481 ms, 36% of the whole
set, so it is the floor of any two-lane split: no repacking can put a lane below
it. After this rebalance the cap is about 1.45x the healthy lane where the
sibling serial lane keeps roughly 2x.

Nothing refuses a stale parallel hint the way PORTABLE_SERIAL_MAX_UNHINTED_PERCENT
bounds the serial lane. parallel_unhinted is reported, not enforced, which is
what let this drift for three weeks unnoticed.

* fix(review): Restrict parallel scheduling hints to portable parallel lanes

* fix(document): Clarify parallel lane scheduling and timing evidence
@karimghabra karimghabra reopened this Sep 11, 2026
@karimghabra
karimghabra merged commit 6705ed2 into main Sep 11, 2026
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants