test(types): re-derive ObjectViewSchema's side of the #6058 split as LOCAL and pin the header counts (objectui#7279) - #7776
Merged
Conversation
…LOCAL and pin the header counts The zod-mirror-parity header routed ObjectViewSchema's ten unmirrored declared keys as SPEC-DERIVED on a scanner false positive that #6705 removed from SPEC_DERIVED_PAIRS without settling the routing. Re-derived on the tree: the mirror is BaseSchema.extend of local literals and z.lazy siblings and takes no shape from the spec; read through the @objectstack/spec@17.2.0 pin, the spec models four of the ten keys on View-shaped schemas and six nowhere. The entry is LOCAL; the 4 / 6 reading is recorded on it for whoever mirrors. The split's counts (1 / 2 spec-derived, 13 / 94 local, 14 / 96 total) are now derived from the ledger and SPEC_DERIVED_PAIRS membership and pinned against the header read off disk, so the prose can no longer drift silently. Test only. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s
…ect-view-unmirrored-route
…ect-view-unmirrored-route
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 was referenced Sep 5, 2026
os-justin
marked this pull request as ready for review
September 5, 2026 17:25
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.
Fixes #7279
What this is
A test-file routing record, not a mirror edit.
packages/types/src/__tests__/zod-mirror-parity.test.tsrecorded objectui#6058's SPEC-DERIVED / LOCAL split of theUnmirroredDeclaredledger withObjectViewSchemaon the SPEC-DERIVED side — a routing that rested on the text-scanner false positive #6705 (PR #7277) dropped fromSPEC_DERIVED_PAIRSwithout settling the routing. This PR re-derives that side on the tree and through the installed spec pin, records the route at the four sites in the file that state it, corrects the split's counts by deriving them from the ledger objects andSPEC_DERIVED_PAIRSmembership, and pins the header's figures against that derivation so the prose cannot drift silently again.Clause-② no: no mirror, declaration, validator,
MIRRORS,EXCLUSIONS, ledger key set orSPEC_DERIVED_PAIRSmembership moves. The ten-key widening this reading implies is a remedy on the manual floor (triage 5548347502's boundary) and is NOT performed here. #6152 remains open; #2231 remains open.Re-derivation
(a) Declared vs mirrored, key by key — every declared key accounted for exactly once
packages/types/src/objectql.tsinterface ObjectViewSchema extends BaseSchemadeclares 25 own members;packages/types/src/zod/objectql.zod.tsexport const ObjectViewSchema = BaseSchema.extend({…})declares 13 own members plusBaseSchema's. EverySpec…token in that file's neighbourhood (KanbanConfig,CalendarConfig,GalleryConfig,TimelineConfig,ViewKindEnum) is a private const feedingListViewSchema; the mirror references none of them. The pair is not inSPEC_DERIVED_PAIRS, and the existingSPEC_DERIVED_PAIRS matches what the mirror sources actually docase agrees on this tree.type,objectName,title,description,layout,showSearch,showFilters,showSort,showCreate,showRefresh,operations(11)className(1)BaseSchematable,form(2)z.lazyto the sibling mirror, wider than the declared Partial-of-Pick slotWiderThanDeclared(SCHEMA-NODE, PR #7758)onNavigate(1)objectql.zod.tscarries noon*by policyRuntimeOnlyDeclared(#6152)allowCreateView,defaultListView,defaultViewType,filterableFields,listViews,navigation,searchableFields,showViewSwitcher,viewActions,viewTabBar(10)UnmirroredDeclared— the ten this card is about25 = 11 + 1 + 2 + 1 + 10. The pair has no
KnownDriftrow.(b) Does the installed spec model the ten keys on a View-shaped schema?
Read THROUGH THE PIN —
@objectstack/spec@17.2.0, resolved frompackages/types(node_modules/.pnpm/@objectstack+spec@17.2.0_…/dist/ui/index.js, theuientry) — by walking all 122 exported zod object schemas'.shape. Control keys hit as expected (objectNameon 10 exports,columnson 16,typeon 35,labelon 43). View-shaped exports present:ViewSchema,ListViewSchema,ObjectListViewSchema,FormViewSchema,ViewTabSchema,ViewFilterRuleSchema,ViewSharingSchema.navigationListViewSchema.navigationandObjectListViewSchema.navigation: optionalNavigationConfigSchema(mode,view,preventNavigation,openNewTab,size,width)NavigationConfig(ViewNavigationConfigalias, imported from@objectstack/spec/ui) — take the shape by referencesearchableFieldsListViewSchema,ObjectListViewSchema,ObjectGridPropsSchema: optional array of stringfilterableFieldsListViewSchema,ObjectListViewSchema: optional array of string; the spec's own description calls it a legacy shorthand foruserFilters.fieldslistViewsViewSchema.listViews: optional record from string to a spec list-view objectNamedListView(label / type / columns / filter / sort / options / show-flags), not the spec's list view — the value type is a unification question a mirror edit must not paper over withz.any()allowCreateViewdefaultListViewdefaultViewTypeshowViewSwitcherviewActionsviewTabBarRoute on the evidence
The SPEC-DERIVED route exists for a mirror that IS the spec schema by reference, where growing a key means diverging from the spec and the question becomes whether the local declaration should keep it (#2231). This mirror takes no shape from the spec, so it can grow any key without touching the spec: the entry is LOCAL, and its remedy is the ordinary local route (#6152's worklist). The spec reading does not change the route; it is recorded on the entry as a 4 / 6 reading for whoever mirrors — four keys take their shape by reference from the spec slot that models them (with the
listViewsvalue-type caveat), six are plain hand-written omissions.DashboardWidgetSchemareconfirmed spec-derived by code reference (specFieldsExcept(SpecDashboardWidgetSchema.shape, …),complex.zod.ts:627).Not decided here: whether each of the six unmodelled keys should be mirrored or retired (the #7129 route) — that is per-key liveness work on #6152's worklist, and the seat raises the follow-up.
Corrected counts — derived, not restated
UnmirroredDeclaredon this tree, entry by entry: ChatbotSchema 3, ChatbotFloatingSchema 2, DashboardWidgetSchema 2, DataTableSchema 17, FormFieldSchema 1, FormSchema 8, InputSchema 1, LabelSchema 1, PaginationSchema 1, ObjectFormSchema 21, ObjectGridSchema 15, ObjectViewSchema 10, ReportComponentSchema 3, DetailViewSchema 11 — 14 entries, 96 keys.SPEC_DERIVED_PAIRSintersected with those entries is exactlycomplex.zod.ts#DashboardWidgetSchema.Sites corrected (all in
zod-mirror-parity.test.ts)ObjectViewSchemaparagraph replaced by the re-derived reading and its evidence, the totals sentence put on one line so the pin can read it, history sentences kept and extended (the header is cumulative by design).UnmirroredDeclaredentry docblock — LOCAL, with the 4 / 6 per-key reading.SPEC_DERIVED_PAIRScomment — the consequence finding(gate):zod-mirror-parity's SPEC_DERIVED_PAIRS scans raw text betweenexport constboundaries, so a Spec-token mentioned in PROSE is attributed to the neighbouring export #6705 left open is settled and points at the pin.RuntimeOnlyDeclaredObjectViewSchemadocblock — a fourth site the dispatch did not enumerate. It read "This pair is ALSO spec-derived … stay routed to objectui#2231" and would have contradicted the other three; prose only, the key did not move. Declared as a deviation in the report.Pin —
describe('… (objectui#7279)'), two casesledgerEntryMembers()reads eachUnmirroredDeclaredproperty signature's union of string literals off this file's AST — the same instrumentledgerEntryKeysalready uses; a non-literal arm is a hard error, not a skipped row. The split is derived from it bySPEC_DERIVED_PAIRSmembership and compared with four figures read off the header on disk, each of which must occur exactly once (a stale copy standing beside a corrected one is red): the SPEC-DERIVED label, the LOCAL label, the one-line totals sentence, and the top-of-fileUnmirroredDeclaredcount. A non-vacuity case checks the reader agrees withledgerEntryKeyson the entry list, that both halves are non-empty, and that unions are actually walked.Verification — exit codes captured before any pipe; verdict lines quoted from the tools
Final head
627d1881=5ff08d22(the change) + two merges oforigin/main(4388f713, then16a725f9after a sibling fetch advanced the shared ref between two of my commands); neither merge touched the parity file.pnpm exec vitest run --maxWorkers=2 packages/types/underos-verify-lock.sh@627d1881:VERDICT command-exit 0—Test Files 124 passed (124),Tests 2196 passed (2196)packages/types/src/__tests__/zod-mirror-parity.test.ts@5ff08d22:VERDICT command-exit 0—Tests 20 passed (20)(18 existing + 2 new)pnpm --filter @object-ui/types type-check@627d1881: exit 0 (three tsc projects;tsc -p tsconfig.test.json --listFileslists the parity file, so the type-level ledgers are compiled)pnpm --filter @object-ui/types lint@627d1881: exit 0 (pre-existingno-explicit-anywarnings in examples and other tests; none in the parity file)node scripts/check-changeset-presence.mjs@627d1881: exit 0 — "1 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s): .changeset/7279-object-view-split-route-pin";check-changeset-fixed,check-changeset-no-major,check-changeset-overwrite: exit 0 eachnode scripts/check-control-bytes.mjs@627d1881: exit 0 — "OK (scanned 6338 tracked text file(s); skipped 85 binary)"pnpm check:spec-symbols@627d1881: exit 0 — "no comment cites a key its spec symbol does not declare"scripts/pm/check-governed-merges.mjs --teston both paths): "0 of 2 path(s) hit the register — NOT governed"Ablation — committed first; restore is
git checkout HEAD -- path, proven by blob hashLOCAL (13 entries, 94 keys)to12 entries): on-disk prooftarget 1 → 0,injected 0 → 1;VERDICT command-exit 1,1 failed | 19 passed— exactly the new pin. Restored:git diff HEADempty, blob52de7cc2equals the HEAD blob.complex.zod.ts#DashboardWidgetSchemafromSPEC_DERIVED_PAIRS(membership feeds the split): on-disk prooftarget 1 → 0;VERDICT command-exit 1,3 failed | 17 passed— the new pin, its non-vacuity twin, and the existingSPEC_DERIVED_PAIRS matches what the mirror sources actually do. Restored the same way, same hash.No dist is involved (the test reads
srcand the installed spec pin), so no build preflight applies; the on-disk proof is thegrep -cpair above.Not in this PR
packages/types/src/zod/**untouched. #6152's worklist, the 23-callback ruling,DashboardWidgetSchema's entry beyond reconfirmation, and #2231 are out of scope and remain open. Placeholders in this body are spelled as words (Partial-of-Pick, record from string to …) because the GitHub body sanitizer eats angle-bracket shapes.Session:
https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s— the dispatching seat's session; the dev is its subagent and its identity is the branch.🤖 Generated with Claude Code
https://claude.ai/code/session_01BAZFhALsQsGqxui8sNqM8s
Generated by Claude Code