Carry the engulf intent on v10 sessions and the batch trace
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (deploy) (push) Successful in 4m6s
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 6m47s
Foundation / checks (checks) (push) Canceled after 6m58s
Foundation / checks (client) (push) Canceled after 6m59s
Foundation / checks (tsan) (push) Canceled after 4m28s
Foundation / checks (network) (push) Canceled after 6m58s

ADR-0124: byte 12 of the canonical cellular input, the CellularAction
wire message and the batch trace record becomes a target kind (0 none,
1 patch, 2 engulf with zero coordinates). Kind 2 exists only on v10,
which no server admitted before; cellular servers now admit v10 with v9
behaviour plus engulf, and still refuse a v10 mutation choice until
11.4c. Admission, the session-batch adapter, trace codec, matcher and
action-block validator carry the kind.

The client session library accepts v10 and an engulf flag, and its send
no longer reports a message its version cannot encode as sent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-13 19:04:46 -04:00
co-authored by Claude Opus 5.5
parent 02adc35fa2
commit e17ade8cb7
15 changed files with 175 additions and 39 deletions
@@ -72,6 +72,8 @@ prepare_cellular_session_tick(const CellularLives& state, std::uint64_t tick,
? std::optional<biology::CellularPatchAddress>{biology::CellularPatchAddress{
input->intake_x_um, input->intake_y_um}}
: std::nullopt;
// ADR-0124: a rules-2 region reports the intent unsupported and ignores it.
owned_intent->intent.engulf = input->engulf;
CellularActionRecord record;
record.account = action.account.bytes;
record.action_id = action.action_id;
+11 -6
View File
@@ -434,7 +434,8 @@ struct RegionSessions::Impl {
(config.accept_cellular_actions &&
(c.protocol_version == network::session_protocol_v7 ||
c.protocol_version == network::session_protocol_v8 ||
c.protocol_version == network::session_protocol_v9)))))
c.protocol_version == network::session_protocol_v9 ||
c.protocol_version == network::session_protocol_v10)))))
return close(c, SessionCloseReason::protocol, now);
if (const auto* ack = std::get_if<network::SnapshotAck>(&*decoded))
return replication.acknowledge(c.session, *ack);
@@ -602,9 +603,10 @@ struct RegionSessions::Impl {
(wire_version == network::session_protocol_v6 && !cellular_v6) ||
((wire_version == network::session_protocol_v7 ||
wire_version == network::session_protocol_v8 ||
wire_version == network::session_protocol_v9) &&
wire_version == network::session_protocol_v9 ||
wire_version == network::session_protocol_v10) &&
!cellular_actions) ||
wire_version > network::session_protocol_v9)
wire_version > network::session_protocol_v10)
return close(c, SessionCloseReason::unsupported_version, now);
} else if (wire_version != c.protocol_version) {
return close(c, SessionCloseReason::unsupported_version, now);
@@ -629,7 +631,8 @@ struct RegionSessions::Impl {
if (const auto* m = std::get_if<network::CellularAction>(&*decoded)) {
if (c.protocol_version != network::session_protocol_v7 &&
c.protocol_version != network::session_protocol_v8 &&
c.protocol_version != network::session_protocol_v9)
c.protocol_version != network::session_protocol_v9 &&
c.protocol_version != network::session_protocol_v10)
return close(c, SessionCloseReason::protocol, now);
if (const auto receipt = intents.admit(c.session, *m, admission()))
answer(c, *receipt);
@@ -898,7 +901,8 @@ bool RegionSessions::send_cellular_perception(const network::AccountId& account,
for (const auto& c : m.connections) {
if (c.state != Impl::State::established ||
(c.protocol_version != network::session_protocol_v8 &&
c.protocol_version != network::session_protocol_v9) ||
c.protocol_version != network::session_protocol_v9 &&
c.protocol_version != network::session_protocol_v10) ||
c.account_id != account)
continue;
auto delivered = perception;
@@ -919,7 +923,8 @@ void RegionSessions::clear_cellular_perceptions(std::uint64_t tick) {
for (const auto& c : m.connections)
if (c.state == Impl::State::established &&
(c.protocol_version == network::session_protocol_v8 ||
c.protocol_version == network::session_protocol_v9))
c.protocol_version == network::session_protocol_v9 ||
c.protocol_version == network::session_protocol_v10))
m.send(c, cleared);
}