Show what a bud costs (ADR-0129 amendment)
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m4s
Foundation / checks (tsan) (push) Successful in 9m59s
Foundation / checks (client) (push) Successful in 19m19s
Foundation / checks (network) (push) Successful in 19m24s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 32m13s
Foundation / checks (checks) (push) Canceled after 32m19s

The v10 cellular perception carries the bud cost after the diagnostics block: the
energy (construction plus the bud's provision) and matter per channel one bud takes
from a fully grown cell's reserve. biology::bud_cost reads it from fund_bud itself,
so the shown cost is exactly the charge; the server caches it per genome. The
client shows it and names the channels the reserve is short on. v10 clients must
be rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-15 19:11:28 -04:00
co-authored by Claude Opus 5.5
parent a97f0c3fea
commit d98d71e7c0
13 changed files with 225 additions and 13 deletions
+7
View File
@@ -4,6 +4,7 @@
#include <cstdint>
#include <expected>
#include <optional>
// M11.5 budding (ADR-0098 decision 1, ADR-0125): a funded proposal, detached from any
// owner. The parent pays its ADR-0032 reproduction investment and a starting provision
@@ -33,4 +34,10 @@ enum class BuddingError : std::uint8_t {
[[nodiscard]] std::expected<BudTransition, BuddingError>
fund_bud(const Genome& genome, GrowthState parent_growth,
const accounting::Inventory& parent_reserve, std::uint32_t temperature_millikelvin);
// What one bud takes from a fully grown, undamaged parent of this genome at this temperature
// (ADR-0129 amendment): investment matter per channel, and construction energy plus the
// bud's provision; exactly what `fund_bud` charges such a parent. Nullopt when the genome
// cannot bud or cannot build a cell from its investment.
[[nodiscard]] std::optional<accounting::Inventory> bud_cost(const Genome& genome,
std::uint32_t temperature_millikelvin);
} // namespace evo::biology