dánwòdánwò

Running

Cleaning up sandboxes

How a live fidelity run tags what it makes, undoes it after each scenario, and sweeps up anything left behind.

A live fidelity run creates real objects in your sandboxes: customers, users, documents. danwo tags each one and removes it when the scenario ends, so your sandbox stays as it was.

Tagged

Everything a run makes carries danwo-fidelity-<run>: in Stripe customer emails and product names, Clerk addresses and organization names, Novu subscriber ids, Tiptap document names, Pusher channels, Resend subjects and the payment references.

Undone after each scenario

Each create registers its undo in the run's cleanup ledger. After every scenario, passed, failed or thrown, the ledger undoes in reverse order and retries each undo once. An answer that the object is already gone counts as undone.

Ctrl-C undoes what the open scenarios made before danwo exits. Anything that couldn't be undone is listed under left behind by kind and id, and fails the run.

--keep leaves everything in place so you can look at it, and lists it as kept.

Sweep leftovers

npx @danwo/cli fidelity --sweep stripe        # list what earlier runs left
npx @danwo/cli fidelity --sweep stripe --yes  # remove it

A sweep only removes what carries the tag. Look-alikes without one are listed for you to judge and never touched.

By provider

ProviderUndone after each scenarioStays behindSweep
Stripecustomers deleted, subscriptions canceled, products archived, sessions expiredpayment intents and refunds stay in test historytagged customers and products
Clerkusers and organizations deleted, invitations and sessions revokednothingtagged users and organizations
Novusubscribers deletednothingtagged subscribers
Tiptapdocuments deletednothingtagged documents
Paystacknothing to undoone abandoned test transaction per runnone
Flutterwavenothing to undoone tagged test payment link per runnone
Bachsnothing to undoone sandbox customer per runnone
Resendnothing to undosent emails, all to delivered@resend.devnone
Twilioa full account's one real send, deleted once it settlesa trial account's sendnone
S3 (Tigris)every object under the run's prefix deleted, uploads abortednothingnone
Othersthey only readnothingnone

Next

On this page

Run it on every pull request

A GitHub check and one comment per pull request, with the flight records attached.

Set up CI