M12.7: bind census evidence to database history domains
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (deploy) (push) Successful in 4m10s
Foundation / checks (network) (push) Successful in 21m32s
Foundation / checks (client) (push) Successful in 22m14s
Foundation / checks (tsan) (push) Successful in 24m30s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 41m43s
Foundation / checks (postgres) (push) Canceled after 41m39s

This commit is contained in:
dingo
2026-10-18 20:33:16 -04:00
parent 145e6e1445
commit 709dfb9557
25 changed files with 547 additions and 27 deletions
@@ -26,7 +26,8 @@ enum class CellularSnapshotError : std::uint8_t {
transaction,
history,
census,
coverage
coverage,
context
};
struct RegisteredCellularRegion {
std::uint64_t region{}, frame{};
@@ -47,6 +48,7 @@ struct CellularCoverageFailure {
struct RegisteredCellularCensusSnapshot {
std::vector<RegisteredCellularRegion> catalog; // Exact registry view used for head selection.
CellularCensusSnapshot snapshot;
Uuid history_domain{}; // Schema 51 database namespace captured with catalog and heads.
};
struct CellularSnapshotFailure {
CellularSnapshotError kind{};
@@ -74,12 +76,13 @@ load_cellular_census_snapshot(Postgres&, std::uint64_t world,
std::span<const Sha256Digest> retained_builds,
std::chrono::milliseconds timeout,
const CellularCensusSnapshotHooks& hooks = {});
// Schema 50: require resources for EVERY registered region of this world,
// Schema 51: require resources for EVERY registered region of this world,
// including expired/released holders and regions with unavailable checkpoints.
// Capture the registry and all heads in the SAME short database snapshot.
// Empty/over-bound registries or any coverage/frame mismatch fail, never zero.
// Completeness is only for registered regions of this connected database view;
// no external branch identity, other viable-store reconciliation or extinction.
// Domain/world identifies this database history, including supported restore forks.
// No other viable-store reconciliation, live authority or terminal extinction.
[[nodiscard]] std::expected<RegisteredCellularCensusSnapshot, CellularSnapshotFailure>
load_registered_cellular_census_snapshot(Postgres&, std::uint64_t world,
std::span<const CellularCensusRegionRequest>,