End dead lives durably so a player can start again
M11.6a (ADR-0127, schema v37): a published life is marked ended once, by a commit of its region, through the lease-fenced end_cellular_lives. One active life per account replaces one life per account, so after a death the account reserves and publishes a new primitive founder while the corpse, archive and descendants stay. The host records endings after the death's publication and again for every founder corpse on recovery. The cellular server now refuses only an unusable carried action, not the whole tick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -138,6 +138,10 @@ class CellularRegionHost {
|
||||
void finalize_births(std::span<const CellularTickIntents::Birth> births);
|
||||
void queue_birth(const CellularTickIntents::Birth& birth);
|
||||
void reload_mutations();
|
||||
// ADR-0127: owned lives that died record their ending so the account may start again.
|
||||
void note_endings(const CellularLives& before, const CellularLives& after,
|
||||
const persistence::Uuid& commit);
|
||||
void flush_endings();
|
||||
void finalize_mutations(std::span<const CellularMutationActionRecord> actions,
|
||||
std::span<const std::uint8_t> results);
|
||||
[[nodiscard]] network::PrimitiveLifeOutcome query_birth(const persistence::Uuid& account,
|
||||
@@ -159,6 +163,11 @@ class CellularRegionHost {
|
||||
bool mutations_uncertain_{};
|
||||
std::vector<FinalCellularMutation> finalized_mutations_;
|
||||
std::vector<FinalCellularMutation> recent_mutations_; // Bounded, for exact repeats.
|
||||
struct Ending {
|
||||
persistence::Uuid commit{};
|
||||
std::uint64_t life{};
|
||||
};
|
||||
std::vector<Ending> pending_endings_; // Recorded endings not yet acknowledged.
|
||||
HostStatus status_{};
|
||||
};
|
||||
} // namespace evo::server
|
||||
|
||||
Reference in New Issue
Block a user