Skip to content

finding(docs): TypeScript examples fenced as plaintext escape check-doc-snippet-types — 211 blocks in 122 files, and #5044 proved one of them taught a type error under a gate that reports the file as covered #5867

Description

@claude

Filed by the domain:ui execution seat on behalf of #5044's dev, which measured this but could not file it: the GitHub search API was rate-limited at the time, and it correctly refused to file without a duplicate search rather than risk a parallel-dev duplicate. The dedupe scan is below and was run before filing.

Filed unassigned and unlabelled — ⛔ this needs triage first-touch, and the deciding question is a triage judgement (how many of the 211 are genuinely prose), not an engineering one.

The measurement

scripts/check-doc-snippet-types.mjs reads only ts / tsx fences (TS_FENCE_LANGUAGES). TypeScript and JavaScript examples fenced as plaintext are therefore invisible to it — by design, not by accident.

Measured, not predicted: 211 such blocks across 122 files under content/docs/ have a body whose first line starts with import / export / interface / type X = / const x: T.

The concrete victim, which is what makes this more than a census

#5044's own second instance was one of them. content/docs/plugins/plugin-calendar.mdx's TypeScript Support block annotated a runtime-shaped literal (id: 1, start: new Date(...)) with the authoring type CalendarEvent imported from @object-ui/types — a type that rejects both of those values.

⚠️ It survived every gate, including check-doc-snippet-types itself, whose ratchet ledger names that very file. A reader following that block would have written code that does not compile, taught by a page the gate reports as covered.

(That instance is fixed in #5044 / PR #5866. This card is the population it came from.)

⛔ This is a coverage/triage question, not a gate defect

The gate's own header declares its edges out loud — it states that a bash block is not read at all. It is doing what it says. The open question is what proportion of the 211 are genuinely prose (a shell transcript, a wire payload, a deliberate non-compiling illustration) versus mislabelled TypeScript that should be an actual ts fence and would then be compiled like everything else.

⛔ Do not "fix" this by widening the gate to compile plaintext fences — that would break every legitimately-prose block at once. The remedy shape is per-block triage, and possibly a narrower detector that flags only the mislabelled ones.

Dedupe — ⚠️ not a duplicate, but this gate now has FOUR independent coverage axes open

Scanned all 217 open issues via the REST list endpoint (the search API is unavailable to this session — repository-bound). Five candidates surfaced; none is this finding, and the pattern across them is the part worth seeing:

card the axis its coverage gap is on
#5465 scan surface excludes skills/ — directory
#5174 collects only .mdx; 40 .md guides excluded — file extension
#5250 JSON snippets checked by nothing — fence language (json)
this card TS/JS inside plaintext fences — fence language (plaintext)

Four independent axes on one gate, each found separately by a different card's dev, each filed as an isolated report. ⚠️ Triage may want to consider whether the useful card is "enumerate this gate's coverage boundary once, deliberately" rather than a fifth axis arriving the same way. That framing is offered, ⛔ not decided here.

(#5259 and #4895 also surfaced in the scan and are unrelated on inspection.)

Reproduction

Python over content/docs, matching plaintext fences whose body starts a line with TS/JS syntax (import / export / interface / type X = / const x: T). Re-measure before acting — the corpus moves.

Refs: #5044 / PR #5866 (the victim, fixed) · #5250 · #5174 · #5465 (the sibling axes).


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repopriority:p3

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions