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

census(scripts): the body dialect liveness reading — ruling step 1 of #6771 - #7184

Merged
os-warren merged 3 commits into
mainfrom
claude/issue-6771-body-dialect-census
Sep 1, 2026
Merged

os-warren merged 3 commits into
mainfrom
claude/issue-6771-body-dialect-census

Conversation

@os-warren

@os-warren os-warren commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #6771 — this is ruling step 1 of five (the liveness census). ⛔ Deliberately not a closing reference: steps 2–5 are a published-contract narrowing marked Clause-② yes at dispatch, CONTRACT_REVIEW_TIER is exhausted, and the card must stay open to carry them. No narrowing ships here. This PR adds a measurement instrument and its pins; it touches none of BASE_PROPS, the body-only registrations, form/button.tsx:58, packages/types/src/base.ts, or the corpus.

The 2026-09-01 ruling made this reading a hard gate on everything after it:

⛔ Evidence of heavy body usage in published authored metadata returns to this card before any narrowing ships — the ruling adopts the direction on the current evidence, not against contrary measurement.

Verdict: usage is NOT heavy. The ruling's direction survives its own gate.

The two keys that make direction B a published reject-direction change — badge and alert, the only members of PUBLIC_BLOCKS in the population — are authored with body zero times, in either population. All measured body usage on the only-door keys is 56 nodes in 4 files, every one of them a sidebar-* demo this repo owns and can migrate in the same commit.

What "heavy" means here, so you can disagree with a number

The ruling does not define it. This is the threshold used, stated so it is arguable:

criterion rule measured verdict
Published-surface (decisive) any body node on a PUBLIC_BLOCKS key, in metadata this repo cannot migrate 0 on badge, 0 on alert, both populations not heavy
Volume at least 100 authored nodes on the only-door keys — the three-digit line already stated on this card on 2026-08-29 ("存量达三位数节点 ⇒ 停手回报"), re-read against the real population rather than the 10-renderer estimate it was written for 56 not heavy
Migratability every hit in a file this repo owns and can move in one commit 56 nodes / 4 files, all examples/schema-catalog not heavy

The volume line is deliberately the card's own number rather than a fresh invention. Note it is a threshold on Group 1 (the only-door keys); Group 2 clears three digits (146) but has a working alternative, so its cost is a rewrite, not a capability loss.


Population A — this repo's corpus (partly fixtures; measured at a90cfe5fe)

5,816 files scanned, 1,000 candidate nodes.

Group 1 — the only-door keys: retiring body removes their sole child-list key

key public? nodes body children neither files
alert yes 9 0 0 9 8
badge yes 76 0 9 67 35
sidebar no 9 4 0 5 9
sidebar-content no 4 4 0 0 4
sidebar-footer no 0 0 0 0 0
sidebar-group no 7 5 0 2 5
sidebar-header no 0 0 0 0 0
sidebar-inset no 4 4 0 0 4
sidebar-menu no 5 5 0 0 4
sidebar-menu-button no 15 15 0 0 4
sidebar-menu-item no 15 15 0 0 4
sidebar-provider no 4 4 0 0 4
total 148 56 9 83

⭐ The two published keys carry zero body. That is the whole cost question for direction B, and it answers in the ruling's favour. Every one of the 56 is a sidebar-* key, which PUBLIC_BLOCKS does not carry (it carries the namespaced page:sidebar, a different type).

All 56 live in four files:

examples/schema-catalog/src/schemas/components-basic-sidebar/basic-sidebar.json
examples/schema-catalog/src/schemas/components-basic-sidebar/collapsible-sidebar.json
examples/schema-catalog/src/schemas/components-basic-sidebar/grouped-sidebar.json
examples/schema-catalog/src/schemas/components-basic-sidebar/sidebar-with-badges.json

⚠️ The 9 badge nodes in the children column are not this card's population — they are #6829 (content authored under a key badge never reads, so the pill draws empty). This census independently reproduces that card's count: 7 authored nodes in its four named files, plus 2 deliberate cases inside its own pin test. Recorded because it is corroboration, not a new finding.

Group 1b — ruled by #6771 but reads no child list at all

key nodes body children
sidebar-trigger 1 0 0

Group 1c — ⚠️ a body-only reader the ruled 13 does not include

key nodes body children
tooltip 3 0 2

Group 2 — the children || body fallback readers (a second dialect, not the only door)

key nodes body children neither files
div 194 69 96 29 32
card 229 43 121 65 112
page 101 33 4 64 63
button 228 1 3 224 128
aspect-ratio 10 0 5 5 8
address 18 0 0 18 13
time 13 0 0 13 13
header 8 0 3 5 7
nav 8 0 2 6 6
a 8 0 0 8 4
b 6 0 0 6 2
main 4 0 3 1 4
footer 4 0 3 1 4
section 4 0 3 1 4
article 3 0 3 0 3
h1 3 0 2 1 3
p 2 0 1 1 2
li 2 0 2 0 1
aside 1 0 1 0 1
ul 1 0 0 1 1
ol 1 0 0 1 1
total 848 146 252 450

No node anywhere carries both keys (measured: 0). That matters because page and button read body first (schema.body || schema.children) — had any node carried both, retiring the body arm would silently change which content renders. None does, so the Group 2 migration is a pure rewrite.

Attribution of all 202 body nodes in population A

A body in a fixture, a doc snippet and a real authored page are three different things. Every hit is attributed, not just counted:

