Inspiration

Thousands of online shops still take payments through PayPal code from a decade ago: Express Checkout (NVP) calls, old checkout.js buttons and IPN listeners. Upgrading is risky. One mistake and a customer is charged twice, or not at all, so most shops never upgrade. We wanted an upgrade a shop owner could actually trust: one that proves itself instead of asking for faith.

What it does

Point GoldGraft at an old shop and it runs the upgrade end to end: Connect → Find → Record → Rules → Attack → Rewrite → Prove.

  • Finds every old PayPal piece. In our reference PHP shop it found 8: Express Checkout calls (SetExpressCheckout, DoExpressCheckoutPayment, RefundTransaction), old checkout.js buttons and IPN validation.
  • 13 AI agents share the work. The Surveyor maps the shop, the Grafter rewrites the checkout for PayPal's Orders v2 API, the Adversary hunts for weaknesses, and ten more handle scenarios, diagnosis, notifications, learning and reporting. In the recorded run all 13 passed on real models, in about 3 minutes, for $0.48 of AI.
  • Runs old and new side by side on real PHP through 9 payment situations (happy path, pending, refund, double refund, double click, decline, forged notification, duplicate notification, unapproved extra item) against a PayPal simulator, and an independent judge compares every result.
  • Tries to break its own work. It plants 10 deliberate bugs in the new code to prove the tests catch them: 6 of 10 caught. 34 of 39 critical checks verified.
  • Real PayPal sandbox payment. The AI-written PHP checkout completed a real PayPal sandbox order and capture, independently re-fetched and confirmed from PayPal's API.
  • Signed and public. The proof result is signed by our GitHub Actions workflow with Sigstore and recorded on the public Rekor log (entry #3833925707). The certificate page's "Check it now" button lets your own browser re-hash the proof and verify it against that public entry.
  • Never fakes a pass. Anything unproven stays an explicit, plain-language hold. A refunded capture is never relabelled as completed.
  • Safe rollout switch. Signed rollout config at 0 → 1 → 10 → 50 → 100%, with libraries in PHP, Node and Python. A missing, expired or tampered config sends every buyer to the old, working checkout.

How we built it

  • Agents: 13 role agents on Anthropic Claude (Haiku first, Sonnet fallback), with a cost ledger and a hard per-run budget cap.
  • Backend: Python 3.12 and FastAPI; versioned contracts (Pydantic) with generated JSON Schemas, OpenAPI and TypeScript types.
  • Proof: real PHP execution of old and new shops with a recorder, an independent judge, planted-bug mutation testing and a signed ProofResult.
  • Payments: PayPal Orders v2 sandbox (order, capture, refund, independent re-fetch).
  • Trust: GitHub Actions and Sigstore keyless signing, verified against the Rekor transparency log.
  • Isolation: E2B sandbox runner, live-tested on 3 real VMs (normal run, deliberate failure, deadline timeout) with internet off and every VM confirmed killed.
  • Frontend: React, TypeScript and Vite on Vercel; read-only recorded-run API on Render.
  • Quality: 3,470 automated tests in CI, including real-PHP tests.

Team (four people, four pieces, one flow): Aditya Singh (agents, frontend, integration), Gupta (backend work control and runner), Singhal (proof and judge), Vijay (shop recipes and rollout switch libraries).

Challenges we ran into

  • Making proof independent: the judge, the signature and the public log had to verify the AI's work without trusting the AI.
  • Real sandbox details: our India sandbox buyer accounts hit a currency error, so we used a US sandbox buyer.
  • Refusing shortcuts: a refunded capture must stay "refunded", and an unisolated run must stay "not isolated", even when a green tick would look nicer.

Accomplishments that we're proud of

  • AI-written code that took a real PayPal sandbox payment.
  • A proof anyone can verify from their browser against a public log.
  • Four separately built pieces running as one connected flow.

What we learned

Trust comes from evidence you can re-check, not from a green badge. Planting bugs in your own code is the fastest way to find out whether your tests are real.

What's next for GoldGraft

Run the shop proof inside the E2B sandbox, close the last four planted-bug gaps, connect real shops through GitHub, and move from recorded runs to live merchants with the staged rollout switch.

Built With

Share this project:

Updates

Submission history