Represent cellular profile migration manifests
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m56s
Foundation / checks (checks) (push) Failing after 11m27s
Foundation / checks (network) (push) Failing after 9m31s
Foundation / checks (client) (push) Successful in 13m14s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 1m57s
Foundation / checks (tsan) (push) Canceled after 1m49s

This commit is contained in:
dingo
2026-10-11 04:59:25 -04:00
parent d652291126
commit beffec40d7
5 changed files with 90 additions and 4 deletions
+25
View File
@@ -457,6 +457,31 @@ void cellular_profile() {
++bad_versions.cellular_versions.archive;
CHECK(!supported(bad_versions));
CHECK(!restore_cellular_payload(payload, bad_versions));
const auto legacy_genesis =
genesis_manifest(key, 9, filled<16>(0x10), 50000, build, payload.size(), filled<32>(0x11),
CheckpointProfile::cellular_lives_v1);
CHECK(legacy_genesis);
const auto legacy_head =
successor_manifest(*legacy_genesis, filled<32>(0x12), filled<16>(0x13), lease(), 1, build,
payload.size(), filled<32>(0x14), batch_for(1, 1));
CHECK(legacy_head && legacy_head->cellular_versions == cellular_v1_versions);
const auto migration =
cellular_profile_migration_manifest(*legacy_head, filled<32>(0x15), filled<16>(0x16),
lease(), build, payload.size(), filled<32>(0x17));
CHECK(migration && supported(*migration) && migration->sequence == 2 &&
migration->begin_tick == 1 && migration->end_tick == 1 &&
migration->cellular_versions == cellular_v2_versions &&
migration->batch == BatchDigests{});
const auto migration_bytes = encode_manifest(*migration);
CHECK(migration_bytes && decode_manifest(*migration_bytes) == *migration);
CHECK(!cellular_profile_migration_manifest(*migration, filled<32>(0x18), filled<16>(0x19),
lease(), build, payload.size(), filled<32>(0x20)));
const auto after_migration =
successor_manifest(*migration, filled<32>(0x21), filled<16>(0x22), lease(), 2, build,
payload.size(), filled<32>(0x23), batch_for(1, 1));
CHECK(after_migration && after_migration->cellular_versions == cellular_v2_versions);
auto bad_identity = *manifest;
bad_identity.key.region = 4;
const auto wrong_identity = restore_cellular_payload(payload, bad_identity);