Skip to content

Commit 4b71a82

Browse files
ci(test-shards): carry the 2026-11-02 shard-timings refresh and slice the CLI in 2 (#29856)
<!-- claude-projects-attribution: {"github_login":"marchtian"} --> _Requested by **田騏** · [project thread](https://claude.ai/code/project/chan_01VmuUhXU9SSUzqJYyXSmYSi?thread=cmsg_01VmuUhXU9SSUzqJYyXSmYSi9paTx1Lu8ENYwwssthfK3h)_ Part of #29777 (its second slice; the card closed on the first, PR #29838). Replaces PR #28978. Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:带入 2026-11-02 的分片计时刷新数据(与 PR #28978 逐字节相同),并把 CLI 的文件级切片从 4 改为 2,旧映射 {cli: 4} 移入 PREVIOUS_FILE_SHARDED_PACKAGES。 - 为什么改:新数据里 CLI 降到 1432 秒,自检的切片数推导(pin 3c)只接受 2 片(716 秒 ≤ 736.45 秒);数据与映射必须同一 PR 落地(#26186 形状),#29838 已让上限接受带声明片的切法。 - 风险与回滚:只动两个仓根脚本/数据文件,不发布任何包。回滚即 revert 本 PR,回到 4 片与旧数据。pin 3c 余量仅 20 秒,另见 finding #29826。 - 先看:`scripts/partition-test-shards.mjs` 里 FILE_SHARDED_PACKAGES 上方新增的「RE-DERIVED AT 2」推导表与两处映射。 - 两分钟验证:`node scripts/partition-test-shards.mjs --self-test`,应见 `self-test OK` 且 `file-level slices: @objectstack/cli x2`,最密分片 1553.36s,在 1455.81s 上限加 111.86s 闭包分摊之内。 - 需要你做的:无,席位落地后关闭 #28978。 ## What changes Implements the second slice of maintainer ruling record 6596963071 (option B) on #29777. - **`scripts/test-shard-timings.json`**: the generated refresh of 2026-11-02 (72 run summaries), byte-identical to PR #28978 head `b5b4b790` (`git diff b5b4b79 HEAD -- scripts/test-shard-timings.json` is empty). Not hand-edited. - **`scripts/partition-test-shards.mjs`**: - `FILE_SHARDED_PACKAGES` changes `@objectstack/cli` from 4 to 2. Pin 3c derives it: the CLI is 1432.04 s, and the heaviest other serial task is metadata-protocol at 566.50 s, so a slice must be within 1.3 × 566.50 = 736.45 s. At n = 1 the CLI is 1432.04 s (2.53x); at n = 2 each slice is 716.02 s (1.26x), which meets the target. The derivation table sits above the map. - `PREVIOUS_FILE_SHARDED_PACKAGES` = `{cli: 4}`, the outgoing map, so the refresh lane still decodes the 4-slice summaries it keeps. Not changed, as ruled: `ci.yml`'s `DTS_READER_SLICE` and the CLI vitest config's `DECLARATION_READER_SLICE`. ## Verification - `node scripts/partition-test-shards.mjs --self-test` exits 0. The bins are 1551.96/1551.44/1553.29/1552.46/1552.43/1553.22/1551.01/1553.36 s, within the 1455.81 s density cap plus its 111.86 s declaration-closure allowance. The whole legs stay within 1868 s, and the CLI is cut x2. - `dispatch-gates --commands`: 33 derived, 33 run, all exit 0. `--ran` reads 0 NOT-MEASURED (a derived zero). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 2a1be29 commit 4b71a82

2 files changed

Lines changed: 278 additions & 408 deletions

File tree

‎scripts/partition-test-shards.mjs‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,19 @@ export function timingModeNote(event) {
379379
// and turned load-sensitive tests red in the merge queue until #26077 reverted
380380
// it. Pin 3d (WHOLE_LEG_CAP_SECONDS, LOAD_SENSITIVE_APART) holds that line.
381381
//
382+
// RE-DERIVED AT 2 (#29777), on the refresh of 2026-11-02 (PR #28978's
383+
// dataset, carried here byte for byte): the CLI shrank to 1432.04s. `spec`
384+
// (1008.78s) and `runtime` (987.16s) each run as two tasks, so the heaviest
385+
// other serial task is still `@objectstack/metadata-protocol`'s, now 566.50s,
386+
// and a slice must sit within 1.3 x 566.50 = 736.45s.
387+
//
388+
// n = 1 1432.04s 2.53x the CLI IS the run's floor
389+
// n = 2 716.02s 1.26x meets -- metadata-protocol is the floor
390+
//
391+
// The margin is 20s (finding #29826). The whole split is now balanced, so the
392+
// density cap equals the 8-shard mean; the slice that reads built declarations
393+
// is admitted by closureAllowance() (#29777 ruling B).
394+
//
382395
// ⛔ THE COUNT IS CONFIGURED; WHETHER A RUN SLICES IS DECIDED BY THAT RUN. A
383396
// pull_request or merge_group run splits its own affected set, so planShards()
384397
// asks, of the run's own list, whether a configured package is that run's
@@ -399,7 +412,7 @@ export function timingModeNote(event) {
399412
// a change to what that generator can DECODE, which is why the map it replaced
400413
// is kept below.
401414
export const FILE_SHARDED_PACKAGES = Object.freeze({
402-
'@objectstack/cli': 4,
415+
'@objectstack/cli': 2,
403416
});
404417

405418
// THE MAP AS IT STOOD BEFORE ITS LAST CHANGE, read only by the generator's
@@ -427,9 +440,10 @@ export const FILE_SHARDED_PACKAGES = Object.freeze({
427440
// `test-core-run-summary-*`, #25771), so four days after that PR lands no
428441
// retained summary predates the change and this map decodes nothing.
429442
// The outgoing map of #22075's third round was empty -- the runs before it
430-
// carried no slice. #25870 raised the CLI from 3 slices to 4, so this holds 3.
443+
// carried no slice. #25870 raised the CLI from 3 slices to 4; #29777 lowered
444+
// it from 4 to 2, so this holds 4.
431445
export const PREVIOUS_FILE_SHARDED_PACKAGES = Object.freeze({
432-
'@objectstack/cli': 3,
446+
'@objectstack/cli': 4,
433447
});
434448

435449
// ── THE SLICE THAT READS BUILT DECLARATIONS CARRIES THEIR CLOSURE (#25870) ──

0 commit comments

Comments
 (0)