feat(cellular): seed dev wildlife and tune budding playtests
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m16s
Foundation / image (push) Successful in 4m54s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m16s
Foundation / image (push) Successful in 4m54s
This commit is contained in:
@@ -99,6 +99,13 @@ steer_cellular(const CellularControls& controls, client::Intention intention,
|
|||||||
short_on[i + 1] = d.bud_cost_matter_fg[i] > d.reserve_matter_fg[i];
|
short_on[i + 1] = d.bud_cost_matter_fg[i] > d.reserve_matter_fg[i];
|
||||||
return short_on;
|
return short_on;
|
||||||
}
|
}
|
||||||
|
[[nodiscard]] inline bool bud_affordable(const network::CellularLifeDiagnostics& d) {
|
||||||
|
const bool known =
|
||||||
|
d.bud_cost_energy_pj != 0 ||
|
||||||
|
std::ranges::any_of(d.bud_cost_matter_fg, [](auto amount) { return amount != 0; });
|
||||||
|
const auto short_on = bud_shortfall(d);
|
||||||
|
return known && std::ranges::none_of(short_on, [](bool missing) { return missing; });
|
||||||
|
}
|
||||||
[[nodiscard]] inline bool can_fund(const network::CellularOfferedCandidate& candidate,
|
[[nodiscard]] inline bool can_fund(const network::CellularOfferedCandidate& candidate,
|
||||||
const network::CellularLifeDiagnostics& reserve) {
|
const network::CellularLifeDiagnostics& reserve) {
|
||||||
if (candidate.cost_energy_pj > reserve.reserve_energy_pj)
|
if (candidate.cost_energy_pj > reserve.reserve_energy_pj)
|
||||||
|
|||||||
@@ -1212,8 +1212,13 @@ void hud_vitals(const PanelView& v, FormBuffers& form, bool compact) {
|
|||||||
const float max_height =
|
const float max_height =
|
||||||
compact ? std::max(px(120), io.DisplaySize.y - px(220)) : io.DisplaySize.y * 0.43F;
|
compact ? std::max(px(120), io.DisplaySize.y - px(220)) : io.DisplaySize.y * 0.43F;
|
||||||
ImGui::SetNextWindowSizeConstraints({width, 0}, {width, max_height});
|
ImGui::SetNextWindowSizeConstraints({width, 0}, {width, max_height});
|
||||||
|
// Keep table width stable when the constrained card gains its vertical scrollbar.
|
||||||
|
ImGui::SetNextWindowContentSize(
|
||||||
|
{width - 2 * ImGui::GetStyle().WindowPadding.x - ImGui::GetStyle().ScrollbarSize, 0});
|
||||||
ImGui::Begin("Vitals", nullptr,
|
ImGui::Begin("Vitals", nullptr,
|
||||||
hud_flags | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_AlwaysAutoResize);
|
hud_flags | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_AlwaysAutoResize |
|
||||||
|
(form.vitals_minimized ? ImGuiWindowFlags_None
|
||||||
|
: ImGuiWindowFlags_AlwaysVerticalScrollbar));
|
||||||
panel_heading("Your cell", form.vitals_minimized);
|
panel_heading("Your cell", form.vitals_minimized);
|
||||||
if (form.vitals_minimized) {
|
if (form.vitals_minimized) {
|
||||||
if (d)
|
if (d)
|
||||||
@@ -1349,12 +1354,35 @@ void hud_dock(const PanelView& v, FormBuffers& form, PanelActions& a, bool compa
|
|||||||
ImGui::BeginDisabled(!play || !play->can_act());
|
ImGui::BeginDisabled(!play || !play->can_act());
|
||||||
if (action_button("Engulf", {each, px(44)}, {0.38F, 0.68F, 1.0F, 1}))
|
if (action_button("Engulf", {each, px(44)}, {0.38F, 0.68F, 1.0F, 1}))
|
||||||
a.cell_action = CellAction::engulf;
|
a.cell_action = CellAction::engulf;
|
||||||
|
ImGui::EndDisabled();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (action_button("Bud", {each, px(44)}, {0.82F, 0.53F, 0.96F, 1})) {
|
const bool bud_ready = play && play->can_act() && d && bud_affordable(*d);
|
||||||
|
ImGui::BeginDisabled(!bud_ready);
|
||||||
|
if (action_button("Bud", {each, px(44)},
|
||||||
|
bud_ready ? ImVec4{0.82F, 0.53F, 0.96F, 1} : ImVec4{0.5F, 0.5F, 0.5F, 1})) {
|
||||||
a.cell_action = CellAction::bud;
|
a.cell_action = CellAction::bud;
|
||||||
a.cell_become = form.bud_become && d && d->members == 1;
|
a.cell_become = form.bud_become && d && d->members == 1;
|
||||||
}
|
}
|
||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
|
if (!bud_ready && ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) {
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
if (d && bud_known(*d)) {
|
||||||
|
ImGui::TextUnformatted("Resources needed to bud (required / available):");
|
||||||
|
ImGui::Text("Energy: %s / %s", energy_text(d->bud_cost_energy_pj).c_str(),
|
||||||
|
energy_text(d->reserve_energy_pj).c_str());
|
||||||
|
for (std::size_t i = 0; i < d->bud_cost_matter_fg.size(); ++i)
|
||||||
|
ImGui::Text("%s: %s / %s", nutrient_names.at(i + 1),
|
||||||
|
mass_text(d->bud_cost_matter_fg[i]).c_str(),
|
||||||
|
mass_text(d->reserve_matter_fg[i]).c_str());
|
||||||
|
if (!play || !play->can_act())
|
||||||
|
ImGui::TextUnformatted("Waiting for a connection, fresh state or pending action.");
|
||||||
|
if (d->members > 1)
|
||||||
|
ImGui::TextUnformatted("Includes the largest possible litter of internal cells.");
|
||||||
|
} else {
|
||||||
|
ImGui::TextUnformatted("Budding requirements are unavailable for this cell.");
|
||||||
|
}
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
// Rules 13 (v14): continue as the bud, or grow the organism toward Emerge.
|
// Rules 13 (v14): continue as the bud, or grow the organism toward Emerge.
|
||||||
if (d && d->members != 0 && play && play->life() != 0) {
|
if (d && d->members != 0 && play && play->life() != 0) {
|
||||||
if (d->members == 1) {
|
if (d->members == 1) {
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ class CellularBridge {
|
|||||||
diagnostics.reserve_energy_pj = life.reserve.energy.value;
|
diagnostics.reserve_energy_pj = life.reserve.energy.value;
|
||||||
for (std::size_t i = 0; i < diagnostics.reserve_matter_fg.size(); ++i)
|
for (std::size_t i = 0; i < diagnostics.reserve_matter_fg.size(); ++i)
|
||||||
diagnostics.reserve_matter_fg[i] = life.reserve.matter[i].value;
|
diagnostics.reserve_matter_fg[i] = life.reserve.matter[i].value;
|
||||||
if (const auto cost = bud_cost_for(state, life.identity.genome)) {
|
if (const auto cost = bud_cost_for(state, life)) {
|
||||||
diagnostics.bud_cost_energy_pj = cost->energy.value;
|
diagnostics.bud_cost_energy_pj = cost->energy.value;
|
||||||
for (std::size_t i = 0; i < diagnostics.bud_cost_matter_fg.size(); ++i)
|
for (std::size_t i = 0; i < diagnostics.bud_cost_matter_fg.size(); ++i)
|
||||||
diagnostics.bud_cost_matter_fg[i] = cost->matter[i].value;
|
diagnostics.bud_cost_matter_fg[i] = cost->matter[i].value;
|
||||||
@@ -262,8 +262,9 @@ class CellularBridge {
|
|||||||
}
|
}
|
||||||
// ADR-0129 (v10): what an engulf or bud intention did this tick.
|
// ADR-0129 (v10): what an engulf or bud intention did this tick.
|
||||||
diagnostics.engulf = engulf_result(feedback->engulf);
|
diagnostics.engulf = engulf_result(feedback->engulf);
|
||||||
diagnostics.bud = feedback->bud ? bud_outcome(*feedback->bud)
|
const auto bud = feedback->bud;
|
||||||
: network::CellularBudOutcome::not_requested;
|
diagnostics.bud =
|
||||||
|
bud ? bud_outcome(*bud) : network::CellularBudOutcome::not_requested;
|
||||||
// Rules 13 (v14): what held growth back and the tick's flows by channel.
|
// Rules 13 (v14): what held growth back and the tick's flows by channel.
|
||||||
diagnostics.growth_limit = feedback->growth_limit;
|
diagnostics.growth_limit = feedback->growth_limit;
|
||||||
const auto channels = [](const accounting::Inventory& value) {
|
const auto channels = [](const accounting::Inventory& value) {
|
||||||
@@ -361,13 +362,11 @@ class CellularBridge {
|
|||||||
const auto before = deposit_stock_.find(patch.id);
|
const auto before = deposit_stock_.find(patch.id);
|
||||||
deposit.drained = before != deposit_stock_.end() &&
|
deposit.drained = before != deposit_stock_.end() &&
|
||||||
(patch.available.energy.value < before->second.energy.value ||
|
(patch.available.energy.value < before->second.energy.value ||
|
||||||
std::ranges::any_of(
|
std::ranges::any_of(std::array{0, 1, 2, 3}, [&](int c) {
|
||||||
std::array{0, 1, 2, 3},
|
const auto i = static_cast<std::size_t>(c);
|
||||||
[&](int c) {
|
return patch.available.matter.at(i).value <
|
||||||
const auto i = static_cast<std::size_t>(c);
|
before->second.matter.at(i).value;
|
||||||
return patch.available.matter.at(i).value <
|
}));
|
||||||
before->second.matter.at(i).value;
|
|
||||||
}));
|
|
||||||
seen_stock_[patch.id] = patch.available;
|
seen_stock_[patch.id] = patch.available;
|
||||||
// Rules 12 (v13): a bubble's world velocity, current plus induced drift, so the
|
// Rules 12 (v13): a bubble's world velocity, current plus induced drift, so the
|
||||||
// client can carry it between perceptions.
|
// client can carry it between perceptions.
|
||||||
@@ -589,19 +588,18 @@ class CellularBridge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ADR-0129 amendment: a genome's bud cost is pure for this region's temperature, and
|
// The parent/plan charge is pure at this region's temperature and fixed rules.
|
||||||
// deriving it scans up to a thousand bodies, so it is computed once per genome.
|
// Internal-cell costs depend on the current body and are recomputed.
|
||||||
std::optional<accounting::Inventory> bud_cost_for(const server::CellularLives& state,
|
std::optional<accounting::Inventory> bud_cost_for(const server::CellularLives& state,
|
||||||
std::uint64_t genome_id) {
|
const server::CellularOwnedLife& life) {
|
||||||
if (const auto known = bud_costs_.find(genome_id); known != bud_costs_.end())
|
if (life.revamp.members > 1)
|
||||||
|
return state.budding_cost(life.identity.life);
|
||||||
|
const auto key = std::pair{life.identity.genome, server::cellular_offspring_genome(life)};
|
||||||
|
if (const auto known = bud_costs_.find(key); known != bud_costs_.end())
|
||||||
return known->second;
|
return known->second;
|
||||||
const auto genome = state.archive().find(genome_id);
|
|
||||||
if (!genome)
|
|
||||||
return std::nullopt;
|
|
||||||
if (bud_costs_.size() >= 4096)
|
if (bud_costs_.size() >= 4096)
|
||||||
bud_costs_.clear(); // Bounded: recomputing is only slower.
|
bud_costs_.clear(); // Bounded: recomputing is only slower.
|
||||||
return bud_costs_[genome_id] =
|
return bud_costs_[key] = state.budding_cost(life.identity.life);
|
||||||
biology::bud_cost(*genome, state.ambient_temperature_millikelvin());
|
|
||||||
}
|
}
|
||||||
static std::uint64_t wall_seconds() {
|
static std::uint64_t wall_seconds() {
|
||||||
return static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::seconds>(
|
return static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::seconds>(
|
||||||
@@ -629,7 +627,8 @@ class CellularBridge {
|
|||||||
friend bool operator==(const SentOffer&, const SentOffer&) = default;
|
friend bool operator==(const SentOffer&, const SentOffer&) = default;
|
||||||
};
|
};
|
||||||
std::vector<SentOffer> offers_; // Last offer view sent to each owner.
|
std::vector<SentOffer> offers_; // Last offer view sent to each owner.
|
||||||
std::map<std::uint64_t, std::optional<accounting::Inventory>> bud_costs_; // By genome.
|
std::map<std::pair<std::uint64_t, std::uint64_t>, std::optional<accounting::Inventory>>
|
||||||
|
bud_costs_;
|
||||||
// ADR-0136: deposit stocks seen at the last replicated tick, and this tick's.
|
// ADR-0136: deposit stocks seen at the last replicated tick, and this tick's.
|
||||||
std::map<std::uint32_t, accounting::Inventory> deposit_stock_, seen_stock_;
|
std::map<std::uint32_t, accounting::Inventory> deposit_stock_, seen_stock_;
|
||||||
std::vector<std::pair<server::LifeAccount, std::uint64_t>> owned_; // At last replication.
|
std::vector<std::pair<server::LifeAccount, std::uint64_t>> owned_; // At last replication.
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
// --current-seed N (default: derived from the --commit bytes). cellular-v10 (rules 13,
|
// --current-seed N (default: derived from the --commit bytes). cellular-v10 (rules 13,
|
||||||
// ADR-0179) is cellular-v9 followed by the revamp upgrade: it also requires
|
// ADR-0179) is cellular-v9 followed by the revamp upgrade: it also requires
|
||||||
// --revamp-tuning FILE (the Git revamp tuning file).
|
// --revamp-tuning FILE (the Git revamp tuning file).
|
||||||
|
// A nonzero playtest.starting_wildlife_cells (ADR-0180) additionally requires
|
||||||
|
// --playtest-wildlife-first-id N: an audited unused range below --life-allocator-start.
|
||||||
// primitive-v1 and cellular-v1/v2/v3 accept --life-allocator-start N
|
// primitive-v1 and cellular-v1/v2/v3 accept --life-allocator-start N
|
||||||
// (ADR-0123): the world's life-identity allocator is created once at the operator-audited
|
// (ADR-0123): the world's life-identity allocator is created once at the operator-audited
|
||||||
// start N; a later run leaves it untouched and refuses one that is below N.
|
// start N; a later run leaves it untouched and refuses one that is below N.
|
||||||
@@ -134,6 +136,7 @@ struct Options {
|
|||||||
std::optional<biology::CellularTuning> tuning; // Parsed from tuning_path.
|
std::optional<biology::CellularTuning> tuning; // Parsed from tuning_path.
|
||||||
std::optional<std::string> revamp_tuning_path; // cellular-v10
|
std::optional<std::string> revamp_tuning_path; // cellular-v10
|
||||||
std::optional<biology::CellularRevampTuning> revamp_tuning; // Parsed from it.
|
std::optional<biology::CellularRevampTuning> revamp_tuning; // Parsed from it.
|
||||||
|
std::optional<std::uint64_t> playtest_wildlife_first_id; // Audited DEV-only reserved range.
|
||||||
std::optional<std::uint64_t> life_allocator_start;
|
std::optional<std::uint64_t> life_allocator_start;
|
||||||
std::optional<persistence::Sha256Digest> build;
|
std::optional<persistence::Sha256Digest> build;
|
||||||
bool retain_build{};
|
bool retain_build{};
|
||||||
@@ -365,7 +368,11 @@ std::optional<Options> parse(int argc, char** argv) {
|
|||||||
o.cellular_mixed = cellular_motes(value);
|
o.cellular_mixed = cellular_motes(value);
|
||||||
else if (o.command == "provision" && flag == "--revamp-tuning" && !value.empty())
|
else if (o.command == "provision" && flag == "--revamp-tuning" && !value.empty())
|
||||||
o.revamp_tuning_path = std::string{value};
|
o.revamp_tuning_path = std::string{value};
|
||||||
else if (o.command == "provision" && flag == "--light-pj" && n && *n > 0)
|
else if (o.command == "provision" && flag == "--playtest-wildlife-first-id") {
|
||||||
|
o.playtest_wildlife_first_id = number(value);
|
||||||
|
if (!o.playtest_wildlife_first_id || *o.playtest_wildlife_first_id == 0)
|
||||||
|
return std::nullopt;
|
||||||
|
} else if (o.command == "provision" && flag == "--light-pj" && n && *n > 0)
|
||||||
o.light_pj = n;
|
o.light_pj = n;
|
||||||
else if (o.command == "provision" && flag == "--tuning" && !value.empty())
|
else if (o.command == "provision" && flag == "--tuning" && !value.empty())
|
||||||
o.tuning_path = std::string{value};
|
o.tuning_path = std::string{value};
|
||||||
@@ -480,6 +487,13 @@ std::optional<Options> parse(int argc, char** argv) {
|
|||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
o.revamp_tuning = *parsed;
|
o.revamp_tuning = *parsed;
|
||||||
|
const auto count = parsed->playtest_starting_wildlife_cells;
|
||||||
|
if (count != 0 && (!o.playtest_wildlife_first_id || !o.life_allocator_start ||
|
||||||
|
*o.playtest_wildlife_first_id == 0 ||
|
||||||
|
*o.playtest_wildlife_first_id >= *o.life_allocator_start ||
|
||||||
|
static_cast<std::uint64_t>(count) >
|
||||||
|
*o.life_allocator_start - *o.playtest_wildlife_first_id))
|
||||||
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
if (o.tuning_path) {
|
if (o.tuning_path) {
|
||||||
std::ifstream file(*o.tuning_path, std::ios::binary);
|
std::ifstream file(*o.tuning_path, std::ios::binary);
|
||||||
@@ -534,6 +548,8 @@ std::optional<Options> parse(int argc, char** argv) {
|
|||||||
return std::nullopt; // The development opening has no lives to allocate.
|
return std::nullopt; // The development opening has no lives to allocate.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (o.playtest_wildlife_first_id && o.opening != "cellular-v10")
|
||||||
|
return std::nullopt;
|
||||||
if (!complete(o.source) || (needs_builds && o.retained.empty()) ||
|
if (!complete(o.source) || (needs_builds && o.retained.empty()) ||
|
||||||
(clone && !complete(o.target)))
|
(clone && !complete(o.target)))
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
@@ -657,6 +673,10 @@ int finish_photosynthesis_opening(const Options& o, persistence::Postgres& db,
|
|||||||
const std::optional<server::CellularLiquidRules>& liquid,
|
const std::optional<server::CellularLiquidRules>& liquid,
|
||||||
const std::optional<server::CellularRevampRules>& revamp) {
|
const std::optional<server::CellularRevampRules>& revamp) {
|
||||||
const auto& key = o.source.key;
|
const auto& key = o.source.key;
|
||||||
|
std::uint32_t wildlife_count{};
|
||||||
|
if (o.revamp_tuning)
|
||||||
|
wildlife_count =
|
||||||
|
static_cast<std::uint32_t>(o.revamp_tuning->playtest_starting_wildlife_cells);
|
||||||
const auto target = revamp ? persistence::cellular_v15_versions
|
const auto target = revamp ? persistence::cellular_v15_versions
|
||||||
: liquid ? persistence::cellular_v14_versions
|
: liquid ? persistence::cellular_v14_versions
|
||||||
: persistence::cellular_v13_versions;
|
: persistence::cellular_v13_versions;
|
||||||
@@ -744,8 +764,9 @@ int finish_photosynthesis_opening(const Options& o, persistence::Postgres& db,
|
|||||||
upgraded = persistence::migrate_cellular_liquid_profile(db, store, *lease, *head, id,
|
upgraded = persistence::migrate_cellular_liquid_profile(db, store, *lease, *head, id,
|
||||||
build, *liquid, timeout);
|
build, *liquid, timeout);
|
||||||
else if (versions == persistence::cellular_v14_versions && liquid && revamp)
|
else if (versions == persistence::cellular_v14_versions && liquid && revamp)
|
||||||
upgraded = persistence::migrate_cellular_revamp_profile(db, store, *lease, *head, id,
|
upgraded = persistence::migrate_cellular_revamp_profile(
|
||||||
build, *revamp, timeout);
|
db, store, *lease, *head, id, build, *revamp, timeout, {}, wildlife_count,
|
||||||
|
wildlife_count == 0 ? 0 : o.playtest_wildlife_first_id.value_or(0));
|
||||||
else
|
else
|
||||||
return finish(4);
|
return finish(4);
|
||||||
if (!upgraded) {
|
if (!upgraded) {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
env:
|
env:
|
||||||
- {name: REGION_SESSION, value: "dev"}
|
- {name: REGION_SESSION, value: "dev"}
|
||||||
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
|
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
|
||||||
- {name: REGION_SESSION_WINDOW, value: "dev-20261026T135918-495ff8ba:1793037558"}
|
- {name: REGION_SESSION_WINDOW, value: "dev-20261026T160157-7386982f:1793044917"}
|
||||||
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
|
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
|
||||||
ports:
|
ports:
|
||||||
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
|
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Region host for evolution-dev: world 100, region 13, frame 9 (cellular-v10 opening, rules 13).
|
# Region host for evolution-dev: world 100, region 14, frame 9 (cellular-v10 opening, rules 13).
|
||||||
# The server image digest appears twice on purpose: as the image and as the build
|
# The server image digest appears twice on purpose: as the image and as the build
|
||||||
# identity the region records in every commit. The policy check requires they match.
|
# identity the region records in every commit. The policy check requires they match.
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Region identity and build (the server image digest without "sha256:").
|
# Region identity and build (the server image digest without "sha256:").
|
||||||
# Revamp playtests (rules 13, ADR-0179): region 13 holds a cellular-v10 opening, a 60 x 60 mm
|
# Revamp playtests (rules 13, ADR-0179): region 14 holds a cellular-v10 opening, a 60 x 60 mm
|
||||||
# cellular-v7 genesis taken durably to rules 11 with light (trial 40 pJ per square um per
|
# cellular-v7 genesis taken durably to rules 11 with light (trial 40 pJ per square um per
|
||||||
# tick), to rules 12 with the currents, handling and moving food of the Git tuning file
|
# tick), to rules 12 with the currents, handling and moving food of the Git tuning file
|
||||||
# (tuning/cellular.tuning), and to rules 13 with the revamp rules of
|
# (tuning/cellular.tuning), and to rules 13 with the revamp rules of
|
||||||
# tuning/cellular-revamp.tuning. Regions 1-12 stay in the stores untouched; they are simply
|
# tuning/cellular-revamp.tuning. Regions 1-13 stay in the stores untouched; they are simply
|
||||||
# not served while dev runs region 13. A region keeps the tuning it opened with, so a new
|
# not served while dev runs region 14. A region keeps the tuning it opened with, so a new
|
||||||
# region opens when the tuning changes (until live retuning exists).
|
# region opens when the tuning changes (until live retuning exists).
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
@@ -17,11 +17,11 @@ spec:
|
|||||||
- name: evo-server
|
- name: evo-server
|
||||||
env:
|
env:
|
||||||
- {name: REGION_WORLD, value: "100"}
|
- {name: REGION_WORLD, value: "100"}
|
||||||
- {name: REGION_ID, value: "13"}
|
- {name: REGION_ID, value: "14"}
|
||||||
- {name: REGION_BUILD, value: effea9180d802e50abed76a5da665374f3591eda8aeb99c0fff085ed6df618ae}
|
- {name: REGION_BUILD, value: effea9180d802e50abed76a5da665374f3591eda8aeb99c0fff085ed6df618ae}
|
||||||
- {name: REGION_PROFILE, value: cellular}
|
- {name: REGION_PROFILE, value: cellular}
|
||||||
# The whole world's catalog: dev world 100 has only this region.
|
# The whole world's catalog: dev world 100 has only this region.
|
||||||
- {name: REGION_LIFE_ROUTES, value: "13=void.aeternalisgames.com:7400=void.aeternalisgames.com"}
|
- {name: REGION_LIFE_ROUTES, value: "14=void.aeternalisgames.com:7400=void.aeternalisgames.com"}
|
||||||
# Keep the currently promoted build plus prior committed builds recoverable.
|
# Keep the currently promoted build plus prior committed builds recoverable.
|
||||||
- {name: REGION_RETAINED, value: "f1183f4476bac87c09504a574112df4663931f67e88cc38dc08f867ce98ff726 815153514ca4a53967932bb46456ff4cb4e1784f9db247bc3b613b7e8365c59f 21507d4369cebef83ee05152daea5ac2f581ea86a9dc85276ef54e3f9f6388c5 5a77cf9e96e7a0e40ea07e9394a3fa458184ce54f8f774a8fb59cbec1db75c54 e17c62bc8dbad089da57e8b30adc391ff8b947cc7182b3160f5e2709103ded78 6c96629eb3c26513d55207b109fe2a9873a58f43510bd067b7d5422572e3fb42 7952185d5ef96504b5793b76fe72e42cbe9c9ac19149bf912adb2c3a735f8dbf f378a43d6146eeed864110b90848df0bec9672fa4c9941a2d04de249068a4a09 ecac8f9f2489c547ce58f12ed01baaa3939c8adbf8aed05c313abbf422cdc855 4af7209941643e0c6a100e2b4e2fef8a959b87fdbfac2173b7867cfc1808bd66 edb39f956df1f481d7ba724cac4ceb3a4fe494efc02f994d31d6c96dfae04a78 0ded41070dd3e0c0daa43e13dadc58c449865eec00530cfceff3c1579c66e916 754446fe4e5f33e9c0d5a1a74a02444a01de1700673442c90827c708aba62cee c597c0bac8b4a796e1e8b70344f9866cb047cc90cfb15af774d38860594ea27a e83c333a87056c678b5e835947647ef42370b43dbfc31997744f28d993f9c4aa db2b0e6a6071502381a768d70fd9bab8c08c64e4717fc23da45dbe8adc5fa3d6 cdc10712ff8bf956f8f5900709500046493523b51dc670d5b2d01eaf604bcd38 028571f257b485acafbe79b704a80f273d899485c4bb264d9c8137bf51e33217 566c29329433934f1436faf94652a7b925df8b4587ab04470322172f47c31c02 1dd640eba3e9dbdd10106698215a0a06df89c5cdf801c53c4c26fb923116552a faeb26fc5db5c4aae9ae9eb4388e807ab4d59499d7639fcab3d878843a740037 5e13e0096eb4010253c270ab98f0e9bbc11571c221eb779d428333e8cd63c955 e891f9427d5ec81b32595d70be9d00bb66c6d8223b4747d12be8c388c2fc0c8e 58aab8aaa538c0c6e5ad7281fd27e50374b489942aa317296dbf9c2ec5ca3434 4a8b0a9dc9f6be491e9eacb464aa7ef7c0d449de3018c4172c01448ce39a5108 3e5b8cef06838821113c8bba064e9415e8c627bca552fb978f830d40027b80f2 67e6bb3d138e7d489850ac99b5915ef8659178a68140b963e282b24020a288e2 f178f7f44251fdc9ae9ccaaecc5ea6f10aa534caa25d506abc3fbde21c69db17 6532f97e9b7d1492f1a17d1228ce7e563016c2187735f44e58ff1e9f786019aa 7c5462391a9bff4f7c25f2761098e7189b7ae204af0a7be61a652e4482f63e6a 9ba005f9216a2211491afd0e335ac5c6f20af1166fbb7518bcc8cec2e536f5ce 7eb84318234e23c223d4279ac01e925ba0b08d6d6950f7ba328f0ce909af8307 0fcdbf1518b677829322dc18e1feebd354a6e39700bd9cdb60ab47dc0465c3a6 801a9ae4fe1049dd27cfd9c356f21f29c6e07238448c201c08d288b5cc8e7e9a f0869be511179866f9a71a63a6a5f65e577e851fd7851184734bb5c56940b1a6 178cd8ffcdfe9fe14f39084d78341a8705ca72e78947bada31ab0356508fc232 0fd4807f67ab317561f115f12c0d8540e04596fdea389d7c2104e97dda5a0351"}
|
- {name: REGION_RETAINED, value: "f1183f4476bac87c09504a574112df4663931f67e88cc38dc08f867ce98ff726 815153514ca4a53967932bb46456ff4cb4e1784f9db247bc3b613b7e8365c59f 21507d4369cebef83ee05152daea5ac2f581ea86a9dc85276ef54e3f9f6388c5 5a77cf9e96e7a0e40ea07e9394a3fa458184ce54f8f774a8fb59cbec1db75c54 e17c62bc8dbad089da57e8b30adc391ff8b947cc7182b3160f5e2709103ded78 6c96629eb3c26513d55207b109fe2a9873a58f43510bd067b7d5422572e3fb42 7952185d5ef96504b5793b76fe72e42cbe9c9ac19149bf912adb2c3a735f8dbf f378a43d6146eeed864110b90848df0bec9672fa4c9941a2d04de249068a4a09 ecac8f9f2489c547ce58f12ed01baaa3939c8adbf8aed05c313abbf422cdc855 4af7209941643e0c6a100e2b4e2fef8a959b87fdbfac2173b7867cfc1808bd66 edb39f956df1f481d7ba724cac4ceb3a4fe494efc02f994d31d6c96dfae04a78 0ded41070dd3e0c0daa43e13dadc58c449865eec00530cfceff3c1579c66e916 754446fe4e5f33e9c0d5a1a74a02444a01de1700673442c90827c708aba62cee c597c0bac8b4a796e1e8b70344f9866cb047cc90cfb15af774d38860594ea27a e83c333a87056c678b5e835947647ef42370b43dbfc31997744f28d993f9c4aa db2b0e6a6071502381a768d70fd9bab8c08c64e4717fc23da45dbe8adc5fa3d6 cdc10712ff8bf956f8f5900709500046493523b51dc670d5b2d01eaf604bcd38 028571f257b485acafbe79b704a80f273d899485c4bb264d9c8137bf51e33217 566c29329433934f1436faf94652a7b925df8b4587ab04470322172f47c31c02 1dd640eba3e9dbdd10106698215a0a06df89c5cdf801c53c4c26fb923116552a faeb26fc5db5c4aae9ae9eb4388e807ab4d59499d7639fcab3d878843a740037 5e13e0096eb4010253c270ab98f0e9bbc11571c221eb779d428333e8cd63c955 e891f9427d5ec81b32595d70be9d00bb66c6d8223b4747d12be8c388c2fc0c8e 58aab8aaa538c0c6e5ad7281fd27e50374b489942aa317296dbf9c2ec5ca3434 4a8b0a9dc9f6be491e9eacb464aa7ef7c0d449de3018c4172c01448ce39a5108 3e5b8cef06838821113c8bba064e9415e8c627bca552fb978f830d40027b80f2 67e6bb3d138e7d489850ac99b5915ef8659178a68140b963e282b24020a288e2 f178f7f44251fdc9ae9ccaaecc5ea6f10aa534caa25d506abc3fbde21c69db17 6532f97e9b7d1492f1a17d1228ce7e563016c2187735f44e58ff1e9f786019aa 7c5462391a9bff4f7c25f2761098e7189b7ae204af0a7be61a652e4482f63e6a 9ba005f9216a2211491afd0e335ac5c6f20af1166fbb7518bcc8cec2e536f5ce 7eb84318234e23c223d4279ac01e925ba0b08d6d6950f7ba328f0ce909af8307 0fcdbf1518b677829322dc18e1feebd354a6e39700bd9cdb60ab47dc0465c3a6 801a9ae4fe1049dd27cfd9c356f21f29c6e07238448c201c08d288b5cc8e7e9a f0869be511179866f9a71a63a6a5f65e577e851fd7851184734bb5c56940b1a6 178cd8ffcdfe9fe14f39084d78341a8705ca72e78947bada31ab0356508fc232 0fd4807f67ab317561f115f12c0d8540e04596fdea389d7c2104e97dda5a0351"}
|
||||||
---
|
---
|
||||||
@@ -36,9 +36,9 @@ spec:
|
|||||||
- name: provision
|
- name: provision
|
||||||
env:
|
env:
|
||||||
- {name: REGION_WORLD, value: "100"}
|
- {name: REGION_WORLD, value: "100"}
|
||||||
- {name: REGION_ID, value: "13"}
|
- {name: REGION_ID, value: "14"}
|
||||||
- {name: REGION_BUILD, value: effea9180d802e50abed76a5da665374f3591eda8aeb99c0fff085ed6df618ae}
|
- {name: REGION_BUILD, value: effea9180d802e50abed76a5da665374f3591eda8aeb99c0fff085ed6df618ae}
|
||||||
# Region 13 (rules 13): cellular-v10, 60 x 60 mm at 20 C, taken through one empty tick,
|
# Region 14 (rules 13): cellular-v10, 60 x 60 mm at 20 C, taken through one empty tick,
|
||||||
# the durable upgrades to rules 11 with light, the liquid upgrade from the mounted
|
# the durable upgrades to rules 11 with light, the liquid upgrade from the mounted
|
||||||
# tuning file (whose region size must match) and the revamp upgrade from the mounted
|
# tuning file (whose region size must match) and the revamp upgrade from the mounted
|
||||||
# revamp tuning file. 9 pools (500 um radius; a pool feeds at a quarter rate; any in a
|
# revamp tuning file. 9 pools (500 um radius; a pool feeds at a quarter rate; any in a
|
||||||
@@ -50,15 +50,17 @@ spec:
|
|||||||
# at most 4,096 deposits. The current seed comes from the
|
# at most 4,096 deposits. The current seed comes from the
|
||||||
# commit. The nursery funds 64 primitive founders; rules-12 founders start at random spots
|
# commit. The nursery funds 64 primitive founders; rules-12 founders start at random spots
|
||||||
# (the 9 sites, 3 mm from pools, are the fallback).
|
# (the 9 sites, 3 mm from pools, are the fallback).
|
||||||
# Genesis is written once: keep --commit stable so every sync resolves it. The world 100
|
# Genesis is written once: keep --commit stable so every sync resolves it.
|
||||||
|
# ADR-0180 reserves IDs 900000003584-900000003615 for the 32 seeded wildlife. Their
|
||||||
|
# resources come from the nursery, leaving its remainder for players. The
|
||||||
# life allocator starts far above the unserved lineage region 1 identities (ADR-0123).
|
# life allocator starts far above the unserved lineage region 1 identities (ADR-0123).
|
||||||
- {name: REGION_OPENING, value: cellular-v10}
|
- {name: REGION_OPENING, value: cellular-v10}
|
||||||
- name: REGION_OPENING_ARGS
|
- name: REGION_OPENING_ARGS
|
||||||
value: >-
|
value: >-
|
||||||
--frame 9 --source-id 1 --commit 5a0d7b3c9e1f2a4b6c8d0e1f2a3b4c5d --light-pj 40
|
--frame 9 --source-id 1 --commit a1807b3c9e1f2a4b6c8d0e1f2a3b4c5d --light-pj 40
|
||||||
--tuning /etc/evo/tuning/cellular.tuning
|
--tuning /etc/evo/tuning/cellular.tuning
|
||||||
--revamp-tuning /etc/evo/tuning/cellular-revamp.tuning
|
--revamp-tuning /etc/evo/tuning/cellular-revamp.tuning
|
||||||
--life-allocator-start 1000000000000
|
--life-allocator-start 1000000000000 --playtest-wildlife-first-id 900000003584
|
||||||
--width-um 60000 --height-um 60000 --ambient-temperature-mk 293150
|
--width-um 60000 --height-um 60000 --ambient-temperature-mk 293150
|
||||||
--funding-energy-pj 528588800 --funding-carbon-fg 385024000
|
--funding-energy-pj 528588800 --funding-carbon-fg 385024000
|
||||||
--funding-nitrogen-fg 86016000 --funding-phosphorus-fg 44032000
|
--funding-nitrogen-fg 86016000 --funding-phosphorus-fg 44032000
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
# Cellular revamp trial values (rules 13, ADR-0179; Cellular_Revamp_Build_Plan.md).
|
# Cellular revamp trial values (rules 13, ADR-0179; Cellular_Revamp_Build_Plan.md).
|
||||||
# Same format as cellular.tuning: `key = value`, integers only, `_` may separate digits,
|
# Same format as cellular.tuning: `key = value`, integers only, `_` may separate digits,
|
||||||
# every key required exactly once. Kept in its own file so images from before rules 13
|
# core keys required exactly once; playtest.* and mutation overrides are optional.
|
||||||
# never read keys they do not know. Not yet mounted into the region; see the build plan.
|
# Mounted for new-region provisioning; an existing region retains its recorded rules.
|
||||||
tuning.version = 1
|
tuning.version = 1
|
||||||
|
|
||||||
|
# DEV opening fixture only (ADR-0180). Zero disables seeding; never replenished on restart.
|
||||||
|
# Requires an audited --playtest-wildlife-first-id range below --life-allocator-start.
|
||||||
|
playtest.starting_wildlife_cells = 32
|
||||||
|
|
||||||
# Body (body and maintenance plan).
|
# Body (body and maintenance plan).
|
||||||
body.essential_upkeep_per_mille = 250 # share of upkeep no upkeep-efficiency trait reduces
|
body.essential_upkeep_per_mille = 250 # share of upkeep no upkeep-efficiency trait reduces
|
||||||
body.reserve_load_per_mille = 1_000 # reserve matter carried as load (slower, costlier thrust)
|
body.reserve_load_per_mille = 1_000 # reserve matter carried as load (slower, costlier thrust)
|
||||||
body.growth_per_tick_centi_mille = 500 # 5 per mille of full size per tick at growth speed 100
|
body.growth_per_tick_centi_mille = 625 # 6.25 per mille per tick; 25% faster for playtesting
|
||||||
|
|
||||||
# Energy (feeding and energy plan): what 1,000 fg of reserve matter stands in for when the
|
# Energy (feeding and energy plan): what 1,000 fg of reserve matter stands in for when the
|
||||||
# reserve's energy runs out. Bubbles carry ~17 pJ of energy per fg of matter, so 2 pJ per fg
|
# reserve's energy runs out. Bubbles carry ~17 pJ of energy per fg of matter, so 2 pJ per fg
|
||||||
@@ -50,12 +54,12 @@ mutation.buds_for_adhesion = 5 # on-demand buds before Adhesion is offe
|
|||||||
# Reproduction (reproduction plan).
|
# Reproduction (reproduction plan).
|
||||||
reproduction.split_share_per_mille = 500 # the offspring's share of a mutation split
|
reproduction.split_share_per_mille = 500 # the offspring's share of a mutation split
|
||||||
reproduction.split_min_growth_per_mille = 500 # a cell splits once half grown
|
reproduction.split_min_growth_per_mille = 500 # a cell splits once half grown
|
||||||
reproduction.bud_fee_e_pj = 0 # on-demand bud fee per channel, times the scale; reclaimed
|
reproduction.bud_fee_e_pj = 250_000 # extra fee above the offspring's tissue and provision
|
||||||
reproduction.bud_fee_c_fg = 0
|
reproduction.bud_fee_c_fg = 100_000
|
||||||
reproduction.bud_fee_n_fg = 0
|
reproduction.bud_fee_n_fg = 30_000
|
||||||
reproduction.bud_fee_p_fg = 0
|
reproduction.bud_fee_p_fg = 10_000
|
||||||
reproduction.bud_fee_o_fg = 0
|
reproduction.bud_fee_o_fg = 60_000
|
||||||
reproduction.bud_fee_scale_percent = 0
|
reproduction.bud_fee_scale_percent = 100 # 0 disables the fee; 100 charges the listed amounts
|
||||||
reproduction.organism_cap = 256 # births refused at this many lives (an organism counts once)
|
reproduction.organism_cap = 256 # births refused at this many lives (an organism counts once)
|
||||||
|
|
||||||
# Multicellular organisms (reproduction plan section 6).
|
# Multicellular organisms (reproduction plan section 6).
|
||||||
|
|||||||
@@ -35,6 +35,10 @@ requirements. See [the architecture](architecture/SYSTEM_OVERVIEW.md),
|
|||||||
|
|
||||||
## Recommendations versus experiments
|
## Recommendations versus experiments
|
||||||
|
|
||||||
|
The maintainer's 2026-10-26 test request permits opt-in randomized wildlife roots
|
||||||
|
only in disposable DEV openings ([ADR-0180](adr/0180-dev-starting-wildlife.md)).
|
||||||
|
This fixture exception does not change the player-origin requirement for product worlds.
|
||||||
|
|
||||||
The maintainer clarified structural inheritance, birth-time control choice and
|
The maintainer clarified structural inheritance, birth-time control choice and
|
||||||
NPC-parent continuity on 2026-10-19 in
|
NPC-parent continuity on 2026-10-19 in
|
||||||
[ADR-0163](adr/0163-structural-inheritance-and-offspring-succession.md). These are
|
[ADR-0163](adr/0163-structural-inheritance-and-offspring-succession.md). These are
|
||||||
|
|||||||
@@ -1,5 +1,16 @@
|
|||||||
# Project status and next steps
|
# Project status and next steps
|
||||||
|
|
||||||
|
## DEV startup wildlife and Bud controls - 2026-10-26
|
||||||
|
|
||||||
|
[ADR-0180](adr/0180-dev-starting-wildlife.md) implements opt-in, nursery-funded
|
||||||
|
random-genome roots at a fresh rules-13 opening, with deterministic durable
|
||||||
|
recovery and no replenishment on restart. The DEV trial prepares region 14 with
|
||||||
|
32 cells, 25% faster funded growth and the existing per-channel budding fee knobs.
|
||||||
|
Bud disables on resource shortfall and explains all five channels on hover; the
|
||||||
|
server projection includes the inherited plan and fee. See [tuning and promotion
|
||||||
|
limits](engineering/CELLULAR_PLAYTEST_TUNING.md) and [validation](engineering/VALIDATION.md).
|
||||||
|
Source/configuration preparation is distinct from image promotion and deployment.
|
||||||
|
|
||||||
## Photosynthesis producers (ADR-0136 step C) - 2026-10-19
|
## Photosynthesis producers (ADR-0136 step C) - 2026-10-19
|
||||||
|
|
||||||
[ADR-0175](adr/0175-photosynthesis-producers.md) adds genome schema 5's photosynthesis
|
[ADR-0175](adr/0175-photosynthesis-producers.md) adds genome schema 5's photosynthesis
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# ADR-0180: Opt-in starting wildlife for disposable playtests
|
||||||
|
|
||||||
|
Accepted scoped experiment, 2026-10-26, requested by the maintainer in chat.
|
||||||
|
|
||||||
|
The vision requires player-origin lineages. Random founding wildlife conflicts with
|
||||||
|
that rule. Resolve this only for explicitly opted-in disposable DEV openings; this
|
||||||
|
does not change the product rule or authorize a World0 operation.
|
||||||
|
|
||||||
|
The optional revamp tuning key `playtest.starting_wildlife_cells` defaults to zero
|
||||||
|
and accepts 0–255, below the region's organism cap. Provisioning a nonzero count
|
||||||
|
also requires `--playtest-wildlife-first-id`, an operator-audited unused identity
|
||||||
|
range below `--life-allocator-start`. As with ADR-0123, the operator owns the
|
||||||
|
world-wide identity audit. Never use this range in another region or restored branch
|
||||||
|
of the same world. The DEV example reserves 900000003584–900000003615 for region 14.
|
||||||
|
|
||||||
|
Seeding is an explicit input to the bundle 14 -> 15 opening upgrade. It requires an
|
||||||
|
empty region at tick 1, spends nursery resources including construction heat, and
|
||||||
|
fails atomically on inadequate funding or placement. Roots are unowned test
|
||||||
|
organisms, with no fabricated player ancestry. Each begins fully grown, undamaged,
|
||||||
|
with zero spare matter and 30 seconds of full demand as energy, using the same
|
||||||
|
founder provisioning formula as players. Genome variation uses seeded, bounded
|
||||||
|
reference indices around the founder, with no acquired modules or free mutations.
|
||||||
|
|
||||||
|
The existing format-11 archive and organism records store the entire result.
|
||||||
|
Recovery first tries the historical upgrade, then, only for an empty tick-1 source,
|
||||||
|
reconstructs the fixture from the target's count and first identity and requires
|
||||||
|
byte equality. No per-tick rule, checkpoint encoding, wire version or golden
|
||||||
|
changes. Older readers can decode these checkpoints but cannot qualify this new
|
||||||
|
opening operation; retain the writing build. Existing non-fixture upgrades retain
|
||||||
|
their exact meaning. Restart and repeated provision never replenish wildlife.
|
||||||
|
|
||||||
|
Alternatives: silently seed product worlds (violates the vision); inject on every
|
||||||
|
worker start (duplicates stock and breaks history); add a general administrator
|
||||||
|
spawn protocol (unnecessary scope). Costs: an explicit exception to the no-biology
|
||||||
|
upgrade convention, extra replay qualification, and finite nursery consumption.
|
||||||
|
This is fixture coverage, not ecological balance or production qualification.
|
||||||
|
|
||||||
|
The Bud HUD consumes the server's current offspring-plan cost plus the configured
|
||||||
|
fee. Internal-cell litter displays a conservative maximum because its random draw
|
||||||
|
occurs at action time. No new simulation or wire version is needed for correcting
|
||||||
|
this derived presentation. Growth and fee changes remain new-region trial inputs.
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
# Architecture decision records
|
# Architecture decision records
|
||||||
|
|
||||||
|
- [ADR-0180: DEV starting wildlife](0180-dev-starting-wildlife.md) - opt-in, nursery-funded random-genome roots for disposable playtest openings, exact recovery and no restart replenishment; a scoped exception to player-origin biology.
|
||||||
|
|
||||||
- [ADR-0179: Cellular gameplay revamp](0179-cellular-gameplay-revamp.md) - maintainer-accepted direction for rules 13: a 49-mutation catalog with behaviour-weighted offers, mutation splits and stay-or-become reproduction, multicellular organisms and emergence, matter as energy with a region spent pool, per-channel collection, membrane points and heritable body traits; two locked-requirement questions open; implementation pending.
|
- [ADR-0179: Cellular gameplay revamp](0179-cellular-gameplay-revamp.md) - maintainer-accepted direction for rules 13: a 49-mutation catalog with behaviour-weighted offers, mutation splits and stay-or-become reproduction, multicellular organisms and emergence, matter as energy with a region spent pool, per-channel collection, membrane points and heritable body traits; two locked-requirement questions open; implementation pending.
|
||||||
|
|
||||||
- [ADR-0178: Durable liquid regions and session v13](0178-durable-liquid-region.md) - rules 12 on owner format 10 (currents, moving food, liquid motion), raw bundle 14 and schema 58 with a 13 -> 14 upgrade from the Git tuning file, the `cellular-v9` opening and session v13 (motion, currents, brake).
|
- [ADR-0178: Durable liquid regions and session v13](0178-durable-liquid-region.md) - rules 12 on owner format 10 (currents, moving food, liquid motion), raw bundle 14 and schema 58 with a 13 -> 14 upgrade from the Git tuning file, the `cellular-v9` opening and session v13 (motion, currents, brake).
|
||||||
|
|||||||
@@ -111,3 +111,9 @@ observations only; optical liquid shading is not a thermal field. Body temperatu
|
|||||||
ambient temperature and directional heat guidance remain pending authoritative
|
ambient temperature and directional heat guidance remain pending authoritative
|
||||||
phase-3 state and a negotiated perception contract. Existing public library and
|
phase-3 state and a negotiated perception contract. Existing public library and
|
||||||
wire interfaces are unchanged.
|
wire interfaces are unchanged.
|
||||||
|
|
||||||
|
The [DEV playtest tuning](../engineering/CELLULAR_PLAYTEST_TUNING.md) Bud control
|
||||||
|
uses the current server-projected charge, including the inherited plan and fee.
|
||||||
|
Insufficient funding disables it, with a hover tooltip listing required and held
|
||||||
|
energy, carbon, nitrogen, phosphorus and other matter. Internal-cell litter shows
|
||||||
|
the maximum possible charge. The server remains authoritative at execution time.
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# Cellular playtest opening controls
|
||||||
|
|
||||||
|
These trial settings live in
|
||||||
|
`deploy/kubernetes/region/dev/tuning/cellular-revamp.tuning`. They are read by
|
||||||
|
`evo-world-clone provision --opening cellular-v10 --revamp-tuning FILE`; the owner
|
||||||
|
then retains its recorded rules. Editing the file does not retune an existing
|
||||||
|
region. Open a fresh disposable region for a changed trial. See [ADR-0180](../adr/0180-dev-starting-wildlife.md).
|
||||||
|
|
||||||
|
| Key | Current DEV value | Meaning |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| `playtest.starting_wildlife_cells` | 32 | Initial random-genome cells; 0 disables; max 255 and below the organism cap. Omission defaults to 0 for older files. |
|
||||||
|
| `body.growth_per_tick_centi_mille` | 625 | 6.25 per thousand per tick at growth speed 100, up from 5: 25% faster when funded. |
|
||||||
|
| `reproduction.bud_fee_e_pj` | 250000 | Additional energy fee per bud action. |
|
||||||
|
| `reproduction.bud_fee_c_fg` | 100000 | Additional carbon fee. |
|
||||||
|
| `reproduction.bud_fee_n_fg` | 30000 | Additional nitrogen fee. |
|
||||||
|
| `reproduction.bud_fee_p_fg` | 10000 | Additional phosphorus fee. |
|
||||||
|
| `reproduction.bud_fee_o_fg` | 60000 | Additional other-matter fee. |
|
||||||
|
| `reproduction.bud_fee_scale_percent` | 100 | Percentage of the listed fee charged; 0 disables it. |
|
||||||
|
|
||||||
|
The fee controls already existed; this change activates and documents them and
|
||||||
|
corrects the displayed cost to include them. Offspring tissue and starting reserve
|
||||||
|
remain funded biological costs. Faster growth spends the same resources in less
|
||||||
|
time; insufficient nutrients can still hold it back.
|
||||||
|
|
||||||
|
The DEV manifest prepares world 100, region 14, with a new stable genesis commit
|
||||||
|
and `--playtest-wildlife-first-id 900000003584` below
|
||||||
|
`--life-allocator-start 1000000000000`. This declares a reserved fixture range;
|
||||||
|
operators must audit its uniqueness across the world's other retained regions.
|
||||||
|
Regions 1–13 remain stored. Counts other than 32 need a correspondingly audited
|
||||||
|
range and enough nursery stock. The fixture spends the nursery rather than
|
||||||
|
minting resources; player founders draw its remainder.
|
||||||
|
|
||||||
|
Each cell uses founder-6 capabilities and full growth, no damage or spare matter,
|
||||||
|
30 seconds of its own full demand as reserve energy, and a seeded genome with
|
||||||
|
75–125-point body, collection, burn, engulfment and movement indices. It has no
|
||||||
|
acquired modules, player account or fabricated ancestry. Randomness is stable
|
||||||
|
for world, region and identity. Normal autonomous wildlife control takes over.
|
||||||
|
Recovery and repeated provisioning retain the saved population, including deaths;
|
||||||
|
they do not top it up.
|
||||||
|
|
||||||
|
Bud uses the current expressed parent and inherited offspring plan, plus the fee;
|
||||||
|
internal-cell litter conservatively shows its largest possible charge. Hover a
|
||||||
|
grey Bud button to inspect every required/available channel. A resource-ready
|
||||||
|
button still submits an intention: growth, placement, regional capacity and
|
||||||
|
changes before execution can affect the authoritative outcome.
|
||||||
|
|
||||||
|
The region-14 configuration requires an image built from this change before
|
||||||
|
manual Argo sync. The currently pinned image is not claimed to support the new
|
||||||
|
opening flag. Build promotion, deployment, live playtesting and identity auditing
|
||||||
|
against production stores were not performed by these local checks. No World0
|
||||||
|
operation is involved.
|
||||||
|
|
||||||
|
Focused durable verification in a new private local PostgreSQL cluster:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
bash tools/ci/postgres-check.sh --starting-wildlife-only "$PWD/build/playtest-postgres/evo-postgres-tests"
|
||||||
|
```
|
||||||
@@ -10178,3 +10178,74 @@ Environmental limits and initial failures:
|
|||||||
|
|
||||||
The AGENTS.md-required pre-push session-window refresh is desired Git configuration
|
The AGENTS.md-required pre-push session-window refresh is desired Git configuration
|
||||||
only. No deployment, live reachability, World0 mutation or world reset is claimed.
|
only. No deployment, live reachability, World0 mutation or world reset is claimed.
|
||||||
|
|
||||||
|
## 2026-10-26 - DEV starting wildlife and resource-aware Bud
|
||||||
|
|
||||||
|
Scope: ADR-0180's explicit disposable DEV fixture, cellular opening/recovery,
|
||||||
|
server-projected budding requirements, native Bud control, and new-region tuning.
|
||||||
|
Existing unrelated drafts and untracked files were preserved. No golden, per-tick
|
||||||
|
simulation version, checkpoint encoding or wire layout changed.
|
||||||
|
|
||||||
|
Executed:
|
||||||
|
|
||||||
|
- GCC 14.2 Release with NDEBUG, configured from the release preset with client and
|
||||||
|
network enabled in build/playtest-release: complete CTest suite 122/122 passed.
|
||||||
|
Final focused UI-model/owner checks passed 2/2 after a test-only optional-access
|
||||||
|
cleanup and formatting-only correction in the affected revamp module.
|
||||||
|
- MSVC 19.44 client preset build succeeded; client CTest 10/10 passed. The final
|
||||||
|
UI-model cleanup was rebuilt and its test passed again. TMP/TEMP were directed
|
||||||
|
to ignored build/playtest-windows-tmp for local bindings-file checks.
|
||||||
|
- Clang 19 ASan+UBSan, existing asan-preset build/client-asan: focused tuning,
|
||||||
|
owner, UI-model and native panel checks 4/4 passed; final UI-model cleanup 1/1.
|
||||||
|
- PostgreSQL 18.6, GCC 14 Release with the existing prepared dependency:
|
||||||
|
tools/ci/postgres-check.sh --starting-wildlife-only against
|
||||||
|
build/playtest-postgres/evo-postgres-tests passed in a fresh private local
|
||||||
|
cluster. It published an empty genesis and all prerequisite upgrades, seeded
|
||||||
|
32 funded roots, replaced the lease, recovered byte-identical state, published
|
||||||
|
a real wildlife tick and replayed it identically without adding more cells.
|
||||||
|
- Parser/owner coverage includes optional count default zero, count bounds,
|
||||||
|
deterministic genome/placement, ordinary founder endowment rules, exact
|
||||||
|
conservation, refusal on inadequate nursery stock, invalid identities and
|
||||||
|
repeated seeding, and restored continuation. Cost checks include the fee;
|
||||||
|
UI checks cover all five shortfall channels and exact affordability equality.
|
||||||
|
- Native panels exercise 640x480, 960x640 and 1280x800, including the production
|
||||||
|
disabled Bud hover tooltip, refusal to click while short, and funded clicking.
|
||||||
|
A cost-aware fixture exposed Vitals gaining horizontal overflow after restore;
|
||||||
|
fixed content width and a reserved vertical scrollbar resolved it.
|
||||||
|
- Repository format-check passed with clang-format 19. A pre-existing formatting
|
||||||
|
violation in the affected cellular_revamp.cpp was corrected. git diff --check
|
||||||
|
passed. Rendered deployment policy passed (75 source objects, 140 rendered
|
||||||
|
objects, 17 overlays); its 50-case fail-closed self-test passed.
|
||||||
|
|
||||||
|
Limits and initial failures:
|
||||||
|
|
||||||
|
- The Windows debug build stopped with MSVC C1902 (program-database manager
|
||||||
|
mismatch) before compiling the changed code; the Windows Release client build
|
||||||
|
and Linux Release/sanitizer builds succeeded. No debug pass is claimed.
|
||||||
|
- Initial compiler and static-analysis failures (a missing draft initializer and
|
||||||
|
optional-access checks), plus the native layout/hover fixture failures, were
|
||||||
|
corrected before the successful checks above. An initial sanitizer compile
|
||||||
|
overlapped a header formatting write; the stable-source rerun passed.
|
||||||
|
- These are local fixtures, not live gameplay, ecological balance, hardware
|
||||||
|
performance, or production-store identity-audit evidence. DEV region 14 needs
|
||||||
|
a compatible image promotion before manual Argo sync. No deployment, live
|
||||||
|
reachability, World0 change, reset or pruning was performed. The AGENTS.md
|
||||||
|
pre-push session-window refresh is desired Git configuration only.
|
||||||
|
|
||||||
|
Final static analysis: the analysis preset in build/playtest-analysis built the
|
||||||
|
changed lifecycle, tuning, persistence, bootstrap and client targets, plus their
|
||||||
|
regressions, with clang-tidy 19 and warnings as errors. Its focused CTests passed
|
||||||
|
5/5 and the isolated PostgreSQL opening/recovery check passed again. A pre-existing
|
||||||
|
unchecked optional access in the touched UI-model test was rewritten through its
|
||||||
|
existing checked helper. Changed C++ files also passed clang-format 19 dry-run.
|
||||||
|
The actual QUIC-enabled evo-server also built successfully in build/tidy-postgres.
|
||||||
|
A separate clang-tidy-19 run on its main translation unit, with an explicit
|
||||||
|
cellular_bridge.hpp header filter and warnings as errors, passed. It required a
|
||||||
|
pre-existing optional-feedback access to be made local before checking/reading.
|
||||||
|
The bridge header passed the Linux clang-format 19 dry-run (minor formatter
|
||||||
|
versions differ on an existing multiline lambda's wrapping).
|
||||||
|
|
||||||
|
Publication limit: the scoped commit was created locally, but the configured HTTPS
|
||||||
|
remote rejected git push with an authentication failure. Git Credential Manager
|
||||||
|
is configured; no stored credential was deleted or changed. A user-authorized retry uses credentials supplied outside the repository. Unrelated drafts and untracked files
|
||||||
|
remain outside the commit.
|
||||||
|
|||||||
@@ -13,14 +13,16 @@
|
|||||||
|
|
||||||
// Git-managed trial values for the cellular revamp (rules 13, ADR-0179), in their own file
|
// Git-managed trial values for the cellular revamp (rules 13, ADR-0179), in their own file
|
||||||
// beside the rules-12 tuning file so older images never meet keys they do not know. Same
|
// beside the rules-12 tuning file so older images never meet keys they do not know. Same
|
||||||
// format and rules: plain `key = value` integer lines, every key required exactly once and
|
// format: plain `key = value` integer lines, range-checked; core keys required once,
|
||||||
// range-checked. Later build phases add feeding, mutation and reproduction keys.
|
// per-mutation overrides and the zero-default DEV opening count optional.
|
||||||
namespace evo::biology {
|
namespace evo::biology {
|
||||||
inline constexpr std::int64_t cellular_revamp_tuning_version = 1;
|
inline constexpr std::int64_t cellular_revamp_tuning_version = 1;
|
||||||
inline constexpr std::size_t max_cellular_revamp_tuning_bytes = std::size_t{256} * 1'024;
|
inline constexpr std::size_t max_cellular_revamp_tuning_bytes = std::size_t{256} * 1'024;
|
||||||
|
|
||||||
struct CellularRevampTuning {
|
struct CellularRevampTuning {
|
||||||
std::int64_t version{};
|
std::int64_t version{};
|
||||||
|
// Optional DEV opening fixture; zero preserves unseeded, player-origin worlds.
|
||||||
|
std::int64_t playtest_starting_wildlife_cells{};
|
||||||
// Body: the share of upkeep no upkeep-efficiency trait reduces.
|
// Body: the share of upkeep no upkeep-efficiency trait reduces.
|
||||||
std::int64_t body_essential_upkeep_per_mille{};
|
std::int64_t body_essential_upkeep_per_mille{};
|
||||||
// Body: share of reserve matter carried as load on handling and thrust costs.
|
// Body: share of reserve matter carried as load on handling and thrust costs.
|
||||||
|
|||||||
@@ -297,7 +297,9 @@ migrate_cellular_liquid_profile(Postgres&, const FilesystemObjectStore&, const L
|
|||||||
migrate_cellular_revamp_profile(Postgres&, const FilesystemObjectStore&, const LeaseGrant&,
|
migrate_cellular_revamp_profile(Postgres&, const FilesystemObjectStore&, const LeaseGrant&,
|
||||||
const CommittedCheckpoint&, Uuid commit, const Sha256Digest& build,
|
const CommittedCheckpoint&, Uuid commit, const Sha256Digest& build,
|
||||||
const server::CellularRevampRules& rules,
|
const server::CellularRevampRules& rules,
|
||||||
std::chrono::milliseconds timeout, const PublishHooks& hooks = {});
|
std::chrono::milliseconds timeout, const PublishHooks& hooks = {},
|
||||||
|
std::uint32_t playtest_wildlife_count = 0,
|
||||||
|
std::uint64_t playtest_first_identity = 0);
|
||||||
// Verify the recorded no-tick operation under current authority, replaying its
|
// Verify the recorded no-tick operation under current authority, replaying its
|
||||||
// entire source/target payload. Version upgrades and profile transitions retain
|
// entire source/target payload. Version upgrades and profile transitions retain
|
||||||
// separate evidence; neither is inferred solely from the target tuple.
|
// separate evidence; neither is inferred solely from the target tuple.
|
||||||
|
|||||||
@@ -310,7 +310,8 @@ cellular_liquid_upgrade_payload(std::span<const std::uint8_t> payload,
|
|||||||
const CheckpointManifest& predecessor,
|
const CheckpointManifest& predecessor,
|
||||||
const server::CellularLiquidRules& rules);
|
const server::CellularLiquidRules& rules);
|
||||||
// Rules 13 (ADR-0179): explicit raw-only bundle 14 -> 15 upgrade declaring the revamp rules
|
// Rules 13 (ADR-0179): explicit raw-only bundle 14 -> 15 upgrade declaring the revamp rules
|
||||||
// from the Git tuning file. The rules are the only input; recovery reads them from the target.
|
// from the Git tuning file. ADR-0180 also admits an explicit empty-opening fixture;
|
||||||
|
// recovery reads its count/first identity from the target and re-derives every byte.
|
||||||
[[nodiscard]] std::expected<CheckpointManifest, CheckpointError>
|
[[nodiscard]] std::expected<CheckpointManifest, CheckpointError>
|
||||||
cellular_revamp_upgrade_manifest(const CheckpointManifest& predecessor,
|
cellular_revamp_upgrade_manifest(const CheckpointManifest& predecessor,
|
||||||
const Sha256Digest& predecessor_digest, Uuid commit,
|
const Sha256Digest& predecessor_digest, Uuid commit,
|
||||||
@@ -319,7 +320,9 @@ cellular_revamp_upgrade_manifest(const CheckpointManifest& predecessor,
|
|||||||
[[nodiscard]] std::expected<std::vector<std::uint8_t>, CheckpointError>
|
[[nodiscard]] std::expected<std::vector<std::uint8_t>, CheckpointError>
|
||||||
cellular_revamp_upgrade_payload(std::span<const std::uint8_t> payload,
|
cellular_revamp_upgrade_payload(std::span<const std::uint8_t> payload,
|
||||||
const CheckpointManifest& predecessor,
|
const CheckpointManifest& predecessor,
|
||||||
const server::CellularRevampRules& rules);
|
const server::CellularRevampRules& rules,
|
||||||
|
std::uint32_t playtest_wildlife_count = 0,
|
||||||
|
std::uint64_t playtest_first_identity = 0);
|
||||||
// ADR-0174: explicit one-way, no-tick profile 5 -> 6 transition. The payload wraps the
|
// ADR-0174: explicit one-way, no-tick profile 5 -> 6 transition. The payload wraps the
|
||||||
// identical population with its declared environment; bundle and policy are unchanged.
|
// identical population with its declared environment; bundle and policy are unchanged.
|
||||||
[[nodiscard]] std::expected<CheckpointManifest, CheckpointError>
|
[[nodiscard]] std::expected<CheckpointManifest, CheckpointError>
|
||||||
|
|||||||
@@ -346,9 +346,15 @@ class CellularLives {
|
|||||||
liquid_upgrade_candidate(const CellularLiquidRules& rules) const;
|
liquid_upgrade_candidate(const CellularLiquidRules& rules) const;
|
||||||
// Rules 13: explicit no-tick format-10/rules-12 -> format-11/rules-13 upgrade declaring the
|
// Rules 13: explicit no-tick format-10/rules-12 -> format-11/rules-13 upgrade declaring the
|
||||||
// region's revamp rules. Existing lives keep their genomes; founders born afterwards are
|
// region's revamp rules. Existing lives keep their genomes; founders born afterwards are
|
||||||
// founder 6.
|
// founder 6. ADR-0180 optionally seeds nursery-funded DEV roots in an empty tick-1
|
||||||
|
// opening. Count zero with first identity zero retains the historical upgrade.
|
||||||
[[nodiscard]] std::expected<std::unique_ptr<CellularLives>, CellularLivesError>
|
[[nodiscard]] std::expected<std::unique_ptr<CellularLives>, CellularLivesError>
|
||||||
revamp_upgrade_candidate(const CellularRevampRules& rules) const;
|
revamp_upgrade_candidate(const CellularRevampRules& rules,
|
||||||
|
std::uint32_t playtest_wildlife_count = 0,
|
||||||
|
std::uint64_t playtest_first_identity = 0) const;
|
||||||
|
// Exact displayed charge, including inherited plan, rules-13 fee and internal tissue.
|
||||||
|
// Internal litter reports the maximum possible charge (the draw occurs at action time).
|
||||||
|
[[nodiscard]] std::optional<accounting::Inventory> budding_cost(std::uint64_t life_id) const;
|
||||||
// Format 11: the declared revamp rules (defaults before).
|
// Format 11: the declared revamp rules (defaults before).
|
||||||
[[nodiscard]] const CellularRevampRules& revamp_rules() const noexcept;
|
[[nodiscard]] const CellularRevampRules& revamp_rules() const noexcept;
|
||||||
// Format 10: the declared liquid rules and the current field they generate (null before).
|
// Format 10: the declared liquid rules and the current field they generate (null before).
|
||||||
|
|||||||
@@ -23,6 +23,14 @@ energy (matter only; the energy entry is zero).
|
|||||||
|
|
||||||
Without an owner life every field is zero.
|
Without an owner life every field is zero.
|
||||||
|
|
||||||
|
The inherited prefix's bud-cost fields project the current expressed parent and
|
||||||
|
offspring-plan investment plus the region's configured fee. For an organism's
|
||||||
|
internal-cell bud they project tissue construction and fee for the largest
|
||||||
|
possible litter, since the draw happens at execution time. Zero cost means that
|
||||||
|
requirements are unavailable or the genome cannot bud. This corrects derived
|
||||||
|
values without changing the wire layout. Clients may disable Bud when any reserve
|
||||||
|
channel is below the projected requirement; the server still decides the result.
|
||||||
|
|
||||||
**Cellular action.** Byte 37 (the v13 flags) adds bit 1 become (only with a bud: the player
|
**Cellular action.** Byte 37 (the v13 flags) adds bit 1 become (only with a bud: the player
|
||||||
continues as the bud) and bit 2 emerge (only with no target). Byte 38 is the exclusion mask
|
continues as the bud) and bit 2 emerge (only with no target). Byte 38 is the exclusion mask
|
||||||
(0-15). The canonical 24-byte action input stores them as byte 13 bits 1-2 and byte 14
|
(0-15). The canonical 24-byte action input stores them as byte 13 bits 1-2 and byte 14
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ constexpr std::int64_t amount_limit = 1'000'000'000'000'000'000; // pJ or fg per
|
|||||||
// Schema order is the canonical encoding order.
|
// Schema order is the canonical encoding order.
|
||||||
constexpr std::array fields{
|
constexpr std::array fields{
|
||||||
Field{"tuning.version", &CellularRevampTuning::version, 1, 1'000},
|
Field{"tuning.version", &CellularRevampTuning::version, 1, 1'000},
|
||||||
|
Field{"playtest.starting_wildlife_cells",
|
||||||
|
&CellularRevampTuning::playtest_starting_wildlife_cells, 0, 255},
|
||||||
Field{"body.essential_upkeep_per_mille", &CellularRevampTuning::body_essential_upkeep_per_mille,
|
Field{"body.essential_upkeep_per_mille", &CellularRevampTuning::body_essential_upkeep_per_mille,
|
||||||
0, 1'000},
|
0, 1'000},
|
||||||
Field{"body.reserve_load_per_mille", &CellularRevampTuning::body_reserve_load_per_mille, 0,
|
Field{"body.reserve_load_per_mille", &CellularRevampTuning::body_reserve_load_per_mille, 0,
|
||||||
@@ -244,12 +246,15 @@ parse_cellular_revamp_tuning(std::string_view text) {
|
|||||||
tuning.*field.member = *value;
|
tuning.*field.member = *value;
|
||||||
}
|
}
|
||||||
for (std::size_t index = 0; index < fields.size(); ++index)
|
for (std::size_t index = 0; index < fields.size(); ++index)
|
||||||
if (!seen.at(index))
|
if (!seen.at(index) && fields.at(index).key != "playtest.starting_wildlife_cells")
|
||||||
return std::unexpected{
|
return std::unexpected{
|
||||||
error(CellularTuningErrorKind::missing_key, 0, fields.at(index).key)};
|
error(CellularTuningErrorKind::missing_key, 0, fields.at(index).key)};
|
||||||
if (tuning.version != cellular_revamp_tuning_version)
|
if (tuning.version != cellular_revamp_tuning_version)
|
||||||
return std::unexpected{
|
return std::unexpected{
|
||||||
error(CellularTuningErrorKind::unsupported_version, 0, "tuning.version")};
|
error(CellularTuningErrorKind::unsupported_version, 0, "tuning.version")};
|
||||||
|
if (tuning.playtest_starting_wildlife_cells >= tuning.reproduction_organism_cap)
|
||||||
|
return std::unexpected{
|
||||||
|
error(CellularTuningErrorKind::inconsistent, 0, "playtest.starting_wildlife_cells")};
|
||||||
if (tuning.mutation_floor_ppm > tuning.mutation_cap_ppm ||
|
if (tuning.mutation_floor_ppm > tuning.mutation_cap_ppm ||
|
||||||
tuning.mutation_min_points >= tuning.mutation_max_points)
|
tuning.mutation_min_points >= tuning.mutation_max_points)
|
||||||
return std::unexpected{
|
return std::unexpected{
|
||||||
|
|||||||
@@ -403,11 +403,13 @@ std::expected<CommittedCheckpoint, CellularProfileMigrationFailure> migrate_cell
|
|||||||
std::expected<CommittedCheckpoint, CellularProfileMigrationFailure> migrate_cellular_revamp_profile(
|
std::expected<CommittedCheckpoint, CellularProfileMigrationFailure> migrate_cellular_revamp_profile(
|
||||||
Postgres& db, const FilesystemObjectStore& objects, const LeaseGrant& lease,
|
Postgres& db, const FilesystemObjectStore& objects, const LeaseGrant& lease,
|
||||||
const CommittedCheckpoint& predecessor, Uuid commit, const Sha256Digest& build,
|
const CommittedCheckpoint& predecessor, Uuid commit, const Sha256Digest& build,
|
||||||
const server::CellularRevampRules& rules, milliseconds timeout, const PublishHooks& hooks) {
|
const server::CellularRevampRules& rules, milliseconds timeout, const PublishHooks& hooks,
|
||||||
|
std::uint32_t count, std::uint64_t first) {
|
||||||
return migrate_rules_profile(
|
return migrate_rules_profile(
|
||||||
db, objects, lease, predecessor, commit, build, timeout, hooks,
|
db, objects, lease, predecessor, commit, build, timeout, hooks,
|
||||||
[rules](std::span<const std::uint8_t> payload, const CheckpointManifest& previous) {
|
[rules, count, first](std::span<const std::uint8_t> payload,
|
||||||
return cellular_revamp_upgrade_payload(payload, previous, rules);
|
const CheckpointManifest& previous) {
|
||||||
|
return cellular_revamp_upgrade_payload(payload, previous, rules, count, first);
|
||||||
},
|
},
|
||||||
cellular_revamp_upgrade_manifest);
|
cellular_revamp_upgrade_manifest);
|
||||||
}
|
}
|
||||||
@@ -722,6 +724,13 @@ verify_cellular_no_tick_checkpoint(Postgres& db, const FilesystemObjectStore& ob
|
|||||||
if (!target)
|
if (!target)
|
||||||
return fail(RecoveryError::payload);
|
return fail(RecoveryError::payload);
|
||||||
auto upgraded = cellular_revamp_upgrade_payload(*bytes, *source, (*target)->revamp_rules());
|
auto upgraded = cellular_revamp_upgrade_payload(*bytes, *source, (*target)->revamp_rules());
|
||||||
|
if (upgraded && !std::ranges::equal(*upgraded, payload) && !(*target)->lives().empty()) {
|
||||||
|
// ADR-0180: the only additional opening input is the explicit fixture identity range.
|
||||||
|
upgraded = cellular_revamp_upgrade_payload(
|
||||||
|
*bytes, *source, (*target)->revamp_rules(),
|
||||||
|
static_cast<std::uint32_t>((*target)->lives().size()),
|
||||||
|
(*target)->lives().front().identity.life);
|
||||||
|
}
|
||||||
if (!upgraded || !std::ranges::equal(*upgraded, payload))
|
if (!upgraded || !std::ranges::equal(*upgraded, payload))
|
||||||
return fail(RecoveryError::history);
|
return fail(RecoveryError::history);
|
||||||
} else if (liquid) {
|
} else if (liquid) {
|
||||||
|
|||||||
@@ -261,10 +261,9 @@ cellular_revamp_upgrade_manifest(const CheckpointManifest& previous,
|
|||||||
return upgrade_manifest(previous, previous_digest, commit, lease, build, bytes, digest,
|
return upgrade_manifest(previous, previous_digest, commit, lease, build, bytes, digest,
|
||||||
cellular_v14_versions, cellular_v15_versions);
|
cellular_v14_versions, cellular_v15_versions);
|
||||||
}
|
}
|
||||||
std::expected<std::vector<std::uint8_t>, CheckpointError>
|
std::expected<std::vector<std::uint8_t>, CheckpointError> cellular_revamp_upgrade_payload(
|
||||||
cellular_revamp_upgrade_payload(std::span<const std::uint8_t> payload,
|
std::span<const std::uint8_t> payload, const CheckpointManifest& previous,
|
||||||
const CheckpointManifest& previous,
|
const server::CellularRevampRules& rules, std::uint32_t count, std::uint64_t first) {
|
||||||
const server::CellularRevampRules& rules) {
|
|
||||||
if (!supported(previous) || previous.profile != CheckpointProfile::cellular_lives_v1 ||
|
if (!supported(previous) || previous.profile != CheckpointProfile::cellular_lives_v1 ||
|
||||||
previous.cellular_versions != cellular_v14_versions)
|
previous.cellular_versions != cellular_v14_versions)
|
||||||
return std::unexpected(CheckpointError::unsupported);
|
return std::unexpected(CheckpointError::unsupported);
|
||||||
@@ -273,7 +272,7 @@ cellular_revamp_upgrade_payload(std::span<const std::uint8_t> payload,
|
|||||||
auto state = restore_cellular_payload(payload, previous);
|
auto state = restore_cellular_payload(payload, previous);
|
||||||
if (!state)
|
if (!state)
|
||||||
return std::unexpected(state.error());
|
return std::unexpected(state.error());
|
||||||
auto upgraded = (*state)->revamp_upgrade_candidate(rules);
|
auto upgraded = (*state)->revamp_upgrade_candidate(rules, count, first);
|
||||||
if (!upgraded)
|
if (!upgraded)
|
||||||
return std::unexpected(CheckpointError::payload);
|
return std::unexpected(CheckpointError::payload);
|
||||||
return (*upgraded)->snapshot();
|
return (*upgraded)->snapshot();
|
||||||
|
|||||||
@@ -1281,7 +1281,8 @@ const CellularLiquidRules& CellularLives::liquid_rules() const noexcept {
|
|||||||
return state_->liquid;
|
return state_->liquid;
|
||||||
}
|
}
|
||||||
std::expected<std::unique_ptr<CellularLives>, CellularLivesError>
|
std::expected<std::unique_ptr<CellularLives>, CellularLivesError>
|
||||||
CellularLives::revamp_upgrade_candidate(const CellularRevampRules& rules) const {
|
CellularLives::revamp_upgrade_candidate(const CellularRevampRules& rules, std::uint32_t count,
|
||||||
|
std::uint64_t first) const {
|
||||||
if (state_->format_version != cellular_lives_liquid_format ||
|
if (state_->format_version != cellular_lives_liquid_format ||
|
||||||
state_->rules_version != cellular_lives_liquid_rules)
|
state_->rules_version != cellular_lives_liquid_rules)
|
||||||
return std::unexpected{CellularLivesError::version};
|
return std::unexpected{CellularLivesError::version};
|
||||||
@@ -1294,7 +1295,154 @@ CellularLives::revamp_upgrade_candidate(const CellularRevampRules& rules) const
|
|||||||
next.format_version = cellular_lives_revamp_format;
|
next.format_version = cellular_lives_revamp_format;
|
||||||
next.rules_version = cellular_lives_revamp_rules;
|
next.rules_version = cellular_lives_revamp_rules;
|
||||||
next.revamp = rules;
|
next.revamp = rules;
|
||||||
return candidate;
|
if (count == 0)
|
||||||
|
return first == 0 ? std::move(candidate) : std::unexpected{CellularLivesError::identity};
|
||||||
|
// ADR-0180: only an explicit, empty opening may contain fixture roots.
|
||||||
|
if (tick() != 1 || !next.lives.empty() || !next.corpses.empty() ||
|
||||||
|
next.archive.archived() != 0 || count >= rules.organism_cap || count > 255 || first == 0 ||
|
||||||
|
first > cellular_bud_namespace - count)
|
||||||
|
return std::unexpected{CellularLivesError::invalid_config};
|
||||||
|
for (std::uint32_t index = 0; index < count; ++index) {
|
||||||
|
const auto id = first + index;
|
||||||
|
const auto founder = biology::primitive_founder(id, id, biology::primitive_founder_v6);
|
||||||
|
if (!founder)
|
||||||
|
return std::unexpected{CellularLivesError::biology};
|
||||||
|
biology::GenomeDraft draft{
|
||||||
|
.id = id,
|
||||||
|
.origin_event = id,
|
||||||
|
.development_version = 7,
|
||||||
|
.parents = {},
|
||||||
|
.capabilities = {founder->capabilities().begin(), founder->capabilities().end()},
|
||||||
|
.schema_version = biology::genome_schema_v7,
|
||||||
|
.movement_arrangement = biology::founder_movement_arrangement,
|
||||||
|
.cellular_traits = biology::founder_cellular_traits};
|
||||||
|
Random random{mutation_seed(world(), region(), id, 0x57494C44U)};
|
||||||
|
const auto points = [&] { return static_cast<std::uint16_t>(75 + random.next() % 51); };
|
||||||
|
auto& traits = *draft.cellular_traits;
|
||||||
|
traits.density = points();
|
||||||
|
traits.upkeep_efficiency = points();
|
||||||
|
traits.growth_speed = points();
|
||||||
|
for (auto& channel : traits.collection)
|
||||||
|
channel = points();
|
||||||
|
for (auto& channel : traits.burn)
|
||||||
|
channel = points();
|
||||||
|
traits.engulf_capacity = points();
|
||||||
|
traits.kill_absorption = points();
|
||||||
|
auto& movement = *draft.movement_arrangement;
|
||||||
|
movement.output = points();
|
||||||
|
movement.efficiency = points();
|
||||||
|
movement.steering = points();
|
||||||
|
movement.streamlining = points();
|
||||||
|
movement.braking = points();
|
||||||
|
movement.coasting = points();
|
||||||
|
const auto genome = biology::Genome::create(draft);
|
||||||
|
const auto budget =
|
||||||
|
genome ? biology::metabolic_budget(*genome, {1000, 0},
|
||||||
|
{next.config.ambient_temperature_millikelvin, {}},
|
||||||
|
1000, rules.body)
|
||||||
|
: std::unexpected{biology::DevelopmentError::overflow};
|
||||||
|
if (!budget)
|
||||||
|
return std::unexpected{CellularLivesError::biology};
|
||||||
|
// A normal founder's starting provision, evaluated for its randomized genome.
|
||||||
|
const accounting::Inventory reserve{
|
||||||
|
{budget->demand.value * biology::founder_reserve_seconds}, {}};
|
||||||
|
auto empty_body = accounting::Inventory{};
|
||||||
|
auto nursery = next.nursery;
|
||||||
|
auto heat = next.heat;
|
||||||
|
const auto development = biology::rules_for(genome->development_version());
|
||||||
|
if (!development || !subtract_inventory(nursery, reserve) ||
|
||||||
|
!rebody(empty_body, nursery, heat, budget->body,
|
||||||
|
development->construction_per_kilogram))
|
||||||
|
return std::unexpected{CellularLivesError::insufficient_funding};
|
||||||
|
const auto extent = budget->phenotype.extent;
|
||||||
|
if (next.config.area.width_um <= extent + 2000 ||
|
||||||
|
next.config.area.height_um <= extent + 2000)
|
||||||
|
return std::unexpected{CellularLivesError::no_placement};
|
||||||
|
std::optional<biology::CellularPosition> position;
|
||||||
|
for (int attempt = 0; attempt < 1024 && !position; ++attempt) {
|
||||||
|
const biology::CellularPosition spot{
|
||||||
|
1000 + random.next() % (next.config.area.width_um - extent - 2000),
|
||||||
|
1000 + random.next() % (next.config.area.height_um - extent - 2000)};
|
||||||
|
bool occupied = false;
|
||||||
|
for (const auto& other : next.lives) {
|
||||||
|
const auto body = budget_for(
|
||||||
|
next.archive, other, next.config.ambient_temperature_millikelvin, rules.body);
|
||||||
|
if (!body)
|
||||||
|
return std::unexpected{CellularLivesError::biology};
|
||||||
|
const auto side = body->phenotype.extent;
|
||||||
|
occupied = occupied || (spot.x_um < other.position.x_um + side &&
|
||||||
|
other.position.x_um < spot.x_um + extent &&
|
||||||
|
spot.y_um < other.position.y_um + side &&
|
||||||
|
other.position.y_um < spot.y_um + extent);
|
||||||
|
}
|
||||||
|
if (!occupied)
|
||||||
|
position = spot;
|
||||||
|
}
|
||||||
|
if (!position)
|
||||||
|
return std::unexpected{CellularLivesError::no_placement};
|
||||||
|
if (!next.archive.admit(*genome) || !next.archive.record_birth(id, id, {tick()}))
|
||||||
|
return std::unexpected{CellularLivesError::archive};
|
||||||
|
CellularOwnedLife life{};
|
||||||
|
life.identity = {id, id, id, id, {tick()}};
|
||||||
|
life.source = next.nursery_config.source;
|
||||||
|
life.growth = {1000, 0};
|
||||||
|
life.position = *position;
|
||||||
|
life.body = budget->body;
|
||||||
|
life.reserve = reserve;
|
||||||
|
life.offspring_genome = id;
|
||||||
|
next.lives.push_back(life);
|
||||||
|
next.nursery = nursery;
|
||||||
|
next.nursery_config.funding = nursery;
|
||||||
|
next.heat = heat;
|
||||||
|
}
|
||||||
|
// Restore validates bodies, identities, history and channel-by-channel closure.
|
||||||
|
return restore((*candidate)->snapshot(), world(), region(), frame(), tick());
|
||||||
|
}
|
||||||
|
|
||||||
|
std::optional<accounting::Inventory> CellularLives::budding_cost(std::uint64_t id) const {
|
||||||
|
const auto life =
|
||||||
|
std::ranges::find(state_->lives, id, [](const auto& value) { return value.identity.life; });
|
||||||
|
if (life == state_->lives.end())
|
||||||
|
return std::nullopt;
|
||||||
|
const auto parent = state_->archive.find(life->identity.genome);
|
||||||
|
const auto child = state_->archive.find(cellular_offspring_genome(*life));
|
||||||
|
if (!parent || !child)
|
||||||
|
return std::nullopt;
|
||||||
|
if (state_->rules_version < cellular_lives_revamp_rules)
|
||||||
|
return biology::offspring_cost(*parent, *child, ambient_temperature_millikelvin());
|
||||||
|
auto cost =
|
||||||
|
cellular_mutation_cost({.cost = state_->revamp.bud_fee,
|
||||||
|
.cost_scale_percent = state_->revamp.bud_fee_scale_percent});
|
||||||
|
if (life->revamp.members == 1) {
|
||||||
|
const auto investment =
|
||||||
|
biology::offspring_cost(*parent, *child, ambient_temperature_millikelvin());
|
||||||
|
if (!investment || !add_inventory(cost, *investment))
|
||||||
|
return std::nullopt;
|
||||||
|
} else {
|
||||||
|
const auto traits = parent->cellular_traits().value_or(biology::founder_cellular_traits);
|
||||||
|
const auto added = std::min<std::uint32_t>(1 + (traits.litter + 99U) / 100U,
|
||||||
|
1 + state_->revamp.bounds.max_litter / 100U);
|
||||||
|
const auto grown = organism_genome(*parent, life->revamp.members + added);
|
||||||
|
const auto target = grown
|
||||||
|
? biology::metabolic_budget(*grown, life->growth,
|
||||||
|
{ambient_temperature_millikelvin(), {}},
|
||||||
|
1000, state_->revamp.body)
|
||||||
|
: std::unexpected{biology::DevelopmentError::overflow};
|
||||||
|
const auto development = biology::rules_for(parent->development_version());
|
||||||
|
if (!target || !development)
|
||||||
|
return std::nullopt;
|
||||||
|
std::uint64_t mass{};
|
||||||
|
for (std::size_t c = 0; c < cost.matter.size(); ++c) {
|
||||||
|
const auto difference = target->body.matter[c].value > life->body.matter[c].value
|
||||||
|
? target->body.matter[c].value - life->body.matter[c].value
|
||||||
|
: 0;
|
||||||
|
cost.matter[c].value += difference;
|
||||||
|
mass += difference;
|
||||||
|
}
|
||||||
|
const auto price = development->construction_per_kilogram;
|
||||||
|
cost.energy.value += mass / 1000 * price + mass % 1000 * price / 1000;
|
||||||
|
}
|
||||||
|
return cost;
|
||||||
}
|
}
|
||||||
const CellularRevampRules& CellularLives::revamp_rules() const noexcept {
|
const CellularRevampRules& CellularLives::revamp_rules() const noexcept {
|
||||||
return state_->revamp;
|
return state_->revamp;
|
||||||
|
|||||||
@@ -51,9 +51,8 @@ bool cellular_revamp_valid(const CellularRevampRules& rules) noexcept {
|
|||||||
rules.split_share_per_thousand < 1'000 && rules.split_min_growth != 0 &&
|
rules.split_share_per_thousand < 1'000 && rules.split_min_growth != 0 &&
|
||||||
rules.split_min_growth <= 1'000 && rules.bud_fee_scale_percent <= 100 &&
|
rules.split_min_growth <= 1'000 && rules.bud_fee_scale_percent <= 100 &&
|
||||||
rules.bud_fee.energy.value <= most &&
|
rules.bud_fee.energy.value <= most &&
|
||||||
std::ranges::all_of(
|
std::ranges::all_of(rules.bud_fee.matter,
|
||||||
rules.bud_fee.matter,
|
[](const accounting::Femtograms& f) { return f.value <= most; }) &&
|
||||||
[](const accounting::Femtograms& f) { return f.value <= most; }) &&
|
|
||||||
rules.organism_cap != 0 && rules.organism_cap <= biology::max_cellular_tick_lives &&
|
rules.organism_cap != 0 && rules.organism_cap <= biology::max_cellular_tick_lives &&
|
||||||
rules.organism_load_per_thousand <= 10'000 && rules.emerge_members >= 2 &&
|
rules.organism_load_per_thousand <= 10'000 && rules.emerge_members >= 2 &&
|
||||||
rules.emerge_members <= 10'000 && rules.emerge_mass_fg <= most &&
|
rules.emerge_members <= 10'000 && rules.emerge_mass_fg <= most &&
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "evo/persistence/life_reservation_store.hpp"
|
#include "evo/persistence/life_reservation_store.hpp"
|
||||||
#include "evo/persistence/sha256.hpp"
|
#include "evo/persistence/sha256.hpp"
|
||||||
#include "evo/server/cellular_region_host.hpp"
|
#include "evo/server/cellular_region_host.hpp"
|
||||||
|
#include "fixtures/cellular_ecology.hpp"
|
||||||
#ifdef EVO_POSTGRES_M10
|
#ifdef EVO_POSTGRES_M10
|
||||||
#include "evo/server/cellular_session_batch.hpp"
|
#include "evo/server/cellular_session_batch.hpp"
|
||||||
#endif
|
#endif
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
void run_cellular_publication_tests();
|
void run_cellular_publication_tests();
|
||||||
|
void run_starting_wildlife_publication_tests();
|
||||||
namespace {
|
namespace {
|
||||||
using namespace evo::persistence;
|
using namespace evo::persistence;
|
||||||
using namespace evo::server;
|
using namespace evo::server;
|
||||||
@@ -1221,6 +1223,7 @@ void cellular_death_is_final_and_account_restarts() {
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void run_cellular_publication_tests() {
|
void run_cellular_publication_tests() {
|
||||||
|
run_starting_wildlife_publication_tests();
|
||||||
cellular_birth_publication_is_durable();
|
cellular_birth_publication_is_durable();
|
||||||
cellular_profile_migration_is_durable_and_recovers_without_a_tick();
|
cellular_profile_migration_is_durable_and_recovers_without_a_tick();
|
||||||
cellular_mutation_publication_binds_results();
|
cellular_mutation_publication_binds_results();
|
||||||
@@ -1412,3 +1415,86 @@ void run_cellular_publication_tests() {
|
|||||||
restarted_committed_value.head.sequence == 2);
|
restarted_committed_value.head.sequence == 2);
|
||||||
restarted->drain();
|
restarted->drain();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void run_starting_wildlife_publication_tests() {
|
||||||
|
auto source = evo::fixture::opening(980, true, 64, false, 14);
|
||||||
|
const RegionKey key{source->world(), source->region()};
|
||||||
|
auto owner = connect_as(env("PGUSER"));
|
||||||
|
auto runtime = connect_as(env("EVO_PG_RUNTIME_USER"));
|
||||||
|
const auto build = filled<32>(0xD9);
|
||||||
|
CHECK(owner->query("INSERT INTO evolution.retained_builds(build_identity) VALUES "
|
||||||
|
"(decode(repeat('d9',32),'hex')) ON CONFLICT DO NOTHING",
|
||||||
|
{}, 5s));
|
||||||
|
const auto identity = [](std::uint8_t index) {
|
||||||
|
auto id = filled<16>(0x18);
|
||||||
|
id.back() = index;
|
||||||
|
return id;
|
||||||
|
};
|
||||||
|
auto objects = FilesystemObjectStore::open(env("PGHOST"), key, max_cellular_lives_bytes);
|
||||||
|
CHECK(objects);
|
||||||
|
auto genesis =
|
||||||
|
provision_cellular_region(*owner, **objects, key, 1, *source, identity(0), build, 5s);
|
||||||
|
CHECK(genesis);
|
||||||
|
auto head = *genesis;
|
||||||
|
auto lease = acquire_region_lease(*runtime, key, build, 60s, 5s);
|
||||||
|
CHECK(lease);
|
||||||
|
CellularBatch batch{{key.world, key.region, 1, head.head.commit, head.head.digest, 0, 1}, {{}}};
|
||||||
|
CHECK(source->advance_tick({}));
|
||||||
|
auto first = publish_cellular_batch(*runtime, **objects, *lease, head, batch, *source,
|
||||||
|
identity(1), build, 5s);
|
||||||
|
CHECK(first);
|
||||||
|
head = first->committed;
|
||||||
|
const auto advance = [&](auto result) {
|
||||||
|
CHECK(result);
|
||||||
|
head = *result;
|
||||||
|
};
|
||||||
|
advance(migrate_cellular_boundary_profile(*runtime, **objects, *lease, head, identity(2), build,
|
||||||
|
5s));
|
||||||
|
advance(migrate_cellular_maturation_profile(*runtime, **objects, *lease, head, identity(3),
|
||||||
|
build, 5s));
|
||||||
|
advance(migrate_cellular_inheritance_profile(*runtime, **objects, *lease, head, identity(4),
|
||||||
|
build, 5s));
|
||||||
|
advance(migrate_cellular_photosynthesis_profile(*runtime, **objects, *lease, head, identity(5),
|
||||||
|
build, {0, 1, {0}}, 5s));
|
||||||
|
CellularLiquidRules liquid{
|
||||||
|
.currents = {5, 48'000, 48'000, 250, 2, 4, 3000, 6000, 60, 300},
|
||||||
|
.founder = {.thrust_q10 = 20'480,
|
||||||
|
.reverse_thrust_q10 = 20'480,
|
||||||
|
.forward_drag_ppm = 95'163,
|
||||||
|
.lateral_drag_ppm = 95'163,
|
||||||
|
.turn = 3'276},
|
||||||
|
.deposits = {.drift_radius_um = 200,
|
||||||
|
.max_drift_q10 = 100 * 1024,
|
||||||
|
.drift_decay_ppm = 95'163,
|
||||||
|
.merged_cap = 8,
|
||||||
|
.bubble_radius_um = evo::biology::cellular_mote_radius_um}};
|
||||||
|
advance(migrate_cellular_liquid_profile(*runtime, **objects, *lease, head, identity(6), build,
|
||||||
|
liquid, 5s));
|
||||||
|
const std::array<Sha256Digest, 1> builds{build};
|
||||||
|
auto before = recover_cellular_checkpoint(*runtime, **objects, key, *lease, builds, 5s);
|
||||||
|
CHECK(before && before->state->lives().empty());
|
||||||
|
CellularRevampRules rules;
|
||||||
|
auto expected = before->state->revamp_upgrade_candidate(rules, 32, 900'000);
|
||||||
|
CHECK(expected);
|
||||||
|
advance(migrate_cellular_revamp_profile(*runtime, **objects, *lease, head, identity(7), build,
|
||||||
|
rules, 5s, {}, 32, 900'000));
|
||||||
|
const auto opening_bytes = (*expected)->snapshot();
|
||||||
|
CHECK(release_region_lease(*runtime, key, *lease, 5s));
|
||||||
|
lease = acquire_region_lease(*runtime, key, build, 60s, 5s);
|
||||||
|
CHECK(lease);
|
||||||
|
auto recovered = recover_cellular_checkpoint(*runtime, **objects, key, *lease, builds, 5s);
|
||||||
|
CHECK(recovered && recovered->state->snapshot() == opening_bytes &&
|
||||||
|
recovered->state->lives().size() == 32 && recovered->state->tick() == 1);
|
||||||
|
batch = {{key.world, key.region, 1, head.head.commit, head.head.digest, 1, 2}, {{}}};
|
||||||
|
batch.ticks.front().lives = checked_value(wildlife_intents(*recovered->state, 2));
|
||||||
|
CHECK(recovered->state->advance_tick(batch.ticks.front().lives));
|
||||||
|
const auto tick_bytes = recovered->state->snapshot();
|
||||||
|
auto tick = publish_cellular_batch(*runtime, **objects, *lease, head, batch, *recovered->state,
|
||||||
|
identity(8), build, 5s);
|
||||||
|
CHECK(tick);
|
||||||
|
recovered = recover_cellular_checkpoint(*runtime, **objects, key, *lease, builds, 5s);
|
||||||
|
CHECK(recovered && recovered->state->snapshot() == tick_bytes &&
|
||||||
|
recovered->state->lives().size() == 32);
|
||||||
|
CHECK(release_region_lease(*runtime, key, *lease, 5s));
|
||||||
|
std::puts("starting wildlife publication and replacement-owner replay passed");
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#include "evo/biology/budding.hpp"
|
||||||
|
#include "evo/biology/founder.hpp"
|
||||||
#include "evo/server/lifecycle/cellular_batch.hpp"
|
#include "evo/server/lifecycle/cellular_batch.hpp"
|
||||||
#include "evo/server/lifecycle/cellular_play_summary.hpp"
|
#include "evo/server/lifecycle/cellular_play_summary.hpp"
|
||||||
#include "fixtures/cellular_ecology.hpp"
|
#include "fixtures/cellular_ecology.hpp"
|
||||||
@@ -72,7 +74,10 @@ LifeAccount account(std::uint8_t last) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// A rules-13 region with a founder 5 born before the upgrade and a founder 6 born after it.
|
// A rules-13 region with a founder 5 born before the upgrade and a founder 6 born after it.
|
||||||
Owner revamp_region(std::uint32_t essential = 250) {
|
Owner revamp_region(std::uint32_t essential = 250, std::uint64_t fee_pj = 0) {
|
||||||
|
auto rules = revamp(essential);
|
||||||
|
rules.bud_fee.energy.value = fee_pj;
|
||||||
|
rules.bud_fee_scale_percent = fee_pj == 0 ? 0 : 100;
|
||||||
auto state = opening(7, true, 2, false); // Funds two founders.
|
auto state = opening(7, true, 2, false); // Funds two founders.
|
||||||
checked(state->advance_tick({}), "genesis tick");
|
checked(state->advance_tick({}), "genesis tick");
|
||||||
state = checked(state->migration_upgrade_candidate(), "boundary upgrade");
|
state = checked(state->migration_upgrade_candidate(), "boundary upgrade");
|
||||||
@@ -84,10 +89,10 @@ Owner revamp_region(std::uint32_t essential = 250) {
|
|||||||
state = checked(state->birth_candidate({account(1), 1}, {100, 100, 100, 100, {state->tick()}}),
|
state = checked(state->birth_candidate({account(1), 1}, {100, 100, 100, 100, {state->tick()}}),
|
||||||
"founder 5 birth");
|
"founder 5 birth");
|
||||||
require(!state->revamp_upgrade_candidate(revamp(1'001)), "an invalid essential share accepted");
|
require(!state->revamp_upgrade_candidate(revamp(1'001)), "an invalid essential share accepted");
|
||||||
state = checked(state->revamp_upgrade_candidate(revamp(essential)), "revamp upgrade");
|
state = checked(state->revamp_upgrade_candidate(rules), "revamp upgrade");
|
||||||
require(state->format_version() == cellular_lives_revamp_format &&
|
require(state->format_version() == cellular_lives_revamp_format &&
|
||||||
state->rules_version() == cellular_lives_revamp_rules &&
|
state->rules_version() == cellular_lives_revamp_rules &&
|
||||||
state->revamp_rules() == revamp(essential) && state->liquid_rules() == liquid() &&
|
state->revamp_rules() == rules && state->liquid_rules() == liquid() &&
|
||||||
state->flow_field() != nullptr && !state->revamp_upgrade_candidate(revamp()),
|
state->flow_field() != nullptr && !state->revamp_upgrade_candidate(revamp()),
|
||||||
"revamp upgrade repeated, wrong versions or lost rules");
|
"revamp upgrade repeated, wrong versions or lost rules");
|
||||||
state = checked(state->birth_candidate({account(2), 1}, {101, 101, 101, 101, {state->tick()}}),
|
state = checked(state->birth_candidate({account(2), 1}, {101, 101, 101, 101, {state->tick()}}),
|
||||||
@@ -125,6 +130,85 @@ void closed(const CellularLives& state) {
|
|||||||
require(state.current_total() == expected, "revamp region broke closure");
|
require(state.current_total() == expected, "revamp region broke closure");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void starting_wildlife_is_a_funded_opening() {
|
||||||
|
auto source = opening(77, true, 64, false);
|
||||||
|
checked(source->advance_tick({}), "opening tick");
|
||||||
|
source = checked(source->migration_upgrade_candidate(), "boundary");
|
||||||
|
source = checked(source->maturation_upgrade_candidate(), "maturation");
|
||||||
|
source = checked(source->inheritance_upgrade_candidate(), "inheritance");
|
||||||
|
source = checked(source->photosynthesis_upgrade_candidate({0, 1, {0}}), "light");
|
||||||
|
source = checked(source->liquid_upgrade_candidate(liquid()), "liquid");
|
||||||
|
const auto before = source->snapshot();
|
||||||
|
auto seeded = checked(source->revamp_upgrade_candidate(revamp(), 32, 900'000), "wildlife");
|
||||||
|
require(source->snapshot() == before && seeded->lives().size() == 32,
|
||||||
|
"seeding changed source or count");
|
||||||
|
auto again = checked(source->revamp_upgrade_candidate(revamp(), 32, 900'000), "same seed");
|
||||||
|
require(again->snapshot() == seeded->snapshot(), "opening is not deterministic");
|
||||||
|
require(!seeded->revamp_upgrade_candidate(revamp(), 32, 900'000), "reseeded a region");
|
||||||
|
require(!source->revamp_upgrade_candidate(revamp(), 256, 900'000), "accepted excessive count");
|
||||||
|
require(!source->revamp_upgrade_candidate(revamp(), 1, 0), "accepted zero identity");
|
||||||
|
require(!source->revamp_upgrade_candidate(revamp(), 1, cellular_bud_namespace),
|
||||||
|
"accepted bud namespace for a root");
|
||||||
|
require(!source->revamp_upgrade_candidate(revamp(), 0, 900'000), "accepted unused identity");
|
||||||
|
require(restore(*seeded)->snapshot() == seeded->snapshot(), "fixture restore diverged");
|
||||||
|
bool varied = false;
|
||||||
|
for (const auto& life : seeded->lives()) {
|
||||||
|
const auto genome = seeded->archive().find(life.identity.genome);
|
||||||
|
require(genome && life.account == LifeAccount{} && life.parent_life == 0 &&
|
||||||
|
life.growth == biology::GrowthState{1000, 0} &&
|
||||||
|
life.reserve.matter == accounting::Inventory{}.matter,
|
||||||
|
"fixture changed founder starting rules");
|
||||||
|
const auto budget =
|
||||||
|
checked(biology::metabolic_budget(*genome, life.growth,
|
||||||
|
{seeded->ambient_temperature_millikelvin(), {}}, 1000,
|
||||||
|
seeded->revamp_rules().body),
|
||||||
|
"wildlife budget");
|
||||||
|
require(life.reserve.energy.value ==
|
||||||
|
budget.demand.value * biology::founder_reserve_seconds &&
|
||||||
|
life.body == budget.body && life.offspring_genome == genome->id(),
|
||||||
|
"wildlife endowment or inherited plan wrong");
|
||||||
|
varied = varied || genome->cellular_traits() != biology::founder_cellular_traits;
|
||||||
|
}
|
||||||
|
require(varied && seeded->nursery() != source->nursery(), "wildlife was free or unvaried");
|
||||||
|
closed(*seeded);
|
||||||
|
for (int tick = 0; tick < 5; ++tick) {
|
||||||
|
const auto intents =
|
||||||
|
checked(wildlife_intents(*seeded, seeded->tick() + 1), "wildlife intents");
|
||||||
|
checked(seeded->advance_tick(intents), "wildlife tick");
|
||||||
|
closed(*seeded);
|
||||||
|
}
|
||||||
|
require(restore(*seeded)->snapshot() == seeded->snapshot(), "running fixture restore");
|
||||||
|
auto poor = opening(77, true, 1, false);
|
||||||
|
checked(poor->advance_tick({}), "poor tick");
|
||||||
|
poor = checked(poor->migration_upgrade_candidate(), "poor boundary");
|
||||||
|
poor = checked(poor->maturation_upgrade_candidate(), "poor maturation");
|
||||||
|
poor = checked(poor->inheritance_upgrade_candidate(), "poor inheritance");
|
||||||
|
poor = checked(poor->photosynthesis_upgrade_candidate({0, 1, {0}}), "poor light");
|
||||||
|
poor = checked(poor->liquid_upgrade_candidate(liquid()), "poor liquid");
|
||||||
|
const auto poor_before = poor->snapshot();
|
||||||
|
require(!poor->revamp_upgrade_candidate(revamp(), 32, 900'000) &&
|
||||||
|
poor->snapshot() == poor_before,
|
||||||
|
"insufficient nursery was not atomic");
|
||||||
|
}
|
||||||
|
|
||||||
|
void shown_bud_charge_includes_the_fee() {
|
||||||
|
auto state = revamp_region();
|
||||||
|
const auto& life = state->lives().back();
|
||||||
|
const auto genome = state->archive().find(life.identity.genome);
|
||||||
|
require(genome.has_value(), "founder genome");
|
||||||
|
require(state->budding_cost(life.identity.life) ==
|
||||||
|
biology::bud_cost(*genome, state->ambient_temperature_millikelvin()),
|
||||||
|
"zero-fee founder charge changed");
|
||||||
|
require(!state->budding_cost(999'999), "cost for missing life");
|
||||||
|
auto paid = revamp_region(250, 250'000);
|
||||||
|
const auto shown = state->budding_cost(life.identity.life);
|
||||||
|
if (!shown)
|
||||||
|
throw std::runtime_error("missing shown cost");
|
||||||
|
auto expected = shown.value();
|
||||||
|
expected.energy.value += 250'000;
|
||||||
|
require(paid->budding_cost(life.identity.life) == expected, "shown charge omitted the fee");
|
||||||
|
}
|
||||||
|
|
||||||
void upgrade_and_restore() {
|
void upgrade_and_restore() {
|
||||||
const auto state = revamp_region(400);
|
const auto state = revamp_region(400);
|
||||||
const auto copy = restore(*state);
|
const auto copy = restore(*state);
|
||||||
@@ -680,6 +764,8 @@ void trace_replays() {
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int main() try {
|
int main() try {
|
||||||
|
starting_wildlife_is_a_funded_opening();
|
||||||
|
shown_bud_charge_includes_the_fee();
|
||||||
upgrade_and_restore();
|
upgrade_and_restore();
|
||||||
mixed_generations_tick_and_continue();
|
mixed_generations_tick_and_continue();
|
||||||
the_spent_pool_drips_back();
|
the_spent_pool_drips_back();
|
||||||
|
|||||||
@@ -19,9 +19,10 @@ void check(bool condition, std::source_location at = std::source_location::curre
|
|||||||
|
|
||||||
CellularRevampTuning trial() {
|
CellularRevampTuning trial() {
|
||||||
CellularRevampTuning t{.version = 1,
|
CellularRevampTuning t{.version = 1,
|
||||||
|
.playtest_starting_wildlife_cells = 32,
|
||||||
.body_essential_upkeep_per_mille = 250,
|
.body_essential_upkeep_per_mille = 250,
|
||||||
.body_reserve_load_per_mille = 1'000,
|
.body_reserve_load_per_mille = 1'000,
|
||||||
.body_growth_per_tick_centi_mille = 500,
|
.body_growth_per_tick_centi_mille = 625,
|
||||||
.energy_burn_carbon_pj_per_kfg = 2'000,
|
.energy_burn_carbon_pj_per_kfg = 2'000,
|
||||||
.energy_burn_nitrogen_pj_per_kfg = 2'000,
|
.energy_burn_nitrogen_pj_per_kfg = 2'000,
|
||||||
.energy_burn_phosphorus_pj_per_kfg = 2'000,
|
.energy_burn_phosphorus_pj_per_kfg = 2'000,
|
||||||
@@ -49,12 +50,12 @@ CellularRevampTuning trial() {
|
|||||||
.mutation_buds_for_adhesion = 5,
|
.mutation_buds_for_adhesion = 5,
|
||||||
.reproduction_split_share_per_mille = 500,
|
.reproduction_split_share_per_mille = 500,
|
||||||
.reproduction_split_min_growth_per_mille = 500,
|
.reproduction_split_min_growth_per_mille = 500,
|
||||||
.reproduction_bud_fee_e_pj = 0,
|
.reproduction_bud_fee_e_pj = 250'000,
|
||||||
.reproduction_bud_fee_c_fg = 0,
|
.reproduction_bud_fee_c_fg = 100'000,
|
||||||
.reproduction_bud_fee_n_fg = 0,
|
.reproduction_bud_fee_n_fg = 30'000,
|
||||||
.reproduction_bud_fee_p_fg = 0,
|
.reproduction_bud_fee_p_fg = 10'000,
|
||||||
.reproduction_bud_fee_o_fg = 0,
|
.reproduction_bud_fee_o_fg = 60'000,
|
||||||
.reproduction_bud_fee_scale_percent = 0,
|
.reproduction_bud_fee_scale_percent = 100,
|
||||||
.reproduction_organism_cap = 256,
|
.reproduction_organism_cap = 256,
|
||||||
.organism_load_per_mille = 500,
|
.organism_load_per_mille = 500,
|
||||||
.organism_emerge_members = 8,
|
.organism_emerge_members = 8,
|
||||||
@@ -130,6 +131,14 @@ void canonical_round_trip() {
|
|||||||
|
|
||||||
void refusals() {
|
void refusals() {
|
||||||
const auto base = encode_cellular_revamp_tuning(trial());
|
const auto base = encode_cellular_revamp_tuning(trial());
|
||||||
|
CHECK(error_of(with(base, "playtest.starting_wildlife_cells", "256")) ==
|
||||||
|
CellularTuningErrorKind::out_of_range);
|
||||||
|
CHECK(error_of(with(base, "playtest.starting_wildlife_cells", "-1")) ==
|
||||||
|
CellularTuningErrorKind::out_of_range);
|
||||||
|
auto legacy = base;
|
||||||
|
const auto start = legacy.find("playtest.starting_wildlife_cells");
|
||||||
|
legacy.erase(start, legacy.find('\n', start) - start + 1);
|
||||||
|
CHECK(parse_cellular_revamp_tuning(legacy)->playtest_starting_wildlife_cells == 0);
|
||||||
CHECK(error_of(base + "unknown.key = 1\n") == CellularTuningErrorKind::unknown_key);
|
CHECK(error_of(base + "unknown.key = 1\n") == CellularTuningErrorKind::unknown_key);
|
||||||
CHECK(error_of(base + "tuning.version = 1\n") == CellularTuningErrorKind::duplicate_key);
|
CHECK(error_of(base + "tuning.version = 1\n") == CellularTuningErrorKind::duplicate_key);
|
||||||
CHECK(error_of(base + "no equals sign\n") == CellularTuningErrorKind::syntax);
|
CHECK(error_of(base + "no equals sign\n") == CellularTuningErrorKind::syntax);
|
||||||
|
|||||||
@@ -411,6 +411,8 @@ void cellular_panels(const std::filesystem::path& review) {
|
|||||||
network::CellularLifeDiagnostics diagnostics;
|
network::CellularLifeDiagnostics diagnostics;
|
||||||
diagnostics.reserve_energy_pj = 248000;
|
diagnostics.reserve_energy_pj = 248000;
|
||||||
diagnostics.reserve_matter_fg = {15000, 2400, 800, 6000};
|
diagnostics.reserve_matter_fg = {15000, 2400, 800, 6000};
|
||||||
|
diagnostics.bud_cost_energy_pj = diagnostics.reserve_energy_pj;
|
||||||
|
diagnostics.bud_cost_matter_fg = diagnostics.reserve_matter_fg;
|
||||||
diagnostics.has_tick_effects = true;
|
diagnostics.has_tick_effects = true;
|
||||||
diagnostics.maintenance_cost_pj = 80;
|
diagnostics.maintenance_cost_pj = 80;
|
||||||
diagnostics.movement_cost_pj = 20;
|
diagnostics.movement_cost_pj = 20;
|
||||||
@@ -680,11 +682,28 @@ void cellular_panels(const std::filesystem::path& review) {
|
|||||||
draw();
|
draw();
|
||||||
CHECK(!probe(evolution, 0.17F, [&] { return action.mutation.has_value(); }));
|
CHECK(!probe(evolution, 0.17F, [&] { return action.mutation.has_value(); }));
|
||||||
play.outcome({mutation_id, network::ActionResult::committed, 103, 5});
|
play.outcome({mutation_id, network::ActionResult::committed, 103, 5});
|
||||||
|
form.evolution_open = false;
|
||||||
|
draw();
|
||||||
|
// One missing resource disables Bud; a disabled button still explains its cost.
|
||||||
|
auto short_reserve = diagnostics;
|
||||||
|
--short_reserve.reserve_energy_pj;
|
||||||
|
perception.diagnostics = short_reserve;
|
||||||
|
draw();
|
||||||
|
const float bud_x = dock->Pos.x + dock->Size.x * 0.84F;
|
||||||
|
const float bud_y = dock->Pos.y + ImGui::GetStyle().WindowPadding.y + 20;
|
||||||
|
mouse(id, SDL_EVENT_MOUSE_MOTION, bud_x, bud_y);
|
||||||
|
for (int i = 0; i < 3; ++i)
|
||||||
|
draw();
|
||||||
|
const auto* bud_tooltip = ImGui::FindWindowByName("##Tooltip_00");
|
||||||
|
CHECK(bud_tooltip && bud_tooltip->Active);
|
||||||
|
CHECK(!probe(dock, 0.84F, [&] { return action.cell_action == CellAction::bud; }));
|
||||||
|
perception.diagnostics = diagnostics;
|
||||||
draw();
|
draw();
|
||||||
bool budded = false;
|
bool budded = false;
|
||||||
for (float fraction = 0.1F; fraction < 1.0F && !budded; fraction += 0.1F)
|
for (float fraction = 0.1F; fraction < 1.0F && !budded; fraction += 0.1F)
|
||||||
budded = probe(dock, fraction, [&] { return action.cell_action == CellAction::bud; });
|
budded = probe(dock, fraction, [&] { return action.cell_action == CellAction::bud; });
|
||||||
CHECK(budded);
|
CHECK(budded);
|
||||||
|
form.evolution_open = true;
|
||||||
play.observe_end({104, 901, network::CellularDeathReason::engulfed});
|
play.observe_end({104, 901, network::CellularDeathReason::engulfed});
|
||||||
perception = {104, 0, {}, {}};
|
perception = {104, 0, {}, {}};
|
||||||
play.observe(perception);
|
play.observe(perception);
|
||||||
|
|||||||
@@ -541,7 +541,7 @@ void cellular_revamp_actions() {
|
|||||||
CHECK(play.queue(CellAction::emerge, 305));
|
CHECK(play.queue(CellAction::emerge, 305));
|
||||||
play.sent();
|
play.sent();
|
||||||
play.observe_end({305, 800, CellularDeathReason::emerged});
|
play.observe_end({305, 800, CellularDeathReason::emerged});
|
||||||
CHECK(play.life() == 0 && play.ended() && play.ended()->cause == CellularDeathReason::emerged &&
|
CHECK(play.life() == 0 && required(play.ended()).cause == CellularDeathReason::emerged &&
|
||||||
play.can_restart());
|
play.can_restart());
|
||||||
}
|
}
|
||||||
void cellular_energy_and_birth_wait() {
|
void cellular_energy_and_birth_wait() {
|
||||||
@@ -617,6 +617,20 @@ void cell_headings() {
|
|||||||
CHECK(!headings.update(1, {6, 6}, *camera));
|
CHECK(!headings.update(1, {6, 6}, *camera));
|
||||||
}
|
}
|
||||||
int main() try {
|
int main() try {
|
||||||
|
network::CellularLifeDiagnostics budding;
|
||||||
|
CHECK(!evo::client_app::bud_affordable(budding));
|
||||||
|
budding.bud_cost_energy_pj = 100;
|
||||||
|
budding.bud_cost_matter_fg = {10, 20, 30, 40};
|
||||||
|
budding.reserve_energy_pj = 100;
|
||||||
|
budding.reserve_matter_fg = {10, 20, 30, 40};
|
||||||
|
CHECK(evo::client_app::bud_affordable(budding));
|
||||||
|
for (std::size_t c = 0; c < 4; ++c) {
|
||||||
|
--budding.reserve_matter_fg[c];
|
||||||
|
CHECK(!evo::client_app::bud_affordable(budding));
|
||||||
|
++budding.reserve_matter_fg[c];
|
||||||
|
}
|
||||||
|
--budding.reserve_energy_pj;
|
||||||
|
CHECK(!evo::client_app::bud_affordable(budding));
|
||||||
labels();
|
labels();
|
||||||
selection();
|
selection();
|
||||||
launcher();
|
launcher();
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ void run_account_control_store_tests();
|
|||||||
void run_life_reservation_store_tests();
|
void run_life_reservation_store_tests();
|
||||||
void run_primitive_publication_tests();
|
void run_primitive_publication_tests();
|
||||||
void run_cellular_publication_tests();
|
void run_cellular_publication_tests();
|
||||||
|
void run_starting_wildlife_publication_tests();
|
||||||
void run_population_publication_tests();
|
void run_population_publication_tests();
|
||||||
void run_environment_publication_tests();
|
void run_environment_publication_tests();
|
||||||
void run_probe_handoff_store_tests();
|
void run_probe_handoff_store_tests();
|
||||||
@@ -127,6 +128,10 @@ void run() {
|
|||||||
} // namespace
|
} // namespace
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
try {
|
try {
|
||||||
|
if (argc == 2 && std::string_view(argv[1]) == "--starting-wildlife-only") {
|
||||||
|
run_starting_wildlife_publication_tests();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (argc == 2 && std::string_view(argv[1]) == "--population-only") {
|
if (argc == 2 && std::string_view(argv[1]) == "--population-only") {
|
||||||
run_population_publication_tests();
|
run_population_publication_tests();
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ set -euo pipefail
|
|||||||
# postgres-check.sh --life-reservations-only [<evo-postgres-tests>]
|
# postgres-check.sh --life-reservations-only [<evo-postgres-tests>]
|
||||||
# postgres-check.sh --population-only <evo-postgres-tests>
|
# postgres-check.sh --population-only <evo-postgres-tests>
|
||||||
# postgres-check.sh --environment-only <evo-postgres-tests>
|
# postgres-check.sh --environment-only <evo-postgres-tests>
|
||||||
|
# postgres-check.sh --starting-wildlife-only <evo-postgres-tests>
|
||||||
# postgres-check.sh --migration-faults <evo-postgres-tests> (private loopback TLS)
|
# postgres-check.sh --migration-faults <evo-postgres-tests> (private loopback TLS)
|
||||||
# --full (default) is the complete qualification: the C++ suite, the backup, DR and
|
# --full (default) is the complete qualification: the C++ suite, the backup, DR and
|
||||||
# upgrade process checks, then the SQL-only migration, permission and checksum checks.
|
# upgrade process checks, then the SQL-only migration, permission and checksum checks.
|
||||||
@@ -14,6 +15,7 @@ set -euo pipefail
|
|||||||
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
root="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||||
mode=full
|
mode=full
|
||||||
case "${1:-}" in
|
case "${1:-}" in
|
||||||
|
--starting-wildlife-only) mode=starting-wildlife; shift ;;
|
||||||
--migration-faults) mode=migration-faults; shift ;;
|
--migration-faults) mode=migration-faults; shift ;;
|
||||||
--population-only) mode=population; shift ;;
|
--population-only) mode=population; shift ;;
|
||||||
--environment-only) mode=environment; shift ;;
|
--environment-only) mode=environment; shift ;;
|
||||||
@@ -89,6 +91,11 @@ if [ "$mode" = environment ]; then
|
|||||||
"$1" --environment-only
|
"$1" --environment-only
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
if [ "$mode" = starting-wildlife ]; then
|
||||||
|
phase starting-wildlife
|
||||||
|
"$1" --starting-wildlife-only
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
# M7.9 clone target: a separate database with its own runtime group and login,
|
# M7.9 clone target: a separate database with its own runtime group and login,
|
||||||
# so a clone shares neither the source's database nor its runtime credentials.
|
# so a clone shares neither the source's database nor its runtime credentials.
|
||||||
psql -X -v ON_ERROR_STOP=1 -c 'CREATE ROLE evo_clone_runtime NOLOGIN' -c 'CREATE ROLE evo_clone_login LOGIN IN ROLE evo_clone_runtime'
|
psql -X -v ON_ERROR_STOP=1 -c 'CREATE ROLE evo_clone_runtime NOLOGIN' -c 'CREATE ROLE evo_clone_login LOGIN IN ROLE evo_clone_runtime'
|
||||||
|
|||||||
Reference in New Issue
Block a user