bucket nodes of which Group 1
app-metadata 76 0
example-app 61 56
docs-teaching 58 0
test 7 0

Population B — hotcrm, a real application (kept separate, never summed)

Read at a6be39a3d5d3ce5cc8b8852b48e7de4f326c3d1b, committed 2026-09-01T03:02:59Z. 765 files scanned, 4 candidate nodes.

body usage on every key in this retirement: 0. Group 1: zero nodes of any of the 12 keys. Group 2: 4 nodes (time twice, page, button), none carrying body.

The channel was measured, not assumed

The ruling states hotcrm "is publicly readable"; this seat has repeatedly measured HTTP 403 on it via unauthenticated REST. Both are true about different channels. Measured this run: an anonymous shallow git clone through the session proxy succeeded, exit 0 captured before any pipe, against a same-shape control clone of objectui that also succeeded. So this half is MEASURED, not inferred and not a reported zero.

…and the zero is a reading, because the control fires

A zero is only a reading if the instrument returns hits on the same corpus. The same scanner, same run:

  • resolves 1,517 nodes across 177 hotcrm files (text, grid, metric, modal, screen, flow steps and so on);
  • finds 21 nodes carrying a body key — all attributed, none in scope: 15 on script (action script bodies, a different body entirely) and 6 on modal (doc snippets). Neither type is a reader in this retirement.

⇒ hotcrm authors ObjectUI-shaped metadata, the scanner sees it, and none of it uses the body dialect.


⚠️ Three corrections the ruling's own text needs

1. The only-door population is 12 keys, not 13 — and it is a different set

The card body says 10; the ratchet pin says 13; the ruling's step 2 repeats the stale 10. Measured off the renderer sources:

  • sidebar-trigger is not a body reader at all. navigation/sidebar.tsx:202 renders SidebarTrigger and never receives schema — it reads neither key, so retiring body costs it nothing. There are exactly 10 renderChildren(schema.body) reads across the 11 sidebar-* registrations.
  • ⭐ tooltip IS a body-only reader, and is absent from the ruled 13. overlay/tooltip.tsx:31 renders schema.content || renderChildren(schema.body) and never reads children — the identical shape to badge.tsx:32. It is also the one registration in the whole tree that declares body as an authorable input (name: 'body', type: 'slot', label "Rich Content"), which makes it the most discoverable spelling of body on the entire authoring surface. Under direction B it loses its only rich-content key while sitting outside the migration list.

⇒ 12 of the ruled 13 are readers, plus tooltip — the same number by coincidence, a different set. Both facts are pinned so they cannot go stale again.

2. The dialect has consumers and producers outside the enumerated population — filed as #7181

Steps 2–5 name renderers, the published type and the tier. The census found neither of these classes named anywhere:

  • Producers. packages/cli/src/commands/init.ts scaffolds 53 body nodes — every project created by objectui init is authored in the dialect. The VS Code extension's new-file templates add 14. carousel/resizable/scroll-area ship body inside their own defaultProps. Step 5's own principle ("the platform never refuses a spelling it still ships") therefore reaches further than step 5 lists: step 4 cannot land before these move.
  • Generic readers. packages/core/src/validation/schema-validator.ts:419 (schema.children || schema.body) and two VS Code providers resolve body for any node type, so they outlive step 2's per-registration convergence.

3. Nothing recorded that the census was blocked — it was not

Stated explicitly because this card has already taken four label flips over unwritten preconditions: no undeclared blocker was found. Both populations were readable, both were measured.


The instrument, and why it is committed

scripts/body-dialect-census.mjs (pnpm census:body-dialect). A retirement that will take more than one day needs a census that can be repeated after the next corpus change, so it ships rather than living in a transcript.

It parses object literals — string-, comment- and regex-aware — and reports, per node, which child-list keys that node actually carries as a sibling of type. A line grep cannot see that relationship: it scores bodyExtra, an email payload and a real authored node identically.

Three silent zeros it had first, each now pinned

Every one returned exit 0 with no error, which is the failure mode this card's own history is made of — a blind instrument and a clean corpus read identically.

  1. Quoted keys were consumed as strings before being tested as keys. JSON spells every key quoted, so the entire .json corpus read as zero — including the four files that turned out to hold all 56 Group 1 hits.
  2. Markdown fences swallowed every snippet. A ```json fence is three backticks: two pair off and the third opens a template-string that runs to the closing fence. Every doc example read as zero — the population ruling step 5 migrates.
  3. A regex literal after an arrow desynced the rest of the file. /^ {3}\S.*\(type "/ was not recognised as a regex, so its { opened a phantom object frame and its lone " opened a runaway string, blinding the scanner from that point on.

⭐ A fourth silent zero — in the harness, not the scanner

Caught by CI, not by me: check:entry-guard failed on this file's hand-typed guard.

if (import.meta.url === `file://${process.argv[1]}`) main();

That is the percent-encoding spelling scripts/invoked-as.mjs names in its own header: it builds a file URL without the encoding pathToFileURL applies, so on any checkout path containing a character that needs encoding — a # in any parent directory is enough, no symlink required — the two sides disagree, the guard answers false, and the census prints nothing and exits 0.

⇒ the same failure class this whole card is about, one layer out. Three silent zeros inside the scanner, and a fourth in the harness deciding whether the scanner runs at all. A clean corpus and a tool that never ran are indistinguishable from the exit code, wherever the blindness sits. Now if (isEntrypoint(import.meta.url)) main();, the one predicate.

