Repository navigation
test(server): share repeated setup in four slow non-cli test files, budget five distinct floors - #28599
Merged
Conversation
…sture-only boot, budget key-custody cloud-managed copies the staged rows (three fresh-salt sign-ups) into a fresh engine, manager and mount per case instead of re-staging fourteen times. posture-only reads its three identical posture-only boots from one boot in a hook. key-custody's five boots are each a distinct subject: line-2 budget. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5kTs9zGs8tcMtB1Kys
… the card-shape passes, budget the distinct floors boot-reconcile walks the 2,500-row history once in the describe's hook and three cases boot over a copy of what it left. promotion-selection runs one pass per natural order for both the per-order and same-answer cases. Line-2 budgets for the files whose remaining floor is distinct real work. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5kTs9zGs8tcMtB1Kys
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): |
Contributor
Author
|
domain:server#1 · os-project-manager · session_01R1q2xdtYgU6FKrZ7LgjPCC 席位核对 · ACCEPT ·
|
| item | reading |
|---|---|
| Shape | Draft, base main, Part of #23181. Exactly slice 26's six non-cli files, labels tests + skip-changeset. Clause-②: no, Metadata-protocol: none. |
| Diff check (seat) | cloud-managed: the three production-scrypt sign-ups stage once in beforeAll (env saved and restored, managed mode off); each case still gets a fresh engine, AuthManager and mount over a structuredClone of the staged rows, so no case sees another's writes. boot-reconcile: the first walked boot runs once in the describe's hook with its readings taken while up; the three cases that repeated it boot over a file copy of that database, and the forced-rebuild control still walks every row. promotion-selection: one pass per natural order feeds both the per-order cases and the same-answer case, assertions unchanged. posture-only: the three identical posture-only boots fold into one hook boot; the env reading before, while up and after stop() is still asserted, and the two other boots keep their own setup. Every assertion and its explanatory comment is kept. Line-2 // test-budget: 20 on five files; cloud-managed takes none (its remainder is the shared helper, now slice 30). No helper outside the six files is touched; no timeout is raised. |
| Evidence | CI green on head 978d4163 (35 success, 18 skipped, 0 failed). Mergeable state clean. Governed check: NOT governed, 276 changed lines. The report gives 54 of 54 derived gates exit 0, --ran reconciled, and A/B N=3 of −66 % (cloud-managed), −29 % (posture-only), −16 % (promotion-selection), −14 % (boot-reconcile). |
| Landing | 「按照 pm-dispatch 规则复核过的都授权」 (Leehom, 2026-10-25T11:35Z): ready and auto-merge through the relay, once every check on this head is green or an expected skip. |
Generated by Claude Code
This was referenced Nov 1, 2026
Merged
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 Leehom · project thread
Part of #23181 (slice 26). The card stays open: other
domain:serverfiles still read over 10 s (slices 24, 25, 27 and 28 hold the cli ones), and one cause found here needs a shared helper this slice may not edit (Acceptance notes).Clause-②: no
Metadata-protocol: none
维护者速读
// test-budget: 20头,因为剩下的地板是互不相同的真实工作。files[]都只发dist、README、CHANGELOG,不发布任何东西;用例名和断言一条没删、没放宽(四个改动文件 base/head 用例名逐条一致);回滚即 revert。packages/plugins/plugin-auth/src/cloud-managed.test.ts(produceStagedRows+ 每例structuredClone复制);packages/plugins/plugin-pinyin-search/src/boot-reconcile.integration.test.ts(beforeAll的首次遍历与fromWalked);packages/verify/src/harness.posture-only.test.ts(合并的启动)。pnpm --filter @objectstack/plugin-auth exec vitest run --maxWorkers=2 src/cloud-managed.test.ts→ 32/32 通过,文件行约 2 s(base 约 6.5 s)。What changes
The six files slice 23's offender table (
pm-orders/server/evidence/23181-s23/offenders-after-s23.md) lists outsidepackages/cli, read from the default reporter's per-file module line in the Test Core shard logs of the scheduledci.ymlruns41199450735,41217827347,41237094739,41255489006and41271604267:plugin-auth/src/cloud-managed.test.ts#8243cases re-run by importingimpersonation-bearer-rotation.testbeforeAll; each case builds a fresh engine,AuthManagerand mount over astructuredCloneof the staged rows. No header (see Acceptance notes)plugin-pinyin-search/src/boot-reconcile.integration.test.tsbeforeAll(readings taken while it is up); the three cases boot over a copy of the database it left (fromWalked). Header 20rest/src/meta-draft-head-package-inheritance.test.ts/metaroutesverify/src/harness.key-custody.test.tsbootStackboots, all in hooksOS_SECRET_KEY, restart pair)verify/src/harness.posture-only.test.tsbootStackboots → 3beforeAlltakes all three cases' readings (tenancy fields andorg-scopingwhile up, the posture before, during and afterstop()). Header 20plugin-security/src/bootstrap-platform-admin-promotion-selection.test.tsbeforeAll; both sets of cases read it. Header 20Headers (ruling 6181973363 letter B, class
spawns the real producer once per single-cause fixture): N = the slowest of the five CI readings × 1.25, rounded up to 10 s; 20 for all five. Where the file also changed, the header keeps its pre-change CI reading. All five parse withreadTestBudget(scripts/measure-test-shard-timings.mjs);cloud-managedreadsnull(no header).Not changed: no case name, assertion, timeout, tier or project; no source file; no test helper (the shared
createMemoryEnginedouble,audience-gate-test-support, the verify harness and the security testkits are untouched).Tests
A/B (one box, one lock hold, base copied beside head as
zzbase.*, interleaved, N=3,--maxWorkers=1, default reporter file line; copies deleted before the gate run):cloud-managedharness.posture-onlypromotion-selectionboot-reconcile.integrationEvery run exit 0, same test counts both sides (32, 5, 25, 8).
vitest liston base and head gives the same case names for all four files (posture-only's three cases sit one describe deeper).Header-only files, run on head:
meta-draft-head-package-inheritance25/25,harness.key-custody7/7.pnpm --filter PKG typecheck(tsc +check:test-typecheck) exit 0 for@objectstack/plugin-auth,plugin-pinyin-search,rest,verify,plugin-security.No ablation: no tested behaviour changed (test-only).
Acceptance notes
cloud-managedre-runs another file's ten cases. It importscreateMemoryEnginefromimpersonation-bearer-rotation.test.ts, and importing that file registers its ten#8243cases in the importer. On head they are about 2.3 s of the file's per-case time, against 0.85 s for its own 22 cases. 32 test files inplugin-authimport that double the same way, so each re-runs the same ten cases. The fix is a registration guard in that file (the shapemetadata-protocol/src/protocol.lock-one-resolution.kit.test.tsalready uses: register its suites only when it is the file under test), which is a helper shared beyond this slice's files, so it is not in this PR. That is whycloud-managedtakes no header: its remainder is not distinct work. Carrier: test budget (domain:cli): 119 test file(s) over 10 s of wall in the hourly full battery (Part of #23151) #23181.skip-changeset. Test-only. All five packages shipfiles: ["dist", "README.md", "CHANGELOG.md"]; after build, a source symbol from each package is in itsdist/(positive control) and a fixture string from each changed test is not, so nofiles[]content changes.Verification
All readings on head
978d4163(two commits, then one merge oforigin/mainafter slice 23, #28581, landed).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon the final head → 54 families, each run with its exit code captured before any pipe, all exit 0, after a fullpnpm exec turbo run build --concurrency=2(thecheck:dual-build-cjs-loadsandcheck:i18nprerequisites) andgit fetch --depth=1of the commit the teardown-shape self-test names.--ranreconciliation:✓ dispatch-gates --ran: 54 derived famil(ies) accounted for — 54 run, 0 NOT-MEASURED. List:pm-orders/server/evidence/23181-s26-gates-ran-978d4163.txtin the project files.pnpm exec eslint --no-inline-configover the six files exit 0 (none of the five packages has alintscript; the repo-widepnpm lintis CI's);node scripts/check-commit-card-trailers.mjs --range origin/main..HEADexit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5kTs9zGs8tcMtB1Kys