Admit v10 mutation choices through the cellular host and sessions

The region host checks a choice against the committed offer, reserves the
successor for the next tick, and publishes it with that tick's batch; the
owner's v10 session gets the receipt and final outcome. Schema v35 now
refuses a checkpoint that skips a reserved choice, and the host reloads
pending reservations after uncertainty, refusal or recovery (ADR-0121).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-13 19:45:23 -04:00
co-authored by Claude Opus 5.5
parent 1bbac48543
commit f59c8498b1
14 changed files with 583 additions and 12 deletions
+15
View File
@@ -64,6 +64,13 @@ struct HandoffKey {
struct LifeOwnerRoute {
network::RegionAddress address;
};
// A host's answer to one v10 choice: the receipt status and target tick, plus the final
// outcome when the same action already published.
struct CellularMutationAnswer {
network::AdmitStatus status{};
std::uint64_t tick{};
std::optional<network::ActionOutcome> outcome;
};
struct RegionSessionsConfig {
network::quic::ServerConfig transport;
network::ControlConfig control; // `epoch` is the initial ownership epoch.
@@ -115,6 +122,11 @@ struct RegionSessionsConfig {
// 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{};
// M11.4c v10 mutation choices (ADR-0121), answered with an ActionReceipt and, once
// published, an ActionOutcome. Without a handler a v10 choice closes as a protocol error.
std::function<CellularMutationAnswer(const network::AccountId&, std::uint64_t,
const network::CellularMutationAction&)>
select_cellular_mutation;
};
// The region host's authority, read once per poll.
struct HostFacts {
@@ -168,6 +180,9 @@ class RegionSessions {
[[nodiscard]] bool send_cellular_perception(const network::AccountId& account,
const network::CellularPerception& perception);
void clear_cellular_perceptions(std::uint64_t tick);
// A published v10 choice's outcome, to the account's current v10 session if any.
[[nodiscard]] bool send_mutation_outcome(const network::AccountId& account,
const network::ActionOutcome& outcome);
[[nodiscard]] network::ReplicationStats replication_stats() const;
// M10.9a (ADR-0097): the host's load governor output. While `refuse_logins`, a Hello
// carrying a grant is closed with `capacity` before signature work (handoff tickets are