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

This commit is contained in:
dingo
2026-10-26 12:01:57 -04:00
parent 18a64a29cd
commit ff121c3ed1
32 changed files with 738 additions and 78 deletions
@@ -13,14 +13,16 @@
// 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
// format and rules: plain `key = value` integer lines, every key required exactly once and
// range-checked. Later build phases add feeding, mutation and reproduction keys.
// format: plain `key = value` integer lines, range-checked; core keys required once,
// per-mutation overrides and the zero-default DEV opening count optional.
namespace evo::biology {
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;
struct CellularRevampTuning {
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.
std::int64_t body_essential_upkeep_per_mille{};
// Body: share of reserve matter carried as load on handling and thrust costs.
+3 -1
View File
@@ -297,7 +297,9 @@ migrate_cellular_liquid_profile(Postgres&, const FilesystemObjectStore&, const L
migrate_cellular_revamp_profile(Postgres&, const FilesystemObjectStore&, const LeaseGrant&,
const CommittedCheckpoint&, Uuid commit, const Sha256Digest& build,
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
// entire source/target payload. Version upgrades and profile transitions retain
// 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 server::CellularLiquidRules& 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>
cellular_revamp_upgrade_manifest(const CheckpointManifest& predecessor,
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>
cellular_revamp_upgrade_payload(std::span<const std::uint8_t> payload,
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
// identical population with its declared environment; bundle and policy are unchanged.
[[nodiscard]] std::expected<CheckpointManifest, CheckpointError>
@@ -346,9 +346,15 @@ class CellularLives {
liquid_upgrade_candidate(const CellularLiquidRules& rules) const;
// 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
// 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>
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).
[[nodiscard]] const CellularRevampRules& revamp_rules() const noexcept;
// Format 10: the declared liquid rules and the current field they generate (null before).