Skip to content

feat(mcp): authoring runners review an edited extension site locally (#940) - #962

Merged
jimhoyd merged 5 commits into
mainfrom
claude/mcp-local-review-940
Sep 29, 2026
Merged

jimhoyd merged 5 commits into
mainfrom
claude/mcp-local-review-940

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #940

Design

run_validate, run_test and run_audit now always pass a fixed --local-review to their CLI child. No tool argument was added.

Why not a localReview: boolean argument:

Boundary (unchanged, enforced by the CLI):

  • Only when neither the forwarded --policy nor PROJECT_SHA256 reaches the child: the run is pinned to the current revision for that run only, reads no policy (no binding or egress grant) and defaults the origin to http://localhost; stderr carries a local_review event.
  • An operator pin always wins; a stale one still refuses.
  • validate/test/audit never serve; serve/dev still refuse the flag. The in-process run_tests has no such mode and still needs the pin.

The three tool descriptions state this exactly. Tool count is unchanged.

Changes

  • packages/core/src/mcp-authoring.ts: runner args and tool descriptions.
  • test/extensions.test.ts: spawns urlcode mcp --allow-authoring --host-file against a composeHost site, edits the project, and asserts all three runners pass with a local_review event at the new revision; with a stale PROJECT_SHA256 all three refuse with a pin mismatch and no local_review. Confirmed the test fails without the change.
  • Docs: TOOLING (inspection section and MCP runner section), EXTENSIONS local review loop, AI-AUTHORING, llms.txt, regenerated llms-full.txt.
  • scripts/package-audit.ts: core unpacked budget 3997 -> 4000 KiB (measured 1034337 packed / 4092005 unpacked, 528 entries on Node 26; packed keeps ~3 KiB over Node 24's +800 bytes).

Evidence

  • npm run verify: green.
  • npm run test:package: green.

Unverified (from the issue): whether any MCP client relied on the previous refusal as a signal.

🤖 Generated with Claude Code

…940)

run_validate, run_test and run_audit always pass --local-review to their
CLI child. With no operator pin reaching the child (no forwarded --policy,
no PROJECT_SHA256) the run is pinned to the current revision for that run
only, reads no policy (no grant) and defaults the origin to
http://localhost, so an agent's edit is checked without a new pin. The CLI
applies the same #932 rule, so an operator pin always wins and serving
never accepts the flag. No tool argument shapes the command line.

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

Development

Successfully merging this pull request may close these issues.

MCP run_validate/run_test/run_audit cannot review an edited extension site without a pin (follow-up to #932)

1 participant