Pin the cellular v4 bundle and admit it in schema v34
Foundation / checks (checks) (push) Successful in 41m8s
Foundation / checks (deploy) (push) Successful in 4m26s
Foundation / checks (ecs) (push) Successful in 2m29s
Foundation / checks (network) (push) Successful in 19m43s
Foundation / checks (postgres) (push) Successful in 44m7s
Foundation / checks (tsan) (push) Successful in 10m5s
Foundation / checks (client) (push) Successful in 13m57s
Foundation / postgres-tools (push) Successful in 1m24s
Foundation / image (push) Successful in 3m20s
Foundation / server-image (push) Successful in 3m23s
Foundation / checks (checks) (push) Successful in 41m8s
Foundation / checks (deploy) (push) Successful in 4m26s
Foundation / checks (ecs) (push) Successful in 2m29s
Foundation / checks (network) (push) Successful in 19m43s
Foundation / checks (postgres) (push) Successful in 44m7s
Foundation / checks (tsan) (push) Successful in 10m5s
Foundation / checks (client) (push) Successful in 13m57s
Foundation / postgres-tools (push) Successful in 1m24s
Foundation / image (push) Successful in 3m20s
Foundation / server-image (push) Successful in 3m23s
ADR-0124: checkpoints pin cellular bundle v4 (rules 3, owner envelope 4, revision archive) with the revision history profile and format-3 traces. A format-4/rules-3 opening provisions on v4, and evo-world-clone accepts --opening cellular-v2 for it. Migration 34 widens canonical action input validation to target kind 2 (engulf, no coordinates), admits v4 manifests through the existing v3 parser chain, and lets birth binding read format-3 traces for v3 and v4. The migration runner and its checks extend to version 34, with SQL and provisioning tests for v4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -431,65 +431,94 @@ void provisioning_creates_the_life_allocator_once() {
|
||||
// ADR-0123: an image promotion changes --build, but a cellular genesis records the
|
||||
// build that wrote it. A rerun under a new build still resolves the same genesis,
|
||||
// while a different commit or opening is refused.
|
||||
void cellular_provisioning_survives_a_build_promotion() {
|
||||
using evo::biology::primitive_endowment;
|
||||
const ServerRegion r{{9761, 1}, fresh("cellular-provision-9761")};
|
||||
const auto endowed = primitive_endowment();
|
||||
// One cellular provisioning run for region 1 of `world` with a one-founder opening.
|
||||
std::vector<std::string> provision_cellular(const ServerRegion& r, const std::string& world,
|
||||
const std::string& opening, const std::string& build,
|
||||
const std::string& commit, const std::string& patch,
|
||||
int& code) {
|
||||
const auto endowed = evo::biology::primitive_endowment();
|
||||
CHECK(endowed);
|
||||
evo::accounting::Inventory funding = endowed->body;
|
||||
funding.energy.value += endowed->reserve.energy.value + endowed->construction.value;
|
||||
Child tool{{env("EVO_WORLD_CLONE_BIN"),
|
||||
"provision",
|
||||
"--world",
|
||||
world,
|
||||
"--region",
|
||||
"1",
|
||||
"--opening",
|
||||
opening,
|
||||
"--pg-host",
|
||||
env("PGHOST"),
|
||||
"--pg-port",
|
||||
env("PGPORT"),
|
||||
"--pg-database",
|
||||
env("PGDATABASE"),
|
||||
"--pg-user",
|
||||
env("PGUSER"),
|
||||
"--objects",
|
||||
r.root.string(),
|
||||
"--build",
|
||||
build,
|
||||
"--retain-build",
|
||||
"true",
|
||||
"--commit",
|
||||
commit,
|
||||
"--frame",
|
||||
"9",
|
||||
"--source-id",
|
||||
"1",
|
||||
"--funding-energy-pj",
|
||||
std::to_string(funding.energy.value),
|
||||
"--funding-carbon-fg",
|
||||
std::to_string(funding.matter[0].value),
|
||||
"--funding-nitrogen-fg",
|
||||
std::to_string(funding.matter[1].value),
|
||||
"--funding-phosphorus-fg",
|
||||
std::to_string(funding.matter[2].value),
|
||||
"--funding-other-fg",
|
||||
std::to_string(funding.matter[3].value),
|
||||
"--site",
|
||||
"2500,2500",
|
||||
"--width-um",
|
||||
"10000",
|
||||
"--height-um",
|
||||
"10000",
|
||||
"--ambient-temperature-mk",
|
||||
"293150",
|
||||
"--patch",
|
||||
patch}};
|
||||
code = tool.wait_exit(30s);
|
||||
return tool.lines();
|
||||
}
|
||||
|
||||
// ADR-0124: cellular-v2 provisions a rules-3 genesis under the v4 bundle (schema v34),
|
||||
// resolves it again on rerun, and refuses the same region asked for as cellular-v1.
|
||||
void cellular_v2_provisioning_uses_the_engulf_bundle() {
|
||||
const ServerRegion r{{9762, 1}, fresh("cellular-v2-provision-9762")};
|
||||
const std::string build(64, 'e');
|
||||
const std::string commit(32, 'f');
|
||||
const std::string patch = "3000,3000,2,1000,1000,1000,1000,1000";
|
||||
int code = -1;
|
||||
const auto first = provision_cellular(r, "9762", "cellular-v2", build, commit, patch, code);
|
||||
CHECK(code == 0 && has(first, "provisioned world=9762 region=1 sequence=0 tick=0"));
|
||||
const auto again = provision_cellular(r, "9762", "cellular-v2", build, commit, patch, code);
|
||||
CHECK(code == 0 && has(again, "already-provisioned world=9762 region=1 sequence=0 tick=0"));
|
||||
const auto older = provision_cellular(r, "9762", "cellular-v1", build, commit, patch, code);
|
||||
CHECK(code == 4);
|
||||
auto db = owner();
|
||||
const auto head = load_region_checkpoint(*db, r.key, 5s);
|
||||
CHECK(head);
|
||||
const auto manifest = decode_manifest(head->manifest);
|
||||
CHECK(manifest && manifest->cellular_versions == cellular_v4_versions &&
|
||||
manifest->history_profile == cellular_revision_history_profile);
|
||||
}
|
||||
|
||||
void cellular_provisioning_survives_a_build_promotion() {
|
||||
const ServerRegion r{{9761, 1}, fresh("cellular-provision-9761")};
|
||||
const auto run = [&](const std::string& build, const std::string& commit,
|
||||
const std::string& patch, int& code) {
|
||||
Child tool{{env("EVO_WORLD_CLONE_BIN"),
|
||||
"provision",
|
||||
"--world",
|
||||
"9761",
|
||||
"--region",
|
||||
"1",
|
||||
"--opening",
|
||||
"cellular-v1",
|
||||
"--pg-host",
|
||||
env("PGHOST"),
|
||||
"--pg-port",
|
||||
env("PGPORT"),
|
||||
"--pg-database",
|
||||
env("PGDATABASE"),
|
||||
"--pg-user",
|
||||
env("PGUSER"),
|
||||
"--objects",
|
||||
r.root.string(),
|
||||
"--build",
|
||||
build,
|
||||
"--retain-build",
|
||||
"true",
|
||||
"--commit",
|
||||
commit,
|
||||
"--frame",
|
||||
"9",
|
||||
"--source-id",
|
||||
"1",
|
||||
"--funding-energy-pj",
|
||||
std::to_string(funding.energy.value),
|
||||
"--funding-carbon-fg",
|
||||
std::to_string(funding.matter[0].value),
|
||||
"--funding-nitrogen-fg",
|
||||
std::to_string(funding.matter[1].value),
|
||||
"--funding-phosphorus-fg",
|
||||
std::to_string(funding.matter[2].value),
|
||||
"--funding-other-fg",
|
||||
std::to_string(funding.matter[3].value),
|
||||
"--site",
|
||||
"2500,2500",
|
||||
"--width-um",
|
||||
"10000",
|
||||
"--height-um",
|
||||
"10000",
|
||||
"--ambient-temperature-mk",
|
||||
"293150",
|
||||
"--patch",
|
||||
patch}};
|
||||
code = tool.wait_exit(30s);
|
||||
return tool.lines();
|
||||
return provision_cellular(r, "9761", "cellular-v1", build, commit, patch, code);
|
||||
};
|
||||
const std::string first_build(64, 'c');
|
||||
const std::string second_build = std::string(63, 'c') + "d";
|
||||
@@ -515,6 +544,7 @@ void run_region_store_tests() {
|
||||
primitive_provisioning_is_explicit_and_profile_safe();
|
||||
provisioning_creates_the_life_allocator_once();
|
||||
cellular_provisioning_survives_a_build_promotion();
|
||||
cellular_v2_provisioning_uses_the_engulf_bundle();
|
||||
full_volumes_publish_nothing();
|
||||
failing_writes_leave_nothing();
|
||||
check_store_qualifies_the_stores();
|
||||
|
||||
Reference in New Issue
Block a user