- a restore whose apply failed can be undone from its safety copy, which is its recovery: the failed apply stops
fencing the target in the transaction that starts the undo (job phase rolled_back, audited restore.rolled_back);
an apply whose agent went silent still waits for an administrator to reconcile it; reconciled restores can be undone
- run views carry undo_state (available, superseded, expired), undo_kept_until, undo_of and restore_job_id
- undo state for a list is worked out in one database pass and a file lookup per copy; the vault is read only for the
newest restore of each target
- eligibility is checked again inside the transaction that creates the run
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- POST /refresh-runs accepts undo_of: restores the safety copy of a completed restore back onto the same
target through the normal run engine (checks, countdown, progress, and a new safety copy so the undo can be
undone); refused when something was restored after it or the copy is gone
- a safety copy is accepted as a source only for the target it was taken from (hub and agent both check)
- run views carry undo and undo_available; audited as refresh.undo_started
- the modal offers Undo last restore and, after a restore, Undo this restore
- proven with a real agent and PostgreSQL: restore, undo back to the original contents, undo of the undo
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- POST /refresh-runs accepts snapshot_id: restore a snapshot somebody picked (a restorable capture of the
relation's own source, never a safety copy or another orbit's) through the same run engine
- refresh-relations carries source_orbit_id; snapshots carry kind (capture|safety), and the UI hides safety copies
- snapshot detail: Restore replaces Export file on hub (disabled with No restore point without a relation);
modal with a restore point selector, a ten second countdown with Abort, and a four step progress view
- administrators keep Other registered target; the Refresh menu and refresh-only screen are removed
- proven with a real agent and PostgreSQL in the browser: capture, restore to Development, abort, no relation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A refresh captures a new dump of the relation's source, then restores exactly that
snapshot onto the relation's target through the existing restore path.
- refresh_runs in SQLite, one active run per target, per-requester idempotency keys,
a cap on concurrent runs and a TTL that only applies until the restore starts overwriting
- the run and its capture job are created in one transaction; the run follows its own
capture job, never the latest snapshot, and pins that snapshot until it ends
- the restore is queued and linked in one guarded transaction; every step is safe to repeat
after a crash; a background driver only reads the database
- authorize_apply re-checks, in the transaction that allows the overwrite, that the relation
is still usable, the requester is still active, the authorising grant still exists, the
deadline has not passed and the target is not the source; otherwise the restore is
cancelled, the run is blocked and the agent gets 409. Administrator restores are untouched
- POST/GET/DELETE /api/v1/refresh-runs: confirmation names source, target and version;
non-administrators never see the snapshot id, the requester or the database identity
- audit refresh.* per run
Tests drive the agent through the real Outpost endpoints and cover revocation at every
stage; the access matrix gains a RunRow kind.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>