This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
docs(core): one number for the record-title record-key-probe rung - #6842
Merged
Merged
Conversation
`record-title.ts` gave one precedence rung two different numbers, 26 lines apart in the same file: `RecordDisplayNameOptions.deriveFromRecordKeys` called the `NAME_ISH_RECORD_KEYS` probe "precedence step 3b", while the `getRecordDisplayName` docblock and the branch itself call it `4b`. `4b` is the number the file's own ladders support. Both ladders (module docblock, resolver docblock) number the type-aware derivation from `objectDef.fields` as step 4 and `objectDef.titleFormat` — a rendered template, not a record-key probe — as step 3; the `deriveTitleField` docblock says "precedence step 4" too. So `3b` was the leftover. Comment-only: `deriveFromRecordKeys` behaves identically either way. A source-reading pin checks every sub-step label against the number the file's own ladder gives the rung it sits under, so a renumbering stays legal as long as every label follows it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRJge11jso9TpXRWFt1Z49
Contributor
✅ 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
|
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #6634
Comment-only.
packages/core/src/utils/record-title.tsgave one precedence rung two different numbers, 26 lines apart in the same file.What I re-verified before editing
The card told me not to inherit its argument. Both ladders on
origin/main(26896c689) say what it says:getRecordDisplayNamedocblock:34—objectDef.titleFormat— LEGACY render-only template:377—objectDef.titleFormat(rendered template) — LEGACY, render-only:37— Type-aware derivation — the first title-eligible field fromobjectDef.fields:380— type-aware derivation fromobjectDef.fields:40— theRecord #idfloor:384— the same floorTwo further witnesses inside the same file already spelled it
4/4b::279— thederiveTitleFielddocblock: "Type-aware derivation (precedence step 4)":437/:442— the branch comments themselves:// 4. Type-aware derivation from the object's fields.immediately followed by// 4b. Name-ish keys on the record itselfSo four sites number the derivation rung
4and theNAME_ISH_RECORD_KEYSprobe beneath it4b. Exactly one site disagreed —RecordDisplayNameOptions.deriveFromRecordKeysat:355, "(precedence step 3b)" — and3isobjectDef.titleFormatin both ladders, a rendered template rather than a record-key probe. The card's reading holds:4bis what the file supports,3bwas the leftover.The change
:355now reads "(precedence step 4b)". That is the whole diff outside the test: nothing but comment text moved, andderiveFromRecordKeysis untouched.The mechanical pin
The card said a red/green demonstration might not exist for a comment-only change, and for the runtime it does not — the 77 existing
record-titleassertions pass identically in both states. But the defect class is mechanically pinnable, so this addspackages/core/src/utils/__tests__/record-title.stepNumbering.test.ts. It reads the source and checks the labels against the file's own ladder rather than against a number hard-coded in the test:bsub-step label — both spellings, the ladder/branch label4b.and the inline proseprecedence step 4b— must carry that same parent number (3 sites today);deriveTitleFielddocblock's inline(precedence step 4)citation must agree.A deliberate renumbering of the ladder therefore stays legal, as long as every label follows it. Each assertion carries a control on the match count, so the pin cannot go vacuously green if the wording moves.
Red/green evidence
Run from the repo root under the shared verify lock, on
560fb6d24, three legs, with the mutation and the restore both proven on disk rather than by an exit code:Leg 2 is load-bearing in both directions: the pin turns red, and the 77 pre-existing assertions stay green — the mechanical statement that this rung's number is prose and the resolver's behaviour does not depend on it. No
dist/is involved on either leg: both test files import../record-titleby relative path, so the mutation reaches the run through the source, not a build product.Gates
All from the repo root, exit captured before any pipe, quoting each gate's own printed verdict, on
560fb6d24:pnpm exec vitest run packages/core/src/utils/__tests__/record-title.stepNumbering.test.ts packages/core/src/utils/__tests__/record-title.test.ts—Test Files 2 passed (2)/Tests 78 passed (78), run with the verbose reporter so the executed file names are in the log.pnpm --filter "@object-ui/core^..." build && pnpm --filter @object-ui/core type-check && pnpm --filter @object-ui/core lint && node scripts/check-control-bytes.mjs— one lock verdict,VERDICT command-exit 0. Lint on the package iseslint ., not a narrowed run: 503 warnings, 0 errors, the pre-existingno-explicit-anybaseline, and the new file contributes none of them.node scripts/check-changeset-presence.mjs— its own verdict: "1 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." That is what settled the changeset question, not my reading of it.node scripts/check-changeset-no-major.mjs— "No changeset declares amajorbump."tsc -p packages/core/tsconfig.test.json --listFiles— the typecheck program provably contains all three files, so "typecheck clean" is a statement about the new test file too, not merely about the shipped source.node scripts/check-control-bytes.mjs—OK (scanned 5649 tracked text file(s); skipped 85 binary). The module's empty-placeholder sentinel keeps its backslash-u escape spelling and was not touched.Citing sites — checked, and one disagrees
The card required this sweep because these numbers are cited by hand. Repo-wide grep for step-number prose citing this ladder:
Agree with the corrected numbering (nothing to do):
packages/app-shell/src/views/InterfaceListPage.tsx:207-237— the prose corrected in objectui#6572. NamesnameField/displayNameFieldas step 1/2,titleFormatas step 3, derivation fromobjectDef.fieldsas step 4. Consistent.packages/app-shell/src/views/InterfaceListPage.mapConfig.test.tsx:182-260— same numbering, same verdict.packages/core/src/utils/__tests__/record-title.test.ts:150and:245— both say4b..changeset/6530-plugin-map-marker-title-precedence.md:34— "the record-key probe (the resolver's step 4b)".packages/plugin-map/src/ObjectMap.markerTitle.test.tsx:30— names the rungs without numbering them, so nothing to reconcile.Disagrees — reported, not touched:
packages/core/src/utils/__tests__/record-title.test.ts:133still says "the record-level name probe (step 3b)". Same stale number, same rung, in the test file for this very module — seventeen lines above a comment that calls the same probe4b. The card's fence ispackages/core/src/utils/record-title.tsalone and it asked me to report rather than renumber another file's prose, so the line is untouched here and filed separately. One consequence worth stating for review: the new pin deliberately scans onlyrecord-title.ts, which is why it is green today; widening its scan to the sibling test file is the natural shape of that follow-up.Scope
record-title.ts:355. The card was split out of objectui#6572 to keep the affected-package set from widening; this PR touchespackages/coreonly, so that split is preserved.content/docs/releases/edit.Generated by Claude Code
Generated by Claude Code