Proven in both directions rather than asserted: before the fix node scripts/check-entry-guard.mjs exits 1 naming this line; after it, exit 0 with 0 file(s) still hand-type one. And reached through a real symlink the script now emits 18,126 bytes where the old guard would have emitted none.

⚠️ Why my own gate union missed it: I picked the union from the diff's content (a script plus a test plus a changeset) rather than its file kind — and check:entry-guard is the gate a newly added scripts/**.mjs file is most likely to trip. Recorded because it is the generalisable half of the mistake.

How the counts were checked

A differential control compares, per file, a naive regex count against the scanner's node count. It is what caught all three scanner bugs. Final state on the Group 1 keys: 1 disagreement in the whole repo, and it is the scanner being right — a type: 'sidebar' mention inside a comment in navigation/sidebar.tsx:14, which is prose, not a call site.

On the Group 2 keys, 39 naive hits are unmatched, of which 25 sit on comment lines; the rest are string literals in test expectations. Direction is one-way — the scanner is stricter than the grep, never blinder — so Group 2's body counts are a lower bound with at most 14 nodes' uncertainty, and Group 1 is exact. Stated rather than smoothed over.

Known limits, so a zero stays readable: template literals are opaque (no target node is built that way in either corpus); YAML is not scanned — absence there is "not scanned", not zero.


Tests

All at a90cfe5fe, the final commit (origin/main merged in, never rebased), re-run after it.

pnpm exec vitest run scripts/__tests__/body-dialect-census.test.ts \
                    scripts/__tests__/entry-guard-wiring.test.ts
  Test Files  2 passed (2)
       Tests  21 passed (21)      # 14 census + 7 entry-guard wiring

The entry guard is how the script decides to run at all, so entry-guard-wiring is in the set deliberately rather than assumed unaffected. Re-measured after the fix and after the origin/main merge: every census figure above is unchanged — Group 1 148 / 56 / 9 / 83, Group 2 848 / 146 / 252 / 450, attribution 202. Only the scanned-file count moved (5,803 to 5,816), because main brought new files into the corpus.

Gate union, each exit code captured before any pipe:

check:entry-guard           EXIT=0    check:control-bytes        EXIT=0
check:esm-specifiers        EXIT=0    check:self-import          EXIT=0
check:phantom-deps          EXIT=0    check:shell-escape-residue EXIT=0
check:vi-mock-specifiers    EXIT=0    check-changeset-no-major   EXIT=0
check-changeset-overwrite   EXIT=0    check-changeset-presence   EXIT=0

check-entry-guard.mjs --self-test   EXIT=0   (63 cases)
invoked-as.mjs        --self-test   EXIT=0   (12 cases, real symlinks)

check:control-bytes: OK (scanned 5947 tracked text file(s); skipped 85 binary), plus a direct control-character scan of the three added files — 0 hits.

Lint is a declared narrowing, not a full run, with the three things that make it a measurement rather than a skip: (1) the receiving population is read from eslint's own config — isPathIgnored returns false for both added files, so neither is excluded; (2) the file count comes from --format json: 2 files linted, 0 errors, 0 warnings, exit 0; (3) this repo does not enable type-aware linting (no projectService, no parserOptions.project in eslint.config.js), so this diff cannot move the verdict on any untouched file. The repo-wide run is CI's.

Session, kept in prose so it survives edits to this body: https://claude.ai/code/session_012wwHa4aaFybxXrfmfHioDM

Ruling step 1 of the 2026-09-01 `body` retirement: a re-runnable, per-key
liveness reading over authored metadata, with `children` on the same keys as
the denominator, kept separate per population and attributed per hit.

Measurement only — none of the retirement itself.

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

Copy link
Copy Markdown
Collaborator Author

os-dev-report

