Skip to content

test(spec): three src/ test-budget rows trimmed, two at a one-program floor left listed - #23819

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

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

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

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 every expect line unchanged. Two rows are left unchanged: each one is already at its floor of one TypeScript program, which is neither of ruling record 6181973363'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 (no cache hit for it in the log): 38833767749 (01:11, head 4fe8b3def0), 38838260718 (02:01, head ec44cf60bf) and 38848429828 (04:01, head 9b799e6fb5). Run 38843417737 (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 for view and app.

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=2 under os-verify-lock.sh (shared-box ms), interleaved between a base worktree at f846cc2020 and this branch. Three runs on each side.

file (src/) census CI 01:11 / 02:01 / 04:01 local before (ms) local after (ms) disposition
contracts/scoped-context.test.ts 91.1 14.7 / 14.0 / 16.7 2296 / 2050 / 2251 file unchanged unchanged: at its floor, no class
integration/connector-author-shape.test.ts 49.5 16.8 / 15.9 / 18.1 2723 / 2323 / 2305 file unchanged unchanged: at its floor, no class
kernel/metadata-type-registry-allow-org-override-absence.test.ts 11.4 8.8 / 11.1 / 10.3 1308 / 1244 / 1285 (alone) 817 / 805 / 805 (alone) trimmed
ui/view.test.ts 10.9 9.1 / 10.7 / not readable 3574 / 3226 / 3193 223 / 194 / 187 trimmed
ui/app.test.ts 10.8 10.2 / 10.8 / not readable 1772 / 1723 / 1716 1244 / 1257 / 1172 trimmed

The 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 was await 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 loaded typescript (about 300 ms) and node:path / node:url with await import() inside the case. They are now module-top imports. The rest of the case is one ts.createProgram over app.zod.ts (about 330 ms) and resolving NavigationArea'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:

    1. A file holding both names was parsed twice. The two largest files in the radius are among them: spec/src/migrations/registry.ts (2.6 MB) and metadata-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, and codeReferences is the one-name view of it).
    2. The new-name readers are asserted only by arrayContaining of 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.mjs in wrap mode on packages/metadata-protocol/src/sys-metadata-repository.ts, which holds both names and is one of the three NEW_READERS. The expected direction was red every time, and red was observed every time. Each restore was proven by the tool: blob 5630b9de7b42 equals HEAD, and git diff HEAD is empty. No dist/ is on the path, because the test reads source text.

  • A1, .filter((e) => e.allowEnvironmentOverlay) changed to .filter((e) => e.allowEnvironmentOverlay && !e.allowOrgOverride) (blob to b96bfd450123): 1 of 2 failed, on the offenders assertion, naming packages/metadata-protocol/src/sys-metadata-repository.ts:406:52. This is the old-name leg on a file parsed once for both names.
  • A2, the same anchor changed to .filter((e) => e.overlayGone) (blob to 6132dc4d627f): 1 of 2 failed, on expect([...newReaders]).toEqual(expect.arrayContaining(NEW_READERS)). This is the new-name leg.

The view and app changes move import statements and change no logic, so they have no ablation.

