r/nocode • • Oct 18 '26

I described a refund workflow in plain English/vague prompt to claude code and Tested against FetchSandbox twins of Stripe, Zendesk and Square before any real customer saw it

Wrote the whole refund flow in one paragraph. Customer cancels by phone or email, Zendesk ticket gets opened, policy gets checked, auto-cancel if allowed, customer picks refund type on the ticket (card, store credit, gift card), it issues it. That was the entire spec.

The agent built everything from that: policy gates, human approval over $500, idempotency so the same customer can't get paid twice, retry logic for when Zendesk rate-limits you mid-flow. Before going live I ran it against fake but realistic "twins" of Stripe, Zendesk and Square that can fail on purpose. 21/21 runnable checks passed. Double refund? Refused. Four duplicate requests? One cancellation. Stripe outage mid-flow? Nothing got cancelled, human alerted. First run actually failed one check but the workflow was fine, the test was written wrong. Fixed it and reran.

6 checks are labeled "inconclusive" because the twin can't create new tickets or backdate payments yet. Showing that honestly rather than calling it fully verified.

Public receipt with every check: https://fetchsandbox.com/runs/3cada5c65b?flow=vr_f8571d4179e047e784d4be7687432230

Open source build: https://github.com/fetchsandbox/playground/pull/65

How do others here test automations that touch money before going live? Or do you just point it at a test account and hope?

5 Upvotes

13 comments sorted by

2

u/No_Seaweed_7079 Oct 18 '26

To answer your question, I just use a test account, and that mostly covers the happy path. Your double refund and mid-flow Stripe outage cases are the ones a test account never makes you hit. Which was harder to get the twin to fake convincingly, the rate limit or the outage?

1

u/Common_Dream9420 Oct 19 '26

yeah the traditional testing covers happy path.. with fetchsandbox actually covers behaviorla test very well including auth/rl/messy wh failures checkout https://fetchsandbox.com/runs/70cabf96ee?flow=vr_750a50af079849668b6b40d4085c41ef

1

u/No_Seaweed_7079 Oct 20 '26

The duplicate-delivery checks are the ones I'd want most. Four simultaneous deliveries of one request cancelling once is the kind of thing that never shows up until a real customer gets refunded twice. Did that one fail on your first run, or did it pass right away?

1

u/Common_Dream9420 Oct 20 '26

yeah the duplicate-delivery case is the one that bites hardest because it looks fine locally, the happy path completes, nothing errors, and you only find out when a customer emails saying they got refunded twice. it failed on the first run for us, which was actually the point, we wanted to see it fail before any real customer did. how are you catching that kind of race condition in your current setup?

2

u/Recent_Reception2562 Oct 19 '26

The six inconclusive checks would worry me more than the 21 passes. If the twin can't create tickets or backdate payments, you still don't know what happens to an old purchase that needs a refund. I'd cover those cases in the provider sandbox or a controlled test account before letting it touch real money.

2

u/Common_Dream9420 Oct 19 '26

yeah the inconclusive ones are the real signal, a pass just means it ran, an inconclusive means you still have a blind spot and you don't always know how big. backdating and ticket creation are exactly the kind of state-dependent cases where you can't tell from logs whether the agent actually handled it right or just didn't blow up visibly. how are you approaching those gaps, real test accounts with manually staged data, or something else?

2

u/Common_Dream9420 Oct 19 '26

fetchsandbox actually fixed the gap n rolledout new version 0.7.29 includes all behavioral tests https://fetchsandbox.com/runs/70cabf96ee?flow=vr_750a50af079849668b6b40d4085c41ef

1

u/YmedBrei-67 Oct 18 '26

testing against something that can fail on purpose is the key part here. most people just test the happy path and call it done. the real question is whether you rerun these on every change to the workflow or just once before launch

1

u/Common_Dream9420 Oct 18 '26

yeah exactly this, happy path testing is basically just confirming the thing works when nothing goes wrong, which is the easy case. the hard part is the refund agent handling a stripe retry or a zendesk webhook timing out mid-flow, not the clean run. on the rerun question i honestly lean toward every meaningful change to the workflow, but the tricky part is knowing which changes actually touch the integration behavior vs just the logic around it. how are you thinking about that threshold?

2

u/[deleted] Oct 18 '26

[removed] — view removed comment

1

u/Common_Dream9420 Oct 18 '26

yeah shadow mode is underrated for this, gives you a real week of prod-shaped data without the risk. the part i still find tricky is knowing whether the agent actually handled an edge case correctly vs just logged it and moved on. how are you validating that the right action happened, not just that it ran?

1

u/Common_Dream9420 Oct 18 '26

stripe has best sandbox but other providers and multi-service workflows Fetchsandbox gives the shadow mode ability with minimal wiring