It ships
An agent with deploy access does not hesitate. The change is live before anyone has read the diff, and the first signal that it was wrong comes from a customer.
SafeCommit wraps every deployment and database migration an agent proposes in a protected run. Checkpoint first. Gates in isolation. Apply, then watch the monitors, and restore the checkpoint automatically the moment one of them breaks.
An agent with deploy access does not hesitate. The change is live before anyone has read the diff, and the first signal that it was wrong comes from a customer.
A schema change is not covered by your deployment rollback. Once the column is dropped, the previous build has nothing left to read.
Retrying is not reverting. Without a checkpoint taken before the change, there is nothing to go back to, only a second guess on top of the first.
Before anything is touched: a Postgres snapshot, or an immutable pin to the build currently serving production.
Every test runs against an isolated copy. A migration is applied to a shadow database first, and its reverse is replayed to prove it works.
Only once the gates are green. If any of them fail, nothing reaches the target environment at all.
Error rate, latency and saturation are compared against the pre-change baseline for the length of the monitoring window.
Clean window: the change is held. A breach: the checkpoint is restored automatically, with the evidence written to the run.
Gates passed, monitors stayed inside baseline. The change is held and the checkpoint is retained in case you want it later.
The change went out, a monitor breached, and SafeCommit restored the checkpoint without waiting to be asked. Evidence attached.
A gate caught it before apply. Nothing reached the target environment, and the checkpoint is retained so the change can be re-attempted against a known state.
Every agent gets its own token with a per-run ceiling, a daily ceiling, an explicit list of approved repositories, and a production switch that is off by default. Spending draws down a prepaid credit balance, so an agent in a retry loop runs out of money long before it runs out of things to break.
Manage tokensQuote a change to learn its price and risk before committing to anything. Execute to authorize payment and run it. Poll for status. Roll back on demand if something the monitors could not see turns out to matter.
Full API reference# 1. price the change and read the risk assessment
curl -X POST https://safecommit.dev/api/quote \
-H "Authorization: Bearer $SAFECOMMIT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"kind": "supabase_migration",
"repository": "northwind/checkout-api",
"target": "production",
"summary": "Retire the legacy shipping address constraint",
"payload": "BEGIN; ALTER TABLE orders DROP CONSTRAINT …; COMMIT;"
}'
# → { "run_id": "run_9c2f5e10",
# "risk": { "level": "high", "score": 64, "factors": [ … ] },
# "quote": { "total_cents": 850 } }
# 2. authorize from the credit balance and run it
curl -X POST https://safecommit.dev/api/execute \
-H "Authorization: Bearer $SAFECOMMIT_TOKEN" \
-d '{ "run_id": "run_9c2f5e10", "max_price_cents": 1000 }'
# → { "status": "rolled_back",
# "rollback": { "trigger": "monitor_breach",
# "restored_checkpoint_id": "ckpt_…" } }