Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(plugin-designer): read a lookup's target under the retired referenceTo spelling too (objectui#8058) - #8899

Merged
huangyiirene merged 1 commit into
mainfrom
claude/issue-8058-lookup-target-legacy-reference-key
Sep 10, 2026
Merged

huangyiirene merged 1 commit into
mainfrom
claude/issue-8058-lookup-target-legacy-reference-key

Conversation

@claude

@claude claude Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Fixes #8058

What was broken

MetadataFieldsPage had two halves that did not meet. The read door (toDesignerField) set referenceTo: raw.reference — the spec spelling and nothing else. The write door's carryOver strips referenceTo from the carried-over server definition (the objectui#6527 tombstone site), and fromDesignerField re-emits the target as reference.

For a field whose target survives only as the pre-objectui#6041 referenceTo, the read found nothing, the strip removed the stored value, and the field reached the wire as a lookup with no target at all — saving silently at @objectstack/spec 17.2.0, and answering 422 INVALID_METADATA at fields.NAME.reference against 17.3.0 with nothing naming which field.

The change

storedRelationshipTarget(raw) reads reference and falls back to referenceTo; toDesignerField uses it. That is all of the behaviour change.

P1 — measured before writing a line, because the ruling hung on it

The dispatch made the fix conditional on referenceTo and reference carrying the same value shape across the objectui#6041 rename. Measured against the installed artifact (pnpm-lock.yaml resolves @objectstack/spec to 17.4.0):

FieldSchema.safeParse({ type: 'lookup', label: 'L', referenceTo: 'account' })
  => success = false
  => unrecognized_keys — "Did you mean `referenceTo` → `reference`?"
FieldSchema.safeParse({ type: 'lookup', label: 'L', reference: 'account' })
  => success = true

Three readings, all pointing the same way:

  1. The spec itself calls them one key under two spellings. referenceTo is one of five entries FieldSchema's alias map renames onto reference (relatedTo, target, targetObject, lookupObject are the rest), and src/ui/view.zod.ts says so in prose: "reference is the key FieldSchema accepts — referenceTo is only a rejected alias it lists so a failed parse can offer a rename hint."
  2. Same type, same id form, same cardinality. reference: z.string().optional() upstream, DesignerFieldDefinition.referenceTo?: string here. Every other site in this repo that names referenceTo (reports.zod.ts, filter-builder.tsx, designer.ts) holds a single object machine name too — no array form, no {object, field} form anywhere.
  3. The stored values came from the same property. The referenceTo this reads is what fromDesignerField's pre-objectui#6041 emit line wrote, out of the same designed.referenceTo that today's reference: designed.referenceTo reads.

⇒ P1 holds. And it is exactly what separates this from objectui#6043: the alias map lists formula → expression too, but those two sides carry different value grammars (expression is CEL; the retired textarea accepted arbitrary text), so that rename would have laundered non-CEL text into a formula that parses green. There is no value grammar to violate here.

⚠️⚠️ An existing pin was flipped — stated in full, never silently

The case: MetadataFieldsPage.specKeyReference.test.tsx, the last describe in the file — objectui#7714 · a lookup whose target survives only as 'referenceTo' › it('is refused by name, and issues no PUT').

What it pinned: a stored { stale_id: { type: 'lookup', label: 'Stale', referenceTo: 'contact' } }, an author relabelling an unrelated field, and two assertions — that the page's error surface named `stale_id`, and that puts stayed [].

What it pins now: the same document and the same edit, and that the target survives: the designer model receives referenceTo === 'contact', the PUT happens, the wire carries reference: 'contact' with no referenceTo key, and FieldSchema parses the emitted field.

Why the flip is right. That pin recorded the CONSEQUENCE of the read-side gap, not a contract anyone chose. objectui#7714 said so itself when it wrote the case — "After objectui#7714 the failure is at least loud and field-named instead of a silent dropped relationship. That is strictly better and it is not a fix: the author still has to re-pick a target the document already held." — and objectui#8058 was filed at that moment for exactly this. Once the read door finds the target, the guard has nothing to refuse, so the old expectation cannot survive the repair; it is replaced rather than respelled, because the branch it pinned is the branch this card removes.

Order of measurement, as required:

step reading
before the fix pnpm exec vitest run packages/plugin-designer/src/MetadataFieldsPage.specKeyReference.test.tsx → Test Files 1 passed (1) · Tests 13 passed (13) — the pin is green, pinning the refusal
after the fix, pin unedited Tests 1 failed | 13 passed (14) — the single failure is that case: TestingLibraryElementError: Unable to find an element by: [data-testid="metadata-fields-page-error"], i.e. the save now succeeds
after flipping it Tests 15 passed (15)

