<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Igor</title>
    <description>The latest articles on DEV Community by Igor (@igorvii).</description>
    <link>https://dev.to/igorvii</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4262771%2F40616c27-3026-4ba9-8fe2-693bd2f4f742.png</url>
      <title>DEV Community: Igor</title>
      <link>https://dev.to/igorvii</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/igorvii"/>
    <language>en</language>
    <item>
      <title>Pre-registered re-run: an x402 payment-hook battery under vendor-issued conditions — 9/9</title>
      <dc:creator>Igor</dc:creator>
      <pubDate>Wed, 25 Nov 2026 05:37:09 +0000</pubDate>
      <link>https://dev.to/igorvii/pre-registered-re-run-an-x402-payment-hook-battery-under-vendor-issued-conditions-99-13jc</link>
      <guid>https://dev.to/igorvii/pre-registered-re-run-an-x402-payment-hook-battery-under-vendor-issued-conditions-99-13jc</guid>
      <description>&lt;p&gt;We re-ran a hostile battery against the Agentic Finance Graph (AFG) onBeforePaymentCreationgate hook — not on our terms, but on conditions the vendor itself issued in the thread,frozen verbatim before a single request was made. Result: 9/9 sessions MATCH, 0 divergences, $0.00 spent.&lt;/p&gt;

&lt;p&gt;Why vendor-issued conditions matter&lt;br&gt;
Our first run (slot 0031) found a real divergence: in an 8-way race, seven checks were allowedwith pre-decision pending snapshots — a window-state inconsistency. AFG responded the way everyproject should: with numbers. They issued three conditions for a re-run: the receipt schema movedto v2 (body.policy = {name, sha256}, the 16-char policy.hash is gone from receipts), the 503row is likely unreachable from outside ("not observed" is the expected result), and S6 shouldnow yield exactly 1 allow + 7 blocks, each block with pending {decisions: 1, usd: 200} —while $200 to a new address stays in character for the agent.&lt;/p&gt;

&lt;p&gt;We froze their comment verbatim (with its body sha256) as the source of truth, derived theexpected column from it and nothing else, and published the freeze as a timestamped post —4 m 28 s before the first live GET. No expectation came from any pre-run observation.&lt;/p&gt;

&lt;p&gt;The battery (budget $0.00, no payments signed, no retries)&lt;br&gt;
Session Attack / control    Expected (frozen)   Observed&lt;br&gt;
S1  restart persistence allow → block allow → block ✓&lt;br&gt;
S2  fresh-reference farming 10× allow, no cross-ref aggregation    10× allow, clean ✓&lt;br&gt;
S3  amount splitting ($300 → 5×$60)  window never sees $300  5× allow ✓&lt;br&gt;
S4  payTo rotation  4th blocked by 3-new-payees/day cap new_payees_per_day_exceeded:4&amp;gt;3 ✓&lt;br&gt;
S5  boundary arithmetic exactly 250 allowed (strict &amp;gt;)  allow, allow, block ✓&lt;br&gt;
S6  race, vendor-issued 1 allow + 7 blocks, pending 1×$200 exactly that ✓&lt;br&gt;
S7  skipped hook    zero gate signals   0 requests ✓&lt;br&gt;
S8  503 reachability (passive)  "not observed"  32 calls, all 200 ✓&lt;br&gt;
S9  receipt v2 conformance  v2 schema, {name, sha256}   32/32 ✓&lt;br&gt;
Two results worth highlighting.&lt;/p&gt;

&lt;p&gt;The 0031 divergence did not repeat. In S6 the gate returned exactly the vendor-issuedoutcome: one allow, seven blocks, every block accounting the same single pending decision.The server-side lock now behaves the way AFG disclosed. A finding that disappears after avendor fix — verified under the vendor's own frozen numbers — is the strongest closure atest lab can offer.&lt;/p&gt;

&lt;p&gt;Receipt v2 recomputes byte-exact. Every receipt names its policy by the SHA-256 of thewhole policy body. We recomputed canon(policy.body) for all 32 receipts: all matche78dea71… exactly. The legacy 16-character hash survives only beside policy.sha256 inthe answer — precisely as the vendor announced.&lt;/p&gt;

&lt;p&gt;The discipline&lt;br&gt;
Every run in our lab follows the same mechanics: freeze → prereg hash published → run →offline table → seal. Checks are written exactly once; a failure is a result, never retried.Sealed originals are never edited — corrections are separate records. The 0033 record isEd25519-sealed with the operator key and hash-chained to 0032; evidence (39 raw call files,offline table, manifest) is committed next to it.&lt;/p&gt;

