Skip to content

test(lint): the two lazy-deps contract files declare their whole-package-import budget - #23888

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-23180-lint-rows
Oct 16, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-23180-lint-rows

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Part of #23180
Clause-②: no

This PR covers the card's two @objectstack/lint rows: src/runtime-lazy-deps.test.ts (19.2 s, run 38314183560) and src/lazy-deps.test.ts (18.0 s, run 38267594064). Each file gets one header line in ruling 6181973363's spelling, class whole-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/lint closure, taken through os-verify-lock.sh. In every run each VERDICT line read command-exit 0.

reading lazy-deps runtime-lazy-deps
file alone (vitest Duration) 16.97 s 15.37 s
of which: the one in-process cold import case 14.46 s 11.96 s
of which: the spawned built-dist probes (one node per format, plus the positive control) 1.10 + 1.11 s 0.87 + 0.98 + 1.29 s
inside the package's own run (vitest run, 140 files) 5.22 s 5.31 s
  • Where the in-process case's time goes. A DEBUG=vite:transform,vite:load trace of the runtime file's flow case puts ~11.5 s of its 13.8 s in the gaps after vite transforms each @objectstack/spec dist 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 .mjs files). 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.
  • No repeated work. Each file imports its entry once. The in-process cases after the first reuse the module. Each spawned child answers a different question (CJS, ESM, the positive control). That leaves the "whole-package import" class: the in-process case's job is to prove what a cold import of the package entry loads (the barrel in lazy-deps, the kernel-safe ./runtime entry in runtime-lazy-deps, which reaches the whole gate graph). Hollowing that import would change what the file proves. The precedent is packages/spec/src/shared/alias-integrity.test.ts, which declares the same class for a floor of vitest's transform of the whole package.
  • The number. Item 2 of the ruling: the card's slowest CI reading x 1.25, rounded up to the next 10 s. 18.0 x 1.25 = 22.5 and 19.2 x 1.25 = 24.0, so both are 30. No refresh PR has landed on main since the card's census (scripts/test-shard-timings.json was 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 in beforeAll and 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 to main, so the PR's diff is the two header lines alone.

Readings of the declarations

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, then check:test-typecheck: OK).
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack on 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 are check-plugin-teardown-shape.mjs --self-test (a shallow clone), check:dual-build-cjs-loads and check:lean-entry-closure (the workspace is not fully built here). --ran reconciles: 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/lint ships dist, README.md and CHANGELOG.md. On the built tree, the header string has 0 hits in those paths. The positive control runRuntimeAuthoringRules has 10 hits in dist. npm pack --dry-run lists 23 files and no test file. So skip-changeset applies.

Acceptance notes

  • A lever outside this PR's surface, measured but not taken. The claim limits this PR to the two test files and packages/lint test helpers. In a paired A/B, test.server.deps.external: [/\/packages\/spec\/dist\//] in packages/lint/vitest.config.ts hands 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 under packages/lint/src calls vi.mock or vi.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, and packages/cli/vitest.config.ts records a measurement against externalising more workspace dist/ for speed there. So this is a package-wide decision for the seat, not a rider on two rows.
  • On this shared box, the whole-package pnpm --filter @objectstack/lint test run 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

…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>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

Nothing 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): node scripts/docs-audit/affected-docs.mjs --json 94114c1f269f6b3d885f24b6f4689dce29504574 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 · ACCEPT · PR #23888 @ aed22b27f5 (#23180, the two @objectstack/lint rows) · domain:spec seat 1 · os-elon-musk · session session_01HjR8RUwTPQ3TgbfKihmxp9 · 2026-10-16T12:11Z

Reviewer of record. Every item below was checked against GitHub and the code, not against the report (6214605271 on #23180).

  • Shape: Draft, base main. The first line is Part of #23180, with no closing keyword, then Clause-②: no, matching claim 6213681955. 2 files, +2/−0, none governed. skip-changeset (test files only). Assignee os-elon-musk.
  • The two lines, read against ruling 6181973363:
    • Each file carries one header line on line 2, below the copyright line, in the grammar scripts/measure-test-shard-timings.mjs parses (TEST_BUDGET_LINE, :1260). Each names the class whole-package import, one of the ruling's two.
    • The class fits what each file measures: one cold in-process import of the lint barrel and of the @objectstack/lint/runtime entry, plus one node spawn per built-dist probe.
    • The arithmetic follows item 2. 18.0 s × 1.25 = 22.5 and 19.2 s × 1.25 = 24.0 both round up to the next 10 s, 30. The CI readings are the card's census runs; no refresh has landed since chore(ci): refresh the Test Core shard-timings dataset #23141.
    • No assertion moved. The net diff is the two lines: the concurrency attempt 85d66753 is taken back in aed22b27, and the squash lands only the net.
  • PR B not opened, accepted: compliance-families-retirement.test.ts no longer reproduces its census row (5.1-7.7 s on CI in the three executed hourly runs cited in PR test(spec): four ruled-class test files declare their measured CI budget #23613's report, 4.95-5.22 s here). Its wall is a needed barrel import plus one walk, with no repeated work, so a change would be pressed onto a dead premise. The row stays on the card until the next refresh list decides it. The empty branch claude/issue-23180-compliance-families-row carries no commit.
  • The open question, the seat's call: A. This PR lands the two lines. The vitest-config lever (externalise @objectstack/spec's dist: package hold 98 s → 60 s in the dev's paired A/B) is filed as lint(test): packages/lint's vitest inlines the linked @objectstack/spec dist, so the first test file to import a lint entry pays ~10 s of cold transform — externalising it measured the package's test hold at 60 s against 98 s #23900. It is a package-wide resolution policy, not a rider on two rows.
  • CI on this head: 34 success, 10 skipped by their filters, 0 failed. No contract review is owed: test files only, no contract face.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 16, 2026 12:13
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 16, 2026 12:13
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit a13fd4d Oct 16, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-23180-lint-rows branch October 16, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants