Repository navigation
test(spec): three src/ test-budget rows trimmed, two at a one-program floor left listed - #23819
Merged
Merged
Conversation
…ubled parse, not on what they assert view.test.ts loaded the ./shared, ./ui and ./api entries by await import() inside four cases; app.test.ts loaded typescript inside its compiler-API case. Both loads move to module top, where a clocked window does not count them. The allowOrgOverride absence walk parsed every file holding both the old and the new key name twice; it now parses each file once and reads both names off the one tree. Every expect is unchanged. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTJ1Sey3QK5wZbayQXfFfH
…of the readers it asserts The new-name readers are asserted by containment of a three-file list, so only those three files are parsed for the new name; the old name is still read off every file in the radius that mentions it. Every expect keeps its meaning. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTJ1Sey3QK5wZbayQXfFfH
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 · objectstack
|
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
The five
packages/spec/src/rows of the test-budget census, measured first. Three rows are trimmed in the test, with everyexpectline unchanged. Two rows are left unchanged: each one is already at its floor of one TypeScript program, which is neither of ruling record6181973363's two classes, so they get no declaration (see the last section). This PR counts no row off the card: the next refresh list decides each one, per the card's pin.Readings, per file
CI readings are the vitest module line (seconds) in the
Test Core (1/6)shard of the hourly runs that executed@objectstack/spec(nocache hitfor it in the log):38833767749(01:11, head4fe8b3def0),38838260718(02:01, headec44cf60bf) and38848429828(04:01, head9b799e6fb5). Run38843417737(03:01) replayed spec from the cache and is not used. The job-log blob host is unreachable from this container, so only each log's last 5000 lines were readable; that is why 04:01 has no reading forviewandapp.Local readings are the sum of the file's case durations (ms), from vitest's JSON reporter. Each one is a five-file run with
--maxWorkers=2underos-verify-lock.sh(shared-box ms), interleaved between a base worktree atf846cc2020and this branch. Three runs on each side.src/)contracts/scoped-context.test.tsintegration/connector-author-shape.test.tskernel/metadata-type-registry-allow-org-override-absence.test.tsui/view.test.tsui/app.test.tsThe allow-org row was re-measured alone, three runs on each side, after its second commit; the five-file runs before that commit read 1570 / 1359 / 1311 against 1235 / 1118 / 1102. If each file keeps its own CI-to-local ratio (slowest CI reading over the slowest local before-reading), the after-readings project to about 7.0 s (allow-org), 0.7 s (view) and 7.7 s (app) in the battery. That is NOT MEASURED on CI; this PR's own
Test Core (1/6)run is the first post-trim reading.The census premise still holds for all five: each row read over 10 s in at least one of the three executed runs.
Trimmed: what each one waited on
ui/view.test.ts: two cases took 1.1 to 1.6 s each, and all of it wasawait import('../shared/index'),'../ui/index'and'../api/index'inside the case, which loads three published entries. The three loads are now static imports at module top, which the census line does not count (AGENTS.md: "Clocked windows measure behaviour, never loading"). The four cases read the same module namespaces as before, so identity (toBe) assertions compare the same objects. Honest accounting: the load cost is moved, not removed. The five-file run's import phase rose from 2.4 to 2.9 s to 5.4 to 5.9 s, and its total wall went from 7.7 to 7.9 s to 7.2 to 7.7 s.ui/app.test.ts: the compiler-API case loadedtypescript(about 300 ms) andnode:path/node:urlwithawait import()inside the case. They are now module-top imports. The rest of the case is onets.createProgramoverapp.zod.ts(about 330 ms) and resolvingNavigationArea's members (about 640 ms). Neither the compiler options nor the lib set changes the latter, so that stays as is.kernel/metadata-type-registry-allow-org-override-absence.test.ts: the walk reads 8,792 files (about 290 ms, the declared radius) and parsed every file mentioning either name. Two costs were removable:spec/src/migrations/registry.ts(2.6 MB) andmetadata-protocol/src/protocol.ts(1.8 MB). Each file is now parsed once, and both names are read off that one tree (codeReferencesByName; the matcher's predicate is unchanged, andcodeReferencesis the one-name view of it).arrayContainingof three named files, so a reader anywhere else cannot change that verdict. Only those three files are now asked the new name (NEW_READERS, the same list the assertion uses). The old name is still read off every file in the radius that mentions it.Parsed bytes went from 14.6 MB to about 6 MB.
Ablations: the changed allow-org paths still go red
Run through
scripts/ablation-replace.mjsin wrap mode onpackages/metadata-protocol/src/sys-metadata-repository.ts, which holds both names and is one of the threeNEW_READERS. The expected direction was red every time, and red was observed every time. Each restore was proven by the tool: blob5630b9de7b42equals HEAD, andgit diff HEADis empty. Nodist/is on the path, because the test reads source text..filter((e) => e.allowEnvironmentOverlay)changed to.filter((e) => e.allowEnvironmentOverlay && !e.allowOrgOverride)(blob tob96bfd450123): 1 of 2 failed, on the offenders assertion, namingpackages/metadata-protocol/src/sys-metadata-repository.ts:406:52. This is the old-name leg on a file parsed once for both names..filter((e) => e.overlayGone)(blob to6132dc4d627f): 1 of 2 failed, onexpect([...newReaders]).toEqual(expect.arrayContaining(NEW_READERS)). This is the new-name leg.The
viewandappchanges move import statements and change no logic, so they have no ablation.Verification
2b6764e25d: 586 tests across the five.pnpm --filter @objectstack/spec typecheck: VERDICT command-exit 0. It includescheck:test-typecheck, which compilessrc/**/*.test.tsthroughtsconfig.test.jsonand held its debt ledger.eslint --no-inline-configon the three changed files: exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat2b6764e25dderived 76 commands from the 3 changed paths (merge basef846cc202). All 76 ran here, each exit captured before any pipe. 74 exited 0. Two of them (check-plugin-teardown-shape --self-testandlint'scheck:doc-formula-expressions) first exited 3 (PREREQUISITE NOT MET: a shallow clone, and an unbuilt@objectstack/formula); they exited 0 aftergit fetch --unshallowand a build of@objectstack/lint's dependency closure.--ranreports "76 derived famil(ies) accounted for — 74 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)". The two arecheck:dual-build-cjs-loadsandcheck:lean-entry-closure, which need every package'sdist/built. Neither reads a test file. CI runs both.npm pack --dry-runof@objectstack/spec18.0.0-next.2 lists 2094 files, 0 of them*.test.ts. The positive controlsdist/index.jsandsrc/ui/view.zod.tsare present. Soskip-changeset.Test Coreruns both spec projects.Not trimmed:
scoped-contextandconnector-author-shapeare at their floorPR #23547 already folded each file's probes into one
ts.createProgram. Timing that program per probe (an instrumented local copy, not committed) shows where the time goes. The first probe whose diagnostics are asked pays the whole type-graph resolution: 740 ms (jsdoc-usage) and 860 ms (doc-l3-connector-0). Every other probe takes 0 to 7 ms, except the second connector example at 117 ms. Program construction parses 586 and 614 files (the spec entry barrels a hook or connector author imports,lib.dom.d.tsand@types/node) in about 1.45 s each under two workers. Changinglibortypesdid not change the file count, because the spec source itself pulls those in.So each file's floor is one compile of the spec's type graph. That is neither "spawns the real producer once per single-cause fixture" nor "whole-package import", so these files carry no
// test-budget:line, and they stay listed. Whether a third class is wanted is a question for the seat (the report'sopen_questions); it is not decided here.Acceptance notes
viewtrim moves load time from the clocked window to the import phase, as the repository's own rule for clocked windows says it should. It does not make the file cheaper end to end. The census line counts only the clocked window.Generated by Claude Code