-
Notifications
You must be signed in to change notification settings - Fork 1
docs(x402): record the self-facilitated settlement; split the two claims #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -115,15 +115,21 @@ itself the feedback. | |||||
| loop was the easy part; the settlement onboarding is where we stalled. The broadcast path is | ||||||
| built — `sidecar/src/facilitator.ts` (landed 2 Aug) calls Circle's Gateway `settle` endpoint | ||||||
| and reads `CIRCLE_API_KEY` — but it has **never run against the live Circle service**. It is | ||||||
| dormant without a key, so our seller reports `settlement: NOT_BROADCAST` and **no x402 purchase | ||||||
| has ever settled**; the loop is cryptographically end to end and financially a dry run, stated | ||||||
| plainly in `docs/CP2-SUBMISSION.md` and `docs/PRD.md` §0.1. Two honest consequences: the wire | ||||||
| dormant without a key, so with Gateway as the configured facilitator the seller reports | ||||||
| `settlement: NOT_BROADCAST` and **the Gateway path has never settled a payment**. We reached | ||||||
| SETTLED a different way — **self-facilitating the EIP-3009 authorization** (broadcasting | ||||||
| `transferWithAuthorization` directly, no Gateway): a real 0.04 USDC x402 payment settled on Arc | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This line (and the linked spine-run 'proof entry') claims a self-facilitated x402 settlement, but the self-facilitator source, the domain-chain test, and the 'Reproducible via x402-simulate.ts / x402-broadcast.ts' scripts do not exist anywhere in the repo (clean working tree, no such symbols in sidecar/). A reader can't regenerate or verify the claimed settlement from a clean checkout, which contradicts the repo's 'must not fabricate / reproducible' ground rule for claims. Either land the self-facilitator code and scripts, or qualify the claim (e.g. one-off, uncommitted) instead of presenting it as reproducible. Prompt for AI agents |
||||||
| (`docs/spine-runs/2026-08-08-first-x402-settlement.md`). So the loop is now end to end both | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Hyphenate “end-to-end” at Line [122]. Use the compound-adjective form and add a comma before “both.” Proposed wording-... the loop is now end to end both cryptographically and financially ...
+... the loop is now end-to-end, both cryptographically and financially ...📝 Committable suggestion
Suggested change
🧰 Tools🪛 LanguageTool[grammar] ~122-~122: Use a hyphen to join words. (QB_NEW_EN_HYPHEN) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||
| cryptographically and financially; what has never run is the Gateway integration specifically, | ||||||
| stated plainly in `docs/CP2-SUBMISSION.md` and `docs/PRD.md` §0.1. Two honest consequences: the wire | ||||||
| contract we coded against Circle's documented interface — the request/response field names — is | ||||||
| an **assumption until that first live call**, which is the actual test; and a *green CI check on | ||||||
| the facilitator path is not evidence the broadcast works*, because that path has never touched | ||||||
| the real endpoint. Getting to a live settlement needs a human-gated setup we could not complete | ||||||
| the real endpoint. Getting to a live *Gateway* settlement needs a human-gated setup we could not complete | ||||||
| in the timebox: a Circle account, terms acceptance, an API key, a funded Agent Wallet, and a | ||||||
| spend policy (`docs/V3-CIRCLE-SETUP.md`). Two smaller frictions compound it: the protocol ships | ||||||
| spend policy (`docs/V3-CIRCLE-SETUP.md`). **x402 settlement itself required none of that** — an | ||||||
| EIP-3009 authorization is a bearer instrument, so we broadcast it ourselves; the gate is on | ||||||
| Gateway, not on x402. Two smaller frictions compound it: the protocol ships | ||||||
| in **two coexisting transport versions** (v1 carries the challenge in the 402 *body*, v2 in a | ||||||
| `payment-required` *header*) that a seller must emit both of; and Circle's Gateway facilitator | ||||||
| lives at a **distinct endpoint** (`gateway-api-testnet.circle.com/gateway/v1/x402/*`) separate | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,9 +110,10 @@ movement and the hashes that anchor it. | |
| - **USDC** — escrow, advances, waterfall settlement, agent purchases | ||
| - **x402 nanopayments** — agents pay per-call for data through the sidecar, under | ||
| deterministic per-category spending caps with human approval escalation | ||
| - **Circle facilitator** — the sidecar calls Circle's Gateway x402 `verify` and `settle` | ||
| endpoints, and the endpoints themselves are contract-asserted in CI (AT-18). **No x402 payment | ||
| has settled on chain yet**; see gaps. | ||
| - **Circle facilitator** — the sidecar's Gateway client calls Circle's Gateway x402 `verify` and | ||
| `settle` endpoints, and the endpoints themselves are contract-asserted in CI (AT-18). **A 0.04 | ||
| USDC x402 payment has settled on chain — self-facilitated, not through Gateway; the Gateway | ||
| `settle` call is built and has never run against the live service. See gaps.** | ||
| - **USYC** — idle-float yield strategy (currently a mock strategy; see gaps) | ||
|
|
||
| ### Both tracks, one system | ||
|
|
@@ -149,14 +150,18 @@ We would rather state these than have them found. | |
| expense, but it is not yet joined to the daemon's own purchase provenance — so an | ||
| expense recorded via CLI surfaces correctly as outside-policy in the invoice. Settlement | ||
| ordering is enforced; expense origination is not yet fully attested. | ||
| - **No x402 purchase has settled.** This is the honest state of the agent-payment leg. The full | ||
| 402 → sign → retry → 200 loop is real and runs end to end, with the EIP-3009 authorization | ||
| signed by a real key and verified by the seller. What has never happened is the broadcast: the | ||
| Circle facilitator client was written on 2 Aug 2026 (`sidecar/src/facilitator.ts`) and has | ||
| never run against the live service, because that needs a Circle account and API key we do not | ||
| have yet. Without a key the seller reports `settlement: NOT_BROADCAST` and the fixture capture | ||
| refuses to write evidence. So the loop is cryptographically end-to-end and financially a dry | ||
| run, and the settlement code is unproven rather than proven. | ||
| - **A 0.04 USDC x402 purchase has settled, self-facilitated. The Circle Gateway path is built and | ||
| has never run.** Two independent facts. The full 402 → sign → retry → 200 loop is real and runs | ||
| end to end, with the EIP-3009 authorization signed by a real key and verified by the seller — | ||
| and that authorization was then **broadcast directly** (`transferWithAuthorization`), settling | ||
| 0.04 USDC operator → seller on Arc ([`0x0d39b5…dccc`](https://testnet.arcscan.app/tx/0x0d39b5738f7042ae82ae0a17f24474e67c27db0cd837b791c112f8d264b6dccc); | ||
| `docs/spine-runs/2026-08-08-first-x402-settlement.md`). Settlement did not require Gateway. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: This PR adds proof entries to docs/spine-runs/ and references the new file in the changed text, but the gap statement right below still claims "docs/spine-runs/ is empty" — that is now factually false and contradicts the README 'must not misrepresent' constraint. Update the line (e.g. drop 'is empty' and acknowledge the settlement entry isn't a full end-to-end spine run) so the submission doesn't carry a stale contradiction. Prompt for AI agents |
||
| Separately, the Circle Gateway facilitator client (written 2 Aug, `sidecar/src/facilitator.ts`) | ||
| has never run against the live service — that path needs a Circle account, key, and Gateway | ||
| allowlisting we do not have. A self-facilitated settlement is marked as such (`self:` facilitator | ||
| markers), and the fixture capture (AT-18) refuses it as *Circle* evidence. So the loop is now | ||
| end to end both cryptographically and financially; what stays unexercised is the Gateway path | ||
| specifically, not settlement itself. | ||
|
Comment on lines
+153
to
+164
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Scope stale settlement statements to Circle Gateway. Both documents now prove a self-facilitated x402 payment, but adjacent text still uses the old generic claim that no agent-payment settlement occurred.
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| - **No end-to-end spine run has been logged.** `docs/spine-runs/` is empty. The harness exists | ||
| (`scripts/spine_run`) and can now run against the pool we already hold (`--scaled`), but the | ||
| claim "green on N consecutive days" is not one we can make. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,9 +134,12 @@ you are asked. | |
|
|
||
| ## 5. Can we see it run? | ||
|
|
||
| Be straight about the state of this. As of 3 Aug 2026 no end-to-end spine run has been logged | ||
| (`docs/spine-runs/` holds only `.gitkeep`), and no agent purchase has settled through x402 — the | ||
| facilitator client exists and has never run against Circle, so the seller records `NOT_BROADCAST`. | ||
| Be straight about the state of this. As of 8 Aug 2026 spine runs have been logged (`docs/spine-runs/`; | ||
| first automated settlement 2026-08-07), and a 0.04 USDC agent purchase has settled through x402, | ||
| self-facilitated (`docs/spine-runs/2026-08-08-first-x402-settlement.md`) — the authorization was | ||
| broadcast directly, not through Gateway. Separately, the Circle Gateway facilitator client is built | ||
| and has never run against Circle's live service; under that facilitator with no key the seller | ||
| records `NOT_BROADCAST`. Two independent facts: settlement happened, and it did not use Gateway. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The new statement claims a 0.04 USDC x402 agent purchase has settled on Arc (self-facilitated), but the text immediately below (unchanged here) still asserts the opposite: "What has not happened is the agent-payment leg settling real money" and "the money mechanism is proven; the agent-payment rail is not.". This is precisely the conflated claim the PR set out to split, and section 5 now contradicts itself — a reader sees the settlement declared, then is told the agent-payment leg never settled. The surrounding lines need to be reconciled with the new settlement fact (e.g. the rail is proven self-facilitated; the Gateway facilitator rail is not). Prompt for AI agents |
||
|
|
||
| What *has* happened, on chain, is the full money lifecycle for two jobs: fund → advance → expense → | ||
| delivery → accept → waterfall → rate rise. What has not happened is the agent-payment leg settling | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,7 +56,7 @@ a **committed artifact**. Code cannot satisfy those. A green CI run is not evide | |
| | V1 real four-cent purchase + committed fixture | V3, then a live capture. `capture-v1-fixture.ts` refuses to write a fixture without a real transaction hash from Circle's endpoints (refusals 5–7). | | ||
| | V7 / V10 / V11 "renders live" | One green spine run with a human watching. | | ||
| | V12 reset → spine → reset → spine | Two consecutive green runs. | | ||
| | Spine runs (schedule, §16) | **First automated settlement logged 2026-08-07, verdict UNVERIFIED** — the waterfall settled on chain and only the x402 beat is unproven (settlement rests at `NOT_BROADCAST`, pending a funded Circle Gateway deposit). **Three prior FAIL runs the same day** are recorded in `docs/spine-runs/spine-runs.tsv` and kept deliberately: the live runs surfaced what CI could not — the missing `startWork`/`submitDelivery` caller, and an operator-owned pool. **No daily cadence exists**: the Wed 29 Jul gate was missed; runs are on-demand, not scheduled. | | ||
| | Spine runs (schedule, §16) | **First automated settlement logged 2026-08-07, verdict UNVERIFIED** — the waterfall settled on chain; the x402 beat rested at `NOT_BROADCAST` in that run (Gateway facilitator, no key). **The x402 beat has since settled separately**: a real 0.04 USDC x402 payment settled on Arc 2026-08-08, **self-facilitated** — broadcasting the EIP-3009 authorization directly, not through Circle Gateway, which is built and has never run against the live service (`docs/spine-runs/2026-08-08-first-x402-settlement.md`). **Three prior FAIL runs the same day** are recorded in `docs/spine-runs/spine-runs.tsv` and kept deliberately: the live runs surfaced what CI could not — the missing `startWork`/`submitDelivery` caller, and an operator-owned pool. **No daily cadence exists**: the Wed 29 Jul gate was missed; runs are on-demand, not scheduled. | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Refresh the implementation-status date. Line [59] now includes events from August 8, 2026, but §0.1 and the document-control row still say that the status was updated on August 2, 2026. Update the section metadata to August 8, 2026, or move the new facts into a dated addendum. 🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: The added §0.1 row records the 2026-08-08 settlement inside a section still stamped "built vs. proven (2 Aug 2026)" / "updated 2 Aug 2026" (section header, §0 status field, and TOC). Since this section is the judge-facing implementation-status record and the PR is precisely about recording the 8 Aug event, update those date stamps when landing so the section header and its content don't contradict each other. Prompt for AI agents |
||
|
|
||
| **Known gaps carried deliberately** | ||
|
|
||
|
|
@@ -317,7 +317,7 @@ Worker need = a fuzzy description, vectorised and similarity-matched against a s | |
| |---|---| | ||
| | Brain (control plane) | Circle CLI + Circle Skills | | ||
| | Funding agent | Circle Agent Wallet spend-policy (outer guard) + deterministic policy engine (inner) | | ||
| | DD-worker discovery + purchases | Circle Agent Marketplace *(discovery: **roadmap** — the shipped code embedding-matches against a local stand-in catalog, our own V2 paid API, behind a `Catalog` seam built for the marketplace; no marketplace API is integrated today)* + **Circle's Gateway x402 facilitator** — **never** the generic x402.org facilitator or another vendor's (Coinbase/Stripe/Cloudflare also implement x402; judges score *Circle's* tools). *Integration detail, stated precisely because it is judge-facing: we call Circle's documented Gateway x402 `verify` and `settle` endpoints directly over HTTP (`sidecar/src/facilitator.ts`, endpoints pinned in `circle-facilitator-fixture.ts` and asserted by AT-18). We do **not** depend on the `@circle-fin/x402-batching` package, which earlier drafts of this table named. As of 2 Aug 2026 that client is written but has never run against the live service — it is dormant without `CIRCLE_API_KEY`, and no payment has settled.* | | ||
| | DD-worker discovery + purchases | Circle Agent Marketplace *(discovery: **roadmap** — the shipped code embedding-matches against a local stand-in catalog, our own V2 paid API, behind a `Catalog` seam built for the marketplace; no marketplace API is integrated today)* + **Circle's Gateway x402 facilitator** — **never** the generic x402.org facilitator or another vendor's (Coinbase/Stripe/Cloudflare also implement x402; judges score *Circle's* tools). *Integration detail, stated precisely because it is judge-facing: we call Circle's documented Gateway x402 `verify` and `settle` endpoints directly over HTTP (`sidecar/src/facilitator.ts`, endpoints pinned in `circle-facilitator-fixture.ts` and asserted by AT-18). We do **not** depend on the `@circle-fin/x402-batching` package, which earlier drafts of this table named. As of 2 Aug 2026 that client is written but has never run against the live service — it is dormant without `CIRCLE_API_KEY`. Settlement itself is not blocked on it: a 0.04 USDC x402 payment has settled on Arc self-facilitated (2026-08-08), broadcasting the authorization directly; the Gateway client specifically remains unexercised.* | | ||
| | Compliance step | Circle Compliance Engine *(**seam only — not integrated**. The shipped screen is `worker.StubCompliance` (`daemon/internal/worker/worker.go:178`), wired at `daemon/cmd/snapfall/main.go:759`, which fabricates nothing: decision `not-screened`, provider `stub`, `stub: true`. No Compliance Engine client or endpoint exists in the tree. What IS real: the screen runs as a task step, the report carries "evidence, not a guarantee", and QA reads the stub flag and attaches a disclosure note rather than passing it silently. Unlike the facilitator this is not credential-blocked — no client has been written.)* | | ||
| | Billing agent | Arc Explorer + Gateway settlement records | | ||
| | JobVault / FloatPool / Waterfall | **Ours** — Arc supplies sub-second finality + USDC-native gas; the primitive is our own engineering | | ||
|
|
@@ -470,7 +470,7 @@ AT-01..15 remain in force from the v4 SRS annex, with AT-10 extended (restart re | |
| - Restart recovery demonstrated, including Brain. | ||
| - Secret audit clean. | ||
| - Full reset rehearsed twice (reset ×2). | ||
| - Spine runs: first automated settlement 2026-08-07, verdict UNVERIFIED (the waterfall settled on chain; only the x402 beat is unproven). Three prior FAIL runs the same day are kept in `docs/spine-runs/spine-runs.tsv` — a live run found what CI could not. No daily cadence: on-demand, not scheduled. See §0.1. | ||
| - Spine runs: first automated settlement 2026-08-07, verdict UNVERIFIED (waterfall settled on chain; the x402 beat rested at `NOT_BROADCAST` then). The x402 beat has since settled on Arc 2026-08-08, self-facilitated (not through Gateway); the Circle Gateway path is built and has never run. Three prior FAIL runs the same day are kept in `docs/spine-runs/spine-runs.tsv` — a live run found what CI could not. No daily cadence: on-demand, not scheduled. See §0.1. | ||
| - Recording integrity: replay of real runs, live transactions, disclosed caption. Record Thu; edit + deck + README Fri (**Teammate 2 owns final README/deck review**). | ||
| - Submission Sat 8 Aug, evening IST; all links verified incognito. Sun 9 Aug = AoE contingency only, not build time. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,7 @@ that no unit test can close, because the clause names a live run: | |||||
|
|
||||||
| | Task | Done when (WORK-SPLIT §2) | Closed by | | ||||||
| |---|---|---| | ||||||
| | V1 | "a real four-cent purchase completes on testnet **and the raw request/response pair is committed as a fixture**" | **NOT closed by any beat yet.** Beat 3 proves the x402 handshake, the EIP-3009 signature and the resource delivery are real, and stops at UNVERIFIED because `seller.ts:217` returns `settlement: NOT_BROADCAST`, so nothing reaches Arc and `SETTLED` is unreachable (H3 section 8). Both halves of the clause need the facilitator broadcast plus a funded wallet: see `docs/V3-CIRCLE-SETUP.md`. | | ||||||
| | V1 | "a real four-cent purchase completes on testnet **and the raw request/response pair is committed as a fixture**" | **Settlement half proven 2026-08-08; the Circle-specific fixture half stays open.** Beat 3 proves the x402 handshake, the EIP-3009 signature and the resource delivery are real. It rested at UNVERIFIED in the 2026-08-07 run because, under the (unconfigured) Gateway facilitator, `seller.ts` returned `settlement: NOT_BROADCAST`. `SETTLED` is **not** unreachable: a real 0.04 USDC x402 payment has since settled on Arc, **self-facilitated** — broadcasting the EIP-3009 authorization directly, no Gateway (tx [`0x0d39b5…dccc`](https://testnet.arcscan.app/tx/0x0d39b5738f7042ae82ae0a17f24474e67c27db0cd837b791c112f8d264b6dccc); `docs/spine-runs/2026-08-08-first-x402-settlement.md`). The open half is the Circle-specific one: the committed fixture (`capture-v1-fixture`, AT-18) requires Circle's endpoints, and the Gateway path is built but has never run against the live service (`docs/V3-CIRCLE-SETUP.md`). | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Calling the settlement half of V1 "proven" overstates the clause, which requires "a real four-cent purchase completes on testnet." The 08-08 event was a standalone manual operator->operator transfer, not a purchase that ran through the live flow to SETTLED, so that half of the clause arguably remains open; suggest wording it as the settlement mechanism being demonstrated rather than the clause half closed. Prompt for AI agents
Suggested change
|
||||||
| | V7 | "a full spine run renders every state transition live" | a human watching during a green run | | ||||||
| | V9 | "clicking Accept produces the on-chain settlement tx" | beat 6, from JobVault status on chain | | ||||||
| | V10 | "a live spine run animates correctly with zero manual triggers" | a human watching during a green run | | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The new text states "A 0.04 USDC agent purchase has settled end to end on Arc through the x402 path, self-facilitated — its transaction is on the audit page" and points the reader at the audit page. But
dashboard/app/audit/page.tsx(the very surface named) still listsclaim: 'No agent purchase has settled through the x402 path.'andclaim: 'No end-to-end run has been logged.'with detail "docs/spine-runs/ contains only .gitkeep.". The landing page and the audit page now assert opposite facts about the same settlement, which contradicts the PR's goal of stating both independent facts on every surface. The audit surface needs the same split update so it does not under/contradict the landing page.Prompt for AI agents