Repository navigation
Conversation
Visitors submit plain text with no account. New policy checks cover a swapped or lookalike payee, a rolling spend window, a repeated invoice, and instructions hidden in a memo or an earlier turn. An allow is broadcast on local Anvil. A block is shown as a simulation and is not signed. PLANNER=anthropic fails closed without a key and a model.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Problem
The console is the only way to try a payment, and it asks for an account. Policy already stops an infinite approve, a bad recipient, and an amount over the per-payment cap. It does not yet catch a lookalike address, a second payment that stays under that cap, the same invoice twice, or instructions stuffed into a memo or an earlier turn.
Solution
/break-ittakes plain text and no login. The standing task is invoice 1042, 50 MOCK_USDC, to the vendor on Anvil. Policy now has checks for the cases above. An allow is broadcast on local Anvil. A block is labeled as a simulation and is not signed. The logged-in console still waits for Approve.Boot refuses an EVM RPC or chain id other than local Anvil 31337, and a Solana RPC other than solana-test-validator.
PLANNER=anthropicsits next to the OpenAI planner and throws if the key or the model is missing. The arena will not call a live model until both per-million prices are set, the daily cap is not spent, and the kill switch is off. Tests use the mock planner.How to test
cd services/policy && go test ./...cd services/api && npx tsc -p tsconfig.json --noEmit && npm testcd apps/web && npx tsc -p tsconfig.json --noEmit/break-it. A blocked example should show the simulation label and no transaction. The clean example broadcasts only when Anvil answers chain id 31337.