Repository navigation
ci: merge upstream CI speedups, changed-file PR lint, and split slow suites - #124
Merged
Merged
Conversation
Upstream adds one commit since the last sync (427056c): kunchenguid#8431, which repacks CI to 19 serial shards at a 15-minute target, two --jobs 2 parallel lanes and a committed timings TSV, and adds PR changed-file lint, cached pinned tool installs, a 20-minute budget warning and two test-file splits. Keep the fork's CI layout (one four-worker pool, 13 serial shards at the 1200 s packing budget, 1500 s per-file bound and 50-minute portable tier, folded guard jobs, embedded hint tables, measured lint packing and today's required-check names). Take upstream's layout-independent parts: fm-lint.sh --changed on pull requests with its full-set upgrades, the actions/cache of pinned ShellCheck/actionlint with installers that skip a present pin, bin/fm-ci-budget-warn.sh in the timing aggregate, and the captain-hold-teardown and watch-triage-busy splits placed in the serial lane. The TSV hint store and the singleton-overflow packing rule are not adopted. The split files carry the fork's test changes into their new homes: run_pr_merge's expected-head pin and public_show in captain-hold-helpers.sh, the busy and exit-picker wedge-cap fixtures and the FM_WATCH_TRACE export in fm-watch-triage-busy.test.sh. Their hints divide the fork's measured parents by upstream's provisional shares.
…he split hints Splitting tests/fm-watch-triage.test.sh into it and fm-watch-triage-busy drops its hint to 395300 ms, so fm-watch-triage-wedge-defer (526980 ms) is now the family's longest member and leads --list-scheduled.
|
Sorry @twilwa, your pull request is larger than the review limit of 150,000 diff characters |
Codex Review Summary: ✅ CompletedThis 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. |
Owner
Author
|
Review disposition for head a91b196: no review findings to address. The size-limit notice is informational and the Codex review reported no findings. No-mistakes run 01M86SW7FGQ12PY31TF0K2ETXC completed on this head with claude-opus-5-5; all required checks are green, including the macOS Bash snapshot job on its rerun. |
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
The owner's words: "we should also probably run another /updatefirstmate pass worker to pick up any changes ken has made, if there are true divergences let me know and give me a digest of his fixes".
Context for reading the ask:
Upstream sync summary (merge-based)
This PR is merge-based: merge commit
d5b34de6brings upstream https://github.com/kunchenguid/firstmate main68918448into fork main83c8d382(merge base427056c4, the upstream tip of #117). Land it as a merge commit, not squash or rebase. Nothing was published upstream.Digest of upstream changes since the last sync
Upstream landed one commit, kunchenguid#8431. It is CI and test layout only; supervision, dispatch, backlog, review gates, secondmates, session start, skills and AGENTS.md are untouched.
bin/fm-lint.sh --changed), upgrading to the full set when a lint-definition file or a sourced helper changes; main keeps the full gate. Taken.bin/fm-lint.shheader andCONTRIBUTING.mdnow say so.bin/fm-ci-budget-warn.shwarns (never fails) on long lanes and lint partitions. Taken with fork thresholds (divergence 6).tests/fm-captain-hold-teardown.test.shandtests/fm-watch-triage-busy.test.shsplit out of their parents. Taken; every fork change to the moved tests went with them.sleep 4. Taken.--jobs 2lanes, a timings TSV, a singleton-overflow rule. Declined (divergences 1-3).True divergences and resolutions
tests/fm-test-ci-timings.tsvfm-lint.sh --partition--changed<k>of<n>, size packingSuperseded fork commits
None. No fork-only commit's stable patch-id matches upstream's, and its content overlaps only
3bebf69c(both run four lint partitions).Behaviour changes and migrations
Only CI, lint and test files plus their docs change.
AGENTS.md,.agents/,.claude/, the backlog/Beads selector, holds and handoff (fork PRs 99, 100, 102),--claude-route(PR 119), the brief prompting pointer (PR 120), review and fleet ledgers, secondmate provisioning and session start are byte-identical to fork main. No running home needs a migration and branch protection needs no edit.Full-suite evidence
Ran in a Boat
--no-envsandbox (bash 5.2.21, jq 1.7, ShellCheck 0.11.0, tasks-axi 0.2.6): 339 scripts, 313 green first pass. One sync-caused failure (watcher-family schedule expectation) fixed in9ffcad42; the other 25 passed once the sandbox's CAP_DAC_READ_SEARCH was dropped or failed identically on base83c8d382. Herdr-lifecycle and real-Herdr tests were not run locally; CI'sBehavior tests (Herdr)andBehavior tests (herdr-core)jobs cover them. The local Lint step's only findings were three ShellCheck info notes in unchangedtests/fm-daemon.test.sh, which fork CI analyzes cleanly.The required
Stock macOS Bash snapshot compatibilitycheck got no GitHub-hosted macOS runner on several attempts; it was rerun until it ran, and passed on this head (run 45427578884, job 138898682679). It was not waived.What Changed
kunchenguid/firstmatecommit 6891844 into the fork. In CI, ShellCheck and actionlint now install into a cached$RUNNER_TEMP/fm-ci-tools, keyed on the installer scripts. Both installers skip the download when the pinned version is already in place. Lint now runs--changedon pull requests. The timing-aggregate job also downloads lint telemetry and runs the new warn-onlybin/fm-ci-budget-warn.sh, which annotates any test lane at or over 2120 s and any lint partition at or over 1200 s. The fork's own review fixes split that script out and correct its budget arithmetic.bin/fm-lint.shgains a--changedmode, which can be combined with--partition. It lints only the canonical files that changed, keeping source-aware analysis. Both changed-file modes switch to the full canonical gate when a lint-definition file changes, or when a changed, deleted, or renamed file is sourced by another canonical script.tests/fm-lint.test.shandtests/fm-ci-workflow.test.shgain cases for this behavior and the new workflow wiring.fm-captain-hold-lifecycle.test.shinto a newfm-captain-hold-teardown.test.sh, with shared fixtures intests/captain-hold-helpers.sh, and splitsfm-watch-triage.test.shinto a newfm-watch-triage-busy.test.sh. The fork keeps its ownbin/fm-test-run.shpacking; upstream's packing rewrite and timings TSV are not taken. The runner maps the new files into their families, and their provisional hints divide the parent hints. The other changes:sleep 4with a bounded wait on the watcher log and heartbeat.fm-watch-triage-wedge-defer.test.shto be scheduled first in its family.docs/fm-test-portable-shards.md,docs/scripts.md, and others) now point at the split suites and describe the new lint and budget-warning behavior.🤖 Generated with Claude Code
Risk Assessment
Testing
All work used disposable temp dirs and a throwaway clone; no Herdr or harness primary was needed because the change touches no runtime fleet surface. The budget warning, lint selection and posture, installer cache reuse, workflow step bodies, and runner partition and selection all behaved as intended. The split suites mostly passed. Captain-hold lifecycle passed 43/43 and watch-triage-busy passed 41/41. Captain-hold teardown passed 28 of 29; its one failure came from the host's mise node shim breaking under the fixture HOME, in a test whose body is unchanged from the base. The parent watch-triage suite reached 78 of 89 with no failures before the 30-minute cap on a heavily loaded host (load about 12 on 12 cores) stopped it. A rerun for the remaining teardown and watch-triage tests could not finish inside the turn budget. tests/fm-ci-workflow.test.sh could not run because ruby is not installed. The change has no visual UI, so there are no screenshots; the evidence is CLI transcripts and logs.
Evidence: Budget warn: lane and lint thresholds, annotations, missing/broken inputs, usage errors
Source: Budget warn: lane and lint thresholds, annotations, missing/broken inputs, usage errors
Evidence: Budget warn: empty-partition telemetry and nonexistent lint dir
Source: Budget warn: empty-partition telemetry and nonexistent lint dir
Evidence: Budget warn on fully real suite timings and lint telemetry (silent, exit 0)
Source: Budget warn on fully real suite timings and lint telemetry (silent, exit 0)
Evidence: fm-lint changed-file selection and full-set upgrade across branch states
Source: fm-lint changed-file selection and full-set upgrade across branch states
Evidence: fm-lint real runs: local no-source vs --changed source-aware vs partitioned
Source: fm-lint real runs: local no-source vs --changed source-aware vs partitioned
Evidence: Pinned installers: cache hit skips download; stale binary re-downloads and verifies
Source: Pinned installers: cache hit skips download; stale binary re-downloads and verifies
Evidence: CI workflow step bodies executed from ci.yml (lint --changed wiring, budget step, tool cache keys)
Source: CI workflow step bodies executed from ci.yml (lint --changed wiring, budget step, tool cache keys)
Evidence: Runner coverage, families, and 13-shard placement for split suites
Source: Runner coverage, families, and 13-shard placement for split suites
Evidence: Changed-path test selection for bin/fm-ci-budget-warn.sh
Source: Changed-path test selection for bin/fm-ci-budget-warn.sh
Evidence: captain-hold teardown (28/29, one mise env failure) log
Source: captain-hold teardown (28/29, one mise env failure) log
Evidence: Host node/mise shim behavior under an alternate HOME
Source: Host node/mise shim behavior under an alternate HOME
Pipeline
Updates from git push no-mistakes
... (3 earlier update rounds omitted to keep the PR body within GitHub's 65536-char limit; full history is in the run log.)
🔧 Fix applied.
3 issues (2 warnings, 1 info) still open:
bin/fm-ci-budget-warn.sh:32- Upstream calibrated its 20-minute budget warning (BUDGET_MS=1200000) for its own 15-minute packing target (PORTABLE_SERIAL_MAX_WEIGHT_MS=900000). The merge takes the warning but keeps the fork's packing ceilings, which sit at or above that threshold: PORTABLE_SERIAL_MAX_WEIGHT_MS=1200000 (bin/fm-test-run.sh:272) and PORTABLE_POOL_MAX_WEIGHT_MS=1400000 (bin/fm-test-run.sh:262).bin/fm-test-run.sh --estimate-ms --lane portable-serial-Kof13currently models every one of the 13 serial shards at 1179688–1179723 ms, which is 98.3% of the warning threshold. So 'warn when a lane exceeds the healthy 20-minute budget' will fire on ordinary runs, and any pool packing the runner accepts between 1.2M and 1.4M ms will warn by design. The warning stops being a regression signal and becomes routine noise. The merge commit does not list this as a divergence. The other places that carry the same 20-minute assumption: .github/workflows/ci.yml:560 (step name), docs/fm-test-portable-shards.md:148, docs/scripts.md:55. The fix is an owner choice: set a fork-specific threshold above the fork's packing ceilings, or accept the noise knowingly..github/workflows/ci.yml:248- The intent says: 'Anything where the right side is not obvious is a question for the owner, not a call for the worker: list it and stop on that file.' On the core of upstream ci: pack every job to ~15 min from measured timings, warn at 20 min, faster lint kunchenguid/firstmate#8431 the merge kept the fork's side: the fork stays at 13 serial shards with a 1200 s packing budget and a single four-worker pool (fm-test-run.sh:242,272; ci.yml serial matrix 1..13). It does not take upstream's 19 serial shards at a 900 s / ~15-minute target, its two--jobs 2parallel lanes, the committed tests/fm-test-ci-timings.tsv hint store, or the singleton-overflow packing rule. Those were the main purpose of upstream's commit ('pack every job to ~15 min'), and the choice changes CI wall time and runner count for every fork PR. The merge commit records the decision but nothing shows the owner approved it. Confirm with the owner that the fork's CI layout should win over upstream's 15-minute packing before merging.bin/fm-ci-budget-warn.sh:20- Round 1's fix added a budget derivation to the header, and one step of its arithmetic is off. The header says '1400 s x 1.513 = 2119 s'. 1400 × 1.513 is 2118.2, and the unrounded factor 1785/1180 ≈ 1.5127 gives about 2117.8. Rounding up to 2120 s still holds, so the threshold and the tests are unaffected; only the stated intermediate value is wrong. Fix: write '≈ 2118 s, rounded up to 2120 s'. No sibling sites: docs/fm-test-portable-shards.md:148-149 quotes only the final 2120 s and the measured 1785/1510 s, which match the header.🔧 Fix applied.
1 warning still open:
.github/workflows/ci.yml:248- The intent says: 'Anything where the right side is not obvious is a question for the owner, not a call for the worker: list it and stop on that file.' On the core of upstream ci: pack every job to ~15 min from measured timings, warn at 20 min, faster lint kunchenguid/firstmate#8431 the merge kept the fork's side: the fork stays at 13 serial shards with a 1200 s packing budget and a single four-worker pool (fm-test-run.sh:242,272; ci.yml serial matrix 1..13). It does not take upstream's 19 serial shards at a 900 s / ~15-minute target, its two--jobs 2parallel lanes, the committed tests/fm-test-ci-timings.tsv hint store, or the singleton-overflow packing rule. Those were the main purpose of upstream's commit ('pack every job to ~15 min'), and the choice changes CI wall time and runner count for every fork PR. The merge commit records the decision but nothing shows the owner approved it. Confirm with the owner that the fork's CI layout should win over upstream's 15-minute packing before merging.tests/fm-captain-hold-teardown.test.sh:2187- On this host, the user-config archive test in the split teardown suite fails because tasks-axi runs through a misenodeshim, and that shim breaks ('node is not a valid shim') when the test overrides HOME with a fixture dir. The test body is unchanged from the base, so this is host-environmental and not caused by the merge. CI or a host whose node does not depend on HOME should pass it.bin/fm-ci-budget-warn.sh <aggregate> <lint-dir>with GITHUB_ACTIONS=true and unset, against an aggregate built by realbin/fm-test-run.sh --aggregate-jsonfrom lanes with hand-set durations of 2200000, 2120000, 2119999, 1785000 and 1400000 ms, and realfm-lint.sh --telemetryTSVs with wall_seconds edited to 1250, 1200, 1199.9 and 1021, plus a .roots.tsv sidecarbin/fm-ci-budget-warn.shedge cases: missing aggregate, unparseable aggregate, nonexistent lint dir, no args, unknown flag, extra positionalbin/fm-ci-budget-warn.shon a fully real aggregate (real suite timing JSON) plus real lint telemetry: no warnings, exit 0bin/fm-lint.sh --list-files/--changed --list-files/--changed --partition 1of4 --list-filesin a disposable clone across five branch states: non-sourced edit, sourced helper edit, sourced helper rename, lint-definition (installer) edit, and the main branchRealbin/fm-lint.shruns with FM_LINT_JOBS=1: local default (source following disabled),--changed(full extended analysis),--changed --partition 1of4 --telemetry,--changed --partition 2of4(empty partition no-op)bin/fm-install-shellcheck.sh/bin/fm-install-actionlint.shinto a temp destination that already holds the pinned binaries (cache hit) and into one holding stale fake versions (real re-download and checksum verification from GitHub releases), then a second runExecuted the realLint canonical partitionand budget-warnrun:bodies extracted from .github/workflows/ci.yml under bash, with FM_LINT_CHANGED=1/0, a stub fm-lint.sh recording argv, and a job-shaped RUNNER_TEMPbin/fm-test-run.sh --check-coverage,--list --family,--estimate-ms --lane portable-serial-Kof13for all 13 shards,--list-scheduled --family watcher-wake-lockbin/fm-test-run.sh --changed --base origin/main --listin a clone whose only change is bin/fm-ci-budget-warn.shbin/fm-test-run.sh tests/fm-watch-triage-busy.test.sh tests/fm-watch-triage.test.sh --jobs 1 --json ...bin/fm-test-run.sh tests/fm-captain-hold-teardown.test.sh tests/fm-captain-hold-lifecycle.test.sh --jobs 1 --json ..., thenbin/fm-test-run.sh tests/fm-captain-hold-lifecycle.test.shon its own, then a time-capped teardown rerunHOME=<empty dir> node --versionvs operator HOME, to diagnose the teardown failuretests/fm-procevent.test.sh:2445- A few comments in test files that came from upstream still point at the parent watch-triage suite for cases that moved to tests/fm-watch-triage-busy.test.sh. tests/fm-procevent.test.sh:2445 says 'tests/fm-watch-triage.test.sh proves delivery', and procevent delivery is now in the busy suite. The opening paragraph of tests/fm-watch-triage.test.sh (lines 10-13) still lists the heartbeat backstop and afk coherence, but its own line 17 says those cases live in the busy suite. Upstream did not update them either, so I left them alone: editing them would add fork-only changes to upstream test files for comment-only gains. The project docs have been repointed. Fix these upstream-side or in a later sync if wanted.✅ **Push** - passed
✅ No issues found.