Resolve a cellular genesis under the build that wrote it
Foundation / checks (checks) (push) Successful in 40m17s
Foundation / checks (deploy) (push) Successful in 3m54s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (network) (push) Successful in 18m40s
Foundation / checks (postgres) (push) Successful in 42m11s
Foundation / checks (tsan) (push) Successful in 9m39s
Foundation / checks (client) (push) Successful in 13m33s
Foundation / postgres-tools (push) Successful in 1m13s
Foundation / image (push) Successful in 3m10s
Foundation / server-image (push) Successful in 3m16s

Promoting the dev server image changed --build, and the cellular
provision rerun re-encoded the genesis manifest with the new build, so it
refused region 100/2 as a different genesis. The check could also never
pass once the head moved past genesis. Match an unadvanced cellular
genesis under its recorded build, and accept profile and frame past
genesis as the other openings do. A different commit or opening is still
refused. Add a PostgreSQL process test and record the finding in ADR-0123.
Also refresh the dev session window (3 h).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-13 13:14:15 -04:00
co-authored by Claude Opus 5.5
parent 7271fa684b
commit 5e45be3b6b
5 changed files with 119 additions and 6 deletions
+16 -4
View File
@@ -580,17 +580,29 @@ int provision(const Options& o) {
// Never re-provision or report success for a different profile/frame.
auto existing = persistence::load_region_checkpoint(*db, o.source.key, timeout);
if (existing) {
const auto manifest = persistence::decode_manifest(existing->manifest);
if (cellular) {
auto same_genesis =
persistence::provision_cellular_region(*db, *store, o.source.key, primitive_frame,
*cellular_opening, commit, build, timeout);
// The genesis records the build that wrote it, and image promotions change
// --build, so an unadvanced genesis is matched exactly under its own build
// (ADR-0123). Past genesis the head is no longer the genesis manifest; as for
// the other openings, the profile and frame identify the region.
if (!manifest ||
manifest->profile != persistence::CheckpointProfile::cellular_lives_v1 ||
manifest->frame != primitive_frame) {
std::puts("provision refused existing profile/frame mismatch");
return 4;
}
if (manifest->sequence > 0)
return report("already-provisioned", existing->head);
auto same_genesis = persistence::provision_cellular_region(
*db, *store, o.source.key, primitive_frame, *cellular_opening, commit,
manifest->build, timeout);
if (same_genesis)
return report("already-provisioned", same_genesis->head);
std::puts("provision refused existing cellular region; use its original --commit to "
"resolve genesis");
return 4;
}
const auto manifest = persistence::decode_manifest(existing->manifest);
const auto expected_profile =
primitive ? persistence::CheckpointProfile::primitive_lives_v1
: persistence::CheckpointProfile::environmental_lineage_v1;