Skip to content

docs(report-schema): drop the retired onSave / onCancel and put the Report Builder example under check:doc-snippets - #7843

Merged
os-sam merged 1 commit into
mainfrom
claude/issue-7488-report-builder-retired-handler-keys
Sep 6, 2026
Merged

os-sam merged 1 commit into
mainfrom
claude/issue-7488-report-builder-retired-handler-keys

Conversation

@claude

@claude claude Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #7488

ReportBuilderSchema.onSave / .onCancel have been ?: never on the TypeScript face and
handlerKeyRefusal(...) arms on the zod mirror since PR objectui#7468 (objectui#7344, in the
objectui#6124 shape). The Report Builder example on content/docs/core/report-schema.mdx
still authored both, so the page taught a literal that is a tsc assignment error and a
named safeParse refusal. The two lines are removed — the disposition objectui#7340 chose
for seven of its eight pages.

The example is not hollow without them: the section teaches the ReportBuilderSchema shape
(type, report, availableFields, showPreview), not a save/cancel flow.

⭐ Why nothing went red, measured rather than asserted

Three instruments were green while the defect was present, each for its own reason:

instrument why it could not see the line
check:doc-snippets compiles ts / tsx fences only — this block was ```plaintext
check:doc-types reads type string literals, nothing else
component-docs-retired-handler-keys-7340.test.ts its DOC_MEMBER_RE requires key?: type (a member DECLARATION row) or a markdown prop-table row; the example's onSave: 'handleSaveReport', is an ASSIGNMENT and matches neither

⚠️ A fourth instrument did see the block, and that nuance matters for the class:
check:doc-fences classifies it as a SYNONYM finding (a TypeScript body under an
unhighlighted fence) and carries it inside a declared SHRINK-ONLY ledger — this page was
baselined at 8 such blocks, and --list names our block as one of them
(content/docs/core/report-schema.mdx:404). So the block being hidden from the compiler was
a known, baselined state, not an unknown one.

The reading the card asked for

Re-fenced the block ts with the two lines still present, then ran check:doc-snippets:

  [semantic]  content/docs/core/report-schema.mdx:421:3  TS2322: Type 'string' is not assignable to type 'undefined'.
  [semantic]  content/docs/core/report-schema.mdx:422:3  TS2322: Type 'string' is not assignable to type 'undefined'.
Semantic phase: 457 of 457 block(s) judged, 1 failed.

Exactly the two lines this card is about, and nothing else on the page — no other block on
this page uses an ambient name, none continues an earlier block. ⇒ per the dispatch ruling,
the re-fence lands too. After the deletion, on the same tree:

Covered blocks: 615 — 457 to compile, 158 declared fragment(s).
Semantic phase: 457 of 457 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.

456 → 457 compiled blocks: the page has joined the gate's scan surface, so this class is dead
on this page by construction — a retired key in a compiled block is a tsc error.

⚠️ A second file, and why it is not scope creep

scripts/check-doc-fence-languages.mjs, one line: content/docs/core/report-schema.mdx
8 → 7. The re-fence cannot land without it — that gate went red the moment the block left its
ledger, and it printed its own remedy:

❌  check:doc-fences — 1 stale KNOWN_UNHIGHLIGHTED_TS_FENCES entry/entries:
  content/docs/core/report-schema.mdx  — baselined at 8, now carries 7
    Good news, and the list has to say so: lower the numbers in
    KNOWN_UNHIGHLIGHTED_TS_FENCES in scripts/check-doc-fence-languages.mjs

That is the lane's documented protocol, stated in the gate's own header: "Every batch of that
lane now lowers these numbers in the same pull request that re-fences the blocks." The number
only ever goes down; no supported route raises it. Repo-wide the ledger moves 90 → 89 blocks.

⚠️ The pin that cites this page

packages/types/src/__tests__/handler-keys-string-any-mirrors-7344.test.ts cites this page's
onSave: 'handleSaveReport' as the corpus source of the retired dialect. Read before
deleting: the citation is a provenance comment, and the value is a hard-coded constant —

const AUTHORED_STRINGS = ['handleSaveReport', 'toast("Hello from ObjectUI!")'] as const;

— while every file that test actually reads comes from packages/types/src/zod (its
ZOD_DIR walk). It matches by existence-at-authoring-time, never by live content, so the
deletion cannot redden it, and it is green here. ⛔ The pin is not edited. The comment now
cites a page that no longer carries the spelling; that is a historical citation of where the
dialect came from and still reads correctly, so it is reported rather than rewritten.

Out of scope, filed rather than repaired

objectui#7840 — the objectui#7340 pin cannot see example object literals at all
(DOC_MEMBER_RE requires the ?). Widening it closes the class rather than this
instance, but it is its own measurement: the parse surface of example literals is far larger
than that of declaration rows, an owner has to be resolved from a type annotation for the
PAIR RULE to run at all, and the false-positive cost is unmeasured. ⛔ Not attempted here.

Evidence

Everything below ran on 9d46971b1, the head of this branch, with the doc gate's scoped
closure built first (pnpm exec turbo run build $(node scripts/check-doc-snippet-types.mjs --build-filter) --concurrency=2 — 34/34 tasks successful).

command verdict
node scripts/check-doc-snippet-types.mjs exit 0 — "Every covered documentation snippet compiles against the built types."
node scripts/check-doc-component-types.mjs exit 0 — "✅ Every documented component type is registered."
node scripts/check-doc-fence-languages.mjs exit 0 — "every TypeScript block in 227 document(s) is fenced ts/tsx/typescript, except 80 declared file(s) carrying 89 block(s)"
node scripts/check-doc-fence-languages.mjs --self-test exit 0 — 26 cases pass
pnpm exec vitest run packages/types/ scripts/__tests__/check-doc-fence-languages.test.ts scripts/__tests__/check-skill-examples.test.ts scripts/__tests__/one-authority-per-exported-name-6273.test.ts exit 0 — Test Files 130 passed (130), Tests 2384 passed (2384)
node scripts/check-doc-links.mjs exit 0 — "Links are valid across 17 scan roots."
node scripts/check-docs-route-eager-closure.mjs exit 0
node scripts/check-doc-example-shared-reader.mjs exit 0
node scripts/check-handler-key-read-sites.mjs exit 0
node scripts/check-control-bytes.mjs exit 0 — 6365 tracked text file(s) scanned

The three test suites beyond packages/types are the ones that name
check-doc-fence-languages — a gate script's own suites are owed separately from the gates
its diff triggers.

node scripts/check-changeset-presence.mjs — exit 0, verdict quoted verbatim:

✅ No source or published contract of a released package changed in this range, so no changeset is owed.

⇒ no changeset file, and ⛔ no skip-changeset label: in this repository that label is read
by no workflow and exempts nothing; the gate's own verdict line is the authority.

Lint, narrowed and proven rather than skipped. Asked ESLint itself about the two changed
paths, through its own config resolution:

content/docs/core/report-schema.mdx     | ignored: true  | has rules: n/a
scripts/check-doc-fence-languages.mjs   | ignored: false | has rules: 0
packages/types/src/reports.ts (control) | ignored: false | has rules: 116

The flat config's only file selector is **/*.{ts,tsx}, so this diff intersects the linted
population in zero rules; the control shows the query measures something real. And
tseslint.configs.recommended is configured with no project / projectService, so linting
is not type-aware and this diff cannot move the verdict of any file it did not touch.

Not run, stated plainly: the full turbo run lint and the full test suite (CI runs both);
no browser verification (documentation-only change with no runtime surface); no reverse
ablation beyond the before/after pair above, which is itself the card's required measurement
— every instrument was captured green on the unmodified tree first, which is the point the
card makes.

Session, as prose because footers get rewritten: this branch was produced by the os-dev
seat at https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3.


Generated by Claude Code

…ck under the compiler gate

`ReportBuilderSchema.onSave` / `.onCancel` are `?: never` on the TypeScript face
and `handlerKeyRefusal(...)` arms on the zod mirror since PR #7468 (objectui#7344,
in the objectui#6124 shape). The Report Builder example authored both, so the page
taught a literal that is a `tsc` assignment error AND a named `safeParse` refusal.
Removed, the disposition objectui#7340 chose for seven of its eight pages.

The example is not hollow without them: the section teaches the ReportBuilderSchema
shape (`type`, `report`, `availableFields`, `showPreview`), not a save/cancel flow.

Why no gate reported it, and what changes here:

  check:doc-snippets  compiles ts/tsx fences only — the block was ```plaintext
  check:doc-types     reads `type` string literals
  7340 pin            its DOC_MEMBER_RE requires `key?: type` (a declaration row)
                      or a markdown prop-table row; an example object literal
                      `onSave: 'handleSaveReport',` matches neither

Measured rather than assumed: re-fencing the block `ts` with the two lines still
present makes check:doc-snippets report exactly two diagnostics on this page and
nothing else —

  [semantic]  content/docs/core/report-schema.mdx:421:3  TS2322: Type 'string' is not assignable to type 'undefined'.
  [semantic]  content/docs/core/report-schema.mdx:422:3  TS2322: Type 'string' is not assignable to type 'undefined'.

— so the re-fence lands with the deletion and the page joins the gate's scan
surface (456 -> 457 blocks compiled). check:doc-fences then names its own remedy
(baselined at 8, now carries 7), so its shrink-only ledger drops to 7, which is
that lane's documented protocol: lower the number in the same pull request that
re-fences the block.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbJQ1y1J12nZxYzFWhP8Q3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(report-schema): the Report Builder example still authors onSave / onCancel, retired to never tombstones by PR #7468

1 participant