docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6) - #7314

Merged
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6
Sep 2, 2026
Merged

docs(plugins,utilities): clear three more .mdx pages off the doc-snippet ledger (#5174 batch 6)#7314
yinlianghui merged 6 commits into
mainfrom
claude/issue-5174-mdx-ledger-batch6

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #5174

Batch 6 of the UNGATED_DOCS burn-down. Takes the next three .mdx entries by fence density and delivers all three whole: 41 blocks, 33 compile against the built dist, 8 carry a FRAGMENT_MARKER with a written, measured reason. 74 diagnostics cleared. Nothing about the gate's strictness moved.

Batch 5 (#7294) landed while this was in flight; origin/main was merged (never rebased) and the two ledger hunks are disjoint removals, as predicted.

Pages taken, and how each block reached zero

All counts produced with the gate's own scanFences, not a hand grep.

pageblockscompiledeclareddiagnostics clearedreal defects found, and the shipped type each was checked against
content/docs/plugins/plugin-calendar.mdx1512328 (19 syntax, 9 semantic)calendar.descriptionField is fabricated — not a member of @objectstack/spec's CalendarConfigSchema (which is $strict and holds exactly startDateField, endDateField, titleField, colorField) and read at zero sites in packages/plugin-calendar; ObjectCalendar.tsx:420 destructures exactly those four. Removed from the "Appointment Scheduler" example and from the published CalendarConfig reference. The "TypeScript Support" section annotated an object-calendar node as ObjectGridSchema — an annotation that cannot hold, since ObjectGridSchema.type is the literal 'object-grid'; repointed to the real ObjectCalendarSchema.
content/docs/utilities/data-objectstack.mdx1411317 (0 syntax, 17 semantic)No fabricated API. Eight blocks were unrunnable as written — a reader copying one got Cannot find name 'createObjectStackAdapter' / 'User' / 'dataSource' / 'mySchema' — and were made self-contained against packages/data-objectstack/dist/index.d.ts. The factory's config signature block was verified member-for-member against the shipped createObjectStackAdapter declaration, and the ElementDataSource restatement member-for-member against ElementDataSourceSchema in the installed @objectstack/spec: both accurate.
content/docs/plugins/plugin-gantt.mdx1210229 (26 syntax, 3 semantic)No fabricated key surfaced. The "Task Click" example rendered ObjectGantt with neither the component nor dataSource in scope — a copy-paste example broken at its first line; rewritten as a real component taking a typed DataSource prop. Six bare object literals became annotated ObjectGanttSchema declarations, which puts their gantt: { … } blocks under GanttConfig for the first time.

Ledger 40 → 37 (6 .mdx + 31 README). Covered documents 184 → 187 — strictly grows. Covered blocks 440 → 481; compiled 312 → 345; declared fragments 128 → 136. The three per-page splits (12+11+10 = 33 compile, 3+3+2 = 8 declared) reconcile exactly with those deltas.

Invariants, each measured rather than asserted

  • The ledger hunk is removals onlygit diff origin/main -- scripts/check-doc-snippet-types.mjs is 0 additions, 6 deletions.
  • Gate strictness byte-identical, from the fence-scanning banner to EOF, origin/main vs this branch:
    sha256 b87e347626a6cbab30b904eaf7d3eb72f6804122505bdf9ec8f2f2c8136e95a3 — the same value on both sides, and the same value batch 5 recorded.
  • Covered count strictly grows — 184 → 187, ungated 40 → 37.
  • Every page taken is off the ledger and every block resolves the two honest ways — compile, or a FRAGMENT_MARKER whose reason names the measured diagnostics. No third route, no UNGATED_DOCS addition, no fence re-labelled to duck the gate.

Before / after, both at a fully built tree, exit codes captured by redirect-then-$? and never through a pipe:

BEFORE (origin/main dd5b01b59 content for the four files, swapped in under an
EXIT/INT/TERM trap; restore proved by an empty `git diff HEAD`)
Scanned 224 document(s): 184 covered (83 hold a ts/tsx block), 40 ungated
Covered blocks: 440 — 312 to compile, 128 declared fragment(s)
Semantic phase: 312 of 312 block(s) judged, 0 failed exit 0
AFTER (355dd8daa)
Scanned 224 document(s): 187 covered (86 hold a ts/tsx block), 37 ungated
Covered blocks: 481 — 345 to compile, 136 declared fragment(s)
Syntax phase: every block parsed, so every one of them reached the semantic phase.
Semantic phase: 345 of 345 block(s) judged, 0 failed exit 0

The lid check, per page — including the negative results

Resolving an unresolved name can uncover diagnostics the first error was hiding. Run on all three:

The read-site grep — what the compiler structurally cannot see

BaseSchema carries [key: string]: any, so a wrong TOP-LEVEL key on any schema literal is invisible to this gate. Every schema literal touched here was therefore also grepped for read sites, and that is what caught the descriptionField defect: zero read sites anywhere in packages/plugin-calendar, while the page taught it twice. The check found nothing further on the gantt or data-objectstack literals.

What the green does not mean

Stated because a green run must not be read as more than it is, and each limit below was measured on these pages by planting a probe, running the gate, and restoring from HEAD under a trap:

  1. A misspelled top-level key on a schema literal is not caught. Probe: ganttt: 'typo-probe' added to an annotated ObjectGanttSchema literal. Gate stayed greenBaseSchema's index signature absorbs it.
  2. A misspelled key inside gantt: { … } is not caught either. Probe: startDateFeild inside the gantt block. Gate stayed greenGanttConfig is SpecGanttConfig & { … } and the spec's GanttConfigSchema is z.core.$loose, so the intersection admits unknown keys. (Note the asymmetry with the authoring surface: the spec's CalendarConfigSchema is $strict, so the same typo in a calendar block would be rejected at parse time even though this gate cannot see it.)
  3. calendar: { … } is wholly unchecked.ObjectCalendarSchema does not declare a calendar member — unlike ObjectGanttSchema, which does declare gantt — so that block lands on the index signature. The four keys used on this page were validated by read-site grep instead.
  4. What IS checked, proved rather than assumed. Two probes went red, so the annotations are live and not no-ops: viewMode: 'century' on the gantt literal → TS2322: Type '"century"' is not assignable to type '"month" | "week" | "day" | "quarter" | "year" | undefined'; defaultView: 'agenda' on the calendar literal → TS2322: Type '"agenda"' is not assignable to type '"month" | "week" | "day" | undefined'. A third, type: 'object-calendar' under an ObjectGridSchema annotation on the data-objectstack page, also went red. Declared members are checked; undeclared keys are not.
  5. The gate answers only "does this snippet compile against the published types". Schema-key validity under safeParse, whether a type literal names a registered component, and whether a shell example runs are three other questions with three other answers.

Type gaps found and filed, not fixed here

packages/* source is out of this PR's surface, so both were filed unassigned after a targeted dedupe search, and the blocks they affect ship declared rather than deleted:

Gate verdict lines

Everything below at 355dd8daa, the final commit, with the closure built first under the shared verify lock (VERDICT command-exit 0) and dist/index.d.ts presence confirmed on disk in this worktree before any gate result was trusted — turbo replays cached logs naming other worktrees' paths.

check:doc-snippets exit 0 Semantic phase: 345 of 345 block(s) judged, 0 failed.
Every covered documentation snippet compiles against the built types.
check:doc-fences exit 0 every TypeScript block in 224 document(s) is fenced ts/tsx/typescript …
check:doc-types exit 0 Every documented component type is registered.
docs:check-links exit 0 Links are valid across 17 scan roots.
check:control-bytes exit 0 scanned 6010 tracked text file(s); skipped 85 binary
check:readme-exports exit 0 386 self-imports judged (386 real, 0 wrong-path, 0 fabricated)
check-changeset-presence exit 0 No source or published contract of a released package changed in
this range, so no changeset is owed.
vitest (repo root) exit 0 Test Files 7 passed (7) · Tests 177 passed (177)

The seven vitest files are every file git grep -l check-doc-snippet-types -- '*.test.ts' '*.test.tsx' names — the two obvious ones plus five pin suites in examples/schema-catalog, plugin-gantt, react and types that an edit to this script could have hijacked. Run from the repo root with --maxWorkers=2, never through pnpm --filter.

check:readme-exports first read NOT MEASURED, not red: it exited 1 with three findings, all three the string its type entry ./dist/index.d.ts is not on disk -- run pnpm build first for plugin-ai, and none naming a file in this diff. Building that closure made it a real measurement, and it is genuinely green.

Declared narrowing

Repo-wide pnpm lint was narrowed to the four changed files, and the narrowing is a measurement rather than a skip:

  1. Population read from ESLint's own config, not from a guess: npx eslint --no-inline-config --format json on the four files reports the three .mdx pages as File ignored because no matching configuration was supplied — they are not in ESLint's population at all.
  2. File count read from the JSON output: 4 files judged, 1 of them actually linted (scripts/check-doc-snippet-types.mjs), 0 errors, 0 warnings.
  3. Config invariance for untouched files: eslint.config.js sets no project, projectService or tsconfigRootDir, so type-aware linting is not enabled and nothing in this diff can move the verdict on a file it does not touch.

A control-byte self-scan (grep -naP '[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]') over the four changed files returns no hits, beside the repo-wide gate above.


🤖 Generated with Claude Code

https://claude.ai/code/session_01BGMDbrVa8JjZcCQ7DWYH1b


Generated by Claude Code

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@claude