So the pin demonstrably sees this change; it was not edited on a hunch.

⛔ objectui#7714's guard is untouched, and the acceptance criterion is two-sided

Not one line of assertRelationshipTargetPresent, describeUnusableTarget or RELATIONSHIP_TYPES_REQUIRING_REFERENCE changed. Both rows are asserted:

situation after this change
target exists only as referenceTo read door finds it ⇒ no longer refused, relationship preserved (objectui#8058 · … › loads with its target, and PUTs it back under the spec spelling)
field really has no target under either spelling still refused, still by name, still no PUT (⛔ CONTROL — a lookup with NO target under EITHER spelling is still refused, by name, with no PUT)

A third control pins the precedence that keeps the fallback a rename rather than a second contract: ⛔ CONTROL — when both spellings are stored and DISAGREE, the spec spelling wins. And the pre-existing guard cases are all still green — the half-filled draft, the four unusable-target states plus null, and the master_detail pair.

⛔ objectui#6041's strip assertion is untouched and green: a save of an object ALREADY carrying 'referenceTo' puts it back without the key. The shared fixture still carries both keys on legacy_id, deliberately — that is what gives the strip something to measure, and it now also pins that reference wins.

The docblock that was false

The carryOver tombstone docblock asserted, as settled:

Two of the four cost nothing: fromDesignerField re-emits the lookup target under the spec spelling reference on the very next line …

That was true only when the READ found a target, which for this shape it did not. It is rewritten to say what it is conditional on — the read door reading both spellings — and to record that this PR is what made it true, so the next reader cannot restate the conclusion without the premise. It also now names the one path where it is still false (below).

验收备注 — out of scope, filed, not fixed here

  • Filed as MetadataFieldsPage's carried-through half and metadata-admin's readFields still lose a target stored only as referenceTo — and the tombstone registry still says the strip "loses nothing" #8896 — the same strip still costs the relationship on the paths with no read door. Measured on this branch: a stored { parent_id: { type: 'master_detail', label: 'Parent', referenceTo: 'invoice' } } goes to partitionStoredFields' preserved half, is re-emitted as carryOver(keep.raw) with no toDesignerField in the path, and is refused — puts=[], error `parent_id` … and this one has none. Worse there than here: a preserved field is read-only on this page, so "Pick the target object" names a control the author cannot reach. metadata-admin's readFields (object-fields-io.ts) states the same invariant and is the second candidate site. The card also names the registry sentence "The strip loses nothing" as the claim to fix at the source, which is a decision about the tombstone contract rather than a local patch.
  • Filed as The installed @objectstack/spec pin is 17.4.0, not 17.3.0 — three version-qualified measurements (one of them a user-visible error message) describe a spec that is not installed #8897 — the installed spec pin is 17.4.0, not the 17.3.0 that three version-qualified measurements in this file, its sibling MetadataService.ts and this test file all name. Measured: reference: ' ' is now refused upstream (custom at reference), so the docblock's "Until the pin reaches the fix, this guard is still the only thing refusing ' ' here" and the user-visible refusal text "@objectstack/spec 17.3.0 ACCEPTS this value" are both false against the installed artifact. ⛔ Not a behaviour bug — the guard is right to keep refusing (objectui#8621 ruled that) — but the refusal message is pinned verbatim by both writers' tests, so correcting it flips existing pins and is not a drive-by edit.
  • noted, not filed — the population question the card raises ("how many stored documents still carry referenceTo") is a deployed-tenant data question this repo cannot answer. No time was spent guessing and the deliverable was not reduced for it; the card's own conclusion covers both outcomes.
  • Cross-file line-address citations (objectui#8875 axis). scripts/cross-file-line-citation-census.mjs run at the branch point (b686ebf7d) and again at the final commit (3a200e94a): population identical (1267), and exactly two rows move — plugin-gantt/src/ObjectGantt.referenceArms-6837.test.tsx:49 and plugin-tree/src/ObjectTree.referenceArms-6837.test.tsx:50, both citing MetadataFieldsPage.specKeyReference.test.tsx:75. At the branch point that line was blank ([non-substantive] (cited line reads '')) while the citation claims it names a referenceTo fixture — so both were class (B): already not pointing at their subject on origin/main, not addresses this PR knocked off target. ⛔ Untouched; they belong to objectui#8875.

Verification

Run at the final commit 3a200e94a.

  • pnpm exec vitest run packages/plugin-designer/src/MetadataFieldsPage.specKeyReference.test.tsx --reporter=verbose → Test Files 1 passed (1) · Tests 15 passed (15)
  • pnpm exec vitest run packages/plugin-designer/ → Test Files 18 passed (18) · Tests 142 passed (142)
  • pnpm --workspace-concurrency=2 --filter '@object-ui/plugin-designer^...' run build → 15 of 47 projects, all Done (the dependency closure; without it type-check answers TS2307 Cannot find module '@object-ui/types', which is PREREQUISITE NOT MET, not a red gate)
  • pnpm --filter @object-ui/plugin-designer run type-check → exit 0. ⚠️ That project excludes *.test.tsx (--listFiles count for the changed test file: 0), so the test file is covered by tsconfig.test.json instead: tsc -p tsconfig.test.json --noEmit --listFiles → exit 0, changed test file present in the program (count 1), zero error TS.
  • node scripts/check-changeset-presence.mjs → ✅ 2 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)
  • pnpm run check:designer-field-key-parity → designer-field-key-parity: OK
  • pnpm run check:control-bytes → ✅ OK (scanned 7086 tracked text file(s)), plus a direct grep -naP over the three changed paths: no match
  • pnpm run check:vi-mock-specifiers / check:vi-mock-inherit / check:spec-symbols → all ✅ OK
  • node scripts/check-governed-queue-guard.mjs --test over the three changed paths → ✅ NOT GOVERNED
  • Lint, and why this is a measurement rather than a skipped run. pnpm lint here is turbo run lint — per-package eslint . — and the diff touches one package, so the affected unit is run whole: pnpm exec eslint . --no-inline-config --format json inside packages/plugin-designer → exit 0, 53 files linted (count read from the JSON output), 0 errors, 66 pre-existing warnings, none of them in either changed file. Invariance for the packages not run: eslint.config.js configures no parserOptions.project and no projectService, so no rule here is type-aware and no verdict on an untouched file can move with this diff.

Clause-②

Clause-②: yes — judged by this seat and appended to the claim comment on #8058 under the dispatch's carrier pre-authorization. No new exported symbol and no new key on a published payload, but the read door now honours a second spelling, so a stored document that previously produced a target-less lookup now produces one carrying reference. That is an acceptance-set widening on the surface AGENTS.md #0.1 governs, and the card had to argue against objectui#6043 to reach it. This PR parks in draft awaiting the contract-review tier; needs:contract-review is attached.


🤖 Generated with Claude Code

https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH


Generated by Claude Code

…enceTo` spelling too

`MetadataFieldsPage`'s read door (`toDesignerField`) read the spec spelling
`reference` and nothing else, while `carryOver` strips `referenceTo` from the
stored definition. A field whose target survives only as the pre-objectui#6041
`referenceTo` therefore read as target-less, the strip removed the stored
value, and the field reached the wire as a `lookup` with no target — saving
silently at `@objectstack/spec` 17.2.0 and answering `422 INVALID_METADATA` at
`fields.NAME.reference` against 17.3.0, with nothing naming which field.

The read door now reads `reference` and falls back to `referenceTo`
(`storedRelationshipTarget`). That is a pure rename, not a lenient alias:
`FieldSchema`'s own map renames `referenceTo` onto `reference` and both
spellings carry one object machine name, so no value changes shape on the way
through — unlike `formula` -> `expression`, where objectui#6043 refused the
rename because the two sides carry different value grammars.

objectui#7714's guard is untouched and still refuses a relationship field with
no usable target under either spelling, by name, before the PUT. The carry-over
docblock's "costs nothing" claim is rewritten to say what it is conditional on,
and to name the one path where it is still false.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01611D6ZaRaMmwTNQmSbk8MH
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3487.4 KB 3512.7 KB
Main entry chunk (gzip) 144.1 KB 350 KB
Entry file index-1Gls4k7n.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.69KB 6.21KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 500.23KB 114.67KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 26.68KB 8.94KB
data-objectstack (index.js) 200.01KB 55.77KB
fields (index.js) 246.94KB 62.28KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.39KB 3.10KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 14.81KB 3.63KB
plugin-calendar (index.js) 49.03KB 13.93KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.54KB 46.34KB
plugin-dashboard (index.js) 131.71KB 34.50KB
plugin-designer (index.js) 215.60KB 44.32KB
plugin-detail (index.js) 252.45KB 65.33KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 136.26KB 34.13KB
plugin-gantt (index.js) 166.96KB 40.93KB
plugin-grid (index.js) 210.86KB 57.28KB
plugin-kanban (index.js) 57.53KB 16.46KB
plugin-list (index.js) 112.54KB 27.65KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.55KB 3.32KB
plugin-view (index.js) 84.42KB 20.80KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 14.27KB 5.47KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Collaborator

Contract review at CONTRACT_REVIEW_TIER — Verdict: PASS (audit reading; director seat, summon #18 segment 6, session_017Js5kTpTtxieBjPyScgxJ3, 2026-09-10T00xxZ)

PR objectui#8899 · head 3a200e94a72f8783587b4ec9516b939668e631e8 (re-read at posting 00:05:33Z; unchanged since 21:10Z) · card objectui#8058.

  • Reviewed-by: isolated claude-fable-5-1 subagent, transcript-verified (78 harness model stamps, all claude-fable-5-1, zero residue; positive control 67 assistant / 48 user role tokens), adopted verbatim below.
  • Implemented-by: session_01611D6ZaRaMmwTNQmSbk8MH · branch claude/issue-8058-lookup-target-legacy-reference-key (newest Claim: 5608380613, PM-dispatched under os-zhuang). Distinct sessions ⇒ not a self-review.
  • Reading for the seat: PASS, no rework; clear both carriers and proceed to landing. ⛔ This seat cleared no carrier and touched no PR state at posting.

Verdict

PASS — contract-review tier. No rework. Clear needs:contract-review on both carriers and proceed to landing ops.

Head reviewed

3a200e94a72f8783587b4ec9516b939668e631e8 (matches 3a200e94a7; head did not move). One commit over merge-base b686ebf7d. 3 files, +250/−50.

Clause-② reading

Measured published face — nothing moves:

  • @object-ui/plugin-designer is published (no private, files: ["dist", …], in the fixed group). Barrel packages/plugin-designer/src/index.tsx:79-80 exports MetadataFieldsPage + MetadataFieldsPageProps — unchanged.
  • storedRelationshipTarget (MetadataFieldsPage.tsx:222-227) is module-local, not exported. ServerFieldSchema (unexported) gains no declared member; the retired key is read through the index signature (:109), so scripts/check-designer-field-key-parity.mjs (whose PAYLOAD_SHAPES names this file) sees no new emit key.
  • Write shape unchanged: fromDesignerField (:394-414) still emits reference: designed.referenceTo; carryOver (:320-325) still strips referenceTo. Only behavioural delta: a stored document holding the target only as referenceTo now PUTs reference: <target> instead of being refused by name (17.3.0+) / saved target-less (17.2.0).

Correct reading: mechanical floor does not force yes (no new export, no new published-payload key). It is the conformance-class judgment the reference reserves for the seat: a read-side acceptance of a spelling the spec itself declares an alias (objectstack field.zod.ts:863 — referenceTo: 'reference'). yes is the prescribed conservative direction when unsure, and the PM brief explicitly flagged the acceptance-set limb; a no would have needed Contract-text: citing that alias line. Substantive verdict on the widening: accepted. AGENTS.md #0.1's hazard ("reading both columns and fields") is about fossilizing a live producer's off-spec dialect; here the producer is this page's own pre-#6041 build, which can no longer emit the key (spec refuses by name, parity gate, write door emits only reference), the document converges to the spec spelling on the next save, and the precedence control makes the spec key win. Distinct from #6043: identical value grammar both sides (z.string() object machine name).

Claim match: PR body Clause-②: yes · card claim comment 5608380613 appended Clause-②: yes · --pair 8899 exit 0 ("both carriers agree").

Governed surface

check-governed-queue-guard.mjs --test over the 3 paths → NOT GOVERNED (exit 0). Governed Surface Queue Guard check green.

CI on head

33 check-runs, all head_sha = 3a200e94a… (pinned via REST). 30 success, 3 skipped (Test (coverage), Test (coverage shard), dependabot — expected matrix skips, not failures). Lint ✓, Type Check ✓, Test shards 1–4 ✓, Changeset Declaration/Bump Policy/Fixed Group ✓, Build & E2E ✓. No red ⇒ no causation needed.

Findings

F1 — Correctness vs the card: PASS. The card's named path (legacy lookup, target only as referenceTo, author relabels an unrelated field) round-trips: toDesignerField:247 → storedRelationshipTarget; wire carries reference:'contact', no referenceTo, FieldSchema.safeParse green. Sibling paths: create (FieldDesigner.tsx:227-245, no prev) unaffected; edit — form seeds referenceTo: editingField.referenceTo || '' (:368), so the legacy target is now visible and preserved where it was blank before; rename — model retains referenceTo, re-emitted as reference under the new key (pre-existing loss of carryOver unknown keys on rename is unrelated); type change — guard scoped to lookup/master_detail (field.zod.ts:1858), reference is plain z.string().optional(), behaviour identical to spec-spelled docs today. objectui#7714's guard (:584-597, describeUnusableTarget, RELATIONSHIP_TYPES_REQUIRING_REFERENCE) is byte-unchanged in the diff.

F2 — Tests: PASS. 13 → 15 it(). The flipped pin is stated in full with the required before/after order (13 green → 1 failed/13 unedited → 15 green). Controls: (a) no target under either spelling still refused by name with puts=[] — would go green if the fallback satisfied the guard instead of finding a value; (b) both spellings disagree → spec wins; (c) #6041 strip assertion untouched, shared fixture still carries both keys. Positive case fails on the loss: stale.referenceTo was undefined before, and waitFor(localPuts).toHaveLength(1) would time out under the guard. beforeEach resets state; new block uses a local PUT recorder. No other file in the repo pins the old refusal.

F3 — Scope: PASS. Three files, one package. No content/docs/releases/. Preserved-half / metadata-admin readFields / registry "loses nothing" sentence filed as #8896 (exists, dispatched); spec-pin drift as #8897. The carryOver docblock rewrite (:274-303) is the card's own second deliverable. Census rows at …test.tsx:75 verified class (B): blank on main, prose on head — correctly left to #8875.

F4 — Changeset: PASS. .changeset/8058-designer-lookup-target-retired-spelling.md: @object-ui/plugin-designer: patch, no major, body names the user-visible effect and the #6043 distinction.

F5 — Note, no rework. storedRelationshipTarget uses ??, so reference: '' beside referenceTo: 'x' yields '' (then refused as "empty") rather than falling back; the docblock's "only when the spec key holds nothing" reads slightly wider than the code. Unreachable from this repo's writers (FieldDesigner maps empty → undefined; every post-#6041 save strips referenceTo), and spec-key-always-wins is the safer #0.1 reading. Record only.

F6 — Note, forward dependency. #8896's proposed canonicalize-at-strip does not make this read fix redundant: fromDesignerField spreads carryOver(prev) then overwrites with reference: designed.referenceTo, so without the read door the designable half would still lose the target. Both are needed; nothing to hold.

F7 — Evidence verified. "Installed 17.4.0" holds: pnpm-lock.yaml at origin/main, merge-base and head all resolve @objectstack/spec@17.4.0 (#8783). The pre-existing 17.3.0 docblock at :553-567 is correctly left to #8897.

F8 — PR form: PASS. Draft, base main, first line Fixes #8058 (correct — both halves of the card are delivered; remainder is separately carded). No closing keyword adjacent to another open card (#8896/#8897 appear as "Filed as").

Docs: no user-facing page describes this read door (only unrelated referenceTo mentions in filter-builder / report-schema / ADR-0059). Changeset is the reader-facing note. Adequate.

Acceptance notes


Generated by Claude Code

Copy link
Copy Markdown
Collaborator

Landing provenance — director seat, summon #18 segment 6 (session_017Js5kTpTtxieBjPyScgxJ3, 2026-09-10T00:14:07Z). Clearing needs:contract-review on both carriers (objectui#8899 + card objectui#8058) on the strength of the contract-review-tier PASS at #8899 (comment) (head 3a200e94a7, unchanged). Landing pre-checks (contract-review.md ①②③): ① tier verdict on the card (pointer posted); ② check-clause2-carriers.mjs --pair 8899 exit 0; ③ 33 check-runs on head, 0 red / 0 in progress; governed-surface test exit 0 (not governed); mergeable_state: clean. Next: ready → auto-merge (SQUASH) → merge-queue entry, per landing-operations.md. Executed under the maintainer's 2026-09-09 13:4xZ order 「把当前的契约复审全部处理完」 precedent; the dispatching seat keeps ACCEPT/landing-window duties (MERGED confirmation + card close-out) if it is back before the queue finishes — otherwise this seat closes out.


Generated by Claude Code

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants