feat(ops): M8.9 upgrade rehearsal on clones, barrier and node plan (ADR-0076)

Drill-only --synthetic-until/--accelerate and evo-world-clone compare
(compare_region_histories) prove a candidate build runs the same world on
clones of one cut before any barrier. upgrade-check.sh rehearses a failed
migration under load and the version barrier with real hosts; upgrade-barrier.sh
retires an old build in dev/stage only once the new digest is Ready. Nodes:
aevolution.io/stores pins every objects-volume pod, aevolution.io/compute is
preference-only (Alertmanager first), checked by policy and scheduling-check.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-30 17:51:17 -04:00
co-authored by Claude Opus 5.5
parent 645d16b27a
commit 5b482ad6a3
19 changed files with 1028 additions and 12 deletions
+30
View File
@@ -101,4 +101,34 @@ struct HistoryAudit {
audit_region_history(Postgres& db, const FilesystemObjectStore& objects, RegionKey key,
std::span<const Sha256Digest> retained_builds, std::size_t restore_budget,
std::uint64_t max_commits, std::chrono::milliseconds timeout);
// M8.9 upgrade comparison (ADR-0076). Before a build replaces another at a barrier,
// both run the same inputs on clones of one cut (accelerated), and their histories
// must be the same world: equal head tick, frame, quantum, versions and profile;
// identical head states once B is rebound to A's world; identical durable outcomes
// (tick, actor, outcome, organism), including those inherited at clone genesis.
// Builds may differ; nothing else may. Both histories are fully audited first.
// Read-only. A rules or format change cannot pass (no converter exists, ADR-0068).
enum class CompareError : std::uint8_t {
identity, // Same key, a zero ID, or different region IDs (only worlds rebind).
audit, // Either history failed its audit (see audit and side).
ticks, // Heads at different ticks: nothing compared.
versions, // Frame, quantum, versions or profile differ.
state, // Head states differ after rebinding B to A's world.
outcomes, // Durable outcome histories differ.
};
struct CompareFailure {
CompareError kind{};
AuditFailure audit{}; // Meaningful for audit.
char side{}; // 'a' or 'b' for audit.
};
struct HistoryComparison {
std::uint64_t tick{}, outcomes{}, commits_a{}, commits_b{};
Sha256Digest state{}; // SHA-256 of the identical head state, in A's world.
};
[[nodiscard]] std::expected<HistoryComparison, CompareFailure>
compare_region_histories(Postgres& db_a, const FilesystemObjectStore& objects_a, RegionKey a,
Postgres& db_b, const FilesystemObjectStore& objects_b, RegionKey b,
std::span<const Sha256Digest> retained_builds, std::size_t restore_budget,
std::uint64_t max_commits, std::chrono::milliseconds timeout);
} // namespace evo::persistence