Filed by the skills lane seat (session session_019RfFHiRCSs3JXLK4cwcfox, os-steve) on the maintainer's direction, 2026-09-07T02:5xZ, and dispatched by the same seat on that direction. Surface owner stays domain:devx.
Authority (maintainer, verbatim, live PM chat 2026-09-07): 「同意你的建议,你负责执行派发所有可行的优化」, on the seat's long-term plan for the Test Core shards (measurement loop → capacity rule → growth constraint). This card is the refresh half of the measurement loop; #16173 carries the one-time refresh and the drift alarm's wiring.
What
A scheduled workflow regenerates scripts/test-shard-timings.json from the six test-core-run-summary-N-of-6 artifacts of the most recent complete, fully green, full-scale push run on main, and opens a pull request with the result, so the balancing input never again depends on someone remembering.
Measured
Ruling
- New workflow
.github/workflows/shard-timings-refresh.yml: schedule weekly (Monday 05:30Z) plus workflow_dispatch. Steps: list the CI workflow's push runs on main through the API with the workflow token, pick the newest whose six Test Core (N/6) jobs all concluded success and whose artifacts are still retained, download the six summaries, run the measure script with --out scripts/test-shard-timings.json, run partition-test-shards.mjs --self-test and update its balancing pins the way the script's own refresh procedure prescribes, and open a PR on a bot branch with skip-changeset, the run id and the before/after per-shard prediction in the body. No PR when the file is byte-identical.
- The workflow never hand-edits the JSON and never touches
timeout-minutes or the shard count; it is the documented refresh command on a timer.
- Read
cut-rc.yml and pr-automation.yml for the house idiom of a workflow that pushes a branch and opens a PR; follow it.
Acceptance
workflow_dispatch once on the PR branch: the PR it opens (or its "byte-identical, no PR" log line) is quoted; the seat reads it.
- The workflow's own gates green (
dispatch-gates --commands derives them).
Refs #16173.
Generated by Claude Code
Filed by the skills lane seat (session
session_019RfFHiRCSs3JXLK4cwcfox, os-steve) on the maintainer's direction, 2026-09-07T02:5xZ, and dispatched by the same seat on that direction. Surface owner staysdomain:devx.Authority (maintainer, verbatim, live PM chat 2026-09-07): 「同意你的建议,你负责执行派发所有可行的优化」, on the seat's long-term plan for the Test Core shards (measurement loop → capacity rule → growth constraint). This card is the refresh half of the measurement loop; #16173 carries the one-time refresh and the drift alarm's wiring.
What
A scheduled workflow regenerates
scripts/test-shard-timings.jsonfrom the sixtest-core-run-summary-N-of-6artifacts of the most recent complete, fully green, full-scalepushrun onmain, and opens a pull request with the result, so the balancing input never again depends on someone remembering.Measured
provenance.refresh); it went 13 days without a refresh while ~700 test files were added, and the shard it mis-weighted was killed twelve times in a day (CI: the shard-timings file is stale for the CLI package — 672s predicted vs 28m46s measured against a 30-minute timeout, so Test Core shard 1/6 is one slow run from being killed on any PR touching the CLI #16173).scripts/measure-test-shard-timings.mjstakes any number of summaries and merges by median.mainare cancelled bycancel-in-progresswhen merges come quickly, so the workflow must select a run whose six shards all completedsuccess(uncensored), not merely the newest.Ruling
.github/workflows/shard-timings-refresh.yml:scheduleweekly (Monday 05:30Z) plusworkflow_dispatch. Steps: list the CI workflow'spushruns onmainthrough the API with the workflow token, pick the newest whose sixTest Core (N/6)jobs all concludedsuccessand whose artifacts are still retained, download the six summaries, run the measure script with--out scripts/test-shard-timings.json, runpartition-test-shards.mjs --self-testand update its balancing pins the way the script's own refresh procedure prescribes, and open a PR on a bot branch withskip-changeset, the run id and the before/after per-shard prediction in the body. No PR when the file is byte-identical.timeout-minutesor the shard count; it is the documented refresh command on a timer.cut-rc.ymlandpr-automation.ymlfor the house idiom of a workflow that pushes a branch and opens a PR; follow it.Acceptance
workflow_dispatchonce on the PR branch: the PR it opens (or its "byte-identical, no PR" log line) is quoted; the seat reads it.dispatch-gates --commandsderives them).Refs #16173.
Generated by Claude Code