Skip to content

[Bug]: CLI/local-review docs: AI-AUTHORING denies expectJson, hermetic lists omit local review, script lists disagree, extension fast checks refused without a pin, stale trial findings #994

Closed

Description

@jimhoyd

Runtime revision and environment

Docs on origin/main fe5d03f0. Found in a coherence audit of the docs edited by the ~40 PRs merged on 2026-09-29 (hermetic runs and seeds, --local-review, tests/audit.json, expectJson). Docs and descriptor strings only.

Minimal reproduction

Each finding cites origin/main file:line, the statement, and what the code does.

  1. AI-AUTHORING says expectJson does not exist, then tells the reader to use it.

    • docs/AI-AUTHORING.md:252-266: "A case has these keys and no others", followed by a table of path, status, method, headers, body, expectHeaders, expectBody, then "There is no json or expectJson key: … assert a JSON answer with its exact text in expectBody."
    • The same page at :299-303 says to "Assert a JSON body that carries generated ids with expectJson pointers". llms.txt:116-118 and starters/default/AGENTS.md:62 say the same.
    • Code: schemas/requests.schema.json case properties are body, expectBody, expectHeaders, expectJson, expectSignals, headers, method, path, status, plus the steps/capture/restart shapes. The table is also missing expectSignals and the steps fixture form. This file is installed (package.json files) and is the first page docs search covers, so agents read it.
  2. The hermetic-run lists leave out a local review, but the code makes it hermetic too.

    • Code: packages/core/src/cli.ts:410 passes hermetic: hermeticHostCommands.includes(command) || localReview !== undefined. So validate and routes under --local-review with no pin get HostContext.hermetic === true and a temporary data. docs/READINESS.md:441-445 and the RIM card (docs/RUNTIME-IMPLEMENTATION.md:99) say this correctly.
    • docs/EXTENSIONS.md:908-918 (### Hermetic runs and test seeds, the extension-author contract) lists only "urlcode test, urlcode audit, urlcode benchmark and the MCP server's run_tests" and documents hermetic as "true for test, audit, benchmark and MCP run_tests". An extension author following it would not expect hermetic: true during a validate run. The source doc comment it mirrors, packages/core/src/extensions.ts:586-597 (HostContext.data / hermetic), says the same, and puts validate and routes on <site>/data without qualification.
    • The same omission appears in packages/store/README.md:165-166, packages/auth/README.md:89 and docs/STORE.md:1842-1845 ("urlcode test, audit and benchmark … use a fresh database").
  3. Pages disagree on which npm scripts pass --local-review. init writes it on four: validate, test, routes, audit (packages/core/src/context.ts:163-165).

    • Four, as in the code: docs/TOOLING.md:110-111, docs/EXTENSIONS.md:1853-1854, docs/LOCAL-DEVELOPMENT.md:137-138, starters/default/README.md:43-44.
    • Three (no routes): llms.txt:34, docs/AI-AUTHORING.md:52, docs/FRAMEWORK.md:310, and the code blocks at docs/EXTENSIONS.md:1857-1859 and starters/default/AGENTS.md:56-58 (generated from packages/core/src/agents-guide.ts:96-98).
    • docs/LOCAL-DEVELOPMENT.md:64-66 says a site has "npm scripts for its own dev, serve, validate, test and doctor commands; both pass --project app --host-file host.mjs". The site has no serve or doctor npm script (it has start, routes and audit), and the Makefile's validate, test, routes and audit also add --local-review (starters/default/Makefile).
  4. The published extension "Fast checks" are refused on a fresh site.

    • packages/store/README.md:543 and packages/mcp/README.md:493 give urlcode validate --project . --host-file <host.mjs> --origin <origin> and the matching test. packages/audit/README.md:207 gives the validate form. packages/auth/README.md:217 gives urlcode validate --local --project app --host-file host.mjs --origin <origin>.
    • These are generated from fastChecks in packages/store/src/authoring.ts:29, packages/mcp/src/mcp.ts:251, packages/audit/src/audit.ts:22 and packages/auth/src/auth.ts:63, and served by get_extensions. None passes --local-review or a pin. docs/TOOLING.md:167-168 says validate (with or without --local) and test "still need the reviewed pin", and the CLI refuses with revision-pin-required. Every other check command the runtime emits now ends in --local-review (context.ts:224-227, MCP in-process run_tests and get_context's suggested commands lack the local review (follow-up to #940) #964). The four packages also use two different project paths (. and app).
  5. FRAMEWORK's third-run findings read as still open, but most are fixed.

  6. The local-review rule is restated on about ten pages, which is how items 3 and 4 drifted.

    • The full rule (pin to the current revision, no grants, http://localhost, throwaway data, read-only commands ignore the flag, serve/dev refuse it, operator pin wins, MCP runners pass it) is written out in docs/EXTENSIONS.md:1848-1916 (the authoritative section), docs/TOOLING.md:109-117 and :174-184 and :1376-1383 and :1404-1410, llms.txt:34-39, docs/AI-AUTHORING.md:52-56 and :694-699, docs/FRAMEWORK.md:309-313, docs/READINESS.md:441-445, docs/LOCAL-DEVELOPMENT.md:137-140, starters/default/README.md:42-51 and starters/default/AGENTS.md:62.
    • Per CONTRIBUTING's "link to authoritative facts rather than copying them", most of these could be one sentence plus the #the-local-review-loop link.

Relevant output

What I verified: items 1-4 against the cited source and schema lines. Item 5 against the GitHub issue states on 2026-09-29.

Not verified: I did not run the refusal in item 4. The conclusion comes from docs/TOOLING.md:167-168 and the pin check in cli.ts/operator-host.ts. Whether urlcode validate --project app without --host-file (auth's first fast check) passes on an auth site depends on the non---local path, which I did not trace.

Activity

  1. added
    documentation
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions