Repository navigation
test(server): share repeated boots in four server test files and budget the 17 files between 10 and 13 s - #28631
Merged
Conversation
Four files booted the same setup in several cases that only read it: the plain bootStack in harness.served-composition (3 to 1), the kernel in sys-user-default-row-scope (10 to 2), and the seeded real stack in meta-history-diff-authoring-door (20 to 1) and meta-draft-read-builder-gate (21 to 1). Each now boots once in a hook; spies and the dataset mock are cleared before each case, as a fresh boot left them. All 17 files take a line-2 test-budget header (20) from their slowest of the five scheduled CI readings x 1.25: what remains is distinct real work. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5mAySGuLppSnAtNXaa
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 33's 17 non-cli files, labels tests + skip-changeset. Clause-②: no, Metadata-protocol: none. |
| Diff check (seat) | Four files share one boot in a hook, each with its reason written beside it, and the seat read the case bodies against it: meta-draft-read-builder-gate and meta-history-diff-authoring-door only read after seeding, and their spies are cleared before each case as a fresh boot left them; sys-user-default-row-scope cases each assert on their own read context, and the only rows written (hook_probe) are read by no case; harness.served-composition shares the plain one-package boot across the slate, cube and mail controls, and only the mail control sends (its sys_email count is its own). Teardown moves from afterEach to afterAll to match. Line-2 // test-budget: 20 on all 17. No assertion changes, no shared helper touched, no timeout raised. |
| Evidence | CI green on head 9f399f58 (35 success, 18 skipped, 0 failed; the CI and Lint & Type Check workflow runs both success). Governed check: NOT governed, 156 changed lines. The report gives 54 of 54 derived gates exit 0 on the merged head and A/B N=3 of −30 % (served-composition), −69 % (sys-user-default-row-scope), −79 % (meta-history-diff), −78 % (meta-draft-read-builder-gate). |
| 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 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 33). The card stays open for later slices:
plugin-auth/src/invitation-delivery-outcome.test.ts(10.5 s) is left to slice 30's effect, and slices 29–32 hold other files.Clause-②: no
Metadata-protocol: none
维护者速读
// test-budget: 20头。files[]都只发dist、README、CHANGELOG,不发布任何东西;用例名和断言一条没删、没放宽(4 个改动文件 base/head 用例名逐条一致,且在 3 个随机顺序种子下全过);回滚即 revert。packages/rest/src/meta-history-diff-authoring-door.test.ts(共享启动 + 每例前清空 spy);packages/services/service-automation/src/sys-user-default-row-scope.integration.test.ts(两个beforeAll);packages/verify/src/harness.served-composition.test.ts(共享的 plain 启动)。pnpm --filter @objectstack/rest exec vitest run --maxWorkers=2 src/meta-history-diff-authoring-door.test.ts→ 20/20 通过,文件行约 0.5 s(base 约 2.3 s)。What changes
The 17 files the order lists from slice 23's offender table (
pm-orders/server/evidence/23181-s23/offenders-after-s23.md), read from the default reporter's per-file module line in the Test Core shard logs of the scheduledci.ymlruns41199450735,41217827347,41237094739,41255489006and41271604267. "local" is the same file line from one run on this box (--maxWorkers=1, based94dd3a65d).plugin-security/src/rls-check-stored-form.test.tsruntime/src/plugin-driver-external-object.spike.test.tsbeforeAllrest/src/meta-history-diff-authoring-door.test.tsboot()(six saves) per case; every case only readsbeforeAll, spies cleared before each case; header 20plugin-auth/src/walled-owner-operator-stamp.test.tsAuthManagerplugin-security/src/rls-stored-list-ordering-fails-closed.test.tsverify/src/harness.required-providers.test.tsbootStackverify/src/harness.served-composition.test.tsbootStackbeforeAll; header 20plugin-security/src/org-admin-assignment-boundary.posture.test.tsservice-automation/src/sys-user-default-row-scope.integration.test.tsboot()per case in each describe; the only case writes arehook_proberows no case readsbeforeAll; header 20runtime/src/installed-plugin-loader.test.tsverify/src/held-session-impersonation-target.pin.test.tsbootStackinbeforeAllplugin-auth/src/scim-deactivation-reconcile-user.test.tsAuthManagerper caserest/src/meta-draft-read-builder-gate.test.tsboot()(seven saves) per case; every case only readsbeforeAll,queryDatasetcleared before each case; header 20verify/src/held-session-platform-admin.pin.test.tsbootStackinbeforeAllruntime/src/app-automation-identity-write-refusal.integration.test.tsruntime/src/sandbox/quickjs-runner.test.tsverify/src/handle.test.tsCause across the set. Every file reads 1.6–6.2 s locally, and its CI readings spread two to four times across runs of the same code (
walled-owner-operator-stamp3.4 s and 11.9 s): the overrun is the Test Core shard's concurrent load on in-process work. No file spawns a CLI; none repeats a boot beyond the four fixed here.Headers (ruling 6181973363 letter B, class
spawns the real producer once per single-cause fixture, the class slice 26 used for in-process boots): N = the slowest of the five CI readings × 1.25, rounded up to 10 s; 20 for all 17. Where the file also changed, the header keeps its pre-change CI reading and says so. All 17 parse withreadTestBudget(scripts/measure-test-shard-timings.mjs): 20 s, line 2.The shares. Only where no case writes what another reads, as the order allows:
harness.served-composition: the slate case and the cube control only read the kernel; the mail control's send leaves asys_emailrow only it counts. Its own anti-vacuity line (onePackage().requiresis undefined) stays.sys-user-default-row-scope: each case reads through its own producer, and asserts on the lastreadContextsentry its own read pushed and on the hook firing it counts from its ownbefore. In theextenddescribe the second case's contribution is refused and the case itself pins that the registry is unchanged.GETdoors,draftVersion's system read; the dataset door hands its query to thequeryDatasetspy, which stores nothing). The protocol spies (history-diff) andqueryDataset(builder-gate) are cleared inbeforeEach, as a fresh boot left them.Not changed: no case name, assertion, timeout, tier or project; no source file; no shared helper or testkit (
verify/src/harness.ts,boot-warm-up.testkit.ts,default-organization.testkit.ts,audience-gate-test-supportuntouched).Tests
A/B (one box, one lock hold, base copied beside head as
zzbase.*, each side in its own vitest invocation, order alternated per round, N=3,--maxWorkers=1, default reporter file line; copies deleted after):meta-history-diff-authoring-doormeta-draft-read-builder-gatesys-user-default-row-scope.integrationharness.served-compositionEvery run exit 0, the same test counts both sides (20, 21, 10, 7).
vitest liston base and head gives the same case names for all four files.Order independence of the shares: each changed file run plain and with
--sequence.shuffle --sequence.seed=11,=22,=33: 16 runs, all exit 0 (7/7, 10/10, 20/20, 21/21).Header-only files: all 13 run on base with the full count passing (local readings in the table); the header is a comment line.
No ablation: no tested behaviour changed (test-only).
Acceptance notes
skip-changeset. Test-only. All six packages shipfiles: ["dist", "README.md", "CHANGELOG.md"]; after the full build, a source symbol from each package is in itsdist/(positive control:bootStack,AutomationServicePlugin,RestServer,QuickJSScriptRunner,SecurityPlugin,AuthManager) and a fixture string from each package's changed tests is not (svc_note_cube,qa_star_reader,nav_atlas_launch_plan,spike_tree,qa_due_stored_,operator@corp.example), nor istest-budget:. Nofiles[]content changes.rls-stored-list-ordering-fails-closed(120 boots) andorg-admin-assignment-boundary.posture(60) could share a boot per key only if their cases stopped reading the whole table, which would change what those assertions say; left as is.Verification
All readings on head
9f399f58(one commit, then one merge oforigin/mainafter slices 24, 25, 26 and 28 landed: #28610, #28601, #28599, #28616), after a fullpnpm exec turbo run build --concurrency=2(118/118).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 (withgit 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-s33-gates-ran-9f399f58.txtin the project files.pnpm --filterthe six packagesrun typecheck(tsc +check:test-typecheck) exit 0.pnpm exec eslint --no-inline-configover the 17 files exit 0 (none of the six 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_01FEkQ5mAySGuLppSnAtNXaa