A disposable production twin for every risky change.
Build the change, branch a sanitized database, isolate the network, replace production credentials, journal every resource as it comes up, and tear all of it down when the report is done.
Built candidate code.
Production-shaped, not production.
Runs inside the twin.
Restored for this run only.
Live credentials are replaced.
External effects are local or simulated.
Rows, traces, invariant results, and cleanup proof leave the boundary. The twin does not.
- 01Build
- 02Restore
- 03Validate
- 04Destroy
Every transition is idempotent and recoverable. A resource is journaled the moment it exists, not after the run succeeds.
Four normal events; failure can terminate the same journaled run.
- 01env.creatingPlan + provision
Lock held; resources journaled.
- 02env.readyContainment verified
Candidate can accept workload.
- 03env.destroyingReverse replay
Journal drives teardown.
- 04env.destroyedTerminal success
Cleanup count is complete.
Failure is emitted where the run stops. The existing journal remains the recovery source for teardown.
- Plan
Read the manifest, take the environment lock, write the plan.
- Provision
Build candidate, restore safe state, replace credentials, verify containment.
- Run
Agents drive the declared workflows. Invariants are asked of the data.
- Close
Evidence attaches to the pull request. The journal is replayed in reverse.
IllustrativeThese are the lifecycle events one run emits, so a reader can run af up and af down and watch each of them arrive in the log. The last two are where a run stops: it was torn down, or it failed, which is emitted from any point before it. The run identifier is invented.
Isolation is a spec, not a hope. An unresolved secret fails closed and stops the run.
These seven are in force today on the Docker runtime, which passes all thirty-two runtime conformance behaviours against a real daemon. The Kubernetes runtime is written and not yet proven to the same standard, and no cloud runtime exists. Convenience must not silently override containment.
Synthetic but production-shaped.
Can only see twin-scoped dependencies.
- 01credentialscreds replaced
No production write credentials
- 02databaseprod-db cut
No production database route
- 03networkegress deny-by-default
No default internet route
- 04dnsdns clone-local
Separate DNS policy
- 05secretsnamespace twin-scoped
Separate secrets namespace
- 06ownershiprun_08f2
One label scheme, on everything
- 07teardownDown_TouchesOnlyItsOwnEnvironment
Touches only what it made
A preview URL is not the product. The twin exists to answer whether the deployment is safe, then it is destroyed.
The output is a pass or a fail on the pull request, with the rows and the trace behind it. Not a dataset, and not an address somebody has to remember to shut down.
- $
af upcreateBuild, restore, isolate, verify.
- $
af cijudgeRun workloads and invariants.
- $
af downdestroyReplay the resource journal.
Cleanup is a first-class safety property. Resource deletion is not a background convenience.
Every resource is written to the journal as it is created, so a run that dies halfway still has a list of what it made. Teardown replays that journal in reverse and counts what it removed. A continuous integration step counts the managed containers and networks afterwards and fails the build if any are left.
IllustrativeA teardown of one run. The journal, the reverse replay and the count of what was removed are real; the resource names and the timestamps are written.
af env prune removes environments older than a cutoff you pass.
There is no automatic time-to-live and no independent reaper yet. The sweep is a command a person or a schedule runs.
- 01isolated networknetwork
- 02database statevolume
- 03candidate appcontainer
- 04side-effect simulatorcontainer
- 04side-effect simulatordelete
- 03candidate appdelete
- 02database statedelete
- 01isolated networkdelete
Teardown can enumerate only the containers, network, and volume created for this run.
af env prune --before <cutoff>manual sweep · no automatic TTLKnow what happens before you deploy.
Create a disposable production twin for every risky change. Catch migration failures before they reach customers.