Format M11 cellular code with clang-format 19
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m52s
Foundation / checks (client) (push) Failing after 4m25s
Foundation / checks (network) (push) Failing after 3m2s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m47s
Foundation / checks (postgres) (push) Canceled after 1m24s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m52s
Foundation / checks (client) (push) Failing after 4m25s
Foundation / checks (network) (push) Failing after 3m2s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m47s
Foundation / checks (postgres) (push) Canceled after 1m24s
This commit is contained in:
@@ -209,9 +209,9 @@ void patch_box(std::vector<evo::render::Rectangle>& out, double x, double y, boo
|
||||
if (x1 > x0 && y1 > y0)
|
||||
out.push_back({static_cast<float>(x0), static_cast<float>(y0), static_cast<float>(x1 - x0),
|
||||
static_cast<float>(y1 - y0),
|
||||
selected ? evo::render::Color{250, 190, 40, 255}
|
||||
: stocked ? evo::render::Color{80, 220, 130, 255}
|
||||
: evo::render::Color{115, 125, 135, 255}});
|
||||
selected ? evo::render::Color{250, 190, 40, 255}
|
||||
: stocked ? evo::render::Color{80, 220, 130, 255}
|
||||
: evo::render::Color{115, 125, 135, 255}});
|
||||
}
|
||||
void outline(std::vector<evo::render::Rectangle>& out, double l, double t, double r, double b,
|
||||
double width, double height) {
|
||||
|
||||
@@ -9,12 +9,14 @@
|
||||
// [--max-commits N]
|
||||
// evo-world-clone check-store --world W --region R --pg-* ... --objects DIR
|
||||
// [--reserve-mib N]
|
||||
// evo-world-clone provision --world W --region R --opening development-v1|primitive-v1|cellular-v1
|
||||
// evo-world-clone provision --world W --region R --opening
|
||||
// development-v1|primitive-v1|cellular-v1
|
||||
// --pg-* ... --objects DIR --build HEX [--commit HEX32] [--retain-build]
|
||||
// primitive-v1 also requires --frame N --source-id N, every --funding-*-* channel,
|
||||
// and one or more ordered --site X,Y values.
|
||||
// cellular-v1 also requires --width-um N --height-um N --ambient-temperature-mk N
|
||||
// and one or more ordered --patch X,Y,SOURCE,ENERGY,C,N,P,O values plus a stable --commit HEX32.
|
||||
// and one or more ordered --patch X,Y,SOURCE,ENERGY,C,N,P,O values plus a stable --commit
|
||||
// HEX32.
|
||||
// evo-world-clone compare --world A --region R --other-world B --pg-* ...
|
||||
// --objects DIR [--other-objects DIR] --retained HEX... [--max-commits N]
|
||||
//
|
||||
@@ -56,10 +58,10 @@
|
||||
//
|
||||
// Exit: 0 done, 2 usage, 3 source/history/database failure, 4 target/objects refused,
|
||||
// 5 target unknown, 6 compared histories differ.
|
||||
#include "evo/biology/cellular_habitat.hpp"
|
||||
#include "evo/persistence/region_clone.hpp"
|
||||
#include "evo/persistence/sha256.hpp"
|
||||
#include "evo/processes/development_opening.hpp"
|
||||
#include "evo/biology/cellular_habitat.hpp"
|
||||
#include "evo/server/lifecycle/cellular_lives.hpp"
|
||||
#include "evo/server/lifecycle/primitive_lives.hpp"
|
||||
|
||||
@@ -98,8 +100,7 @@ struct Options {
|
||||
std::optional<std::uint64_t> primitive_frame, primitive_source;
|
||||
std::array<std::optional<std::uint64_t>, 5> primitive_funding;
|
||||
std::vector<server::SpawnSite> primitive_sites;
|
||||
std::optional<std::uint32_t> cellular_width_um, cellular_height_um,
|
||||
cellular_temperature_mk;
|
||||
std::optional<std::uint32_t> cellular_width_um, cellular_height_um, cellular_temperature_mk;
|
||||
std::vector<biology::CellularPatch> cellular_patches;
|
||||
std::optional<persistence::Sha256Digest> build;
|
||||
bool retain_build{};
|
||||
@@ -146,8 +147,7 @@ std::optional<biology::CellularPatch> cellular_patch(std::string_view text) {
|
||||
fields[1] > std::numeric_limits<std::uint32_t>::max())
|
||||
return std::nullopt;
|
||||
biology::CellularPatch result{};
|
||||
result.address = {static_cast<std::uint32_t>(fields[0]),
|
||||
static_cast<std::uint32_t>(fields[1])};
|
||||
result.address = {static_cast<std::uint32_t>(fields[0]), static_cast<std::uint32_t>(fields[1])};
|
||||
result.source = fields[2];
|
||||
result.stock.energy.value = fields[3];
|
||||
for (std::size_t i = 0; i < result.stock.matter.size(); ++i)
|
||||
@@ -263,8 +263,7 @@ std::optional<Options> parse(int argc, char** argv) {
|
||||
else if (o.command == "check-store" && flag == "--reserve-mib" && n && *n <= 1048576)
|
||||
o.reserve_mib = *n;
|
||||
else if (o.command == "provision" && flag == "--opening" &&
|
||||
(value == "development-v1" || value == "primitive-v1" ||
|
||||
value == "cellular-v1"))
|
||||
(value == "development-v1" || value == "primitive-v1" || value == "cellular-v1"))
|
||||
o.opening = value;
|
||||
else if (o.command == "provision" && flag == "--frame" && n)
|
||||
o.primitive_frame = *n;
|
||||
@@ -444,9 +443,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 payload_limit = cellular ? server::max_cellular_lives_bytes
|
||||
: primitive ? server::max_primitive_lives_bytes
|
||||
: persistence::max_lineage_payload_bytes;
|
||||
const auto payload_limit = cellular ? server::max_cellular_lives_bytes
|
||||
: primitive ? server::max_primitive_lives_bytes
|
||||
: persistence::max_lineage_payload_bytes;
|
||||
auto store = open_objects(o.source, payload_limit);
|
||||
if (!store) {
|
||||
std::puts("objects refused");
|
||||
@@ -534,7 +533,8 @@ int provision(const Options& o) {
|
||||
timeout);
|
||||
if (same_genesis)
|
||||
return report("already-provisioned", same_genesis->head);
|
||||
std::puts("provision refused existing cellular region; use its original --commit to resolve genesis");
|
||||
std::puts("provision refused existing cellular region; use its original --commit to "
|
||||
"resolve genesis");
|
||||
return 4;
|
||||
}
|
||||
const auto manifest = persistence::decode_manifest(existing->manifest);
|
||||
@@ -564,10 +564,12 @@ int provision(const Options& o) {
|
||||
return 3;
|
||||
}
|
||||
if (cellular) {
|
||||
auto made = persistence::provision_cellular_region(
|
||||
*db, *store, o.source.key, *o.primitive_frame, *cellular_opening, commit, build, timeout);
|
||||
auto made =
|
||||
persistence::provision_cellular_region(*db, *store, o.source.key, *o.primitive_frame,
|
||||
*cellular_opening, commit, build, timeout);
|
||||
if (!made) {
|
||||
std::printf("cellular provision refused %u\n", static_cast<unsigned>(made.error().kind));
|
||||
std::printf("cellular provision refused %u\n",
|
||||
static_cast<unsigned>(made.error().kind));
|
||||
return 4;
|
||||
}
|
||||
return report("provisioned", made->head);
|
||||
|
||||
Reference in New Issue
Block a user