feat(ops): M8.8 World0 acknowledgment gate and host-loss recovery (ADR-0075)
Ratifies dev/stage RPO/RTO from measurements and keeps World0 launch blocked (policy-enforced) until acknowledged outcomes survive host loss in an independent failure domain. Adds in-place restore with an explicit rewind, barrier-based fencing of a superseded database, and promotion of stage-pinned digests only. dr-check.sh rehearses host loss in every PostgreSQL build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
# source database or the object volume, and no admission barrier is needed.
|
||||
#
|
||||
# Bundle (DIR): MANIFEST, database.dump (pg_dump custom format, schema `evolution`,
|
||||
# no owners or grants: a restore never needs the source's roles or credentials),
|
||||
# no owners; grants are kept for an in-place restore, ADR-0075, and skipped by every
|
||||
# other restore, which therefore never needs the source's roles or credentials),
|
||||
# objects/w<world>/r<region>/<sha256>, SHA256SUMS over every other file. A source
|
||||
# object whose bytes differ from its name fails the backup.
|
||||
set -euo pipefail
|
||||
@@ -71,7 +72,7 @@ SELECT 'rows', (SELECT count(*) FROM evolution.region_commits),
|
||||
(SELECT count(*) FROM evolution.region_outbox),
|
||||
(SELECT count(*) FROM evolution.region_origins);
|
||||
\setenv EVO_BACKUP_SNAPSHOT :snapshot
|
||||
\! pg_dump --no-password --format=custom --schema=evolution --no-owner --no-privileges --snapshot="$EVO_BACKUP_SNAPSHOT" --file="$EVO_BACKUP_DUMP" && echo 'dumped' || echo 'dump-failed'
|
||||
\! pg_dump --no-password --format=custom --schema=evolution --no-owner --snapshot="$EVO_BACKUP_SNAPSHOT" --file="$EVO_BACKUP_DUMP" && echo 'dumped' || echo 'dump-failed'
|
||||
COMMIT;
|
||||
SQL
|
||||
grep -qx 'dumped' "$out/.cut" || { echo "backup failed: pg_dump did not complete" >&2; exit 3; }
|
||||
@@ -95,6 +96,7 @@ done < <(find "$objects" -mindepth 3 -maxdepth 3 -type f ! -name '.tmp-*' -print
|
||||
echo "format aevolution-backup-v1"
|
||||
echo "created $started"
|
||||
echo "label ${label:--}"
|
||||
echo "dump privileges"
|
||||
grep -E '^(database|schema|build|head|rows) ' "$out/.cut"
|
||||
echo "objects $count $bytes"
|
||||
} > "$out/MANIFEST"
|
||||
|
||||
Reference in New Issue
Block a user