Skip to content

finding(docs): 22 of 198 json-tagged fences under content/docs fail JSON.parse — and the one gate that reads them normalizes exactly those two shapes away #10088

Description

@os-tesla

Path: P1 | 那条路第 1 步「写元数据」 | content/docs 下 198 个 json 围栏有 22 个过不了 JSON.parse,而唯一读它们的门禁正好把这两种形状归一化掉
分诊重测与定级:2026-09-20T15:58Z

Dedupe words: json fence not valid JSON · doc example fails JSON.parse · json-tagged fence comment · no gate asserts json fence validity · expression-carriage tolerance hides invalid json

Surfaced by the objectui#9989 dev while repairing one such fence. ⭐ Re-measured first-hand by the domain:ui#2 execution seat before filing (PM session session_018HrVaotisyhgmot9o2MLRq) — 立卡也要分「自量」与「转述」, and this is the 自量 half. ⛔ No priority:* and no type are written here: both are the triage seat's sole production. domain:ui is inherited from the in-flight parent objectui#9989 under the derivation exception, ⛔ not a routing decision.

The reading, taken by this seat on origin/main

A fence-walker over every .md / .mdx under content/docs, feeding each ```json body to JSON.parse:

json-tagged fences: 198
FAIL JSON.parse: 22

⭐ Control, same command, both directions — the same parser rejects {"a":1,} (Expecting property name enclosed in doub…) and accepts {"a":1}. ⇒ the 22 is a reading and the 176 is not a dark pass.

Concentration:

page failing fences
content/docs/guide/expressions.md 9
content/docs/guide/layout.md 4
content/docs/utilities/runner.mdx 4
content/docs/guide/schema-rendering.md 2
content/docs/guide/deployment.md 1
content/docs/plugins/index.md 1
content/docs/utilities/vscode-extension.mdx 1

⚠️ One of schema-rendering.md's two is repaired by PR objectui#10086, which is landing — so ⭐ re-measure on origin/main when this card is taken; the figure above is anchored to a tree that PR changes.

Why a reader is harmed: the failure lands BEFORE the schema

A json-tagged fence is what an author copies. When it does not parse, the reader's editor or JSON.parse rejects it before the value ever reaches a schema, so the page's own subject — which keys are legal — never gets a chance to be right or wrong. The two shapes doing it are a JavaScript comment inside the fence (/* … */) and raw newlines inside a string.

⚠️ Why this is a triage call and ⛔ NOT a drive-by fix

Several of the 22 are deliberate. Elision markers and // Bad: counter-examples are doing a job: a counter-example that parses is a worse counter-example. ⇒ the deliverable is ⛔ not「make 22 go to 0」. Somebody has to decide:

  1. which non-parsing spellings are declared (an elision convention, a counter-example convention) and how a reader tells them from a mistake;
  2. whether any gate flips to blocking on the rest — ⭐ a gate-strength decision, which is on the human floor.

Measured by the #9989 dev, ⛔ NOT re-run by this seat: why no gate catches it

Recorded as 转述 and marked as such, because the taking dev should re-take it rather than trust this table:

gate why it is silent here
check:doc-snippets compiles ts / tsx / typescript only; its own header states a json fence is never compiled against anything
check:doc-fences asks whether a TypeScript BODY sits under a non-TypeScript fence — a JSON body under a json tag is exactly right by its classifier
check:doc-types judges the type literal and, in its own words, deliberately not the snippet's other keys
check:doc-expression-carriage ⭐ the ONLY gate that reads json fence bodies — and it is report-only, and its declared tolerance list REMOVES line and block comments and re-escapes raw newlines BEFORE parsing. ⇒ the two shapes that make a fence uncopyable are normalized away by design; it printed 「225 json/jsonc fence(s), 225 parsed, 0 UNPARSED」 on a tree carrying 22 that JSON.parse refuses

⭐ That last row is the finding under the finding: the repo HAS an instrument over this corpus, and its tolerances are calibrated to make exactly this class invisible. ⛔ Not a defect in that gate — it was built for a different question — but it is why nobody noticed.

⚠️ One unmeasured neighbour, recorded so it is not mistaken for checked

content/docs/guide/schema-rendering.md's Memoization subsection asserts 「the renderer automatically memoizes components to prevent unnecessary re-renders」. ⛔ No measurement was taken in either direction, by the dev or by this seat. It is on the same page as two of the 22 and is the same class of claim as the lazyLoad promise objectui#9989 just removed after measuring it false. ⇒ whoever takes this card is the natural reader; ⛔ it is recorded as unmeasured, ⛔ not asserted to be false.

Acceptance

  • The conventions are named: what a deliberately non-parsing fence looks like and how a reader tells it from a mistake.
  • Every fence not covered by a named convention parses, re-measured on the tree at that moment with the control lit in the same command.
  • Whether a gate blocks is answered — and if the answer is 「it should」, that is raised as its own decision rather than landed inside this card. ⛔ Gate strength is not this lane's to grant itself.

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:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions