Deliver cellular tick diagnostics to owners
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (postgres) (push) Failing after 52s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / checks (network) (push) Failing after 3m1s
Foundation / checks (client) (push) Failing after 4m30s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-11 02:04:55 -04:00
parent fe03a0f8e4
commit ab9fbdec8f
16 changed files with 408 additions and 188 deletions
@@ -41,6 +41,14 @@ struct CellularLifeIntent {
biology::CellularStepIntent intent{};
auto operator<=>(const CellularLifeIntent&) const = default;
};
struct CellularLifeTickFeedback {
std::uint64_t life_id{}, tick{};
accounting::Inventory reserve;
accounting::Picojoules maintenance_cost{}, movement_cost{};
biology::CellularMovementStatus movement{biology::CellularMovementStatus::not_requested};
biology::CellularIntakeStatus intake{biology::CellularIntakeStatus::not_requested};
auto operator<=>(const CellularLifeTickFeedback&) const = default;
};
struct CellularLivesConfig {
biology::CellularArea area{};
std::uint64_t tick{};
@@ -95,11 +103,12 @@ class CellularLives {
[[nodiscard]] accounting::Inventory heat() const noexcept;
[[nodiscard]] accounting::Inventory opening_total() const noexcept;
[[nodiscard]] accounting::Inventory current_total() const noexcept;
// Latest successful in-memory step report; omitted from snapshots and empty after restore.
[[nodiscard]] std::span<const CellularLifeTickFeedback> last_tick_feedback() const noexcept;
[[nodiscard]] std::vector<std::uint8_t> snapshot() const;
// Exact stock view for one live cell, filtered by its authoritative footprint and the
// M11.3 perception radius. Patch provenance and out-of-range stock are never returned.
[[nodiscard]] std::expected<std::vector<biology::CellularPatchPerception>,
CellularLivesError>
[[nodiscard]] std::expected<std::vector<biology::CellularPatchPerception>, CellularLivesError>
perceive(std::uint64_t life_id) const;
// Returns a detached post-birth candidate for an allocator-reserved request.
@@ -123,5 +132,6 @@ class CellularLives {
struct State;
explicit CellularLives(std::unique_ptr<State> state);
std::unique_ptr<State> state_;
std::vector<CellularLifeTickFeedback> last_tick_feedback_;
};
} // namespace evo::server
+2 -2
View File
@@ -100,7 +100,7 @@ struct RegionSessionsConfig {
// M10.8d recovery: this often, open outgoing transfers prepared more than ticket_lifetime
// + 10 s ago (by the store's clock, e.g. by a process that died) are aborted.
std::chrono::milliseconds overdue_poll{5000};
// v5/v8 are accepted only when both primitive-life handlers are supplied. Callbacks
// v5/v8/v9 are accepted only when both primitive-life handlers are supplied. Callbacks
// receive the authenticated account and durable control generation for this session.
// A cellular host may enable v5 together with the v7 cellular action path; each
// connection remains fixed to its negotiated protocol.
@@ -112,7 +112,7 @@ struct RegionSessionsConfig {
query_primitive_life;
// M11.3 v6 cellular intentions. Opt-in until a cellular state owner consumes them.
bool accept_cellular_intentions{};
// M11.3 v7 durable cellular actions and v8 owner-filtered perception. Requires durable
// M11.3 v7 durable cellular actions and v8/v9 owner-filtered perception. Requires durable
// control and action ledgers; the caller forwards carried inputs to profile 4.
bool accept_cellular_actions{};
};