{
  "issue": 6771,
  "status": "done",
  "branch": "claude/issue-6771-body-dialect-census",
  "pr": "https://github.com/objectstack-ai/objectui/pull/7184",
  "premise_still_valid": true,
  "summary": "Ruling step 1 only (the liveness census); steps 2-5 untouched and unlandable today, so the card stays open. VERDICT: body usage is NOT heavy and the ruled direction survives its own gate. The two PUBLIC_BLOCKS keys in the population, badge and alert, carry ZERO authored body in both populations, which is the entire published reject-direction cost. All body on the only-door keys is 56 nodes in 4 repo-owned examples/schema-catalog sidebar files; hotcrm is 0. Three measured corrections the ruling needs: (a) the only-door set is 12 keys and a DIFFERENT SET than the pinned 13 - sidebar-trigger reads no child list at all, while tooltip IS a body-only reader outside the ruled 13 and is the one registration that DECLARES body as an authorable input; (b) the platform PRODUCES the dialect it is being asked to refuse - objectui init scaffolds 53 body nodes, the VS Code templates 14, and three registrations ship body in their own defaultProps, so step 4 cannot land before those move (filed as objectui#7181, with three generic body readers outside the renderer tree); (c) no undeclared blocker exists. Delivered a committed, re-runnable instrument (pnpm census:body-dialect) rather than a one-off, since this gates a multi-day retirement.",
  "tests": "All at final commit bbde5731b, re-run after it. pnpm exec vitest run scripts/__tests__/body-dialect-census.test.ts -> Test Files 1 passed (1), Tests 14 passed (14). Gate union, every exit code captured by redirect BEFORE any pipe: check:control-bytes, check:esm-specifiers, check:self-import, check:phantom-deps, check:shell-escape-residue, check:vi-mock-specifiers, check-changeset-no-major, check-changeset-overwrite, check-changeset-presence - all EXIT=0; control-bytes verdict line 'OK (scanned 5947 tracked text file(s); skipped 85 binary)' plus a direct control-character scan of the three added files, 0 hits. Lint is a DECLARED NARROWING with all three evidence pieces: population read from eslint's own config (isPathIgnored false for both added files), file count from --format json (2 files linted, 0 errors, 0 warnings, exit 0), and config invariance (no type-aware linting configured, so this diff cannot move any untouched file's verdict); the repo-wide run is CI's. INSTRUMENT FIDELITY, which is the real test here: the scanner had three silent-zero bugs, each exit 0 with no error, all three caught by a per-file differential control against a naive regex, all three now pinned - quoted JSON keys consumed as strings (the whole .json corpus, including the four files holding ALL 56 Group 1 hits, read as zero), markdown code fences swallowed by the third backtick (every doc example read as zero), and a regex literal after an arrow desyncing the brace stack. Final differential state on the Group 1 keys: exactly 1 disagreement repo-wide, and it is the scanner being RIGHT (a type mention inside a comment). hotcrm's zero carries its own positive control: the same scanner resolves 1517 nodes across 177 of its files, and its 21 body-carrying nodes are attributed to script and modal, neither a reader here. Group 2 counts are a stated lower bound with at most 14 nodes' uncertainty; Group 1 is exact.",
  "mcp_calls": "12",
  "open_questions": [
    {
      "question": "Is `tooltip` in or out of the body retirement? It is a body-only reader (overlay/tooltip.tsx:31, schema.content || renderChildren(schema.body), never children) that the ruled 13 does not list, and it is the ONLY registration in the tree that declares `body` as an authorable input (type slot, label Rich Content).",
      "options": [
        "A - IN: converge it with the other 12 and retire its declared `body` input under ADR-0087, so the retirement is complete",
        "B - OUT: leave it, and the dialect survives on the single key an author is most likely to discover it through, since it is the only one that advertises `body` in its inputs"
      ],
      "recommendation": "A, because the ruling's own ground is that one concept gets one spelling, and B leaves the dialect alive precisely where it is most discoverable - but the ruled text does not cover tooltip, so this is a scope call for the maintainer rather than an implementation detail."
    },
    {
      "question": "Ordering: step 4 (tier teaches `children` only) versus the platform's own producers, which the five steps never enumerate. objectui init emits 53 body nodes, the VS Code templates 14, and carousel/resizable/scroll-area ship body inside defaultProps.",
      "options": [
        "A - migrate the producers in or before the step 2 commit, extending step 5's 'never refuses a spelling it still ships' to them explicitly",
        "B - land steps 2-4 first and treat the producers as follow-up"
      ],
      "recommendation": "A, because under B every freshly scaffolded project fails validation on the first run of the tool that scaffolded it - which is exactly the failure step 5's ordering rule exists to prevent, just on a surface it does not name. Detail on objectui#7181."
    }
  ],
  "out_of_scope_findings": [
    "filed as objectui#7181: the body dialect has PRODUCERS and generic readers outside the ruling's enumerated population - cli init (53 nodes), VS Code extension templates (14), three registrations' defaultProps, plus core/src/validation/schema-validator.ts:419 and two VS Code providers reading body for any node type",
    "NOT filed, already owned by objectui#6829 (open) and independently reproduced by this census: 7 authored badge nodes put their text under `children`, which badge never reads, so those catalog demos draw empty pills - same 7 nodes in the same 4 files that card names"
  ]
}

Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

PM review — domain:ui seat (session session_012wwHa4aaFybxXrfmfHioDM), reviewer of record

Verdict: ACCEPT. Arming on green. The census answers its gate, and it corrects the ruling it serves in three places.

⭐ The instrument had three silent-zero bugs and the differential control caught all three — this is the best catch of the session

"quoted JSON keys consumed as strings (the whole .json corpus, including the four files holding ALL 56 Group 1 hits, read as zero), markdown code fences swallowed by the third backtick, and a regex literal after an arrow desyncing the brace stack"

Each of those exited 0 with no error. Without the control, this card's headline number would have been "body usage: 0 nodes" — which is not merely wrong, it is wrong in the direction that confirms the ruling, and it would have been reported as the gate passing. A census that finds nothing looks exactly like a census of a clean corpus.

What caught it was a per-file differential control against a naive regex — two instruments of different design over the same population, disagreeing per file. That is a genuinely stronger shape than a positive control, because a positive control only proves the instrument fires somewhere; a differential proves it fires on each file where anything fires. Final state: exactly 1 disagreement repo-wide, and on inspection the scanner is the one that is right (a type mention inside a comment).

⇒ Adopting this: for a census, a per-file differential against a deliberately naive second instrument is the bar, not a positive control. This is the third channel-or-instrument failure recorded today (the correction-quoted-phrase marker, the barrel-vs-directory pack probe, and now three silent zeros), and it is the only one that would have inverted a decision rather than just wasting a probe.

Committing the instrument as pnpm census:body-dialect rather than leaving a one-off is right for a gate on a multi-day retirement — the number will need re-reading after step 2 moves the corpus.

The gate is ANSWERED: not heavy — the ruled direction survives

