Skip to content

ci: widen the Test Core matrix from 8 to 10 shards - #34727

Merged
os-zhuang merged 4 commits into
mainfrom
claude/issue-34710-test-core-ten-shards
Nov 17, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/issue-34710-test-core-ten-shards

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #34710
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:Test Core 测试矩阵从 8 片加宽到 10 片(.github/workflows/ci.yml 里所有写死的 /8 宽度改成 /10),分片脚本自动跟随,阈值一个没动。
  • 为什么改:11-16 刷新的耗时数据下,8 片里有 5 片的整包合计约 2195s,超过 1868s 上限,chore(ci): refresh the Test Core shard-timings dataset #34314 合不进去;源码规则写明「加宽矩阵或切更细,不许把片塞更满」,算下来要 9.4 片,取 10。
  • 风险与回滚:费用每次完整 Test Core 多约 3.6 runner-分钟(2 片 × 每片固定开销约 1.8 分钟:拉代码、装依赖、建闭包;依据 2026-11-17 两次 schedule 全量跑的 16 个分片作业实测,现在一次全量约 136-148 runner-分钟,涨约 2.5%,merge queue 按推测构建次数放大)。测试本身的总秒数不变,只是切成 10 份。单片墙钟按文件里的模型(整包和/2.9 + 切片):用 chore(ci): refresh the Test Core shard-timings dataset #34314 的数据,最慢片测试步骤约 1247s → 1095s,纯整包片约 757s → 605s。回滚 = revert 本 PR。
  • 先看:.github/workflows/ci.yml 的 test 作业(matrix 回退列表、--shard、--total、产物名)和 test-gate 的 --leg "test/10:…" 与 OS_TEST_PLAN;其次 scripts/partition-test-shards.mjs 新增的「RE-DERIVED AT 10」注释段。
  • 两分钟验证:本分支上把 chore(ci): refresh the Test Core shard-timings dataset #34314 的数据集放进去跑 node scripts/partition-test-shards.mjs --self-test,应看到 10 shards ... whole legs 1769/222/1754/... within 1868s;在 main 上同样操作是红的(5 片超上限)。
  • 需要你做的:os-zhuang 审批本 PR(动了 .github/workflows/**,Tier H,含上面这笔 CI 费用),之后席位落地,再让 chore(ci): refresh the Test Core shard-timings dataset #34314 rebase 合入。

What changes

  • .github/workflows/ci.yml, the Test Core test job and its test-gate: every spelling of the width moves from 8 to 10, nothing else. Job name Test Core (N/10), the matrix fallback '[1, ..., 10]', --shard N/10 (partitioner and the per-file timing capture), the turbo-cache and drift --site / --label strings, the artifact names test-core-run-summary-N-of-10, test-core-timings-N-of-10 and shard-attest-test-N-of-10, the attestation --total 10, and in test-gate the --leg "test/10:..." and the OS_TEST_PLAN fallback. Comments that state the width follow; the rationale block gains a TEN since #34710 paragraph and the cost paragraph the 8 -> 10 reading. Cache keys carry only the shard index, so they need no change.
  • scripts/partition-test-shards.mjs: no code change. SHARD_COUNT is liveShardTotal('test') and reads 10 from the matrix. The SHARD_COUNT docblock gains RE-DERIVED AT 10 (#34710 ...) with the arithmetic and the 8/9/10/11 table on the 2026-11-16 dataset; the closure-allowance docblock adds its figure at 10 (783 / 9 = 87.00s).
  • scripts/ci/plan-test-core-shards.mjs: header text only (Test Core (N/10), --shard k/10, test-k-of-10).
  • scripts/ci/select-shard-timings-run.mjs (delta round 1, the seat's ruling): its SHARD_COUNT was a literal 8 its comment called the live width; it now reads ci.yml's test matrix through liveShardTotal('test') (scripts/ci-shard-matrix.mjs), the source the partitioner uses, and its comment says so. It stays only the matchers' default: the live lane judges each run at its own width. Self-test: the name-matcher pins are spelled at the live width (W = SHARD_COUNT, a non-live width W + 1), and each also pins an 8-wide name read at its own width, so a retained pre-resize run stays pinned; the eligibility and candidate fixtures stay an 8-wide run judged at its own width, on purpose; the firing control now reds by name when the live width equals its 6-wide fixture, where it used to return. The partitioner's note on this file follows.
  • No bound moved: WHOLE_LEG_CAP_SECONDS, LOAD_SENSITIVE_APART, MAX_SHARD_OVER_MEAN, SLICE_COUNT_HYSTERESIS, FILE_SHARDED_PACKAGES (CLI at 3) and PREVIOUS_FILE_SHARDED_PACKAGES are unchanged, and the dataset scripts/test-shard-timings.json is untouched.

Required checks: branch protection requires the bare Test Core context, published by test-gate (name: Test Core), not the per-shard Test Core (N/M) jobs. check:required-contexts reads N from the matrix through scripts/ci-shard-matrix.mjs, and no registry or gate names a Test Core (N/8) context.

Tests

No partitioner pin reds at 10, so no pin was re-derived. The one test file changed is the self-test inside scripts/ci/select-shard-timings-run.mjs (delta round 1, above).

  • node scripts/partition-test-shards.mjs --self-test, (a) committed dataset at 10: self-test OK (79 measured packages -> 81 shard items, 10 shards, max/mean 1.05x [bound 1.3x], floor 1009s, bins 1304.07/1235.93/.../1233.65s within the 1432.04s density cap, whole legs 44/1236/1236/1235/1234/1236/1236/1234/757/756s within 1868s, file-level slices: @objectstack/cli x3).
  • Same, (b) with chore(ci): refresh the Test Core shard-timings dataset #34314's dataset (git show 5009c644:scripts/test-shard-timings.json into a scratch worktree, not committed), at 10: self-test OK (82 measured packages -> 84 shard items, 10 shards, max/mean 1.01x [bound 1.3x], floor 1769s, ... within the 2245.53s density cap, whole legs 1769/222/1754/1754/1006/1005/1753/1756/1753/1754s within 1868s, file-level slices: @objectstack/cli x3).
  • Control, (b) at 8 on origin/main: exit 1, whole leg, committed dataset at 8 shards (sums 2195/663/2193/2194/1446/1445/2193/2195s), shards 1, 3, 4, 7, 8 past the cap and objectql with plugin-security on 8/8: the card's red, reproduced.
  • Other width readers, all at 10: node scripts/ci/plan-test-core-shards.mjs --self-test (23 cases), pnpm check:shard-attestation (runs the ci-shard-matrix self-test; 360 assertions), pnpm check:required-contexts, node scripts/ci/select-shard-timings-run.mjs --self-test, pnpm check:ci-filter-parity, node scripts/check-self-test-workflow-commands.mjs --self-test: all exit 0.
  • node scripts/ci/select-shard-timings-run.mjs --self-test :: exit 0, select-shard-timings-run: self-test OK. Cases per battery, read by a temporary instrumented copy before (67be267) and after (b238da2): 37/9/13/17/18/13/5 = 112 both, so no case was dropped or added. Mutant SHARD_COUNT = 8 at the head (temporary copy): exit 1, job matcher: a job from a different shard count was accepted, so the live-width pins read the live width.

Acceptance notes

  • Refresh lane across the width change: select-shard-timings-run.mjs judges each run at its own width (runIsEligible with no count reads M from the run's own Test Core (N/M) jobs), so the retained 8-wide schedule runs stay eligible and the 10-wide runs after this lands are eligible too. Measured on this PR's own rehearsal of the refresh lane (Regenerate the shard-timings dataset, job 133947759319, dry run): it selected the 8-wide schedule runs 44043569490, 44014522626 and 43985144717, downloaded shards 1-8 of each, and the partitioner's verdict on the refreshed dataset at 10 read PARTITIONER_EXIT: 0.
  • Generator decode: measure-test-shard-timings.mjs does not decode the width from test-core-run-summary-N-of-M; it decodes slices by digest against FILE_SHARDED_PACKAGES / PREVIOUS_FILE_SHARDED_PACKAGES, which are unchanged, so the runs made at 8 decode exactly as before.
  • Spec is now the floor: on the 2026-11-16 dataset @objectstack/spec's whole 1769.27s is the heaviest bin at 10 (1.01x the mean, 99s under the cap) and its whole leg is 1769s at any width. A refresh that takes spec past 1868s needs a finer slice of spec, not an eleventh shard.
  • Per-shard turbo cache keys carry only the shard index, so on the first runs after this shard k restores the cache shard k saved at 8 wide, which held other packages; that costs local cache hits once and never correctness, and the remote cache is unaffected.
  • timeout-minutes: 60 on the test job is unchanged; ten shards shorten every shard's tests step in the wall model.
  • Seen in the same rehearsal, not from this diff: the refresh lane's regression diff (measure-test-shard-timings.mjs --diff) refused with exit 1 on main's tree, because packages/cli/test/serve-multi-node-gate-declaration.integration.test.ts declares test-budget: 58, off the 10 s grid its header format requires; the lane then reports its regression readings as NOT MEASURED. Filed as cli test: serve-multi-node-gate-declaration's test-budget 58 s is off the 10 s grid, so every timings refresh's regression diff refuses #34711.

Verification

At head b238da2 (the branch after merging origin/main f6f5b50):

  • Local derived gate subset, node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 67 families (the 65 of round 1 plus select-shard-timings-run.mjs --self-test and measure-test-shard-timings.mjs --self-test), all exit 0. check:dts-closure and check:dual-build-cjs-loads first ran while a locked pnpm build --concurrency=2 was still writing built output, and were re-run after it finished (VERDICT command-exit 0, 119/119 tasks), as were three other gates that read built output. The --ran reconciliation reads 67 derived, 67 run, 0 NOT-MEASURED, 0 UNRUN.
  • PR check-runs on this head, all 46 completed: Test Core success (the plan started Test Core (1/10), (2/10) and (3/10), all success), and Lint & Repo Gates, TypeScript Type Check, Build Core, Governed Surface Queue Guard, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Dogfood Regression Gate and Regenerate the shard-timings dataset all success; the rest skipped by their filters.
  • Not run locally: pnpm lint and the full farm, which are CI's. Dogfood battery: n/a (no ! in the title, no narrowing arm).

Generated by Claude Code

The 2026-11-16 timings refresh puts five of eight shards past the
1868s whole-package leg cap. The cap's own rule is a wider matrix, never
a denser shard: (14524 + 2245.53 + 783) / 1868 = 9.4, so ten.

Every width spelling in the test and test-gate jobs moves to 10 (job
name, matrix fallback, --shard, labels, artifact names, --total, the
gate's leg and planned roster); the partitioner reads the count from
the matrix. The CLI keeps 3 slices, so the generator's decode is
unchanged. Docblocks record the figures re-derived at 10.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRH4UCX1tvddXMS7cq
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 17, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRH4UCX1tvddXMS7cq

Final head for review · 67be267b99cb39800838d8a99ce504576b3ef118 · 2026-11-17T09:28Z
Card #34710 (claim 6942771051). The dev's report is on #34710. Gates: 65 derived, 65 run, all exit 0 (/mnt/project-files/objectstack-seat2/34710-gates-ran.txt, --ran 0 NOT-MEASURED). Every check-run on this head has completed green. The Verification section of the body now carries these readings.
Tier H (.github/workflows/ci.yml): it stays a draft until the L2 contract-tier review and the os-zhuang approval are in.
Clause-②: no
Metadata-protocol: none

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head 67be267 · 2026-11-17T09:30Z

select-shard-timings-run.mjs spelled SHARD_COUNT = 8 and called it the
live width; it now reads ci.yml's test matrix through ci-shard-matrix.mjs,
the source the partitioner uses. Its matcher pins are spelled at the live
width, and each keeps an 8-wide name read at its own width so retained
runs from before the resize stay pinned. The eligibility fixtures stay an
8-wide run judged at its own width. The firing control reds by name
instead of returning when the live width equals its fixture's. Case
counts are unchanged per battery.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRH4UCX1tvddXMS7cq
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmRH4UCX1tvddXMS7cq

Final head for review, round 2 · b238da2b57c2140ceeee2a1fffb334f132f5d94c · 2026-11-17T10:11Z
Adds the seat's ruling to this card: scripts/ci/select-shard-timings-run.mjs reads its default width from liveShardTotal('test') (claim amendment 6944133679). Retained 8-wide runs stay pinned at their own width. The self-test case count is unchanged at 112. The dev's report is comment 6945015626 on #34710. Gates: 67 derived, 67 run, all exit 0 (/mnt/project-files/objectstack-seat2/34710-gates-ran-r2.txt). All 50 check-runs on this head have completed, and none failed. The comment for the previous head, 6944106295, is superseded.
Tier H: it stays a draft until the L2 contract-tier review and the os-zhuang approval are in.
Clause-②: no
Metadata-protocol: none

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract-review-claim: session_01ADHkmP44onN8RMzsPMqjRq · head b238da2 · 2026-11-17T10:12Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmQtnGcx7hYEL11ptVs

席位核对

L1 first review: ACCEPT · PR #34727 · card #34710 · area o2-C · L1-a2 · 2026-11-17T10:14Z

Head-sha: b238da2b57c2140ceeee2a1fffb334f132f5d94c

Final-head comment 6945057088 (round 2); dev report 6945015626 on #34710. L1 wrote no record at 67be267b: the seat held that head for its ruling (claim amendment 6944133679). So this record is a full first review of the whole PR at this head.

Checklist

  • Shape. Draft, base main, labels ci/cd, size/m and skip-changeset. Fixes #34710 is right: the PR does what the card asks, which is to widen the matrix so the 2026-11-16 timings fit the 1868 s whole-leg cap. Clause-②: no and Metadata-protocol: none are right, because nothing an author writes moves.
  • Scope (4 paths, +138/−68): .github/workflows/ci.yml, scripts/partition-test-shards.mjs, scripts/ci/plan-test-core-shards.mjs and scripts/ci/select-shard-timings-run.mjs. Commits 6c44fc53 and b938531d, plus merges 67be267b and b238da2b. git show --remerge-diff is empty for both merges.
  • ci.yml. All 17 width sites go from 8 to 10, and nothing else changes: the job name, the matrix fallback list, --shard N/10, the timing capture, the turbo-cache and drift --site/--label strings, the artifact names, and test-gate's --leg "test/10:…" and OS_TEST_PLAN fallback. At this head, the only /8 left in the file is :942, a dated measurement note about the 16 Test Core (N/8) jobs. It is history, so it is correct.
  • Required checks. Branch protection and the ruleset name only the aggregate Test Core context, which test-gate publishes. No per-shard name is required, so the rename strands no required check. check:required-contexts reads N from the matrix.
  • Partitioner and planner. partition-test-shards.mjs already took SHARD_COUNT from liveShardTotal('test'). Its diff is comments only: the RE-DERIVED AT 10 arithmetic and the selector sentence that b938531d corrects. plan-test-core-shards.mjs changes header text only. I checked that neither file has a changed code line.
  • The seat's ruling (b938531d).
    • select-shard-timings-run.mjs now sets SHARD_COUNT = liveShardTotal('test'). That is the same reader the partitioner uses, so a resize has one spelling. If the matrix cannot be read, the import fails; it does not fall back to a number. The comment now says this. The partitioner's comment no longer claims the selector keeps its own 8.
    • The matcher pins use the live width W. Beside each one there is now an 8-wide name read at width 8, so a run kept from before the resize stays parseable. The near-miss pin Test Core (3/8) at the default width must read null. That pin is what reds if the literal comes back.
    • The eligibility fixtures stay an 8-wide run judged at its own width. That is the real retained-run case after the matrix goes to 10.
    • The firing control used to return silently when the live width was 6. It now throws a named error. That is the stricter reading.
    • Counts. Both 67be267b and b238da2b have 59 check( sites (I counted them). The body's per-battery count is 112 both before and after. Nothing was dropped or skipped.
    • What I ran myself. node scripts/ci/select-shard-timings-run.mjs --self-test at this head gives exit 0, self-test OK. Mutant SHARD_COUNT = 8: exit 1 on job matcher: a job from a different shard count was accepted. That matches the body, and the run was restored.
  • Refresh lane across the resize. runIsEligible with no count reads each run's own width, so the retained 8-wide schedule runs stay eligible. The PR's own Regenerate the shard-timings dataset rehearsal (job 133947759319) is success, and the body says it picked an 8-wide schedule run.
  • Leftover: body edit needed, not a rework item. The Acceptance note on serve-multi-node-gate-declaration.integration.test.ts (test-budget: 58, off the 10 s grid) says "handed to the seat as a finding". The card already exists: cli test: serve-multi-node-gate-declaration's test-budget 58 s is off the 10 s grid, so every timings refresh's regression diff refuses #34711 (opened 07:52Z, open). Please put #34711 on that line before landing. A body edit does not move the head, so this record stands.
  • Observation, no change asked. shard-timings-refresh.yml's pull_request.paths does not list ci.yml or scripts/ci-shard-matrix.mjs, which the selector now imports. A PR that only breaks the matrix would not run the rehearsal. It would still red in the partitioner self-test and check:shard-attestation in Lint & Repo Gates, which read the same matrix.
  • Cost. The body states about +3.6 runner-minutes per full Test Core (two more shards at about 1.8 min fixed overhead each, about +2.5%), measured on two 2026-11-17 schedule runs. This is the maintainer's cost call, carried by the Tier H approval below.
  • Gates. 67 derived, 67 run, all exit 0, 0 NOT-MEASURED (34710-gates-ran-r2.txt).
  • CI on this head (check-runs, filter=latest, 50 runs): success=37, skipped=13, nothing red or pending. Plan Test Core shards selected Test Core (1/10), (2/10) and (3/10), all success, and the aggregate Test Core is success.

L2 and landing

  • L2: owed (CONTRACT_REVIEW_TIER, governed workflow surface; the round-2 final-head comment asks for it). The L2 claim 6944131802 is at 67be267b. No ## Contract review record is on file at either head.
  • Landing tier (node scripts/pm/check-governed-merges.mjs --pr 34727): ⛔ GOVERNED, landing tier H (.github/workflows/** split, ruling record 6722205630, letter C). It goes to the seat. ⛔ Do not mark it ready or arm auto-merge before an L2 PASS at this head and the os-zhuang approval (which also accepts the CI cost) are on file. After landing, chore(ci): refresh the Test Core shard-timings dataset #34314 rebases, as the body says.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

l2-review#4 · os-steve · session_01ADHkmP44onN8RMzsPMqjRq

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: b238da2b57c2140ceeee2a1fffb334f132f5d94c
Local-runs: none
Scope: .github/workflows/ci.yml + scripts/ci/select-shard-timings-run.mjs, scripts/partition-test-shards.mjs, scripts/ci/plan-test-core-shards.mjs

Read: card #34710 body and all five comments (triage first touch, claim, round-0 report, claim amendment, delta-round-1 report), PR #34727 body and file list, the net diff of four files against merge base f6f5b50a05 (+138/-68), and the 50 check-runs on the head. origin/main has not moved on any of the four paths, on scripts/ci-shard-matrix.mjs, on scripts/check-shard-attestation.mjs or on the dataset since the merge base.

① Derived judgments

  • Shard count, one authority: RIGHT. The only literal is the test matrix fallback in ci.yml, now '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]'. scripts/ci-shard-matrix.mjs (outside the diff, read) sizes a planned matrix from that fallback and refuses every shape it cannot read, with no default. scripts/partition-test-shards.mjs (SHARD_COUNT = liveShardTotal('test'), unchanged code), scripts/ci/plan-test-core-shards.mjs (imports the partitioner's SHARD_COUNT), scripts/check-shard-attestation.mjs and scripts/check-required-contexts.mjs (both shardTotal(ciText, 'test')) all follow it. After this head scripts/ci/select-shard-timings-run.mjs follows it too.
  • Every width spelling in the test job and test-gate: RIGHT. I read every matrix.shard line of the test job at head: job name Test Core (N/10), --shard N/10 twice (partitioner, per-file capture), the three --site and two --label strings, the NOT MEASURED echo, artifacts test-core-run-summary-N-of-10, test-core-timings-N-of-10, shard-attest-test-N-of-10, attestation --total 10, and in test-gate --leg "test/10:..." and the OS_TEST_PLAN fallback. No /8, -of-8 or --total 8 is left in the job. The partitioner's pin 4 reads --shard N/SHARD_COUNT and --total SHARD_COUNT back from ci.yml, and check:shard-attestation holds the gate's --leg total and the gate's roster expression to the matrix's bytes; both ran green on the head (Lint & Repo Gates success).
  • Residual 8-wide names elsewhere in the repo: RIGHT to leave. They are historical measurements in comments (Test Core (4/8) medians, run citations), synthetic fixtures spelled at an explicit width (check-shard-attestation.mjs total 8 fixtures, check-expected-skips.mjs /6), or ui-coverage-nightly.yml, which is a different, UI lane with its own 8-wide matrix. No ruleset, registry or required-context entry names a Test Core (N/8) context; the registry requires the bare Test Core.
  • Aggregate cannot pass over a failed or missing shard: RIGHT. test-gate keeps name: Test Core, needs: [test, filter, test-plan, queue-verdict] and if: always() && needs.queue-verdict.outputs.covered != 'true'. Its verdict counts one attestation per PLANNED shard (--planned "test=$OS_TEST_PLAN", the same expression the matrix reads, fallback 1..10 included) against --leg test/10; a failed or never-started planned shard publishes none and the gate reds. The download pattern shard-attest-test-[0-9]* matches the two-digit shard-attest-test-10-of-10 and still excludes shard-attest-test-ui-*.
  • Every package on exactly one shard at 10: RIGHT. The planner calls planRun(..., SHARD_COUNT), refuses a bin count other than SHARD_COUNT, and digests every bin in order together with the bin count; each started shard recomputes the plan and reds on a digest mismatch (--verify), so a bin the plan called empty is empty by the shard's own computation. Nothing in that mechanism is width-specific and none of its code changed. Plan Test Core shards (which runs the planner self-test first) and all three started shards concluded success on the head.
  • The cited rule prescribes this change: RIGHT. The WHOLE_LEG_CAP_SECONDS docblock on main reads "When a refresh grows the whole legs past the cap, the remedy is a wider matrix or a finer slice, never a denser shard" and forbids raising 1868 without a merge-queue red-rate reading. The diff leaves WHOLE_LEG_CAP_SECONDS, LOAD_SENSITIVE_APART, MAX_SHARD_OVER_MEAN, FILE_SHARDED_PACKAGES and scripts/test-shard-timings.json untouched (the partitioner hunk is comment-only). The arithmetic in the new text checks: (14524 + 2245.53 + 783) / 1868 = 9.40; means 2194 / 1950 / 1755 / 1596 at 8 / 9 / 10 / 11; closure allowance 783 / 9 = 87.00 and 783 / 7 = 111.86.
  • Cap honoured at 10: RIGHT on the committed dataset by check-run (pin 3d runs inside the partitioner self-test, green on the head; the refresh-lane rehearsal Regenerate the shard-timings dataset also concluded success). On the dataset of chore(ci): refresh the Test Core shard-timings dataset #34314 the figure 1769 (spec alone, 99 under the cap) is the dev's local reading plus that rehearsal; it is consistent with the arithmetic above and is re-judged by the same pin when chore(ci): refresh the Test Core shard-timings dataset #34314 rebases, where a miss would be a red, not a silent overload.
  • Merge-queue and PR paths: RIGHT. One test job serves pull_request, merge_group, push, schedule and workflow_dispatch; there is no second matrix.
  • Check-runs on the head: 50, all completed, none pending, none failed. NOT ten shard runs: the plan started three, Test Core (1/10), (2/10), (3/10), all success, and the aggregate Test Core is success. Shards 4 to 10 were not created because this diff reaches no package (the ci: Test UI always starts 16 shard runners and Test Core 8, even when the affected set is one package, and an empty shard still pays checkout + install + closure build before learning it has nothing to run #26084 planner). So the full 10-wide roster, including the two new runners 9 and 10, has not run on any runner at this head; see ③.
  • select-shard-timings-run.mjs reading the live count: RIGHT. It reads .github/workflows/ci.yml of its own checkout, synchronously at import, through the same function the partitioner uses. There is no cache, no environment input and no fallback value: an unreadable file or matrix throws at import and the script exits non-zero, so it fails closed and cannot silently read 8. It cannot disagree with the planner or the matrix inside one checkout. The live lane never passes this default: runIsEligible with no count reads each run's own width from its Test Core (N/M) jobs, so retained 8-wide runs stay eligible; the rehearsal on this head (success) is the reading.

② Semver level

The diff is one workflow and three repo scripts; nothing under a published package, no schema, no generated baseline. It carries no changeset file and the label skip-changeset; Check Changeset concluded skipped. That matches what the diff publishes: nothing. The PR body's Clause-②: no line holds, and no narrowing arm applies.

③ Boundary flags

  • CI cost (triage first touch, maintainer floor): the statement is in the PR body's quick-read, as triage ordered, and repeated in the ci.yml cost paragraph. It is internally consistent: 2 shards x (1.67 + 0.12) min = 3.58, stated as about +3.6 runner-min per full run, about +2.5% of the 135.6 to 148.0 it cites, with the merge-queue multiplication named. Two limits a reader should know: the sample is 16 jobs of two schedule runs (the earlier 6 to 8 reading used 512 jobs and gave a p90 of 5.5 min for the pre-test part; no p90 is given here), and the figure is for a FULL run only. The approval of this spend is the maintainer's (Tier H, os-zhuang); this record does not decide it. ESCALATED to that approval.
  • No full-width run exists on this head (my flag): three of ten shards ran. The 10-wide roster is held by static gates only (partitioner self-test at 10, check:shard-attestation, the planner self-test). The merge-queue build of this PR will most likely also start only the filled bins, so the first real 10-shard run is the first schedule run after landing. I found nothing in the tree that is specific to shards 9 and 10 (cache keys carry the index only and the restore prefix ends in a dash, so shard 1 cannot restore shard 10's cache; timeout-minutes: 60 is unchanged). ESCALATED as a fact for the approver, not a defect.
  • Dev deviation, shard-timings-refresh.yml path filter: ANSWERED, real. That workflow is the only place the selector's self-test runs, and its pull_request.paths name the workflow, the selector and the generator, not .github/workflows/ci.yml or scripts/ci-shard-matrix.mjs, which the selector now reads at import. A later ci.yml-only resize therefore does not run this self-test at PR time; the Monday schedule run would be the first reading. An unreadable matrix is still caught at PR time by the ci-shard-matrix self-test in check:shard-attestation. The workflow is outside the diff and outside the claim's file surface, so it is not reviewed here: it needs a follow-up card (add the two paths). See N1 for the one case where it bites.
  • Dev open question, route to contract review at this head: ANSWERED by this record. The earlier question on aligning the selector's default was closed by the seat's ruling in the claim amendment and is implemented on this head.
  • Out-of-scope finding the dev handed over (the refresh lane's --diff refusing on a test-budget: 58 header in a CLI test on main): not from this diff, not judged here; it needs its own card.
  • SQL push-down: not applicable. No query, no id materialisation, no in-app join; workflow and CI scripts only.

④ Design judgment

.github/workflows/ci.yml (hits). The change holds against the code it cites. The rule it quotes is on main in the words it quotes, the count it derives follows from the figures it gives, and every enforcing gate reads the new width from the matrix rather than from a copy. The required context is unaffected: the aggregate keeps its name and its always(). I tried three ways to break it. (1) A two-digit index: the attestation download pattern, the cache restore prefixes and the anchored name matchers all hold at 10. (2) A dead plan job: matrix and gate fall back to the same 1..10 literal, held byte-identical by check:shard-attestation. (3) The transition: on the first runs shard k restores the turbo cache shard k saved at 8 wide, which costs local cache hits once and no correctness, as the PR body says. The rewritten comments are accurate; the older paragraphs that still say eight are dated history (#25376, #26084) and read as such.

scripts/partition-test-shards.mjs (implementing). Comment-only. The RE-DERIVED AT 10 block and the 87.00s figure agree with the constants beside them. The table's 8 / 9 / 11 rows and the wall-model figures are the dev's local readings; the row for 10 on the committed dataset is the one CI grades.

scripts/ci/plan-test-core-shards.mjs (implementing). Header-only; code follows SHARD_COUNT.

scripts/ci/select-shard-timings-run.mjs (implementing). The code agrees with its new comment: live read, same source as the partitioner, import fails rather than falling back. On the self-test: the pins spelled at W are self-referential (W IS SHARD_COUNT), so they pin the matchers' anchoring at whatever the default is, exactly as the literals did before. What distinguishes a live read from a remembered 8 is the three added default-width negatives (testCoreShard('Test Core (3/8)'), and the two artifact twins, must be null). That is a real pin of this card's regression, not a fixture tuned to pass: with the constant set back to 8 it reds, which is the mutant the dev reports. It is a pin of "not 8", not of "equals the matrix"; the equality is by construction and the reader has its own self-test, which I accept. The eligibility and candidate fixtures staying 8-wide and judged at their own width is right, and is the retained-run case the lane must keep. The self-test's verdict on the head is the Regenerate the shard-timings dataset check-run, success; battery floors are unchanged in the diff (37 / 13 / 9 / 17 / 18 / 13 and the per-file battery), and the claim of 112 cases before and after is the dev's instrumented count, which I did not re-take.

N1 (nit) — select-shard-timings-run.mjs self-test: the three default-width negatives hard-code 8, so if the live matrix is ever 8 wide again they red under the message "a job from a different shard count was accepted", which names the wrong cause, and the comment above them ("so a resize moves these with the matrix") is not true for a resize to 8. The same file turns the equivalent coincidence at 6 into a named red on this head; 8 deserves the same. It fails closed and loud, and a revert of this PR reverts the fixture with it, so nothing is wrong today. With the path-filter gap in ③ the red would first show on the scheduled lane. Follow-up card, together with the two paths.

N2 (nit) — plan-test-core-shards.mjs header, two present-tense lines the diff did not move: "the matrix fell back to its literal 1..8 (|| '[1, ..., 8]' in ci.yml)" and "counts attestations against the PLANNED roster, not 1..8". Both should read 1..10. Comment only; the code prints 1..SHARD_COUNT. Accepted deviation or the same follow-up card.

No must-fix, no should-fix.

Implemented-by: claude/issue-34710-test-core-ten-shards
Reviewed-by: session_01ADHkmP44onN8RMzsPMqjRq

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmQ2SN4K183oqAvUajA

Seat record · 2026-11-17T10:21Z · Head-sha: b238da2

维护者速读

  • 改了什么:Test Core 测试矩阵从 8 片加宽到 10 片(.github/workflows/ci.yml 里写死的 /8 全改 /10),分片脚本跟随,阈值一个没动。
  • 为什么改:11-16 刷新的耗时数据下 8 片里有 5 片超 1868s 上限,chore(ci): refresh the Test Core shard-timings dataset #34314 合不进去;规则写明「加宽矩阵或切更细,不许把片塞更满」,算出 9.4 片,取 10。
  • 风险与回滚:每次完整 Test Core 约多 3.6 runner-分钟(约 +2.5%,合并队列按构建次数放大;依据只有 16 个分片作业样本,没有 p90)。本 head 只跑了 3/10 片,第一次跑满 10 片是落地后的首次定时运行。测试总秒数不变;最慢片测试步骤约 1247s → 1095s。回滚即撤回本 PR。
  • 先看:ci.yml 的 test 作业(matrix、--shard、--total、产物名)与 test-gate 的 --leg "test/10:…";scripts/partition-test-shards.mjs 新增的「RE-DERIVED AT 10」注释。
  • 两分钟验证:本分支放入 chore(ci): refresh the Test Core shard-timings dataset #34314 的数据跑 node scripts/partition-test-shards.mjs --self-test,应见 10 片全在 1868s 内;main 上同样操作为红。
  • 需要你做的:用 os-zhuang 审读并批准。本 PR 改 ci.yml,按你的规矩需要你本人同意;os-zhuang 的批准席位即视为你同意上面这笔 CI 费用和「首次跑满 10 片在落地后」这一点,不同意请不批并留言。契约复审 PASS 6945222844,钉在 Head-sha b238da2b57c2140ceeee2a1fffb334f132f5d94c。批准在案后由席位翻 ready,经合并队列落地,再让 chore(ci): refresh the Test Core shard-timings dataset #34314 rebase 合入。

席位意见:同意合并。这是按源码规则的根修(加宽而不塞满),阈值不动;费用小且有实测依据。

席位核对

  1. 形态:4 个文件,+138/−68,Fixes #34710;Clause-②: no,Metadata-protocol: none。.github/workflows/** ⇒ Tier H;动 ci.yml 另需维护者本人同意(见上)。
  2. 前提实测:区在 main 上用 chore(ci): refresh the Test Core shard-timings dataset #34314 数据重放 --self-test 为红(5 片超限),本分支为绿;过期默认值 8 已在同 PR 修掉。
  3. 门禁 check-runs:head b238da2b 上 54 条,38 绿、16 跳、0 红。
  4. 接受的偏差:L1-a2 ACCEPT 6945113926;契约复审 PASS 6945222844,无 should-fix;成本样本小、只跑 3/10 片两点已写入速读交你判断。
  5. 范围外去向:off-grid test-budget: 58 归 cli test: serve-multi-node-gate-declaration's test-budget 58 s is off the 10 s grid, so every timings refresh's regression diff refuses #34711;复审建议的 refresh 工作流路径过滤与 N1、N2 立为 ci shard follow-ups after the Test Core 10-shard widening: refresh-lane path filter, width-8 self-test rows, stale 1..8 header #34783(p3 建议,Blocked-by ci: widen the Test Core matrix from 8 to 10 shards #34727)。Skills-docs: 不欠。
  6. 落地条款:os-zhuang 授权批准在案后,席位翻 ready,经合并队列落地;合并即关 ci: widen the Test Core matrix to 10 shards so the 2026-11-16 timings fit the 1868s whole-leg cap (blocks #34314) #34710,随后 chore(ci): refresh the Test Core shard-timings dataset #34314 rebase。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 17, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 17, 2026 10:23
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit 7d904e0 Nov 17, 2026
60 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-34710-test-core-ten-shards branch November 17, 2026 11:05
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: widen the Test Core matrix to 10 shards so the 2026-11-16 timings fit the 1868s whole-leg cap (blocks #34314)

3 participants