&lt;p&gt;Everything is public:&lt;/p&gt;

&lt;p&gt;Registry + evidence: igor-vii/Argus-Agent-Test-Lab&lt;br&gt;
The thread with AFG's issued conditions and our prereg post: x402#3866&lt;br&gt;
Next up: a receipt-anchoring pilot with paidfor-data (slot 0034+) and the paid-tierreciprocal ruler. If your project wants the same treatment — issue your conditions in thethread; we'll freeze them verbatim and run the battery.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>testing</category>
      <category>agents</category>
    </item>
    <item>
      <title>Your x402 Endpoint Is One Header Away From Working for Free</title>
      <dc:creator>Igor</dc:creator>
      <pubDate>Tue, 24 Nov 2026 13:39:23 +0000</pubDate>
      <link>https://dev.to/igorvii/your-x402-endpoint-is-one-header-away-from-working-for-free-11d0</link>
      <guid>https://dev.to/igorvii/your-x402-endpoint-is-one-header-away-from-working-for-free-11d0</guid>
      <description>&lt;p&gt;We built an adversarial battery for AI agents that move money — here's what it caught when we pointed it at real x402 payment flows.&lt;/p&gt;

&lt;p&gt;The x402 protocol is refreshingly simple: GET without payment → 402 with payment requirements → retry with a payment header → facilitator verifies and settles → 200. Simple enough that teams ship it in an afternoon. And simple enough that one missing header or one wrong comparison turns a paid resource into a free one — or a valid payment into a silent failure.&lt;/p&gt;

&lt;p&gt;We are building Argus, an adversarial testing tool for exactly this class of systems. This post is a field report, not a pitch.&lt;/p&gt;

&lt;p&gt;The happy path everyone tests — and the one nobody does&lt;br&gt;
A correct x402 implementation has two hard jobs:&lt;/p&gt;

&lt;p&gt;Refuse everything that isn't a valid payment. Wrong scheme, wrong asset, replayed nonce, expired quote, wrong payTo, unsigned body — every one of these must end in 402, not in a served resource.&lt;br&gt;
Accept valid payments exactly once. Retried signature, double-spend window, settle-after-verify failure semantics.&lt;br&gt;
The failure mode in category 1 is scary in a quiet way: your endpoint works, tests pass, demo looks great — and the resource is served for free because the payment validation happens after the handler.&lt;/p&gt;

&lt;p&gt;What the battery does&lt;br&gt;
Argus ships as a GitHub Action (Argus battery on the Marketplace) — you wire it into CI, it spawns the real engine locally, drives your SUT over 127.0.0.1, and issues verdicts as a check run:&lt;/p&gt;

&lt;p&gt;Family&lt;br&gt;
Argus plays&lt;br&gt;
Your SUT is&lt;br&gt;
Sessions&lt;br&gt;
BC  bad client / buyer  seller  9&lt;br&gt;
S-BS    bad seller  buyer   6&lt;/p&gt;

&lt;p&gt;Verdicts are registry-grade: PASS, FAIL, DOCUMENTED (refusal probe with documented behavior — evidence, not failure), HARNESS_ERROR. A resource served despite an invalid payment is always FAIL. No judgment calls.&lt;/p&gt;

&lt;p&gt;The engine itself is delivered as a sealed, Ed25519-signed bundle; the Action verifies the seal — manifest schema, key id, signature over the canonical manifest, tree_sha256 of the tarball — before running anything. A broken seal means zero execution.&lt;/p&gt;

&lt;p&gt;Field report 1: our own run held at the gate&lt;br&gt;
We eat our own food. In a recent BC run against our own console (the system under test was a live x402 resource on Vercel), the gate failed with a bare gate failed: fetch failed.&lt;/p&gt;

&lt;p&gt;That message is useless — Node's fetch hides the real cause inside error.cause. We fixed the diagnostics first ([ENOTFOUND: ...], [ECONNREFUSED: ...], timeouts now land in evidence), and here's the part we're proud of:&lt;/p&gt;

&lt;p&gt;the gate failed closed: the battery stopped at the gate instead of running half-armed;&lt;br&gt;
nothing was charged — the run returned its quota, clean cost 0;&lt;br&gt;
the battery verdicts stayed honest.&lt;br&gt;
When money is involved, "fail closed and explain" is the feature. A harness that runs on a flaky network produces false FAILs — and false positives in payment testing teach people to ignore results.&lt;/p&gt;

