Repository navigation
Local review loop without re-pinning; plan-feature ignores incidental words; booking and credits recipes (#932) - #942
Merged
Merged
Conversation
…s incidental words, booking and credits recipes (#932) - validate, test, routes and audit take --local-review: with no operator pin (no --policy, URLCODE_POLICY or PROJECT_SHA256) the run is pinned to the current revision, reads no policy (no grants) and defaults the origin to http://localhost; it prints a local_review event on stderr. serve, dev and every other command refuse the flag. An operator pin always wins. The generated npm scripts and the starter Makefile pass it for the checks only. - plan-feature: a surface matched by one goal word no longer requires its extension ("Notify the team" no longer requires store); a surface needs two goal words, or its extension a matching recipe or noun. - recipes store-booking (intervals, cancel transition) and store-credits (pay, and an issuer transfer with a negative min plus members), run by the store package through the CLI with --local-review; the credits plan and the store transfers surface name the issuer pattern. - Docs: EXTENSIONS "The local review loop", TOOLING, RECIPES, STORE, AI-AUTHORING, LOCAL-DEVELOPMENT, FRAMEWORK, MONITORING, OBSERVABILITY, starter README/AGENTS, llms; package budgets raised. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 29, 2026 18:19
…-doc links, drop a duplicated store CHANGELOG entry Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
added a commit
that referenced
this pull request
Sep 29, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
added a commit
that referenced
this pull request
Sep 29, 2026
--local-review and hermetic runs compose: the store-credits recipe seeds its issuer from tests/seed.json instead of adding it to the live database, and the recipe tests assert nothing reaches the configured database. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #932
1. The local edit loop needs no new pin (
--local-review)validate,test,routesandauditaccept--local-review. It applies only when the operator gave no pin: no--policy,URLCODE_POLICYorPROJECT_SHA256. Then the CLI:prepareFunctionSnapshot, the same valueurlcode permissionsprints) and passes it toloadOperatorHostas the host's pin, the same way a verified--policyrevision is passed;--origintohttp://localhost;{"event":"local_review","revision","origin","note"}on stderr, so the output shows the run was not a reviewed one.The generated npm scripts (
validate,test,routes,audit) and the starter Makefile pass the flag.devandstartdo not. The loop is documented in docs/EXTENSIONS.md "The local review loop", with notes in TOOLING, LOCAL-DEVELOPMENT, AI-AUTHORING, FRAMEWORK, MONITORING/OBSERVABILITY (the new event), the starter README/AGENTS.md and llms.txt.Why the approval boundary holds
serve,dev,benchmark,explainand every other command refuse it withlocal-review-unsupported. A served runtime is still pinned only by the operator, anddev's start is still strict.serverefuses until the operator pins a revision.--policy,URLCODE_POLICYorPROJECT_SHA256is present, the flag does nothing. A stale policy still givesrevision-pin-mismatch, and a stalePROJECT_SHA256still givesExtension revision pin mismatch. Both are tested.permissionsis undefined, the same as a run without a policy. Env, secret and egress grants are all denied. A test shows a proxy route refused withEgress denied by revision-pinned operator policyunder--local-review, and passing with the reviewed policy that grants it. That policy's pin applies unchanged, and nolocal_reviewevent is printed. The only grant is the test harness's ownURLCODE_DATA_DIRgrant, which exists with or without the flag.host.mjsalready composes. These are the same ones the manual workaroundPROJECT_SHA256=<current revision>activates, and the one the trial used. The published CI action already computesPROJECT_SHA256from the checkout for its non-serving checks.The MCP runners (
run_validate/run_test/run_audit) are unchanged: they forward only the operator's own flags. Whether they should pass the flag is filed as #940.2. plan-feature ignores incidental words
A surface matched by a single goal word no longer makes its extension required. For example, the store's
membershipsurface matched "Notify the team" through "team". An extension is required only through one of these:A single-word surface is still listed when its extension is required for one of those reasons. Among equal recipes, the one needing fewer services ranks first. This keeps approvals on
store-crudrather thanstore-booking.Regression cases: "Notify the team", "send the team a welcome email", "move the old page to a new address" and "update the homepage copy" require no store. "Let users book a room" plans
store-bookingwith theintervalssurface. A credits goal plansstore-credits.3. Recipes:
store-bookingandstore-creditsBoth are declarative (no handler code), declare
auth: trueandstore, and pass theirtests.commandswith--local-review:bookingscollection with an hour pattern andintervals {within: [room], when: {status: booked}}. Acanceltransition frees the slot, andstatusis read-only.wallets.balancedefaults to 0, is inreadOnlyPropertiesand is never set by a transition (the Store: a transfers collection's sum never changes on delete or create (#928) #935 rule).paynever overdraws. Funding uses the issuer pattern:issue: {amount: balance, min: -1000000, members: issuers}.The fixtures leave nothing behind (the credits wallets are paid back to 0 and deleted), so they rerun on the same database.
recipes search bookingandrecipes search creditsfind them first.The credits plan's outline names the issuer pattern. The store's
transfersauthoring surface now names it too (descriptor rebuilt), and its goals addissuer,issuersandmint.The fixtures identify callers with
Authorization: Bearer <id>through the stand-in principal host shown in the README, as the authenticated recipes already do. With the real Better Auth extension, each caller needs a sign-instepsfixture; the READMEs say so. core'stest/recipes.test.tsskips every store recipe.packages/store/test/recipes.test.tsruns both through the CLI (validate --local,testtwice,auditready) with--local-review, the real store and no pin or origin. It adds the issuer member first withaddMember.Evidence (macOS, Node 26)
npm run verifypasses.npm run test:packagepasses (39 packaged example commands).npm run test:addonspasses (7). Its auth-site test now shows:npm run validatepassing with thelocal_reviewevent;npm startrefusing with one complete command;URLCODE_POLICYalone still refusing for the origin;test/extensions.test.ts:--local-reviewfor the four commands, an edit at the new revision, refusal by serve/dev/benchmark/explain, operator pin wins, no egress grant.test/feature-plan.test.ts: the Local edit loop needs a new revision pin on every edit; plan-feature false positive on 'team' and no scheduling/credits recipes #932 regression cases.packages/store/test/recipes.test.ts.Limitations
--local-reviewpins to the current revision, so a local review still runs the project's trusted functions and the operator host with full Node access, as any validate or test does.steps.🤖 Generated with Claude Code