Skip to content

fix(docs): CLI and local-review docs match the code; extension fast checks run without a pin (#994) - #1007

Merged
jimhoyd merged 3 commits into
mainfrom
claude/docs-cli-994
Sep 29, 2026
Merged

jimhoyd merged 3 commits into
mainfrom
claude/docs-cli-994

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #994

Each finding was checked again on current main before it was fixed.

The bug users hit: extension fast checks were refused

On a fresh site, the "Fast checks" printed in the store, mcp, audit and auth READMEs (and served by get_extensions) could not run. I confirmed this on a store site built from the store's own example, before the fix:

  • urlcode validate --project . --host-file host.mjs --origin … fails with Host file must be outside the application project.
  • The same command with --project app fails with revision-pin-required.

Fix. The fastChecks in packages/store/src/authoring.ts, packages/mcp/src/mcp.ts, packages/audit/src/audit.ts, packages/auth/src/auth.ts and the create-extension template now use the site's own npm script commands:

  • urlcode validate --local --project app --host-file host.mjs --local-review
  • urlcode test --project app --host-file host.mjs --local-review (for the packages that also had a test check)

Auth keeps its host-free urlcode validate --project app. It activates nothing, so it needs no pin. The generated "Schema-valid is not activatable" note in each README and docs/EXTENSION-REFERENCE.md gave the same broken command. They now name npm run validate. The descriptors and READMEs were regenerated (npm run build:addons).

Guard. A new fastCheckProblems in scripts/generate-extension-reference.ts rejects a fast check that:

  • is not a urlcode command, or contains a placeholder
  • has a flag the CLI does not accept
  • is serve, dev or benchmark
  • loads the host without matching the site's --local-review script

generate-extension-reference.ts --check (part of check:docs) applies it to every extension. test/extension-reference.test.ts covers the first-party checks and the refusals, and test/create-extension.test.ts covers the template.

Evidence. On the store site, with no PROJECT_SHA256 or URLCODE_POLICY set:

  • The new validate printed local_review, then {"event":"valid","routes":1}.
  • The new test passed a GET /api/todos fixture ({"total":1,"failed":0}).
  • Neither run created data/ in the site.

Docs that contradicted the code

Merges

I merged origin/main after #998 landed, with no conflicts. #987 and #996 are still open. #987 changes the same EXTENSIONS.md and extensions.ts lines, so whichever PR merges second may need a small manual merge.

Checks

  • npm run verify passes (macOS, Node 26). An earlier run caught two problems, both fixed:
    • The starter AGENTS.md went over its 80-line limit. I removed a duplicate blank line.
    • A shipped page linked a doc the package does not ship. It now uses the versioned reference.
  • npm run test:package passes. Core packs to 1059169 bytes (4183428 unpacked, 537 files), within the budgets.

Limitations

  • I only ran the fast checks on the store. For the mcp, audit and auth commands the evidence is the structural test plus the fact that they match the npm scripts init writes. I did not run them against real sites.
  • The guidance-claims check did not catch "no expectJson key", so this kind of prose contradiction can still recur.

🤖 Generated with Claude Code

jimhoyd and others added 3 commits September 29, 2026 18:38
…hecks run without a pin (#994)

- The store, mcp, audit and auth fastChecks (and the create-extension
  template) printed commands a fresh site refuses with
  revision-pin-required. They are now the site's own npm script commands
  with --local-review; the generated "Schema-valid is not activatable" note
  names npm run validate. generate-extension-reference --check and a test
  hold every fast check to one the CLI accepts without a pin.
- AI-AUTHORING lists expectJson, expectSignals and the steps form instead
  of denying expectJson.
- The hermetic-run contract (EXTENSIONS.md, HostContext doc comment, store
  and auth READMEs, STORE.md) includes a --local-review validate or routes.
- Pages and the generated AGENTS.md name all four check scripts;
  LOCAL-DEVELOPMENT no longer names npm scripts that do not exist.
- FRAMEWORK's third-run findings are marked fixed, with their PRs.
- The local-review rule is restated once, in EXTENSIONS.md "The local
  review loop"; other pages link to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ference, as a shipped page must

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant