…op (objectui#9700) (objectstack-ai#9728)
Fixes objectstack-ai#9700
Clause-②: no
## ⭐ The fresh reading first — outcome 1, on today's `main`
The card measured this gate at `bbe57fdd52`, before PR objectstack-ai#9702 rewrote the
file. Re-measured on
`dea17b469` (branch base), with `--list`:
| registration | census rows |
|---|---|
| `detail` (registers `DetailView` **raw**) | 3 — `onNavigate`,
`onAddComment`, `onTabChange`, all at `DetailView.tsx` |
| `detail-view` (registers the **wrapper** `DetailViewRenderer`) | **0**
|
⇒ **the wrapper hop is still invisible.** objectstack-ai#9702's re-keying did not
touch it: that change decided
*which arm* a registration is scored against, and this defect is about
*whether the component is
reached at all*. Gate exit 0 either way.
## The mechanism — derived, not inherited from the card
The card declined to name one. Measured with `documentCarryingChildren`
on the real
`DetailViewRenderer` node:
```
before: ['ElementDataSourceGate']
after: ['ElementDataSourceGate', 'DetailView']
```
Isolated on a minimal fixture, one token apart:
```
schema={bound as DetailViewSchema} -> Gate (hop NOT taken)
schema={bound} -> Gate, DetailView (hop taken)
schema={bound satisfies X} -> Gate (hop NOT taken)
schema={bound!} -> Gate (hop NOT taken)
```
⇒ ⛔ **not** the `hops > 4` cap, ⛔ **not** a failure to resolve the
wrapper's reference, ⛔ **not**
the wrapper stopping the walk. `resolveComponent` already handles the
HOC spelling and the wrapper's
inline body is walked. What closed the hop is a **type-only cast on the
`schema=` attribute that
hands the child the document**: `carriesDocument` tested the raw
expression, so
`{(bound) => <DetailView schema={bound as DetailViewSchema} />}` read as
"not the parent's document"
and `DetailView` was never enqueued. The data-source gate is imported
from another package and
cannot be followed, so that render-prop hop was the only way in.
⚠️ objectui#9344 peeled exactly these wrappers off a READ receiver — *"a
cast is erasure … a census
that sees one and not the other is not describing the runtime"* — and
stopped there. **The two
failures are not symmetric.** A hidden read still leaves its component
in the census; a hidden HOP
removes the component entirely: no finding, no census row, no ledger
row, and the green then reads
as "no undeclared reads" over a file the gate never opened. That is the
state objectui#9447 stood
in, and it is why this is a card of its own.
## ① The repair
`peelErasure` is extracted from `erasedReceiverName` and shared with
`carriesDocument`, so a cast
changes what the census READS about a node and never whether it SEES it.
⚠️ It widens what the walk **sees**, never what it **follows**. The node
underneath still has to be
a document identifier or a spread of one, and an object literal writing
its own `type` is still a
NEW document — the narrowing that keeps `ViewSwitcher`'s `onViewChange`
off `ObjectViewSchema`.
Both directions are pinned.
## Measured delta on this tree — the class is ONE instance, not a
population
`--list` diff, before vs after: **46 -> 49 reachable reads**, and the
three added rows are all
`detail-view`, all read in `DetailView.tsx`. ⇒ every other
`elementDataSourceBlock` wrapper in the
repo (17 of them) already hopped fine; `detail-view` is the only one
that hands its child a cast.
The card asked for that enumeration and this is its answer: **no sibling
sweep is owed.**
## ⚠️ The one judgement call — a NEW ledger row, and why it is not the
forbidden one
The repair surfaces one finding:
`detail-view::DetailViewSchema.onTabChange`.
- It is the **same read site** as the existing
`detail::DetailSchema.onTabChange` row —
`DetailView.tsx`'s `(schema as any).onTabChange` — scored a second time,
correctly, under the
other registration that reaches that component. `register('detail-view',
DetailViewRenderer,
{ namespace: 'plugin-detail' })` omits `skipFallback`, so it claims the
bare `detail-view` key and
`DetailViewSchema` IS its arm.
- The number of live undeclared **read sites** did not move: one line,
before and after. What moved
is how many of the two registrations reaching it the gate can score —
one, now both.
- ⛔ It is **not** a row bought to make a widening quiet. Ledgering the
*blind spot* would invert the
map's meaning; this row is a defect the blind spot was **hiding**, which
is what the ledger is
for, and the file's own instruction text says so: *"if the fix belongs
to another card, add the key
to KNOWN_UNDECLARED_READS with the card that owns it."*
- ⭐ And it **cannot outlive the repair**: under ablation the gate's own
`staleExemptions()` reds on
this exact row ("The defect the row waives is gone, so the row is now a
live waiver for nothing").
The row is welded to the hop.
⚠️ **The alternative was the Clause-② fork and was refused.** Declaring
`onTabChange` on
`DetailViewSchema` widens a published accept set ⇒ `Clause-②: yes` ⇒ not
this card's to take. The
disposition is objectui#7804's, open, and it is the card both rows
carry.
## ② The pin that can go RED
`scripts/__tests__/check-handler-key-read-sites.test.ts` gains a block
that rebuilds objectui#9447's
shape hop for hop: `register('detail-view', DetailViewRenderer)`,
`elementDataSourceBlock(...)`, a
data-source gate imported from another package, and the render-prop
child handed
`bound as DetailViewSchema`.
- **The firing pin** — arm declares nothing, the gate must reach the
component and report the key.
- **The control on it** — same tree, key declared: GREEN, with
`reads`/`judged` floors so the green
cannot be a walk that found nothing.
- ⭐ **FIRING CONTROL, one token apart** — the operand under the cast
changed from the render-prop
document to an unrelated local declared two lines above it. The hop must
NOT be taken, paired with
its lit half so the zero is a reading and not an unreached fixture.
- Six erasure spellings on the hop side, and the built-document
narrowing under a cast.
- On the real tree: the three `detail-view` rows NAMED (an empty
`detail-view` census is the blind
spot restored), with the raw `detail` twin's three rows as the control —
the repair only ever ADDS
hops, so those must be untouched.
### Ablation — restore the pre-repair `carriesDocument` body, read the
pin
Mutation proved on disk (`peelErasure` call 2 -> 1, pre-fix paren
recursion 0 -> 1; blob hash
`fb8841ce` -> `b97508be`), restored via `git checkout HEAD --` with the
hash re-compared and
`git diff HEAD` empty.
```
gate exit=1 (staleExemptions reds on the new ledger row)
vitest exit=1 11 failed | 38 passed (49)
```
All ten wrapper legs RED, plus the ledger-honesty leg. On the repaired
tree: **49 passed (49)**.
## Verification
| run | result |
|---|---|
| `pnpm --filter @object-ui/types test` | 203 files / 4757 tests passed
|
| `pnpm --filter @object-ui/plugin-detail test` + the gate suite |
`VERDICT command-exit 0` — 181/1742 and 1/49 |
| `pnpm type-check:scripts` | exit 0 (the edited test file is in that
project — `--listFiles` hit 1) |
| `check:handler-key-reads` | `OK … 49 reachable … 2 exempted` |
| `check:control-bytes` · `check:new-line-citations` ·
`check:changeset-no-major` · `check:changeset-claims` ·
`check:pending-changeset-literals` · `check:comment-mask-corpus` ·
`check:component-surface-parity` ·
`check:element-data-source-declaration` · `check:spec-symbols` ·
`check:sdui-registration-pins` · `check:registry-bare-names` | all exit
0 except `check:sdui-registration-pins` |
| `check:changeset-presence` | exit 0 — 1 empty-frontmatter changeset |
| eslint, targeted | 4 files, 0 errors, 0 warnings |
- ⚠️ `check:sdui-registration-pins` exits **2 = PREREQUISITE NOT MET**,
not red: *"No console build to
weigh at apps/console/dist/assets."* Read as **NOT MEASURED**; this diff
adds and removes no
registration and does not touch the bundle. Left to CI, which builds the
console.
- ⚠️ `pnpm -s check:changeset-no-major` reported exit 254 with no
output; run directly the script
exits **0** with `✅ No changeset declares a 'major' bump.` The 254 is
pnpm's wrapper, not a gate.
- The eslint run is a **declared narrowing**: ① the population is
eslint's own config; ② 4 files, read
from `--format json`; ③ invariance — `eslint.config.js` configures no
type-aware linting (no
`project` / `projectService`), so this diff cannot move the verdict on
any untouched file. Repo-wide
lint is CI's run.
## Prose this change falsified, repaired in place
Two live docblocks stated *"its transitive hop stops at the wrapper"*
and told readers ⛔ not to read
the gate's green as evidence — `DetailViewSchema`'s `onNavigate` member
and
`detail-view-handler-slots-9447.test.tsx`. Both are now false in the
direction that matters (they
say the gate is blind where it is not), so both are rewritten. ⚠️
**Comment-only**: no zod member,
no runtime behaviour, no published contract field. Surface re-measured —
all four files held by
**0 of 13** open PRs, 1804 filenames fully paginated, positive control
`.github/workflows/ci.yml -> objectstack-ai#9584`.
The changeset is therefore an **empty-frontmatter declaration**, which
`check-changeset-presence.mjs` names as a first-class pass.
## Acceptance notes
- ⚠️ `resolveComponent`'s CallExpression branch returns the first
capitalised identifier argument and
**discards the wrapper call's own body**, so a wrapper spelled
`block(Inner)` that also renders
document-carrying JSX around `Inner` would lose the outer half. Not
reachable on this tree — the
one such registration (`register('record_picker',
elementDataSourceBlock(ElementRecordPickerRenderer))`)
renders nothing around it. Noted, not filed: no undeclared read is
exposed and no open PR passes
this file.
- ⚠️ `check:sdui-registration-pins` cannot be run without a console
build; nothing here is implicated.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_015h79niBMyoB1xcaQje3uiz
---
_Generated by [Claude
Code](https://claude.ai/code/session_015h79niBMyoB1xcaQje3uiz)_
Co-authored-by: Claude <noreply@anthropic.com>
Fixes #9573
Clause-②: no
scripts/check-handler-key-read-sites.mjskeyed a registration by its raw type string.register()in@object-ui/core'sRegistrysetsns:type, and sets the baretypekey only when a namespaced registration omitsskipFallback— so a renderer registered as{ namespace: 'view', skipFallback: true }was judged against the arm of the bare key, the keyskipFallbackexists to stop it claiming. The census asked its question of a schema minted for a different component.registrationsInnow reads the third argument and resolves it to literals (an inline object, a same-fileconst, a spread of one — the tree uses all three: five page registrations hand over a sharedpageMetaidentifier and four spread it).analyzethen looks the arm up by the keys the registry would resolve the registration under.The count moved in BOTH directions, and neither direction is a relaxation
Thirteen
KNOWN_UNDECLARED_READSrows leave, and none by being declared. Each was produced by a registration carryingskipFallback: trueunder a namespace —action:button,action:icon,page:tabs,view:form,view:grid,view:list— so the arm named in the row was another component's: a bullet/numbered list, a Shadcn button, theui:tabscontainer.@object-ui/plugin-list's own registration comment says it in the repo's words: "the barelistkey belongs to the bullet/numbered list DISPLAY primitive".object-form,object-grid,list-view— where all ten are declared runtime slots. What left is a second, wrongly addressed scoring of them.A false green went with them, and the ledger could never have shown it.
'form' FormSchema.onCancelpassed only becauseFormSchemais theui:formprimitive's own arm and mints its ownonCancelfor its own destructure; the two spellings coincided. A passing read leaves no row, so no count of the ledger could see that half. It is now scored once, onobject-form.detail::DetailSchema.onTabChangestays:register('detail', DetailView, { namespace: 'view', category: 'view' })carries noskipFallback, so it does claim the bare key andDetailSchemaIS its arm. Its disposition is still undecided and still owned by objectui#7804.The gate was not made to look at less
The three reads that now have no arm anywhere (
action:button,action:icon,page:tabsregister nowhere else) are not dropped. They are reported asUNMIRRORED-ALIAScensus rows carrying the bare arm they are not, counted in the OK line and printed by--list— boundary 3 of this gate made countable. Bringing them into judgement means mirroring the namespaced key, never declaring it on the bare arm.A registration whose
namespace/skipFallbackcannot be resolved to literals is refused rather than guessed at (scoped to types that have an arm, since the rest were never judged). That is also the floor under the keying itself: a broken resolver leaves every registration unkeyed and reds. The repository has zero today.Verification
Gate, before and after on this branch (
node scripts/check-handler-key-read-sites.mjs):Reverse verification (ablation), run from the committed state. One line reverted —
armKeyback to the raw type string — with the drained ledger and everything else left in place. On-disk proof: the injected spelling greps 1 and the removed spelling greps 0, and the mutated blob hash differs from theHEADblob (dc8e822); restore isgit checkout HEAD -- <path>under atrap, proved by an emptygit diff HEAD.⇒ the thirteen rows are produced by the raw-string keying itself. Each left this ledger with a reason drawn from its registration, which is why
Clause-②staysno.Tests:
scripts/__tests__/check-handler-key-read-sites.test.ts— 38 passed, 7 new legs, including the firing control that the same registration withoutskipFallbackclaims the bare key and goes RED (one property, same literal, same file), a leg that mirroringview:listbrings the read back into judgement on its own arm, the false-green leg, thepageMetaidentifier/spread resolution leg and the unkeyable-refusal leg. The repository leg names the six aliases rather than counting them, so a collapsed census reds instead of reading as a clean tree.Surface note
packages/plugin-kanban/src/__tests__/handlerKeyDispositionsMeasured-7804.test.tsxis a third file beyond the two this task claimed, and it is amended here rather than left red: its suite-4 CONTROL namedbutton::ButtonSchema.onSuccessas the witness row, and that row is one of the thirteen. Its own comment prescribes exactly this repair — "re-derive it againstKNOWN_UNDECLARED_READSrather than dropping the name and leaving the length check alone". The witness is nowdetail::DetailSchema.onTabChange, the one row that is not alias-shape. Held by 0 of the 13 open PRs (fully paginated, 1804 filenames, positive control.github/workflows/ci.yml -> #9584fires).The changeset is empty-frontmatter: the gate's own verdict line demanded one because a published package's
src/tree was touched (a test file), and nothing published moves.Acceptance notes
registerLazycarries the samenamespace/skipFallbackmechanics and this census reads onlyregister, so a lazily-registered renderer's reads are outside it in both spellings. That is pre-existing, unchanged by this PR, and not a defect in the keying — filing it would need a measurement of whether any lazy registration has a mirrored arm at all. Carrier: whoever next widens what this census walks.Generated by Claude Code