docs: make walkthrough citations checkable, and point new readers at START_HERE - #614
docs: make walkthrough citations checkable, and point new readers at START_HERE#614HomenShum wants to merge 3 commits into
Conversation
…HERE
A guard that checks only whether a cited line NUMBER is in range proves the
anchor is stable, never that it is correct: a citation that has drifted onto a
different symbol is still in range, and the check passes it. validate-tours.mjs
had that hole in two ways — `pattern` was optional on a tour step, so a step
with no pattern got a range check and nothing else, and docs/START_HERE.md's
line citations had no guard at all.
Demonstrated before fixing: delete `pattern` from tour step 1 and move its line
from main.tsx:156 to 157 (a real line, wrong symbol) and the old script prints
"All 27 tour steps resolve" and exits 0.
Now:
- a tour step without `pattern` is rejected rather than range-checked;
- every `path:line` citation in START_HERE.md is written `path:line — text on
that line`, and the guard asserts the line contains that text;
- bare "line N" prose references are rejected, because nothing can check them.
The eight in START_HERE.md are deleted; each already named the symbol beside
it, which is what a reader greps anyway.
Verified by pointing one citation at a wrong in-range line (fails), dropping a
tour `pattern` (fails), and re-adding a bare "line N" (fails), then restoring:
37 citations resolve and match their anchors.
Wired so it runs: `npm run docs:check`, plus a CI step in the Typecheck job
before `npm install` (needs no dependencies, fails in about a second).
Also:
- CLAUDE.md and AGENTS.md now point at docs/START_HERE.md in their first
paragraph. `grep -c START_HERE` on both was 0.
- START_HERE.md Step 11 marks both Playwright rows as requiring a configured
Convex deployment. Measured 2026-08-13 from a fresh clone with vite serving
the frontend and no VITE_CONVEX_URL: one-flow-regression 6 failed / 0 passed
(2 tests x chromium, firefox, webkit) on getByTestId('one-surface-workspace');
redesign-runtime-route-ownership on chromium 3 failed / 1 passed on
right-inspector, reports-runtime-inspector and exact-web-chat-stream. Every
one of them was looking at the "Convex backend not configured" card.
docs/codebase/TESTING.md already said this; the table a reader reaches first
did not.
No local fixture backend was added. Steps 5-10 are Convex server code and this
repo ships no substitute for Convex; faking one is a subsystem, not a doc fix.
app-vitest unchanged: 22 failed / 1426 passed / 20 skipped both at HEAD and
with this change, matching the figure TESTING.md already records.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
CI: the new step passes; the job's failure predates this branchThe
(run Worth noting the step ordering is deliberate: |
Adversarial pass on my own previous commit found it. docs/SIMPLIFICATION_REPORT.md records a deliberate decision, with a reason: validate-tours.mjs is "deliberately **not** wired to a 199th npm script in a repository whose script count is itself a documented problem (CONCERNS C5)". Adding `docs:check` silently overrode that and took the count to 199, while leaving the report asserting the opposite. It also gave one command two names: the three .tour descriptions already say `node scripts/validate-tours.mjs`. So: script removed (198 again), and all four documents now name the same command the tours do. What actually makes the guard run is the CI step, which is untouched — and CI has since confirmed it, `Walkthrough citations: success` in the Typecheck job. Also footnoted the report's "27 / 27" row: the validator has since grown to cover START_HERE.md citations, so the same command now reports 37, of which 27 are still the tour steps that row counted. The historical number is left alone rather than edited to match today's run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Correction, found by an adversarial pass on my own first commit
My first commit added Reverted in 840bb38. Script count back to 198, verified on the branch: All four documents now name the same command the tours do. Nothing about the wiring changed — what makes the guard run is the CI step, which is untouched and already confirmed green ( Also footnoted the report's |
Cosmetic. The command-name substitution in 840bb38 pushed two lines past the 80-column wrap the rest of both files keeps to. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A cold reader was given only this repository and asked to run it and trace nine stages. They succeeded. These are the things that cost them time, plus the guard that should have caught one of them.
The citation guard proved anchor stability, not anchor correctness
scripts/validate-tours.mjschecked that a cited line NUMBER was inside the file. That proves the anchor is stable. It does not prove it is correct — a citation that has drifted onto a different symbol is still in range, and the check passes it.Two holes:
patternwas optional on a tour step. A step with no pattern got a range check and nothing else.docs/START_HERE.mdhas line citations into live source and no guard at all.Demonstrated before fixing — delete
patternfrom tour step 1 and move its line frommain.tsx:156to157(a real line, the wrong symbol):Now:
patternis rejected rather than range-checked;path:linecitation in START_HERE.md is writtenpath:line — text on that line, and the guard asserts the cited line contains that text;"line N"prose references are rejected, because nothing can check them. The eight in START_HERE.md are deleted rather than rewritten — each already named the symbol beside it, which is what a reader greps anyway.Proven on three mutations, each restored afterwards:
patterndeleted and its line drifted"line N"prose ref re-addedClean tree:
All 37 citations resolve and match their anchors.Wired so it actually runs —
npm run docs:check, plus a step in the CI Typecheck job placed beforenpm install, since it needs no dependencies and fails in about a second.grep -c START_HEREon CLAUDE.md and AGENTS.md returned 0 and 0Both now point at
docs/START_HERE.mdin their first paragraph.Step 11's Playwright rows did not say they need a backend
docs/codebase/TESTING.mdsaid it under "Browser checks need a running app". The table a reader reaches first did not, and the cold reader burned a run finding out.Re-measured 2026-08-13 from a fresh clone, vite serving the frontend with no
VITE_CONVEX_URLandBASE_URLpointed at it:one-flow-regression.spec.tsgetByTestId('one-surface-workspace')never foundredesign-runtime-route-ownership.spec.tsright-inspector,reports-runtime-inspector,exact-web-chat-streamRoot cause, confirmed by reading the rendered page rather than inferring it: with no deployment URL
main.tsxrendersMissingConvexUrlScreen, so the page under every one of those failures was the "Convex backend not configured" card and no product element can ever mount.What was deliberately not built
No local fixture backend. Steps 5–10 are Convex server code and this repo ships no substitute for Convex; a canned
redesignChatRuns/redesignChatStreamEventssource needs a fake reactive client and an auth shim, which is a subsystem rather than a documentation fix. START_HERE.md now says so plainly instead of leaving a reader to discover it.Tests
app-vitest22 failed / 1426 passed / 20 skipped, measured both at clean HEAD and with this change — identical, and identical to the figuredocs/codebase/TESTING.mdalready records. The fullnpm run test:runis red at HEAD for the pre-existing reasons that document lists. This change touches four markdown files, one script nothing imports,package.json(one added key) andci.yml.The four vitest rows of Step 11 that do run from a clean clone: 61 passed.
🤖 Generated with Claude Code