- 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>
- MBU parity map, cutover runbook and the tasks/ planning notes move outside the repo
- tests/mbu becomes tests/fixtures with generic application names and no placement inventory
- test fixtures in Rust and web use neutral names
- scripts/export-public.sh checks an external list of private terms instead of naming them
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>
PUT /api/v1/orbits/:id changes only the name (admin, validated, case-insensitively unique, audited).
Snapshot metadata is immutable, so the list and the download file name look the orbit up by id and
fall back to the written name only when the orbit is gone.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- PUT /api/v1/restore-targets/:id changes only the display name (admin, validated, audited); ids,
identity, relations and jobs are untouched
- Relations console: Application column, inline rename, application in the target pickers
- Refresh screen: the application on each card
- registering a target suggests '<application> · <database>'
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- pg_restore's stderr is kept; the archive header names the pg_dump that wrote it, and a newer one than
the local client gives 'install a PostgreSQL client >= N' before any safety backup is taken
- omit_pg_stat_statements recreates the extension the target had, where it lived
- reconcile on a job that needs no recovery answers 409 with a reason
- proven against a real PostgreSQL server (real archive header, extension kept, mutation caught)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A safety copy of a restore target was stored in the application's orbit and weighed by the same
retention as captures, so the newest copy (the target's) could push the production capture that had
just been restored out of the keep set, whatever the rule (GFS, count or age). Safety copies are now
separated: they have their own per-target rule (newest three plus anything under seven days) and
never count for or against captures. Proven red on the old behaviour with a real refresh.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- the agent reports the client's primary ERROR/FATAL line with a failed restore step; the hub keeps it
as failure_reason (administrators only), logs it and audits restore.failed. psql runs with
VERBOSITY=terse and DETAIL/CONTEXT/statement text is dropped so row data never travels
- reset mode user_schemas empties every non-system schema in the restore transaction, so multi-schema
databases restore without DROP DATABASE; proven against a real PostgreSQL server
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- downloads are named <orbit>_<time>_<engine>_<id8>.<ext> (schedule zone or UTC), orbit names are
reduced to [a-z0-9_-], and the header carries filename and filename*
- operators can change a profile's schedule and retention (absent = keep, null = clear), validated
like registration, audited, and a changed schedule never replays slots that already passed
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- web: Refresh console (relation cards, overwrite confirmation, progress,
cancel, distinct failure messages), rail item, and a single-screen view
for people who may only refresh
- hub: refresh-only users are authorized; /me exposes refresh_relations
- docs and auth plan record the real rehearsal (Postgres, agent, Keycloak,
browser) and what was not verified
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>