Repository navigation
ci(test-shards): the density cap carries the declaration closure's own displacement when a split carries the reader slice - #29838
Merged
objectstack-fleet[bot] merged 2 commits intoNov 3, 2026
Conversation
…n displacement when the split carries the reader slice The reader slice's closure charge (783 s of packing weight) moves that much whole-package work onto the other shards. When the whole-package split is balanced the density cap is its mean, so no split carrying the charge could ever come back within it, at any slice count: on the 2026-11-02 refresh the cap read 1455.81 s and the CLI cut 2/3/4 ways reached 1552.68/1552.77/1552.63 s, so the full list ran the CLI whole as one 1432 s serial task. A candidate split that carries the reader slice is now judged, and repaired, against the cap plus DECLARATION_CLOSURE_CHARGE_SECONDS / (shardCount - 1); a split without it keeps the bare cap. The self-test's hard constraint is scored against the same adjusted cap; the cap-definition pin and the capFixture controls are unchanged. Four new cases pin the allowance on the refresh's frozen package weights: x2 is admitted within 1567.67 s, a split with no reader slice is allowed nothing, and a split past the cap plus its allowance is refused by name. Today's committed dataset splits byte-identically: every shard's stdout and stderr, the items, the bins and the cap; the slice decision record gains one `allowance` key. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
…en the bins exceed the bare cap The success line said "within the <cap> density cap" from the bare cap alone; once a dataset slices only through the allowance (bins 1553 s against a 1455.81 s cap on the 2026-11-02 refresh) that sentence would be false. It now names the allowance exactly when the bare cap did not decide, so today's line is byte-identical. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
Contributor
Author
|
domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd 席位核对 — ACCEPT ·
|
objectstack-fleet
Bot
deleted the
claude/issue-29777-partitioner-slice-spread
branch
November 3, 2026 07:33
This was referenced Nov 3, 2026
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.
Requested by 田騏 · project thread
Fixes #29777
Clause-②: no
Metadata-protocol: none
维护者速读
scripts/partition-test-shards.mjs的closureAllowance()与planShards()里 WITHIN CAP 那几行;再看自检新增的四个「declaration-closure allowance」用例。node scripts/partition-test-shards.mjs --self-test,应见self-test OK,且 bins 仍为 1600.11/1597.48/1597.14/1599.09/1598.01/1597.78/1599.48/1597.04s。What changes
scripts/partition-test-shards.mjsonly, implementing maintainer ruling record 6596963071 (option B, the first of its two slices):closureAllowance(items, shardCount)(new):DECLARATION_CLOSURE_CHARGE_SECONDS / (shardCount - 1)when the items carry the declaration-reader slice's closure charge,0otherwise and on a one-shard run. Its docblock carries the measured reason. The charge (783 s of packing weight) moves that much whole-package work onto the other shards. So when the whole-package split is balanced, the density cap (its densest bin) is the mean, and no split carrying the charge can come back within it at any slice count. On the 2026-11-02 refresh the cap read 1455.81 s against 1552.68 / 1552.77 / 1552.63 s for the CLI cut 2 / 3 / 4 ways, so the full list ran the CLI whole.planShards(): the WITHIN CAP check, and the repair placement behind it (placeItems/refineToCap), judge a candidate split againstcap + closureAllowance(candidate). The final placement uses the same. Each decision records itsallowance.renderSliceDecision(): names the allowance only when it was part of the verdict (a refusal past it, or a slicing only it admitted), so the shard log never claims a cap the split did not meet. Today's lines are unchanged.capFixturerefusal/admission controls.density cap and the per-run slice decisionbattery, whose floor is raised 14 to 18. They are built on the refresh's package weights frozen in the test (79 packages from PR 28978 headb5b4b790, not read from the dataset file), at 8 shards:Not changed, as ruled:
scripts/test-shard-timings.json,FILE_SHARDED_PACKAGES/PREVIOUS_FILE_SHARDED_PACKAGES,ci.yml'sDTS_READER_SLICEand the CLI vitest config'sDECLARATION_READER_SLICE. The dataset and map swap (CLI 4 to 2, previous = 4) is the ruling's second slice, a separate lane PR that replaces PR 28978.Tests
Measured on
objectstack-ai/objectstackat heade9569e920e(merge baseb0ef25f524).node scripts/partition-test-shards.mjs --self-test, committed dataset: exit 0, and the verdict line is byte-identical to the base's.1/8..8/8on a full-list document with--exclude @objectstack/dogfood: stdout and stderr are byte-identical on all 8. In the plan JSON (planShardson the full list, as the self-test builds it),items,bins(1600.11/1597.48/1597.14/1599.09/1598.01/1597.78/1599.48/1597.04) andcap(2697.45) are identical. The one difference is the added decision key"allowance": 111.85714285714286.b5b4b790), scratch tree, not committed. At head the self-test is red on one check only: pin 3c, "sliced 4 ways ... Lower it to 3". That is the map swap the second slice carries. At base it was red on 7, the first beingslice spread. With the second slice's map applied in scratch (CLI 2, previous 4): exit 0,bins 1551.96/1551.44/1553.29/1552.46/1552.43/1553.22/1551.01/1553.36s within the 1455.81s density cap plus its 111.86s declaration-closure allowance, whole legs within 1868 s, CLI x2.closureAllowancemutated toreturn 0, marker grep-confirmed): exit 1. With failures collected, the three cases that depend on the allowance go red and the "not carried" case stays green. Restored by byte comparison; the restored self-test exits 0.nightly-tiers,check-test-suite-ceilings,measure-test-shard-timings,ci/select-shard-timings-run,ci-shard-matrix,check-test-completenessall exit 0.Acceptance notes
skip-changeset.Verification
Derived gates: 31 of 31 exit 0, reconciled with --ran
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackate9569e920ederived 31 commands (17 pnpm, 14 node). All 31 were run with exit codes captured before any pipe, afterpnpm install --frozen-lockfile. A first pass withoutnode_modulesgave PREREQUISITE NOT MET (exit 3) on 6 commands and 1 environment finding; all reran green after the install.pnpm check:pm-dispatch-gatesexit 0 (fast tier, 1945 cases).--ran: "31 derived famil(ies) accounted for, 31 run, 0 NOT-MEASURED (a DERIVED zero, all 31 recorded an exit code and none of them is 3)". The derivation names one path-scheduled CI step (Plan Test Core shards) and the type-check lanes as NOT MEASURED locally; CI runs those.Session: https://claude.ai/code/session_017ihL2gLghEqeDKTbDTC7Zd
🤖 Generated with Claude Code