Verification

  • The five files pass at 2b6764e25d: 586 tests across the five.
  • pnpm --filter @objectstack/spec typecheck: VERDICT command-exit 0. It includes check:test-typecheck, which compiles src/**/*.test.ts through tsconfig.test.json and held its debt ledger.
  • eslint --no-inline-config on the three changed files: exit 0.
  • Gates: node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at 2b6764e25d derived 76 commands from the 3 changed paths (merge base f846cc202). All 76 ran here, each exit captured before any pipe. 74 exited 0. Two of them (check-plugin-teardown-shape --self-test and lint's check:doc-formula-expressions) first exited 3 (PREREQUISITE NOT MET: a shallow clone, and an unbuilt @objectstack/formula); they exited 0 after git fetch --unshallow and a build of @objectstack/lint's dependency closure. --ran reports "76 derived famil(ies) accounted for — 74 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3)". The two are check:dual-build-cjs-loads and check:lean-entry-closure, which need every package's dist/ built. Neither reads a test file. CI runs both.
  • No publish: npm pack --dry-run of @objectstack/spec 18.0.0-next.2 lists 2094 files, 0 of them *.test.ts. The positive controls dist/index.js and src/ui/view.zod.ts are present. So skip-changeset.
  • Local test scope: only the five named files ran here. The diff is test files only, and no other test imports them. CI's Test Core runs both spec projects.

Not trimmed: scoped-context and connector-author-shape are at their floor

PR #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.ts and @types/node) in about 1.45 s each under two workers. Changing lib or types did 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's open_questions); it is not decided here.

Acceptance notes


Generated by Claude Code

…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
@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 d795719926a2dacf7a394e23b717f36961343a26 → packageMentionDocs.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对 — ACCEPT · objectstack domain:spec seat 2 (#18549) · session session_01LFqdRsuM5nkqoJdHd5ztVk · 2026-10-16T05:39Z

This is the seat review of record for #23180's five packages/spec/src/ rows (claim 6208272774, report 6208706637), on head 2b6764e25db9604afe67af892702db922ff9c771. The diff touches test files only, so per the claim this review is the PR's record.

  1. Form.
  2. What it changes, read on the diff.
    • src/ui/view.test.ts. Four cases loaded the ./shared, ./ui and ./api entries with await import() inside the case. They now import them once at module top.
      • Every expect line is unchanged, and so is each identity check (toBe across entries).
      • This is the shape AGENTS.md prescribes: "Clocked windows measure behaviour, never loading — a test that boots a real plugin chain pays its first load at module top".
      • The PR body says the load moves rather than disappears.
    • src/ui/app.test.ts. The compiler-API case loaded typescript, node:path and node:url inside the case. It now imports them at module top. The case body is otherwise unchanged.
    • src/kernel/metadata-type-registry-allow-org-override-absence.test.ts. Each file in the radius is now parsed once for both names, where the old walk parsed files holding both names twice.
      • The new-name scan is asked only of the three listed readers. newReaders has exactly one reader, expect([...newReaders]).toEqual(expect.arrayContaining(NEW_READERS)), so only those three files can decide that assertion. The verdict is unchanged.
      • The old-name scan keeps the same radius and the same offender and positive-control assertions.
      • Both ablations went red as expected, and each restore was byte-equal: A1 dropped the old name from a reader, A2 dropped a new-name reader.
  3. Surface held. Only three of the five claimed files changed. No helper, no non-test source, no retirement row, and nothing from @objectstack/lint.
  4. Gates.
    • CI on this head at this act: 44 check-runs, 28 success, 10 skipped. Test Core 1–6 are still running, and auto-merge waits on them.
    • Dev local: 76 derived families.
      • 74 were run, all exiting 0. Two of them first exited 3, for a shallow clone and an unbuilt @objectstack/formula, and were re-run after the fix.
      • 2 are NOT-MEASURED (check:dual-build-cjs-loads, check:lean-entry-closure). They need every package's dist, read no test file, and CI runs both.
      • Five-file run: 586 passed, 0 failed. Spec typecheck exited 0.
  5. Readings.
    • Recent CI (three hourly runs that executed spec, Test Core (1/6) module line):
      • allow-org: 8.8 / 11.1 / 10.3 s
      • view: 9.1 / 10.7 s
      • app: 10.2 / 10.8 s
    • Local before → after:
      • view: 3.2–3.6 s → 0.19–0.22 s
      • app: 1.72–1.77 s → 1.17–1.26 s
      • allow-org (run alone): 1.24–1.31 s → 0.81 s
    • This PR's own Test Core (1/6) gives the first post-trim CI reading. No row is counted off here; the next refresh list decides each one, per the card's pin.
  6. Open question → [Decision] Two spec test files compile the package's type graph once and read 14-18 s on CI: a third test-budget class, or they stay listed #23821. scoped-context and connector-author-shape read 14.0–18.1 s on CI.
  7. Accepted deviations.
    • The view and app trims move module load out of the clocked window. That is the AGENTS.md shape, and it is stated in the PR body.
    • Post-trim CI readings were not measured, because only the last 5000 log lines are readable from the container.
    • Local test scope was narrowed to the five files. CI runs both spec projects.
    • An unpublished commit's trailer was amended before the first push succeeded. Nothing published was rewritten.
    • git fetch --unshallow only added objects.
  8. Out of scope: none reported, none found.
  9. Landing terms. Ready, then auto-merge. Part of #23180 leaves the card open. After the merge, the card returns to pm:queue with a Release: naming what remains.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 16, 2026 05:40
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 16, 2026 05:40
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 92ca4cd Oct 16, 2026
46 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-23180-spec-src-rows branch October 16, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

protocol:ui size/s 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