Skip to content

Trial-3 CLI friction: hermetic local review, one committed route count, pin-free --local-review, method-level coverage notes - #970

Merged
jimhoyd merged 5 commits into
mainfrom
claude/trial3-cli-friction
Sep 29, 2026
Merged

jimhoyd merged 5 commits into
mainfrom
claude/trial3-cli-friction

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes four CLI findings from the third agent workflow trial (tracking issue #961).

Fixes #954
Fixes #955
Fixes #958
Fixes #959

Design

#954: validate needed urlcode-auth migrate. Rule: a local review never touches the site's data. When validate or routes runs with --local-review and no operator pin, the extensions activate on a fresh temporary data directory, with no seed. This is how test and audit already run (RIM-EXT-HERMETIC-001). The generated npm run validate therefore needs no migration or secret. The serving checks are unchanged: with --policy, URLCODE_POLICY or PROJECT_SHA256, validate activates on <site>/data exactly as serve will, so a missing migration or secret still surfaces before serving. test:proof still asserts that. The RIM card, READINESS and the local review loop state the split.

#955: --expect-routes in three files. The count is now committed once, in the project's tests/audit.json as {"expectRoutes": N}.

  • urlcode audit reads the file when --expect-routes is absent, and the flag still overrides it. The report's expectedRoutesFrom says which source applied.
  • A malformed file refuses the audit with invalid-audit-expectation.
  • init writes the file with 0 (it is in the starter). The generated npm script, AGENTS.md and the starter workflow carry no count.
  • extensions add|remove move that one file and name it.
  • The file lives under tests/, outside the project revision, so changing the count needs no new pin.
  • The action's expect-routes input still overrides the file. When the input is empty, the audit reads the file.
  • context omits the flag when the file exists.

The audit still catches an unexpected route-count change: the value is reviewed and committed, never derived from the YAML.

#958: openapi --local-review refused. explain, context, plan-feature, review, report and openapi need no pin. They now accept the flag and ignore it, so the flag the check scripts pass works on every check. serve and dev still refuse it: "<cmd> does not take --local-review: serving always needs the reviewed revision pin". Every other command refuses it and names itself and the commands that accept it.

#959: misleading gated-route-uncovered. A new note, method-without-success, covers a route that some case reached (another of its methods is covered). It lists the uncovered {route, method} pairs, and in cases the fixture cases that sent those methods only an asserted refusal (status 400 or more). gated-route-uncovered now fires only when no method of the gated route is covered.

Evidence

  • npm run verify and npm run test:package pass locally (macOS, Node 26).
  • New tests:
    • test/extensions.test.ts: pin-free acceptance, refusals naming the command, and hermetic local review vs. the pinned validate, using a stand-in extension that refuses unset site data.
    • test/readiness.test.ts: the committed count, the flag override and malformed files.
    • test/addons.test.ts: the one file moves.
    • test/authenticated-fixtures.test.ts: the refusal-only PATCH case.
    • packages/store/test/recipes.test.ts: the configured database is never created by the local-review loop.
  • Package budget (core): 1042709 packed / 4114003 unpacked bytes, 531 entries on Node 26. The limits are raised to 1023 / 4022 KiB (+800 bytes for Node 24 and about 3 KiB of headroom).

Limitations

  • The hermetic local review is proven with a stand-in extension and the real store recipes. validate --local-review was not run against a real auth site with an unmigrated database.
  • A local review of validate no longer surfaces a missing migration. That now happens at the pinned validate, dev or start, and the auth scaffold note says so.

🤖 Generated with Claude Code

… route count, pin-free --local-review, method-level coverage notes

- #954: validate and routes under --local-review with no operator pin activate
  extensions on a fresh temporary data directory, like test and audit. The
  pinned validate still checks the site's data/ that serve uses.
- #955: the audit reads the expected route count from the project's committed
  tests/audit.json when --expect-routes is absent. init writes it; the npm
  script, AGENTS.md and the workflow carry no count; extensions add|remove move
  that one file. The report gains expectedRoutesFrom.
- #958: explain, context, plan-feature, review, report and openapi accept
  --local-review and ignore it; other refusals name the command.
- #959: coverageNotes adds method-without-success for uncovered methods of a
  route whose other methods are covered, listing the refusal-only cases;
  gated-route-uncovered fires only when no method of the gated route is covered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jimhoyd
jimhoyd enabled auto-merge (squash) September 29, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment