Skip to content

fix: verify receipt-free payments on chain and return delivered content - #7

Merged
eminogrande merged 1 commit into
mainfrom
fix/settlement-chain-verify
Oct 28, 2026
Merged

eminogrande merged 1 commit into
mainfrom
fix/settlement-chain-verify

Conversation

@eminogrande

Copy link
Copy Markdown
Contributor

Summary

  • Keep merchant receipts as the primary settlement evidence; discover matching token transfers from beforeBlock when the receipt is missing or unusable (src/agent-kernel-runtime.mjs:516-574).
  • Require two confirmations, exact token/Safe/payTo/amount (positive amount up to ceiling for upto), used nonce, and transaction-level nonce binding through AuthorizationUsed or decoded settlement calldata (src/agent-kernel-runtime.mjs:525-557).
  • Persist chain_discovered transaction/block and reconcile existing receipt-free operations read-only; preserve the discovered transaction over unusable merchant metadata (src/agent-kernel-runtime.mjs:208,557-558,1060).
  • Return delivered_unverified with the actual resource and an explicit settlement warning rather than a bare failure (src/mcp-wallet-tool.mjs:716-717). No MCP schema/action changes, dependencies, custody/signing changes or DECISIONS changes.

Verification

Based on live revision 2a50dfc. Extended the existing offline harness, not a new suite (scripts/check-wallet-ask.mjs).

  • npm run precheck: PASS
  • npm run check: PASS; import closure ok: 57 files from 3 entries, 55 src modules
  • npm run check:ask: PASS; 11 synthetic payments; receipt-free -> chain_discovered/paid; durable replay; wrong nonce/asset/payTo/amount and unrelated transaction with no authorization event stay unconfirmed and return delivered content; same-request reconciliation succeeds; two confirmations asserted
  • npm run check:ask:regression: PASS; three mutations fail, restored candidate passes
  • git diff --check: PASS

Offline fake RPC/merchant/signatures only; no live settlement test or deployment. Draft for review only; do not merge/deploy.

@eminogrande
eminogrande marked this pull request as ready for review October 28, 2026 09:04
@eminogrande
eminogrande merged commit 6cf518e into main Oct 28, 2026
1 check passed
@eminogrande
eminogrande deleted the fix/settlement-chain-verify branch October 28, 2026 09:04
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.

1 participant