The AWS program becomes a skipped clap field so tests can substitute a fake; run is split
into reconcile (returns the report) and a printing wrapper. No behaviour change.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Before the permit the lease is still given up on; after it the failure is logged and the
apply runs to its terminal report instead of being killed mid-flight.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Also removes OperatorActor.browser, unused since reconstitute targets are confined for every caller.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Safety failure never applies, identity and source guards, rollback
exception, per-step timeouts, lost apply permit, crash after permit,
poll lease checks, and the heartbeat-failure behaviour.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
RestoreTarget, RestoreHub and BackupSource let the destructive restore
sequence be driven by fakes. poll takes the heartbeat interval as a
parameter instead of reading the constant.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Activity lists restores from refresh runs, so the Refresh permission is enough to see them; an administrator's
restore jobs add the database, the person and the snapshot
- an undo is listed under the restore it reverses, and a redo under that undo; opening a restore or an undo opens
its undo or redo dialog
- the dialog has an explicit undo mode: it describes what is put back instead of the snapshot that was open, and
an interrupted restore offers Roll back
- a restore whose safety backup retention has forgotten shows "Safety backup expired" instead of a link, and the
dialog says how long a safety copy is kept
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- 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>
Backend: grants accept a list of permissions; PUT /access/grants edits or renews a set atomically; refusals carry a reason; the grant list includes refresh grants per relation and the administrator-only permissions; users keep their last groups and admin flag; the emergency operator cannot hold grants.
Frontend: the Access screen shows the grantable permissions as a checkbox tree with dependencies, rows grouped by person or group, orbit and end date, expiry and no-effect states, and what each person can do right now.
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>
- limits sized for WAN S3 (probe/list 120s, init 90s, retries 3, stuck-request 60s)
- a finished copy (tagged snapshot present) is accepted instead of copied again;
the verification listing is retried before the copy is called failed
- a missing off-site repository is no longer a listing error
- restic's stderr tail is kept and the hub logs the failure reason
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>