Filed by #5867batch 3, unassigned. Both files are excluded from batch 3 by measurement, not by eye: they were re-fenced in a throwaway probe, compiled by check-doc-snippet-types, observed to redden, and the probe was restored under a trap.
Blocks 6 of the 129 blocks remaining on #5867 — 4 of them here, 2 more in the sibling card for location.mdx.
The measurement
Probe: all 23 classifier-matching plaintext fences across the 13 content/docs/fields pages re-fenced to ts, package closure rebuilt, gate run. Diagnostics, verbatim:
[semantic] content/docs/fields/auto-number.mdx:119:16 TS2304: Cannot find name 'db'.
[semantic] content/docs/fields/auto-number.mdx:119:38 TS7006: Parameter 'tx' implicitly has an 'any' type.
[semantic] content/docs/fields/object.mdx:205:17 TS2307: Cannot find module 'ajv' or its corresponding type declarations.
Both blocks pass triage's classifier — auto-number's first line is interface SequenceCounter {, object's is import Ajv from 'ajv'; — so under the ruling on #5867 they are code and should be ts fences. They cannot become ts fences while they reference these names.
1. content/docs/fields/auto-number.mdx, block at fence line 109
Under the heading Sequence Management ("The backend maintains sequence counters"). It declares interface SequenceCounter — fine, self-contained — and then:
const getNextSequence = async (object: string, field: string) => {
return await db.transaction(async (tx) => {
db is not an ObjectUI export and is declared nowhere in the workspace. It is a stand-in for whatever database handle the reader's backend supplies. tx then falls out of it as an implicit any.
The question is what this page should teach, and it is a judgement, not a mechanical fix:
Recommendation: C. It keeps everything the page actually teaches about ObjectUI (the counter shape) under the gate, and stops presenting a fabricated db API as if it were code a reader could copy.
2. content/docs/fields/object.mdx, block at fence line 204
Under Backend Validation. First line is import Ajv from 'ajv';. Measured: ajv is not resolvable from the repo root where the snippet program compiles (no node_modules/ajv), and it is declared in no workspace package.json — I grepped the root and every packages/*/package.json.
This is adjacent to #6120 but not the same shape. #6120 is about lucide-react, a dependency a workspace package does declare but that does not resolve from the root. Here nothing in the repo depends on ajv at all — it is an external library named in an illustration.
- A — add
ajv as a root devDependency purely so a doc snippet resolves. Pulls a runtime schema validator into the tree for documentation's sake; hard to justify on its own. - B — leave the block prose, same standing-exception cost as 1B.
- C — rewrite the example against something the repo does depend on, or reduce it to the validation contract without naming a specific validator.
Recommendation: C, and if #6120's ruling establishes a general route for "a snippet imports a package the root cannot resolve", this should follow it rather than grow a second answer.
Scope note
⛔ Neither is fixable inside #5867's batch discipline: each needs a decision about what the documentation should say, and #5867's rule is that a reddening block is a real defect to fix, never to paper over with a FRAGMENT_MARKER — a marker on a block that is genuinely TypeScript is a lie the ledger then carries.
Refs: #5867 (parent) · #6120 (the sibling resolution-environment card) · #6121 · #6122.
Filed by #5867batch 3, unassigned. Both files are excluded from batch 3 by measurement, not by eye: they were re-fenced in a throwaway probe, compiled by
check-doc-snippet-types, observed to redden, and the probe was restored under a trap.Blocks 6 of the 129 blocks remaining on #5867 — 4 of them here, 2 more in the sibling card for
location.mdx.The measurement
Probe: all 23 classifier-matching
plaintextfences across the 13content/docs/fieldspages re-fenced tots, package closure rebuilt, gate run. Diagnostics, verbatim:Both blocks pass triage's classifier —
auto-number's first line isinterface SequenceCounter {,object's isimport Ajv from 'ajv';— so under the ruling on #5867 they are code and should betsfences. They cannot becometsfences while they reference these names.1.
content/docs/fields/auto-number.mdx, block at fence line 109Under the heading Sequence Management ("The backend maintains sequence counters"). It declares
interface SequenceCounter— fine, self-contained — and then:dbis not an ObjectUI export and is declared nowhere in the workspace. It is a stand-in for whatever database handle the reader's backend supplies.txthen falls out of it as an implicitany.The question is what this page should teach, and it is a judgement, not a mechanical fix:
db/txinterface that ObjectUI does not ship and does not own. Contract-first says a renderer's docs should not mint a backend contract in passing.plaintextfence whose first line the classifier calls code, so 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 has to record a standing exception for it.interface SequenceCounterand move the transaction sketch into prose, so the code half is real and compiles.Recommendation: C. It keeps everything the page actually teaches about ObjectUI (the counter shape) under the gate, and stops presenting a fabricated
dbAPI as if it were code a reader could copy.2.
content/docs/fields/object.mdx, block at fence line 204Under Backend Validation. First line is
import Ajv from 'ajv';. Measured:ajvis not resolvable from the repo root where the snippet program compiles (nonode_modules/ajv), and it is declared in no workspacepackage.json— I grepped the root and everypackages/*/package.json.This is adjacent to #6120 but not the same shape. #6120 is about
lucide-react, a dependency a workspace package does declare but that does not resolve from the root. Here nothing in the repo depends onajvat all — it is an external library named in an illustration.ajvas a root devDependency purely so a doc snippet resolves. Pulls a runtime schema validator into the tree for documentation's sake; hard to justify on its own.Recommendation: C, and if #6120's ruling establishes a general route for "a snippet imports a package the root cannot resolve", this should follow it rather than grow a second answer.
Scope note
⛔ Neither is fixable inside #5867's batch discipline: each needs a decision about what the documentation should say, and #5867's rule is that a reddening block is a real defect to fix, never to paper over with a
FRAGMENT_MARKER— a marker on a block that is genuinely TypeScript is a lie the ledger then carries.Refs: #5867 (parent) · #6120 (the sibling resolution-environment card) · #6121 · #6122.