The rules
(F6 reserved.)
Why each rule exists
F1 — Don’t trust the receipt; trust the chain.
A facilitator can post apayments.received event making it look like settlement happened on-chain when it didn’t. F1 says: persist what the RPC node observed, not what the facilitator claims. Tamper tests in apps/mcp/src/tools/__tests__/x402-pay.test.ts exercise the divergence path.
F2 — Treat every job re-fire as adversarial.
Inngest re-fires jobs after transient crashes. Without a single-claim guarantee, two workers attempt to broadcast the same payment. F2’s CAS-claim closes that window: only the worker that winsUPDATE ... RETURNING proceeds.
The saga-reaper (migration 0044) cleans up workers that crashed AFTER claim but BEFORE broadcast.
F3 — A grant is a snapshot. Tenant is the source of truth.
Bearer grants are valid untilexp. Between issue and use, the principal’s tenant membership might be revoked, transferred, or suspended. F3 says: re-read the tenant row on every tool call, before authorizing. @glideco/grant-wrapper is the single point of truth.
F4 — Audit log integrity is non-negotiable.
A compromised admin or rogue insider could tamper withactivity_log to hide an exfiltration event. F4 enforces append-only via Postgres trigger. Even admin DSAR redaction requires a session var (app.dsar_context_id) AND a redacted_fields_bitmap match — historical existence is preserved.
F5 — Don’t sign with a rotated-out key.
A signer rotation transaction advancespolicy_version. Tool calls compare the grant’s policy_version to current; mismatch → PolicyStaleError and the agent re-fetches a fresh grant. Without F5, in-flight tool calls could sign against keys that were rotated out mid-flight.
F7 — Sigils are single-use.
URL-mode elicitation sigils (the step-up tokens) MUST be CAS-claimed on first use. Without F7, a captured sigil URL could be replayed after the principal completes biometric approval.What if I want to disable an F-rule?
Don’t. If you absolutely must — for a fork that’s not connected to a real-money corridor, for example — document it explicitly in yourapps/mcp/COMPLIANCE.md divergence section + bump the policy_version to advertise the change. Operators downstream of you need to know.
Reading list
- Threat model — STRIDE pass with F-rules as primary mitigations.
- Agent platform self-host — operator-facing F-rule guide.