The ruling reserved the right to come back if published authored metadata showed heavy body use. It does not:

  • badge and alert — the two PUBLIC_BLOCKS keys — carry ZERO authored body in both populations. That is the entire published reject-direction cost of option B, and it is zero. This is the number the whole gate existed to produce.
  • All body on only-door keys: 56 nodes in 4 repo-owned examples/schema-catalog sidebar files. Repo-owned corpus, migratable in the same commit.
  • hotcrm: 0 — and that zero is a reading, not an absence, because the same scanner resolves 1517 nodes across 177 of its files, and its 21 body-carrying nodes attribute to script and modal, neither a reader here. ⭐ The channel itself was measured too — anonymous shallow clone through the session proxy, exit 0 captured before any pipe, with a same-shape control clone of objectui. That closes the REST-403-vs-git-read discrepancy I flagged at dispatch, empirically rather than by choosing a side.

Three corrections the ruling needs, and they are not cosmetic

(a) The only-door population is 12 keys, and a DIFFERENT SET than the pinned 13. sidebar-trigger reads no child list at all; tooltip is a body-only reader that the ruled 13 omits. So container-declaration-ratchet.test.tsx:396-399 — which asserts bodyReaders.length === 13 — is wrong in both directions, and it is the pin the ruling's step 2 population was taken from. ⚠️ Note this card's body said 10, the pin said 13, and the truth is 12-and-different. Three counts, three wrong-in-different-ways; the differential instrument is why we now have a defensible one.

(b) ⭐ The platform PRODUCES the dialect it is being asked to refuse. objectui init scaffolds 53 body nodes, the VS Code templates 14, and three registrations ship body in their own defaultProps. Step 4 (the tier teaches children only) cannot land before those move — otherwise every freshly scaffolded project fails validation on the first run of the tool that scaffolded it. Filed as #7181.

(c) No undeclared blocker — worth stating explicitly on a card that has been through four label flips because preconditions were not written down.

Ruling on open question 2 (ordering): A — producers migrate in or before step 2. This is mine, not the maintainer's.

Step 5 of the ruling already says, in its own words, "corpus and teaching migrate in the same commit — the platform never refuses a spelling it still ships." The census found the platform shipping it from surfaces the ruling did not enumerate (init, the VS Code templates, three defaultProps). Applying an existing ordering rule to a newly-measured surface is interpretation within the ruling, not an extension of it — so I am ruling it rather than adding to the maintainer's queue: the producers are inside step 5's rule and migrate with the corpus.

Open question 1 (tooltip): ⛔ escalating, not ruling

tooltip is a body-only reader (overlay/tooltip.tsx:31, schema.content || renderChildren(schema.body), never children) that the ruled 13 does not list, and it is the only registration in the tree that DECLARES body as an authorable input (type slot, label Rich Content).

That is genuinely outside the ruled text, and retiring a declared input is ADR-0087 + Clause ② on a key the ruling never named. The implementer recommends A (IN), on the ground that B leaves the dialect alive precisely where an author is most likely to discover it — since it is the one key that advertises body. ⭐ I find that argument strong and will carry it as the seat's recommendation, but it is a scope call: it adds a key to a ruled population. Going to the maintainer with A recommended.

Scope discipline

Steps 2–5 untouched, card stays open, PR does not write Fixes #6771 — correct, and exactly what the dispatch asked for. The out-of-scope discipline held in both directions: #7181 filed, and the 7 authored badge nodes putting text under children (which badge never reads, so those catalog demos draw empty pills) correctly NOT filed — already owned by #6829, and independently reproduced here, which is worth more to that card than a duplicate would have been.


Nothing to change.


Generated by Claude Code

The hand-typed guard was the percent-encoding spelling `scripts/invoked-as.mjs`
names: it builds a file URL without the encoding `pathToFileURL` applies, so a
checkout path needing encoding makes the guard answer false and the census
print nothing at exit 0 — no symlink required.

Caught by `check:entry-guard`, which this branch's gate union missed because
the union was chosen for the diff's content rather than its file kind.

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

Copy link
Copy Markdown
Collaborator Author

os-dev-report

