Skip to content

ci: a scheduled workflow regenerates scripts/test-shard-timings.json from the newest fully green main run and opens the PR (maintainer-directed, measurement loop) #16464

Description

@claude

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

  1. 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.
  2. 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.
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions