Repository navigation
test(lint): the two lazy-deps contract files declare their whole-package-import budget - #23888
Merged
Merged
Conversation
…rocess import Each of the two boot-path contract files spawned its built-entry probes one after another (two in lazy-deps, three in runtime-lazy-deps), then cold-imported the source entry in-process. The children are independent processes, so they now start together in beforeAll and each case awaits its own child's stdout, after the in-process cases, which overlap them. Every assertion and child script is unchanged. Claude-Session: https://claude.ai/code/session_01PaFAtTG4vuRcRwFYo3F5z5 Co-authored-by: Claude <noreply@anthropic.com>
…age-import budget Takes back the previous commit's concurrent dist probes. Measured in the package's own run, starting the probes together moved each file's in-process import ahead of every other worker's, so each file then paid the cold transform of @objectstack/spec's inlined dist bundles itself: lazy-deps went from 5.2 s to 12.7-14.2 s and runtime-lazy-deps from 5.3 s to 12.3-13.9 s. Both files are back to their base bodies. Both files cold-import a @objectstack/lint entry in-process (the barrel in lazy-deps, the runtime entry in runtime-lazy-deps) to prove what that import and each gate load. Run alone, that one import is 11.8-14.5 s of each file's wall: vitest inlines and transforms every @objectstack/spec dist bundle the graph reaches, while a native import of the built entry takes 0.86 s. The spawned built-dist probes are one node per format and are needed. So each file takes ruling 6181973363's "whole-package import" line: the card's slowest CI reading (18.0 s and 19.2 s) x 1.25, rounded up to 30 s. Claude-Session: https://claude.ai/code/session_01PaFAtTG4vuRcRwFYo3F5z5 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): |
This was referenced Oct 16, 2026
Contributor
Author
席位核对 · ACCEPT · PR #23888 @
|
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 #23180
Clause-②: no
This PR covers the card's two
@objectstack/lintrows:src/runtime-lazy-deps.test.ts(19.2 s, run38314183560) andsrc/lazy-deps.test.ts(18.0 s, run38267594064). Each file gets one header line in ruling6181973363's spelling, classwhole-package import, budget 30 s. No other line changes: the net diff is +2 / -0 over the two test files. #23180 remains open for its other rows, and the next refresh PR's list decides these two.What the wall is (measured first)
All local readings are shared-box seconds on a built
@objectstack/lintclosure, taken throughos-verify-lock.sh. In every run eachVERDICTline readcommand-exit 0.lazy-depsruntime-lazy-depsDuration)nodeper format, plus the positive control)vitest run, 140 files)DEBUG=vite:transform,vite:loadtrace of the runtime file's flow case puts ~11.5 s of its 13.8 s in the gaps after vite transforms each@objectstack/specdist bundle the lint graph reaches (dist/index.mjs,system/,kernel/,ui/,api/,shared/,data/,automation/…, 2.1–2.9 MB each, 33 MB across the 24.mjsfiles). A pnpm-linked workspace package has no/node_modules/in its realpath, so vitest inlines it. A native import of the built lint entry takes 0.80–0.86 s, against 12–14 s through the transform.lazy-deps, the kernel-safe./runtimeentry inruntime-lazy-deps, which reaches the whole gate graph). Hollowing that import would change what the file proves. The precedent ispackages/spec/src/shared/alias-integrity.test.ts, which declares the same class for a floor of vitest's transform of the whole package.mainsince the card's census (scripts/test-shard-timings.jsonwas last refreshed by chore(ci): refresh the Test Core shard-timings dataset #23141 on 2026-10-13), so the card's readings are the newest.A fix tried and taken back
The branch's first commit (
85d66753) started the dist probes together inbeforeAlland awaited each one in its own case, after the in-process cases. Run alone, the files dropped to 13.5 s and 12.1 s. In the package's own run, though, they rose from 5.2 s to 12.7–14.2 s and from 5.3 s to 12.3–13.9 s. Moving the in-process import ahead of every other worker's meant each file now paid the cold spec-bundle transform itself, where before another file had already warmed it. The cost only moved, and these two rows got worse. The second commit (aed22b27) restores both bodies byte-identical tomain, so the PR's diff is the two header lines alone.Readings of the declarations
readTestBudgeton each file, the one-liner from PR feat(scripts): a test file of either ruled class is listed over its own declared budget, not the 10 s line #23595: exit 0, returning{ seconds: 30, cls: "whole-package import", line: 2 }for both.declaredBudgetInTree('@objectstack/lint', FILE), the refresh's own resolution: 30 and 30.whole-packge importis refused attypo:2: the class "whole-packge import" is neither class the ruling names.Tests and gates (head
aed22b27)pnpm --filter @objectstack/lint test: 140 files, 6781 tests, all passed (VERDICT command-exit 0).pnpm --filter @objectstack/lint typecheck: exit 0 (tsc --noEmit, thencheck:test-typecheck: OK).node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon this branch's diff derives 51 commands. 48 exited 0. Three exited 3 with PREREQUISITE NOT MET, so they read NOT MEASURED, not pass. The three arecheck-plugin-teardown-shape.mjs --self-test(a shallow clone),check:dual-build-cjs-loadsandcheck:lean-entry-closure(the workspace is not fully built here).--ranreconciles:51 derived famil(ies) accounted for — 48 run, 3 NOT-MEASURED. CI runs every family on a fresh, full checkout.Changeset
None. The edit is two comment lines in two test files.
@objectstack/lintshipsdist,README.mdandCHANGELOG.md. On the built tree, the header string has 0 hits in those paths. The positive controlrunRuntimeAuthoringRuleshas 10 hits indist.npm pack --dry-runlists 23 files and no test file. Soskip-changesetapplies.Acceptance notes
packages/linttest helpers. In a paired A/B,test.server.deps.external: [/\/packages\/spec\/dist\//]inpackages/lint/vitest.config.tshands those bundles to Node. Run alone, the files drop from 16.97 to 6.86 s and from 15.37 to 6.45 s. The whole package's lock hold drops from 98 s to 60 s. All 6781 tests still pass, and no file underpackages/lint/srccallsvi.mockorvi.doMock. In the package's own run the two files move only from 5.22 to 4.55 s and from 5.31 to 4.81 s. The config's header warns that any key there re-specifies every file in the package, andpackages/cli/vitest.config.tsrecords a measurement against externalising more workspacedist/for speed there. So this is a package-wide decision for the seat, not a rider on two rows.pnpm --filter @objectstack/lint testrun read the two files at 16.7 s and 17.6 s while the 51-command gate battery ran beside it. That is load, not the files.Generated by Claude Code