Send the owner its outstanding mutation offer over v10

Session protocol v10 adds type 26: the life's earned offer with its unranked
candidates in operator order and each successor's capability value,
maintenance and total mass. The cellular bridge sends it when the offer or the
owner's session changes and clears a consumed offer; the client keeps the
latest one for the maintainer's choice UI (ADR-0121, 11.4d server half).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-13 23:07:50 -04:00
co-authored by Claude Opus 5.5
parent 187b1a7b98
commit f77956e579
16 changed files with 314 additions and 17 deletions
+8
View File
@@ -5,6 +5,7 @@
#include "evo/persistence/sha256.hpp"
#include "evo/server/cellular_region_host.hpp"
#include <algorithm>
#include <cstdlib>
#include <optional>
#include <source_location>
@@ -556,6 +557,13 @@ void cellular_host_admits_mutation_choices() {
life.mutation.offer_tick,
offer.candidates.front().operator_id};
const auto next = host->state()->tick() + 1;
// 11.4d: the owner's view lists the same candidates in operator order.
const auto view = offer_view(life, next - 1);
CHECK(view.life_identity == life_id && view.event_index == choice.event_index &&
view.offer_tick == choice.offer_tick &&
view.candidates.size() == offer.candidates.size() &&
std::ranges::is_sorted(view.candidates, {},
&evo::network::CellularOfferedCandidate::operator_id));
auto wrong = choice;
wrong.operator_id = 0xFFFF;
CHECK(host->select_mutation(account, control->generation, 31, wrong).status ==