Validate clone provision frame before use
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (checks) (push) Failing after 4m7s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 3m54s
Foundation / checks (postgres) (push) Canceled after 1m49s
Foundation / checks (client) (push) Canceled after 5m58s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m54s
Foundation / checks (checks) (push) Failing after 4m7s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 3m54s
Foundation / checks (postgres) (push) Canceled after 1m49s
Foundation / checks (client) (push) Canceled after 5m58s
This commit is contained in:
@@ -444,6 +444,9 @@ std::vector<std::uint8_t> probe_bytes() {
|
||||
int provision(const Options& o) {
|
||||
const bool primitive = o.opening == "primitive-v1";
|
||||
const bool cellular = o.opening == "cellular-v1";
|
||||
const auto primitive_frame = o.primitive_frame.value_or(0);
|
||||
if ((primitive || cellular) && primitive_frame == 0)
|
||||
return 2;
|
||||
const auto payload_limit = cellular ? server::max_cellular_lives_bytes
|
||||
: primitive ? server::max_primitive_lives_bytes
|
||||
: persistence::max_lineage_payload_bytes;
|
||||
@@ -475,7 +478,7 @@ int provision(const Options& o) {
|
||||
server::NurseryConfig config{};
|
||||
config.world = o.source.key.world;
|
||||
config.region = o.source.key.region;
|
||||
config.frame = *o.primitive_frame;
|
||||
config.frame = primitive_frame;
|
||||
config.source = *o.primitive_source;
|
||||
config.funding.energy.value = *o.primitive_funding[0];
|
||||
for (std::size_t i = 0; i < 4; ++i)
|
||||
@@ -492,7 +495,7 @@ int provision(const Options& o) {
|
||||
biology::CellularHabitatConfig habitat_config{};
|
||||
habitat_config.world = o.source.key.world;
|
||||
habitat_config.region = o.source.key.region;
|
||||
habitat_config.frame = *o.primitive_frame;
|
||||
habitat_config.frame = primitive_frame;
|
||||
habitat_config.width_um = *o.cellular_width_um;
|
||||
habitat_config.height_um = *o.cellular_height_um;
|
||||
habitat_config.patches = o.cellular_patches;
|
||||
@@ -530,7 +533,7 @@ int provision(const Options& o) {
|
||||
if (existing) {
|
||||
if (cellular) {
|
||||
auto same_genesis = persistence::provision_cellular_region(
|
||||
*db, *store, o.source.key, *o.primitive_frame, *cellular_opening, commit, build,
|
||||
*db, *store, o.source.key, primitive_frame, *cellular_opening, commit, build,
|
||||
timeout);
|
||||
if (same_genesis)
|
||||
return report("already-provisioned", same_genesis->head);
|
||||
@@ -543,7 +546,7 @@ int provision(const Options& o) {
|
||||
primitive ? persistence::CheckpointProfile::primitive_lives_v1
|
||||
: persistence::CheckpointProfile::environmental_lineage_v1;
|
||||
const auto expected_frame =
|
||||
primitive ? *o.primitive_frame : processes::development_opening_frame;
|
||||
primitive ? primitive_frame : processes::development_opening_frame;
|
||||
if (!manifest || manifest->profile != expected_profile ||
|
||||
manifest->frame != expected_frame) {
|
||||
std::puts("provision refused existing profile/frame mismatch");
|
||||
@@ -568,7 +571,7 @@ int provision(const Options& o) {
|
||||
}
|
||||
if (cellular) {
|
||||
auto made =
|
||||
persistence::provision_cellular_region(*db, *store, o.source.key, *o.primitive_frame,
|
||||
persistence::provision_cellular_region(*db, *store, o.source.key, primitive_frame,
|
||||
*cellular_opening, commit, build, timeout);
|
||||
if (!made) {
|
||||
std::printf("cellular provision refused %u\n",
|
||||
@@ -579,7 +582,7 @@ int provision(const Options& o) {
|
||||
}
|
||||
if (primitive) {
|
||||
auto made =
|
||||
persistence::provision_primitive_region(*db, *store, o.source.key, *o.primitive_frame,
|
||||
persistence::provision_primitive_region(*db, *store, o.source.key, primitive_frame,
|
||||
*primitive_opening, commit, build, timeout);
|
||||
if (!made) {
|
||||
std::printf("provision refused %u\n", static_cast<unsigned>(made.error().kind));
|
||||
|
||||
@@ -6955,3 +6955,12 @@ in `src/server/session/postgres_action_ledger.cpp`. The single and batched
|
||||
lookups now copy present rows via `value_or`, and the small durable result records
|
||||
are copied without ineffective `std::move`. The PostgreSQL job failed on these
|
||||
new diagnostics, so image publication remained skipped.
|
||||
|
||||
CI run #296 confirmed the action-ledger repair, then PostgreSQL analysis rejected
|
||||
an unchecked `Options::primitive_frame` access in `apps/evo-world-clone/main.cpp`
|
||||
while compiling the primitive-region provisioning path. The provision command now
|
||||
uses a validated frame value for primitive and cellular openings. The default
|
||||
Windows debug preset has PostgreSQL disabled and does not contain this target;
|
||||
`clang-format` is also unavailable in the local environment, so PostgreSQL
|
||||
analysis, format and integration checks remain delegated to CI. Run #297 must
|
||||
confirm the fix and proceed through the server image and Harbor publication gates.
|
||||
|
||||
Reference in New Issue
Block a user