Skip to content

docs(guides,tooling): clear the last two .md pages off the doc-snippet ledger (#5174 batch 4) - #5991

Merged
yinlianghui-tw merged 1 commit into
mainfrom
claude/issue-5174-md-ledger-batch4
Aug 24, 2026
Merged

docs(guides,tooling): clear the last two .md pages off the doc-snippet ledger (#5174 batch 4)#5991
yinlianghui-tw merged 1 commit into
mainfrom
claude/issue-5174-md-ledger-batch4

Conversation

@yinlianghui-tw

@yinlianghui-twyinlianghui-tw commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Part of #5174 — batch 4, the final batch. These were the last two content/docs.md entries on the ledger.

Ledger

beforeafter
UNGATED_DOCS entries4644
covered documents176178 (strictly grows)
content/docs.md entries remaining20
diagnostics cleared104 = guide/component-registry 59 + guide/layout 45

The UNGATED_DOCS hunk contains only removals, so "zero previously-covered docs newly ungated" is structurally impossible to violate in this diff. Verified programmatically against d8b48f495's copy of the script: ADDED ledger entries: [] · previously-covered docs now UNGATED: [] · surviving entries whose REASON TEXT changed: [] · surviving entries with a non-measured reason: [].

What remains on the ledger is 12 .mdx pages and 32 package READMEs.

Routes — the two honest ones, no third

32 blocks brought under the gate: 9 compile (5 already did untouched, 4 after an edit) and 23 declared fragments with measured reasons.

pageblockscompilefragments
guide/component-registry.md23914
guide/layout.md909

The real defect, fixed rather than declared

guide/component-registry.md's one complete copy-paste example — the RatingComponent the page invites a reader to take whole — calls useState while importing only forwardRef from react. It was broken at the first hook for anyone who copied it. The same block took cn from the reader's own @/lib/utils alias when @object-ui/componentsexports cn itself; sourcing it from the package makes the block compile and removes a dangling alias a reader may not have.

Three more blocks (getAllTypes / has / getMeta) were made self-contained by adding the one import a reader copying that block actually needs — the objectui#5047 disposition, applied to the document rather than to the harness.

What this green run does NOT mean

Stated because a green run must not be read as more than it is:

  • ComponentRegistry is a Registry parameterised with any, so register()'s component argument is any. No registered component's props are checked against what SchemaRenderer passes.
  • BaseSchema carries [key: string]: any, so a wrong key on a BaseSchema-shaped literal is structurally invisible to this gate. "No excess-property errors" is not "the keys are right".

What is sealed, and therefore really checked: ComponentMeta, ComponentInput, NavItem, NavGroup, AppShellProps, SidebarNavProps. Every literal of those six across both pages was measured clean — the four lucide-react blocks by probing them with the icon import shimmed, not by inferring it from the TS2307 that was hiding them. That probe is the batch-3 lesson applied: a broken import is a lid, so what sits under it gets measured, not assumed.

Declared, with the reason recorded rather than worked around

  • lucide-react supplies the icon componentsNavItem.icon takes. It is a dependency of ten workspace packages (@object-ui/layout among them) but not a root dependency, so the specifier does not resolve in this gate's program. Four guide/layout.md blocks are declared for it. Hoisting a package to the repo root to buy a doc snippet coverage is a real dependency edge — the same call batch 3 made for class-variance-authority.
  • guide/component-registry.md's six category lists are markdown bullet lists inside tsx fences. A leading - reads as unary minus on an undeclared name, and the form list does not even parse because switch is a keyword. The fence language is the underlying defect; correcting it changes the page's rendering rather than a snippet, which is neither of the two routes this batch is allowed, so it is declared here and recorded for its own change.

Gate strictness — proven byte-for-byte, not argued

Everything from the // ── Fence scanning banner to EOF (scanFences, listDocuments, derivePackageTypePaths, analyze, compileSnippets, reporting, main) is byte-identical to d8b48f495: 475 lines, sha256 dd9e52a11f116f3b on both sides. DOC_EXTENSIONS, TS_FENCE_LANGUAGES, FRAGMENT_MARKER, MIN_REASON_LENGTH and COMPILER_OPTIONS each hash identical too. The script diff is the two removed entries plus the ledger docblock's own prose.

--build-filter (#4846) — re-measured, not assumed

Filters 20 → 20, the two sets textually identical (diff clean). Turbo build tasks 33 → 33, identical package-by-package from --dry=json (tasks ADDED: [], tasks REMOVED: []). Covering these two pages costs this gate zero extra build tasks — the packages they import were already in the closure. Nothing for the maintainer to weigh.

Verification

All at final commit 1178f9a9a, working tree clean and byte-identical to what is pushed; the union was re-run after that commit. Exit codes captured before any pipe; every line quotes the gate's own printed verdict.

  • node scripts/check-doc-snippet-types.mjs → exit 0: Scanned 222 document(s): 178 covered (42 of them hold a ts/tsx block), 44 ungated · Covered blocks: 273 — 156 to compile, 117 declared fragment(s). · Syntax phase: every block parsed · Semantic phase: 156 of 156 block(s) judged, 0 failed. · Every covered documentation snippet compiles against the built types. Controls green.
  • pnpm exec vitest run scripts/__tests__/check-doc-snippet-types.test.tsTest Files 1 passed (1) / Tests 20 passed (20). Running the script is not running its test; both were run.
  • node scripts/check-doc-component-types.mjs → exit 0: Every documented component type is registered.
  • node scripts/check-doc-links.mjs → exit 0 · node scripts/check-control-bytes.mjs → exit 0 · node scripts/check-skills-paths.mjs → exit 0 · node scripts/check-changeset-no-major.mjs → exit 0 · node scripts/check-lint-coverage.mjs → exit 0 (46/46 packages linted).
  • node scripts/check-changeset-presence.mjs → exit 0: 3 file(s) changed, 0 of them under the src/ of a package the release covers … no changeset is owed.Verdict followed; none added, and no skip-changeset label (A skip-changeset label exists on this repo, but no workflow reads it — the repo's own test records that neither the workflow nor the label was ever real #4912/.github/WORKFLOWS.md documents 5 workflows that do not exist and omits 9 that do — including a changeset gate and a skip-changeset label neither of which is real #3724).
  • pnpm run lint:root — the complete root eslint task, run whole, not narrowed → exit 0: 26 problems (0 errors, 26 warnings), all pre-existing; the changed .mjs reports 0 errors / 0 warnings. Population read from eslint's own --format json: 166 files, 0 of them .md, so both changed .md files are outside eslint's population by its own config; the other 46 lint tasks are per-package and this diff touches nothing under packages/, apps/ or examples/.
  • pnpm check → exit 0: All checks passed.

Reverse verification

Prediction written to disk before each run with the direction stated. Build artifact between mutation and thing-under-test: none on either leg — the mutation is markdown the gate reads straight from disk and the dist/*.d.ts it compiles against is untouched — so no rebuild was needed. Each leg proved the mutation reached disk by grepping the specific text meant to change, and carried trap … EXIT INT TERM restoring with git checkout HEAD -- PATH (objectstack#11648: git checkout REF -- PATH writes the index, so a trap restoring with a bare git checkout -- PATH reads the mutation back and exits 0).

  • Leg 1, revert component-registry.md only, ledger removal kept. Predicted exit 1 · exactly 59 diagnostics all on that page · fragments 117 → 103 · blocks-to-compile 156 → 170 · 1 syntax failure · NOTE printed · direction MORE. Observed exactly that, including the three named lines (TS2304 'BaseSchema', TS2307 './HeavyComponent', TS2304 'useState').
  • Leg 2, revert both pages. Predicted exit 1 · exactly 104 split 59 / 45 per page · fragments 117 → 94 · blocks-to-compile 156 → 179 · covered blocks 273 unchanged · 3 syntax failures · direction MORE. Observed 104 split exactly 59 component-registry / 45 layout — matching the baseline to the unit and per page.
  • Restore verified after each leg, not skipped: git diff HEAD empty and git status --short empty, 23 markers back on disk, gate exit 0 with 156 of 156 block(s) judged, 0 failed.

Generated by Claude Code

…t ledger
Walks `content/docs/guide/component-registry.md` (59 diagnostics) and
`content/docs/guide/layout.md` (45) off `UNGATED_DOCS`, clearing 104 and
leaving ZERO `content/docs` `.md` entries on the ledger.
Each of the 32 blocks reached zero one of the two honest ways: 9 compile
against the built `dist/` (5 already did, 4 after an edit) and 23 carry a
`FRAGMENT_MARKER` with a measured reason. Gate strictness is unmoved --
everything from the fence-scanning banner to EOF is byte-identical.
One real defect fixed rather than declared: the page's one complete
copy-paste example calls `useState` while importing only `forwardRef`
from `react`, and took `cn` from the reader's own `@/lib/utils` alias
when `@object-ui/components` exports `cn` itself.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019b5UBNMtTzKbVtZZGvFuxe
@yinlianghui-tw
yinlianghui-tw marked this pull request as ready for review August 24, 2026 13:44
@yinlianghui-tw
yinlianghui-tw added this pull request to the merge queueAug 24, 2026
Merged via the queue into main with commit 802d937Aug 24, 2026
21 checks passed
@yinlianghui-tw
yinlianghui-tw deleted the claude/issue-5174-md-ledger-batch4 branch August 24, 2026 13:55
yinlianghui-tw pushed a commit that referenced this pull request Aug 24, 2026
…down lists
The six "Component Categories" blocks were tagged ```tsx but held markdown
bullet lists (`- input`, `- textarea`, ...) — not TypeScript in any form. The
mislabel misled two audiences: a reader got syntax highlighting implying code,
and check-doc-snippet-types spent compile budget proving prose is not
TypeScript (3 parse + 35 undefined-name diagnostics before #5991 declared them).
Correcting the fence removes the blocks from the TS population rather than
excusing them, so the six FRAGMENT_MARKER declarations #5991 had to write go
with it — a marker on a block the gate no longer collects is debt nothing will
ever fail to prompt the removal of.
Item spelling follows the docs' own convention for a bare list of component
keys (content/docs/utilities/vscode-extension.mdx:152-156, and this page's own
list at line 46): one key per line, in backticks.
Sign up for freeto 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.

2 participants

@yinlianghui-tw@claude