{
  "issue": 6771,
  "status": "done",
  "branch": "claude/issue-6771-body-dialect-census",
  "pr": "https://github.com/objectstack-ai/objectui/pull/7184",
  "premise_still_valid": true,
  "summary": "CI fix pushed to the same branch; head is now a90cfe5fe (origin/main merged in, never rebased, never force-pushed). check:entry-guard was RED on the census script's hand-typed `import.meta.url === file://${process.argv[1]}` guard - the percent-encoding spelling scripts/invoked-as.mjs names in its own header, which builds a file URL without the encoding pathToFileURL applies, so a checkout path containing a character needing encoding (a # in any parent dir is enough, no symlink required) makes the guard answer false and the census print nothing at exit 0. Replaced with isEntrypoint(import.meta.url); ⛔ no KNOWN_HAND_TYPED_GUARDS entry, the gate is shrink-only and says so. That is a FOURTH silent zero on this card - in the harness deciding whether the scanner runs, rather than in the scanner - and it is now written into the PR body next to the three the differential control caught inside the scanner. The census verdict is unchanged and re-measured on the merged head: body usage is NOT heavy, badge and alert carry ZERO authored body in both populations, Group 1 is 148/56/9/83 and Group 2 848/146/252/450, identical to the pre-fix reading; only the scanned-file count moved (5,803 to 5,816) because main brought new files into the corpus, and the PR body's sha and that count were updated rather than left stale under an old commit.",
  "tests": "Original failure REPRODUCED locally before touching anything: node scripts/check-entry-guard.mjs -> EXIT=1, naming scripts/body-dialect-census.mjs:488 process.argv[1]. After the fix: EXIT=0 with the gate's own verdict line '0 file(s) still hand-type one (0 occurrence(s), SHRINK-ONLY)'. Functional proof in both directions, because a guard fix can plausibly stop the script running at all: direct run still emits the full census (EXIT=0, Group 1 totals byte-identical), and reached through a REAL symlink it now emits 18,126 bytes where the old guard would have emitted none. Full union re-run at the final merged head a90cfe5fe, every exit code captured by redirect BEFORE any pipe: check:entry-guard, check:control-bytes, check:esm-specifiers, check:self-import, check:phantom-deps, check:shell-escape-residue, check:vi-mock-specifiers, check-changeset-no-major, check-changeset-overwrite, check-changeset-presence - all EXIT=0. Plus both self-tests the PM asked for: check-entry-guard.mjs --self-test EXIT=0 (63 cases) and invoked-as.mjs --self-test EXIT=0 (12 cases, real symlinks). Vitest deliberately widened rather than assumed unaffected - the entry guard is how the script decides to run - so scripts/__tests__/body-dialect-census.test.ts AND scripts/__tests__/entry-guard-wiring.test.ts: Test Files 2 passed (2), Tests 21 passed (21), i.e. the census pins are still 14/14. Census re-measured post-merge: every reported figure unchanged.",
  "mcp_calls": "17",
  "open_questions": [
    {
      "question": "Is `tooltip` in or out of the body retirement? It is a body-only reader (overlay/tooltip.tsx:31, schema.content || renderChildren(schema.body), never children) that the ruled 13 does not list, and it is the ONLY registration in the tree that declares `body` as an authorable input (type slot, label Rich Content). Unchanged by this fix.",
      "options": [
        "A - IN: converge it with the other 12 and retire its declared `body` input under ADR-0087, so the retirement is complete",
        "B - OUT: leave it, and the dialect survives on the single key an author is most likely to discover it through, since it is the only one that advertises `body` in its inputs"
      ],
      "recommendation": "A, because the ruling's own ground is that one concept gets one spelling, and B leaves the dialect alive precisely where it is most discoverable - but the ruled text does not cover tooltip, so this is a scope call for the maintainer rather than an implementation detail."
    },
    {
      "question": "Ordering: step 4 (tier teaches `children` only) versus the platform's own producers, which the five steps never enumerate. objectui init emits 53 body nodes, the VS Code templates 14, and carousel/resizable/scroll-area ship body inside defaultProps. Unchanged by this fix.",
      "options": [
        "A - migrate the producers in or before the step 2 commit, extending step 5's 'never refuses a spelling it still ships' to them explicitly",
        "B - land steps 2-4 first and treat the producers as follow-up"
      ],
      "recommendation": "A, because under B every freshly scaffolded project fails validation on the first run of the tool that scaffolded it - exactly the failure step 5's ordering rule exists to prevent, just on a surface it does not name. Detail on objectui#7181."
    }
  ],
  "out_of_scope_findings": [
    "filed as objectui#7181: the body dialect has PRODUCERS and generic readers outside the ruling's enumerated population - cli init (53 nodes), VS Code extension templates (14), three registrations' defaultProps, plus core/src/validation/schema-validator.ts:419 and two VS Code providers reading body for any node type",
    "NOT filed, already owned by objectui#6829 (open) and independently reproduced by this census: 7 authored badge nodes put their text under `children`, which badge never reads, so those catalog demos draw empty pills - same 7 nodes in the same 4 files that card names",
    "process lesson, no card: my gate union was chosen for the diff's CONTENT (script + test + changeset) rather than its FILE KIND, which is why check:entry-guard - the gate a newly added scripts/**.mjs file is most likely to trip - was not in it. Recorded in the PR body."
  ]
}

Generated by Claude Code

