Repository navigation
test(metadata-protocol): lock-one-resolution runs as four shards under the 10 s budget (#23182 row 1, step B) - #23790
Merged
objectstack-fleet[bot] merged 4 commits intoOct 16, 2026
Conversation
…les over one shared helper (#23182 row 1, step B) Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-authored-by: Claude <noreply@anthropic.com>
…ows the double into the shared helper (#23182 row 1, step B) Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-authored-by: Claude <noreply@anthropic.com>
…d split (#23182 row 1, step B) Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-authored-by: Claude <noreply@anthropic.com>
…r the 10 s budget (#23182 row 1, step B) The table's 16 320 rows run in four shard files over one shared helper (protocol.lock-one-resolution.kit.test.ts). The rows that share a read request stay in one shard, so step A's four-to-one read memo holds in each. A pin in the helper fails when a row is in no shard or two, a read group is split, or a shard file is missing, renamed or empty. Same 16 360 test titles, plus the pin's two tests; the engine double moves into the helper with its ledger row. Claude-Session: https://claude.ai/code/session_01ADzJtzYTLUfgrRZHxkagkX Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
objectstack-fleet
Bot
deleted the
claude/issue-23182-lock-one-resolution-shards
branch
October 16, 2026 03:34
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.
Part of #23182 (row 1)
Clause-②: no
This PR is step B of row 1 of #23182:
@objectstack/metadata-protocol,src/protocol.lock-one-resolution.test.ts. Step A (#23755,4fe8b3def0) took each read once and left the single file at about 8 s alone and 21 to 28 s in a CI-shaped package run. This step splits the 16 320 generated rows over four shard files, as the seat answered in comment 6204945326 (A+B, K=4). It changes test files and one ledger row, and no production file. #23182 stays open: this PR does not close row 1 by itself (its pin is the next refresh's list, owed to the refresh), and rows 5 and 6 are separate.What the split is
protocol.lock-one-resolution.kit.test.ts(new)readScenario,agree, the partition, and the shard-set pinprotocol.lock-one-resolution.shard-1.test.tstoshard-4.test.ts(new)registerRowShard(); the shard a file is comes from its own nameprotocol.lock-one-resolution.test.ts(kept)requestScopeandoperation, which no read takes: one read group is a row's title with those two axes blanked (readGroupOf). Groups are numbered in the table's own order, and group n is run by shard (n mod 4) + 1. A group is never split, so step A's four-to-one read memo holds inside every shard. It is a pure function of the table, so a row, slice or axis added later lands in a shard by the same rule. Each shard holds 1 020 groups, 4 080 rows.kit, always run: it is a test file). Two tests. The first: the shards' rows are the table's, once each (counted with repeats, as a set, and by identity against the table's titles), no shard is empty, and every read group is whole, in one shard, and of exactly scope times verb rows. The second: the shard files on disk are exactly the four expected names, and each one callsregisterRowShard()on a line of its own. A shard file whose name is not one of the four fails at collection (the count is read from the file name, so a rename cannot leave rows unrun)..test.tsfile. Three gates read engine doubles and each walks*.test.tsfiles only (check:engine-double-contract,check:where-matcher,check:objectql-double-limit). A double in a*.testkit.tsfile would have left all three, andcheck:engine-double-contractwould have called the leaving row the check:engine-double-contract has no ratchet on its DISCOVERED population — deleting a pinned double'sdelete()member takes 319 pinned to 318 and the gate stays green #9680 defect. Sharing a double through a test file is already this repository's practice (impersonation-bearer-rotation.testis imported by fifteen plugin-auth tests). What an import must not do is run the helper's own tests in the importer: the helper registers its two tests only when it is the file vitest was started on (expect.getState().testPath).scripts/engine-double-contract.pinned.jsonchanges by one row, thefindOnerow, fromprotocol.lock-one-resolution.test.tsto the kit.check:engine-double-contract --writeprinted "922 (file, verb) row(s), 1 added or grown, 1 lost"; the one lost is the old path, and the double it names is the one the new row names, so coverage is unchanged.check:where-matcherandcheck:objectql-double-limitread the moved double and report none new.Wall time
Vitest module line in ms, a shared 4-core box under
os-verify-lock, default reporter,--maxWorkers=2, each file alone. BASE is the single file onorigin/main6362c66ca8(a copy run beside the branch's files); the branch readings are atc19398bd2f, and the final commit7686410907changes comments only.--maxWorkers=4(each shard beside the others)--maxWorkers=8(2x oversubscribed), the slowest fileROW_SHARDS) plus the shard files, and the pin stays red until the two agree.Ablation: the rows still go red on the same titles, and the pin goes red on a lost row
Each leg mutated production source through
scripts/ablation-replace.mjs(anchor 1 to 0, a unique replacement, blob changed on disk), ran a copy of the single file onorigin/mainand the six branch files in one vitest run, and restored the path to its HEAD blob withgit diff HEADempty. The subject is imported by relative path fromsrc, so no dist is in play. Red sets are compared by full title.item-lock.ts)item-lock.ts)item-lock.ts)protocol.ts, temporary, restored)The pin stays green under all four, since none of them touches the partition. These counts are the ones step A measured.
The pin's own legs (kit tests plus the four shards; the first three by deleting, renaming or editing a tracked file and restoring it with
git checkout HEAD):shard-4deletedshard-2renamed toshard-9shard-9itself at collection (the name is not one of the four)shard-3loses itsregisterRowShard()callshard-3("No test suite found")shard-4at collectionM1 is the case the pin exists for: a lost quarter-percent of the table, with every remaining test green.
Verification at
7686410907pnpm --filter @objectstack/metadata-protocol typecheckexits 0;tsc --listFilesnames all six files.eslint --no-inline-config --format json: 6 files, 0 errors, 0 warnings.--print-configreturns a config for the kit, with parserOptionsecmaVersionandsourceTypeonly: type-aware linting is off, so this diff cannot move any other file's result.dispatch-gatesover the 7 changed paths derives 59 commands. All 122 distinct commands (the 59, plus the 53 artifact-roster and 11 wide-population families it names, one shared) ran at this head after a fullturbo run build(74 tasks): 118 exit 0 and 4 exit non-zero. The four are PR-context guards that judged nothing and say so (check-closing-target-claim,check-single-claim-paths,check-partof-closing-keyword,check-governed-queue-guard): NOT MEASURED, not red.dispatch-gates --ranwith exit codes: 59 derived, 59 run, 0 NOT-MEASURED, 0 UNRUN.origin/main, with two files it derives from changed upstream (scripts/check-route-envelope.mjsand an adr-anchors file forpackages/rest/src/discovery-routes.ts: thecheck:route-envelopefamily, whose population is non-test sources inpackages/rest, which this diff does not touch). I did not mergemain, as the card says.check:nul-bytesexits 0.No changeset
This diff changes only test files under
packages/metadata-protocol/srcand one repository ledger underscripts/; the package'sfiles(dist,README.md,CHANGELOG.md) ships none of it.skip-changesetis the label, as on step A.Acceptance notes
protocol.tsonce (see the import-phase reading above); that cost is carried by this split and is the price the seat's answer named.Generated by Claude Code