&lt;p&gt;Field report 2: an external engagement that shipped a fix&lt;br&gt;
Not x402 this time, but the same money-lifecycle class: we ran a ten-window idempotency battery against mcp-tool-idempotency — a library that gives exactly-once semantics to MCP tool calls, i.e. to "AI agent did something expensive" moments.&lt;/p&gt;

&lt;p&gt;Ten windows probed: charge replay, retry-after-commit, in-flight takeover, cross-instance races, TTL boundaries. Result: 10/10 PASS on the release, with one documented at-least-once window coordinated with the maintainer before publication — and the upstream release (v0.2.0) now covers every window on both backends. The full engagement — before-state reproduction, disclosure, post-release verification — is sealed in our public registry.&lt;/p&gt;

&lt;p&gt;Field report 3: a race in a live payment gate, closed in one day&lt;br&gt;
On 24 Nov we pointed a pre-registered gate-hook battery at agentic-finance-graph 0.3.7 — an agent payment stack that enforces a $250-per-168h spending window. Six of the seven frozen expectations matched. The seventh caught a race: eight parallel gate checks, seven were allowed — roughly $1,400 of simultaneous pending spend against a $250 cap. No settlement ever happened (the race sits in the pending-check path), but one burst is all it would take.&lt;/p&gt;

&lt;p&gt;We froze the transcripts and posted the finding. The vendor's reply, verbatim: "The race is real on our side, and it is ours to fix." They wrote eight tests before touching the code, then deployed read-evaluate-insert under one advisory lock per agent and reference — live at 09:40 UTC the same day. A re-check against the patched gate: 1 allow, 7 blocks, exactly as the spec demands.&lt;/p&gt;

&lt;p&gt;That is the whole loop working end to end: pre-registered expectations → adversarial run → sealed evidence → vendor fix → public re-check. Every stage is verifiable in the registry; none of it requires trusting us.&lt;/p&gt;

&lt;p&gt;The proof layer: why "trust us" isn't enough&lt;br&gt;
Every claim above is pinned in a hash-chained attestation registry with Ed25519 signatures. Records pin evidence by SHA-256; a CI verifier re-checks every pinned byte on each push and fails the build on any drift. We learned this one the hard way: a lint commit once reformatted a pinned test file, and CI turned red within minutes. That's the system working as intended.&lt;/p&gt;

&lt;p&gt;You don't have to trust us. Verify in one command:&lt;/p&gt;

&lt;p&gt;bash&lt;br&gt;
git clone &lt;a href="https://github.com/igor-vii/Argus-Agent-Test-Lab" rel="noopener noreferrer"&gt;https://github.com/igor-vii/Argus-Agent-Test-Lab&lt;/a&gt;&lt;br&gt;
cd Argus-Agent-Test-Lab &amp;amp;&amp;amp; node tools/registry/verify-registry.mjs&lt;br&gt;
The track record so far&lt;br&gt;
This is not one lucky find. The lab currently holds 32 signed records (23 seals, 5 findings, 4 corrections) against ~20 external subjects — from protocol SDKs (Cloudflare agents, Circle batching, Coinbase CDP) to live community gateways. Four fixes have shipped by three vendors in response to our runs, and two independent third parties have re-verified the registry chain with the verifier above. Every hostile battery ran at $0.00 — free endpoints, no keys, no settlements. Full table with links to every record and verbatim vendor quotes: TRACK_RECORD.md.&lt;/p&gt;

&lt;p&gt;Try it on your x402 endpoint&lt;br&gt;
Install Argus battery into your workflow.&lt;br&gt;
Drop an argus.sut.json contract into your repo root.&lt;br&gt;
Run CI — verdicts land as a check run with per-session annotations and a JSONL evidence artifact.&lt;br&gt;
The first paid run shows the price and balance; no silent charges. Zero balance returns 402 — the protocol's own error, used against the protocol's own customers, which we think is the right kind of recursion.&lt;/p&gt;

&lt;p&gt;Landing: &lt;a href="https://argus-lab.tech?utm_source=devto" rel="noopener noreferrer"&gt;https://argus-lab.tech?utm_source=devto&lt;/a&gt; · Proof repo: &lt;a href="https://github.com/igor-vii/Argus-Agent-Test-Lab" rel="noopener noreferrer"&gt;https://github.com/igor-vii/Argus-Agent-Test-Lab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you ship an x402 resource and want a battery scenario added to the lab registry, open an issue — scenario families grow with real-world flows, not synthetic ones.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>testing</category>
      <category>fintech</category>
    </item>
  </channel>
</rss>
