diff --git a/apps/evo-world-clone/main.cpp b/apps/evo-world-clone/main.cpp index a08a018..8d559f5 100644 --- a/apps/evo-world-clone/main.cpp +++ b/apps/evo-world-clone/main.cpp @@ -479,10 +479,10 @@ int provision(const Options& o) { config.world = o.source.key.world; config.region = o.source.key.region; config.frame = primitive_frame; - config.source = *o.primitive_source; - config.funding.energy.value = *o.primitive_funding[0]; + config.source = o.primitive_source.value_or(0U); + config.funding.energy.value = o.primitive_funding[0].value_or(0U); for (std::size_t i = 0; i < 4; ++i) - config.funding.matter[i].value = *o.primitive_funding[i + 1]; + config.funding.matter[i].value = o.primitive_funding[i + 1].value_or(0U); config.sites = o.primitive_sites; auto opening = server::PrimitiveLives::create(std::move(config)); if (!opening) { @@ -668,7 +668,8 @@ int check_store(const Options& o) { std::printf("database version=%s user=%s ssl=%s\n", row[0].value_or("?").c_str(), row[1].value_or("?").c_str(), row[2].value_or("?").c_str()); auto tables = (*db)->query("SELECT 1 FROM evolution.region_heads LIMIT 1", {}, timeout); - const bool denied = !tables && std::string_view(tables.error().sqlstate.data()) == "42501"; + const bool denied = !tables && + std::string_view(tables.error().sqlstate.data(), 5) == "42501"; auto head = persistence::load_region_head(**db, o.source.key, timeout); const bool reachable = head || head.error().kind == persistence::LeaseStoreError::not_provisioned; diff --git a/docs/engineering/VALIDATION.md b/docs/engineering/VALIDATION.md index 015ee9e..11ab580 100644 --- a/docs/engineering/VALIDATION.md +++ b/docs/engineering/VALIDATION.md @@ -7002,3 +7002,5 @@ safe `value_or(0)` reads for those parsed values; valid `cellular-v1` options ar still required by the parser. The run failed before the dependent server-image and Harbor publication jobs could start. CI must validate this repair on the next push. + +CI run #302 compiled that cellular change, then PostgreSQL clang-tidy found three unchecked primitive-provisioning optionals and a SQLSTATE `string_view` created without its fixed length in `apps/evo-world-clone/main.cpp`. The run failed before the dependent server-image and Harbor publication jobs could start. These four analyzer findings are now addressed; the next pushed run must validate them and publish the image.