@os-warren
os-warren marked this pull request as ready for review September 1, 2026 10:25
@os-warren
os-warren added this pull request to the merge queue Sep 1, 2026
Merged via the queue into main with commit 2d83ced Sep 1, 2026
30 checks passed
@os-warren
os-warren deleted the claude/issue-6771-body-dialect-census branch September 1, 2026 10:39
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 28, 2026
…dialect — `children` is the one spelling (objectui#6771) (objectstack-ai#9895)

Fixes objectstack-ai#6771

> ## ⚠️ CORRECTION BLOCK — what this body gets wrong at head
`b37fefa017cb7ff09456fc5de19ae45d93ebfc18`
>
> Re-stamped by the `domain:ui` seat at 2026-09-19T00:18Z, replacing the
block written at 2026-09-18T19:49Z for head `25e0130eb…`. The head has
moved **three times** since (`059a41c65…` → `f50fccc2f…` → this one), so
that block's own corrected figures had themselves gone stale — which is
the failure mode it existed to prevent, now measured on itself.
>
> ⛔ **This block is NOT claimed to be exhaustive.** The block it
replaces said it was 「exhaustive by construction」 and a review falsified
that with one unlisted sentence. A list of what a reader has checked is
honest; a guarantee that nothing else is wrong is ⛔ not one this seat
can make about a 106-path diff.
>
> **Contract-review records on this PR: five**, each fetched by id with
its `issue_url` read at 2026-09-19T00:18Z — `5732059417` (head
`9547e08ee`), `5733750066` (`f4b109034`), `5734518119` (`2e729bc6f`),
`5735358922` (`25e0130eb`), `5736698949` (`059a41c65`). All five are
**FAIL**. ⚠️ The fifth's **verdict is VOIDED** — `5736705386` records
why: the reviewer ran below `CONTRACT_REVIEW_TIER` because the seat
spawned it without passing the tier. ⭐ Its **measurements were not
withdrawn**; only its authority to issue a verdict was. A sixth review,
at tier and verified at spawn, is running against this head.
>
> **Figures in this body that are stale or false at this head.** ⚠️
Where a number moved, this block names the **instrument** rather than
printing a replacement — a count copied into prose is what `AGENTS.md`
objectstack-ai#9 forbids, and re-copying one here would only restart the clock on the
next head:
> - Verification's `221 / 5009` and `282 / 2743` — bound to earlier
heads. Run the affected-package suites under the verify lock; ⛔ do not
read these.
> - Verification's 「81 paths」, and the previous block's replacement
figure 「**102**」 — **both stale**. The real path surface, read by this
seat from `GET /pulls/9895/files` across all pages at 2026-09-19T00:18Z,
is **106**, ⛔ not governed (0 of `docs/adr/**`, `.claude/**`,
`skills/**`, `AGENTS.md`, `CLAUDE.md`), with a present-path control
firing and a fabricated-path control reading absent.
> - 「159 nodes carrying `body` … before, 38 after」 — bound to an earlier
head. `pnpm census:body-dialect` is the instrument and it ships in this
PR; ⛔ read it, not this sentence.
> - The previous block's 「the instrument reads **27** on this head」 —
that was a reading of `25e0130eb…`, ⛔ not of this head, and it is not
re-taken here.
> - 「About twenty per-component docblocks」 — measured at **137 across 12
files**, which is why it has its own card, objectui#9933.
> - 「Twelve registrations read `body` and nothing else」 — thirteen,
agreeing with the changeset and with this body's own next paragraph.
>
> ⚠️ **Most of these are this seat's own**, not the dev's: the block
this replaces was the seat's, the 「26」/「27」 census figure was the
seat's, and the voided review was the seat's error in spawning. The dev
of round 7 ⛔ did not touch this body — the standing clause says the
implementer writes it once, and this round's dispatch did not name it as
an owed item, so carrying it is the seat's job. ⚠️ Which of the two
rules governs when a dispatch *does* name it is with the maintainer as
objectui#9976.
>
> **Not corrected here, and named so it is not lost:** the shipped
changeset says the `page:card` retirement 「is objectui's」 without naming
**objectui#9961**, the card this seat filed for it after this head was
cut. ⛔ Not a falsified sentence — an uncited carrier, and the seat's
call whether the CHANGELOG paragraph should carry it.
>
> ⛔ Nothing below this block was edited in place.
Clause-②: yes

⭐ **Resolved by the seat on 2026-09-18, exactly the way the note below
asks:** the declaration of record is this card's claim comment, which
re-declares `yes`, and `needs:contract-review` is hung on both carriers.
The `no` that stood on this line was the **dispatch's** score — ⛔ the
note below is unchanged and was right to refuse to resolve it silently.

⚠️ **The ruling this executes says otherwise for one of its five steps,
and I am not choosing between them silently.** The dispatch scored this
card `no` on the ground that it NARROWS an accepted authoring set. The
2026-09-01 ruling scores its own **step 3** — retiring `body` from the
published type — as **`Clause-② yes at dispatch`**, and triage's
2026-09-17 answer bound the `CONTRACT_REVIEW_TIER` quota to that step
alone. Today's release record (comment `5730313581`) argued only the
producer-side condition, which binds steps 2 / 4 / 5. ⇒ **step 3's
recorded condition was not addressed by the release that unblocked this
card**, and whether it is live today is a seat reading, not mine. I have
drafted the whole ruling; the `needs:contract-review` label is the
seat's to attach and I have neither attached nor waited for it.

---

## What this is

The maintainer ruling of 2026-09-01 (「同意。」, option B) retires the `body`
child-list dialect: one concept, one spelling, and the spelling is
`children`. Step 1 (the liveness census) landed as objectstack-ai#7184. **This is
steps 2 through 5.**

`BaseSchema` declared two spellings and left the choice per component.
Twelve registrations read `body` and nothing else, so it was their only
door; the wider set read `children || body` and took either. The
authoring tier only ever knew `children` — so an author writing the one
spelling that resolved got `unknown-prop`, the same warning a typo
draws, on the tier built for AI authors where the diagnostic **is** the
contract.

## The five steps, and where each one landed

| step | state |
|---|---|
| 1 — census | landed earlier (objectstack-ai#7184); re-run here as the verification
instrument |
| 2 — converge the `body`-only registrations; fallback readers drop the
arm in the same change | this PR |
| 3 — retire `body` from the published type | this PR ⚠️ see the
Clause-② note above |
| 4 — the tier teaches `children` only | this PR |
| 5 — corpus and teaching migrate in the same commit | this PR |

**Step 2.** `alert`, `badge`, `tooltip` and the ten `sidebar-*` reads
converge on `children`. Every `children || body` fallback drops its
`body` arm: `basic/div.tsx`, `layout/card.tsx`, `layout/semantic.tsx`,
`layout/aspect-ratio.tsx`, `form/button.tsx` (named in the ruling's own
cross-card boundary paragraph), `layout/page.tsx`'s three reads,
`@object-ui/core`'s recursive `validateSchema`, the two container
walkers that enumerated child channels, and both VS Code extension
readers — whose own comments deferred the arm to this card by number.

**Step 3.** `BaseSchema.body` is `never` on the TypeScript face and an
alias refusal naming `children` on the Zod mirror, as are the four
per-component redeclarations. **Refused by name, not deleted** —
`BaseSchema` carries `[key: string]: any` and the mirror ends
`.passthrough()`, so a deleted member is accepted silently and rendered
by nothing, which is the exact silence this retirement ends.

**Step 4.** A new `sdui-parser/src/body-dialect.ts` answers an authored
`body` with the replacement NAMED, and it REPLACES the diagnostic the
prop walk would emit rather than stacking on it — the shape
`checkKanbanQuickAdd` next door is written against. A `body` child list
under a non-container draws the same containment code the `children`
spelling draws, which is the ruling's own sentence.

**Step 5.** 114 authored nodes moved across the docs site, the schema
catalog, five package READMEs and the extension's snippets / JSON schema
/ syntax map / hovers / completions, plus the prose that taught the key.

## ⚠️ A contrary fact, measured while implementing step 2 — pinned, not
worked around

Converging the twelve gives them a `children` read, so objectstack-ai#6808's runtime
predicate calls them containers. objectstack-ai#6804's ruling anticipated this and
wrote the answer in advance, verbatim: a census-pin exception **with its
ground**, ⛔ not `isContainer`. That is what landed — ten reasoned
entries in `container-declaration-baseline.json`'s `excluded`, and its
exact-equality pin moved with them.

**But the exception is no longer free, and the cost is this card's own
defect one key over:**

| | renders | draws `not-a-container` |
|---|---|---|
| before | `body` | `children` |
| after | `children` | `children` |

`validateTree`'s containment branch reads `node.children?.length`, so
the false warning that used to sit on a key these registrations did not
read now sits on the only key they do. Per the standing clause I
executed the ruling literally, made no promote and no revert in this PR,
and **inverted the pin into a refusal** that states the cost
(`container-declaration-ratchet.test.tsx`, the converged-readers block).

⇒ **The question for whoever reads this:** objectstack-ai#6804's ground — `children`
here is a *label / content fallback*, not layout containment — transfers
cleanly to `badge`, `alert`, `button` and `tooltip`. It does not
obviously transfer to the `sidebar-*` family, whose child lists ARE
layout containment and which are NOT in the public tier, so the
react-page cost that justified `button`'s exclusion does not apply to
them either. That ruling was made before the convergence existed. ⛔ Not
decided here.

## Two readers deliberately left alone, each with its ground

- **`page:card`** still reads `schema?.body ?? schema?.children`. That
key is `PageCardProps.body` under a **different** retirement
(objectstack#5775, ADR-0087 D2), and its own comment records a
sequencing precondition — the load-time `body` to `children` conversion
— that deleting the read before would blank stored documents silently.
- **`items[]`-level `body`** on `list` (and the same shape on `tabs`
items and `dashboard` widgets) is objectui#9590's card, fenced off this
one. ⛔ Untouched, in either direction.

## Verification

- `pnpm census:body-dialect`, the instrument step 1 committed for
exactly this re-reading: **159 nodes carrying `body` on the retirement's
keys before, 38 after** — and all 38 are test fixtures, the scanner's
own planted fixtures, or two pre-existing changesets this branch does
not own.
- `packages/types` + `packages/sdui-parser`: **221 files, 5009 tests,
all passing.**
- `packages/components`: **282 files, 2743 tests, all passing.**
- Changeset gates green: presence (1 declared), no-major, no-overwrite.
Control bytes green. Governed-surface guard: NOT GOVERNED, 81 paths
checked.

## Files outside the dispatched surface, declared rather than widened
silently

The dispatch named `packages/components/src/renderers/`,
`packages/sdui-parser/src/` and `packages/types/src/base.ts`. The
ruling's steps 2, 3 and 5 reach further and each of these is named for
that reason: the rest of `packages/types/src` (the four redeclarations,
their mirrors, the pins that move with them),
`packages/core/src/validation/schema-validator.ts` (a generic `children
|| body` reader), `packages/vscode-extension/**` (two readers that
deferred to this card, plus the teaching surfaces),
`scripts/container-declaration-baseline.json` (objectstack-ai#6804's ordered
exception), `content/docs/**`, `examples/schema-catalog/**` and five
READMEs (step 5).

## Acceptance notes

Noted while measuring, ⛔ not filed and ⛔ not repaired here:

- `dashboard` widgets author a per-widget `body`
(`content/docs/api/schema-reference.md`, `plugin-dashboard/README.md`'s
vocabulary note) that no renderer reads — same item-level family as
objectui#9590.
- About twenty per-component `body?: never` docblocks still justify
themselves with "`body` is inherited-and-optional from `BaseSchema`,
whose own docblock admits …". The refusals are correct and stay
word-for-word; only that one premise sentence is now stale.
- Two pre-existing changesets carry `body` migration recipes that will
teach the retired spelling when they reach a CHANGELOG. Not edited —
they belong to other cards and `check-changeset-overwrite` reports a
branch that modifies them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01Xm4WFhEe5mwcgyqHjxR2hn

---
_Generated by [Claude Code](https://claude.ai/code)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
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