Repository navigation
test(core): widen the record-title step-numbering pin to its sibling test file - #8656
Conversation
…test file `record-title.test.ts:133` still called the record-level name probe "step 3b"; the module's ADR-0079 ladder numbers the `objectDef.fields` derivation as step 4 with `NAME_ISH_RECORD_KEYS` beneath it as `4b`, and the same file already said `4b` at three other sites. Corrected to `4b`. The pin `record-title.stepNumbering.test.ts` scanned `record-title.ts` only, so this drift sat in its declared blind spot. Its scanned set is now an explicit list naming the sibling test file, with a vacuity guard (both files by name, on disk, non-empty, per-file label floors typed over the set), a collector/verdict self-test on a fixture, and one absolute pin that `titleFormat` is step 3 and the fields derivation step 4 — the numbers the hand-citing sites outside the module carry. Measured before widening: of 49 files under `packages/core/src/utils/__tests__/`, only `record-title.test.ts` cites the ladder (objectui#6843). Empty-frontmatter changeset: comment text and tests only, nothing is released. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
The red is not this PR's — filed as objectui#8688, branch updated to re-run
This PR's diff is What it actually is, so nobody re-runs it away⭐ The wait is on
What I did hereUpdated this branch so CI re-runs against current Auto-merge stays armed, so a green head lands it. Generated by Claude Code |
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Fixes #6843
What changed
packages/core/src/utils/__tests__/record-title.test.ts:133— the comment on the record-level name probe said "step 3b"; it now says "step 4b". That is the numberrecord-title.tsgives the rung everywhere it states its ADR-0079 ladder (step 3 isobjectDef.titleFormat, a rendered template; step 4 is theobjectDef.fieldsderivation withNAME_ISH_RECORD_KEYSbeneath it as 4b), and the number the same file already used at three other sites (:150,:245,:252).packages/core/src/utils/__tests__/record-title.stepNumbering.test.ts— the pin from PR docs(core): one number for the record-title record-key-probe rung #6842 scannedrecord-title.tsonly, so this drift sat in its declared blind spot. Its scanned set is now an explicit list,SCAN_SET, namingrecord-title.tsand__tests__/record-title.test.ts, and:3bas the bug it describes);CONTROL_LABEL_COUNTS, typed over the set so a new entry without a floor is a compile error; the cross-set floor must be greater than 0;step-4bspelling the sibling uses, and reports file plus line for every stray label;strayLabels) depend on their input — the fixture carries the original uncorrected:133text — and thatit('0b. …')test names stay out of the population;titleFormaton step 3 and the fields derivation on step 4 — the numbers the hand-citing sites outside the module carry (InterfaceListPageprose, the plugin-map README documents a marker-title fallback that objectui#5953 replaced — "Omitted, markers are titledMarker" is false today #6530 changeset, this sibling test). Everything else stays relative to the ladder, so a deliberate renumbering edits two constants on purpose instead of silently reconciling a stray label by moving the ladder..changeset/6843-record-title-step-numbering-scan.md— empty frontmatter; comment text and tests only, nothing is released.Measured before widening
Of the 49 files under
packages/core/src/utils/__tests__/, exactly one besides the pin cites the ladder:record-title.test.ts(step 3bonce,step 4btwice,step-4bonce). No other file enters the population, so this is not a bigger card. Repo-widegit grep 'step 3b'overpackages/*/src/*andapps/*now hits only the pin's own fixture and expectation lines (the lit control for the sweep);step 4b/step-4bhits 10 lines.Evidence (all at
e64f3af96, vitest root-relative form, runs under the shared verify lock)Red on the uncorrected file, before the one-line edit: the widened pin failed with
sub-step labels disagreeing with the ladder's 4blisting__tests__/record-title.test.ts:133 "step 3b" says 3— 1 failed, 6 passed. After the edit: 7 passed.Ablation legs — each mutation proven on disk by
grep -cbefore the run, each restored withgit checkout HEAD -- ABSOLUTE_PATHunder a trap and proven bygit hash-objectequal to theHEADblob plus an emptygit diff HEAD:SCAN_SET— RED: guardexpected 0 to be greater than or equal to 2; cross-set floorexpected 0 to be greater than 0(2 failed, 5 passed — the per-file loop is vacuous over an empty set, which is exactly why the guard exists).record-titel) — RED: guardto include '__tests__/record-title.test.ts', plus ENOENT in the two reading tests (3 failed).3bat:133— RED naming:133(1 failed).fields-derivation sites not on step 4listing 3 sites (1 failed).titleFormat3 to 2 in the module — only the absolute pin fails:titleFormat sites not on step 3listing 4 sites (1 failed).[[2,4],[3,4],[4,4],…]vs[[2,3],[3,3],[4,3],…]).strayLabelsreturns[]) — only the fixture self-test fails.record-title.ts: 0 sub-step label(s) found, control floor is 3), cross-set floor and self-test fail (3 failed).No void legs. No
dist/is involved: the pin reads source throughnode:fs, so no build step sits between a mutation and its measurement.Leg D, JSON reporter over
pnpm exec vitest run packages/core/: 132 files, 701 suites, 2792 tests, all passed;record-title.stepNumbering.test.ts7/7 passed,record-title.test.ts75/75 passed; no death strings.pnpm --filter @object-ui/core type-check(script name echoed;@object-ui/typesbuilt first): 0 TS errors, andtsc -p tsconfig.test.json --listFilesreads all threerecord-title*files. ESLint on both test files: 0 errors (2 pre-existingno-explicit-anywarnings atrecord-title.test.ts:311and:362, lines not touched here).node scripts/check-changeset-presence.mjs: "2 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s) … Every one of them has an EMPTY frontmatter — declared as releasing nothing, which is the explicit exemption and a complete answer to this gate."node scripts/check-governed-queue-guard.mjs --test PATHS: "NOT GOVERNED — 3 path(s) checked against 5 governed surface(s); none matched."Placeholders in this body are written as upper-case words (ABSOLUTE_PATH, PATHS) because the platform strips tag-shaped text from bodies.
Session:
https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S🤖 Generated with Claude Code
https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
Generated by Claude Code