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:
@@ -62,10 +62,10 @@ bool prepared_is_canonical(const CellularPreparedCommit& prepared,
|
||||
std::unexpected{server::CellularActionBlockError::format}};
|
||||
const auto encoded_trace = server::encode_cellular_batch(trace);
|
||||
const auto digest = sha256(prepared.trace);
|
||||
const bool trace_version_matches = (manifest.cellular_versions == cellular_v3_versions &&
|
||||
trace.format_version == server::cellular_batch_format) ||
|
||||
(manifest.cellular_versions != cellular_v3_versions &&
|
||||
trace.format_version == server::cellular_batch_v2_format);
|
||||
const bool revision = cellular_revision_bundle(manifest.cellular_versions);
|
||||
const bool trace_version_matches =
|
||||
(revision && trace.format_version == server::cellular_batch_format) ||
|
||||
(!revision && trace.format_version == server::cellular_batch_v2_format);
|
||||
return manifest.profile == CheckpointProfile::cellular_lives_v1 && trace_version_matches &&
|
||||
manifest.key == prepared.key && manifest.commit == prepared.commit &&
|
||||
manifest.sequence > 0 && manifest.batch.trace_bytes == prepared.trace.size() && digest &&
|
||||
@@ -99,10 +99,15 @@ provision_cellular_region(Postgres& owner, const FilesystemObjectStore& objects,
|
||||
genesis_manifest(key, frame, commit, biology::cellular_motion_tick_microseconds, build,
|
||||
payload.size(), *digest, CheckpointProfile::cellular_lives_v1);
|
||||
if (manifest && opening.format_version() == server::cellular_lives_format &&
|
||||
opening.rules_version() == server::cellular_lives_rules)
|
||||
opening.rules_version() == server::cellular_lives_rules) {
|
||||
manifest->cellular_versions = cellular_v2_versions;
|
||||
else if (manifest && (opening.format_version() != server::cellular_lives_legacy_format ||
|
||||
opening.rules_version() != 1))
|
||||
} else if (manifest && opening.format_version() == server::cellular_lives_engulf_format &&
|
||||
opening.rules_version() == server::cellular_lives_engulf_rules) {
|
||||
// ADR-0124: a rules-3 region starts on the v4 bundle with genome revisions.
|
||||
manifest->cellular_versions = cellular_v4_versions;
|
||||
manifest->history_profile = cellular_revision_history_profile;
|
||||
} else if (manifest && (opening.format_version() != server::cellular_lives_legacy_format ||
|
||||
opening.rules_version() != 1))
|
||||
return std::unexpected{failure(PublicationError::candidate)};
|
||||
auto encoded = manifest ? encode_manifest(*manifest)
|
||||
: std::expected<std::vector<std::uint8_t>, CheckpointError>{
|
||||
@@ -326,7 +331,7 @@ publish_cellular_batch(Postgres& db, const FilesystemObjectStore& objects, const
|
||||
const auto predecessor_digest = sha256(predecessor.manifest);
|
||||
auto committed_batch = batch;
|
||||
if (previous)
|
||||
committed_batch.format_version = previous->cellular_versions == cellular_v3_versions
|
||||
committed_batch.format_version = cellular_revision_bundle(previous->cellular_versions)
|
||||
? server::cellular_batch_format
|
||||
: server::cellular_batch_v2_format;
|
||||
const auto trace = server::encode_cellular_batch(committed_batch);
|
||||
@@ -501,10 +506,9 @@ recover_cellular_checkpoint(Postgres& db, const FilesystemObjectStore& objects,
|
||||
auto trace = server::decode_cellular_batch(*trace_bytes);
|
||||
if (!trace)
|
||||
return fail_with(RecoveryError::tail);
|
||||
if ((manifest->cellular_versions == cellular_v3_versions &&
|
||||
trace->format_version != server::cellular_batch_format) ||
|
||||
(manifest->cellular_versions != cellular_v3_versions &&
|
||||
trace->format_version != server::cellular_batch_v2_format))
|
||||
const bool revision = cellular_revision_bundle(manifest->cellular_versions);
|
||||
if ((revision && trace->format_version != server::cellular_batch_format) ||
|
||||
(!revision && trace->format_version != server::cellular_batch_v2_format))
|
||||
return fail_with(RecoveryError::tail);
|
||||
if (trace->header.world != key.world || trace->header.region != key.region ||
|
||||
trace->header.frame != manifest->frame ||
|
||||
|
||||
@@ -69,7 +69,8 @@ bool structural(const CheckpointManifest& m) noexcept {
|
||||
if ((!cellular && m.cellular_versions != cellular_v1_versions) ||
|
||||
(cellular && m.cellular_versions != cellular_v1_versions &&
|
||||
m.cellular_versions != cellular_v2_versions &&
|
||||
m.cellular_versions != cellular_v3_versions) ||
|
||||
m.cellular_versions != cellular_v3_versions &&
|
||||
m.cellular_versions != cellular_v4_versions) ||
|
||||
(cellular && m.versions != environmental_v1_versions))
|
||||
return false;
|
||||
if (primitive && (m.manifest_version != 2 || m.tick_microseconds != 50000 ||
|
||||
@@ -154,14 +155,15 @@ bool supported(const CheckpointManifest& m) noexcept {
|
||||
m.versions == primitive_v1_versions && m.tick_microseconds == 50000 &&
|
||||
m.rng_streams == 0 && m.durability == DurabilityPolicy::single_volume_development;
|
||||
if (m.profile == CheckpointProfile::cellular_lives_v1) {
|
||||
const bool history_matches = (m.cellular_versions != cellular_v3_versions &&
|
||||
m.history_profile == cellular_history_profile) ||
|
||||
(m.cellular_versions == cellular_v3_versions &&
|
||||
m.history_profile == cellular_revision_history_profile);
|
||||
const bool revision = cellular_revision_bundle(m.cellular_versions);
|
||||
const bool history_matches =
|
||||
(!revision && m.history_profile == cellular_history_profile) ||
|
||||
(revision && m.history_profile == cellular_revision_history_profile);
|
||||
return m.manifest_version == 2 && history_matches &&
|
||||
(m.cellular_versions == cellular_v1_versions ||
|
||||
m.cellular_versions == cellular_v2_versions ||
|
||||
m.cellular_versions == cellular_v3_versions) &&
|
||||
m.cellular_versions == cellular_v3_versions ||
|
||||
m.cellular_versions == cellular_v4_versions) &&
|
||||
m.versions == environmental_v1_versions && m.tick_microseconds == 50000 &&
|
||||
m.rng_streams == 0 && m.durability == DurabilityPolicy::single_volume_development;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user