feat(biology): fund offspring from a distinct inherited genome
Foundation / checks (ecs) (push) Successful in 2m27s
Foundation / checks (deploy) (push) Successful in 4m15s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m22s
Foundation / checks (tsan) (push) Successful in 31m40s
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 45m38s
Foundation / checks (checks) (push) Canceled after 45m43s
Foundation / checks (ecs) (push) Successful in 2m27s
Foundation / checks (deploy) (push) Successful in 4m15s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m22s
Foundation / checks (tsan) (push) Successful in 31m40s
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 45m38s
Foundation / checks (checks) (push) Canceled after 45m43s
This commit is contained in:
@@ -26,7 +26,8 @@ enum class BuddingError : std::uint8_t {
|
||||
no_capability, // The genome cannot reproduce.
|
||||
not_grown, // The parent is not fully realized, or is damaged.
|
||||
insufficient_funding, // Some channel of investment plus provision is missing.
|
||||
development // The genome's rules cannot develop it.
|
||||
development, // The genome's rules cannot develop it.
|
||||
incompatible_genome // Distinct schema/development laws, or conflicting same-ID contents.
|
||||
};
|
||||
|
||||
// Pure and deterministic. On every channel the parent's reserve before equals its reserve
|
||||
@@ -37,6 +38,18 @@ enum class BuddingError : std::uint8_t {
|
||||
fund_bud(const Genome& genome, GrowthState parent_growth,
|
||||
const accounting::Inventory& parent_reserve, std::uint32_t temperature_millikelvin,
|
||||
std::uint32_t share = 1);
|
||||
// ADR-0164: the expressed parent pays its own investment; the distinct inherited
|
||||
// genome determines the newborn body/growth and its own provision. Both records
|
||||
// must use the same schema/development versions. Inputs and parent anatomy are
|
||||
// unchanged. This proposal confers no identity, placement, ancestry or control authority.
|
||||
[[nodiscard]] std::expected<BudTransition, BuddingError>
|
||||
fund_offspring(const Genome& parent, const Genome& offspring, GrowthState parent_growth,
|
||||
const accounting::Inventory& parent_reserve, std::uint32_t temperature_millikelvin,
|
||||
std::uint32_t share = 1);
|
||||
// Exact charge for that pair and share from a full-grown, undamaged parent.
|
||||
[[nodiscard]] std::optional<accounting::Inventory>
|
||||
offspring_cost(const Genome& parent, const Genome& offspring, std::uint32_t temperature_millikelvin,
|
||||
std::uint32_t share = 1);
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user