Repository navigation
test(spec,lint): cheaper slow-file sweeps and re-measured test budgets - #26089
Merged
Merged
Conversation
- lint non-record-object-entry: one sweep of the authoring-rule table per distinct stack, read by both the throws case and the count case; the control stack is swept once per collection. - spec ui/app: the compiler-API case reads the ES2022 lib and no ambient @types, the inputs the NavigationArea type actually has. - spec bscm manifest: the #12588 pair shares one generation. - Five declared budgets re-measured over refresh PR #25960's window, and five undeclared rows declare their ruled class at their CI reading. Claude-Session: https://claude.ai/code/session_01LpCAbWQuprShJmC2GJXTp7 Co-authored-by: Claude <noreply@anthropic.com>
The compiler-API case's cheaper program brings the file down about 12% locally, which still leaves the window's 11.90 s CI reading near the 10 s line. Declare 20 s from that reading (x 1.25, rounded up). Claude-Session: https://claude.ai/code/session_01LpCAbWQuprShJmC2GJXTp7 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): |
Contributor
Author
席位核对ACCEPT · domain:spec seat 2 · 2026-10-26T11:56Z · head
|
This was referenced Oct 26, 2026
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 Steedos · project thread
Part of #23180. This PR covers the packages/spec and packages/lint rows of refresh PR #25960's per-file list that are still over 10 s or over their declared budget (12 rows, listed below). #23180 stays open for the other packages' rows.
Clause-②: no
Metadata-protocol: none
Summary
Tests only. Each row is either made cheaper (three files), or given a budget re-measured from #25960's window, or both. Nothing is deleted, no vitest timeout is raised, and no file moves to a slower or skipped project.
packages/lint/src/non-record-object-entry.test.ts: the junk-value sweeps ran every rule once per assertion. They now run each rule once per distinct fixture and memoize the outcome (findings count, or the thrown message), and every assertion reads that record. 348/348 tests, 2.11 s to 1.00 s locally.packages/spec/src/ui/app.test.ts: the compiler-API case built its program with the ES5 default lib (DOM declarations) and every ambient@typespackage. Neither is an input ofapp.zod.ts, so the program now useslib.es2022.d.tsandtypes: []. The guard still reads the full member list off the resolved type. 1.49 s to 1.25 to 1.37 s locally.packages/spec/scripts/build-schemas-check-mode.manifest.test.ts: the [finding] the published bundlejson-schema/objectstack.jsondeclaresx-schema-count: 1596but carries 1585 definitions — and a docs page publishes that field as "the total number of definitions" #12588 block ran the generator twice on one fixture for two read-only cases. It now runs it once per block (beforeAllplus a lazy memo, the same shape asopenapi-self-consistency.test.ts's shared run). That is one generator spawn (about 7 s) fewer per run. 136.3 s to 125.1 s locally (shared box).Rows covered, with their source lines
Source: refresh workflow run 40275747937, job 121418010419 (the #25960 refresh). Line numbers are that job log's.
scripts/build-schemas-check-mode.retired-keys.test.tsscripts/build-schemas-check-mode.manifest.test.tsscripts/build-schemas-check-mode.anchor.test.tssrc/eager-entry-import.test.tsscripts/upgrade-guide-docs.test.tssrc/lazy-deps.test.tssrc/runtime-lazy-deps.test.tsscripts/root-entry-type-nameability.pin.test.tssrc/non-record-object-entry.test.tssrc/ui/app.test.tsscripts/pure-schema-construction.test.tsscripts/openapi-self-consistency.test.tsThe window is the hourly runs 40200279306 to 40272142430. Over the window's executed readings, the declared budgets were exceeded in: retired-keys 6 of 10, manifest 6 of 10, anchor 1 of 10, eager-entry 7 of 8, upgrade-guide 1 of 8.
Re-measure arithmetic
Every budget follows rulings 6181973363 item 2: the slowest CI reading in the window, x 1.25, rounded up to the next 10 s. Each header line names its reading and run, and each was parsed with
readTestBudgetfromscripts/measure-test-shard-timings.mjs.non-record-object-entry.test.tsgets no budget. Its local time halved, which puts its CI reading at about 6 s by the window's CI-to-local ratio (12.49 / 2.11). Per c91af8e, a later CI reading over 10 s would be the measurement a declaration needs.Why the bscm, eager-entry and upgrade-guide floors stay
One
build-schemas.tsspawn costs about 7.3 s on a profile: zod to JSON Schema 3.14 s, module load and script 2.73 s, writes 0.97 s, GC 0.40 s, child_process 0.24 s. Each bscm case is one spawn on its own single-cause fixture. retired-keys and anchor have no two cases on an identical fixture, so no run can be shared. In manifest, the #12588 pair was the one identical-fixture pair inside a block. Sharing across blocks (for example a #16431 control with another block's run) would couple fixtures that each block seeds itself, so it is left out. Batching causes or redesigning the producer is the option seat ruling 6176284384 declined.eager-entry-import spawns one fresh tsx child per published entry by design, and upgrade-guide-docs spawns the real producer once per mode or usage error it pins (about 0.7 s each). Both are kept and re-declared.
Measurements
Local runs use the CI shape:
CI=true pnpm exec vitest run --project P --maxWorkers=1with the agent environment variables unset. They ran on a shared box, so ratios carry more weight than absolutes.Mutation proof (non-record-object-entry)
The memo must not hide a rule regression. I mutated
recordsOfinpackages/lint/src/object-graph.tstoreturn v as AnyRec[]withscripts/ablation-replace.mjs, then ran both the new file and the BASE copy against the same mutant. Both failed the identical set, 121 of 348. The restore was proven: the blob equals HEAD's (693c48ac1308) andgit diff HEADwas empty.Acceptance notes
repoproject, which CI's Test Core owns. Locally I ran only the manifest file after the change, 18/18 green.Verification
All runs below are on head 1a44227 (this branch merged with main bbf7061), unless noted.
pnpm --filter @objectstack/lint test: 164 files, 7356 tests passed (exit 0).localfiles, run together after the merge: 6 files, 169 tests passed (exit 0).pnpm --filter @objectstack/spec test(723 files, 21902 tests passed, 1 todo),pnpm --filter @objectstack/spec typecheck,pnpm --filter @objectstack/lint typecheck. All exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackgives 84 commands. All 84 exit 0, and--ranprints: "84 derived famil(ies) accounted for, 84 run, 0 NOT-MEASURED". One note:check:dts-closurefirst exited 1. After the merge,@object-ui/plugin-editorcould not build because main's newmonaco-editordependency was not installed yet. Afterpnpm install --frozen-lockfileand a rebuild of the two named UI packages, it exited 0 ("231/231 declared declaration file(s) present").repoproject, which CI's Test Core runs. Locally, the manifest file ran after its change, 18/18 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01LpCAbWQuprShJmC2GJXTp7