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
+4 -2
View File
@@ -59,11 +59,13 @@ class RegionSessionClient {
// retries and reconnects). False unless established and sent.
[[nodiscard]] bool send_action(std::uint64_t action_id, network::ActionKind kind,
std::uint64_t tick);
// Protocol v7/v8. Reuse the exact same fields and action id after reconnect.
// Protocol v7-v10. Reuse the exact same fields and action id after reconnect. `engulf`
// (ADR-0124) needs a v10 session and no intake target.
[[nodiscard]] bool
send_cellular_action(std::uint64_t action_id, std::uint64_t tick, std::int16_t move_x,
std::int16_t move_y,
std::optional<std::pair<std::uint32_t, std::uint32_t>> intake_target = {});
std::optional<std::pair<std::uint32_t, std::uint32_t>> intake_target = {},
bool engulf = false);
[[nodiscard]] bool query_action(std::uint64_t action_id);
// Primitive profile v5 only. The account and generation are always supplied by the
// authenticated session; callers choose only a stable request id.
+5
View File
@@ -165,11 +165,14 @@ struct CellularIntention {
};
// Canonical biological input saved with a durable cellular action. Transport session,
// epoch and action id are deliberately absent so the same retry survives reconnects.
// Byte 12 is the target kind (ADR-0124): 0 none, 1 patch intake, 2 engulf with zero
// coordinates. Kind 2 is carried only by v10 sessions.
struct CellularActionInput {
std::uint64_t tick{};
std::int16_t move_x{}, move_y{};
bool has_intake_target{};
std::uint32_t intake_x_um{}, intake_y_um{};
bool engulf{};
friend bool operator==(const CellularActionInput&, const CellularActionInput&) = default;
};
inline constexpr std::size_t cellular_action_input_bytes = 24;
@@ -180,6 +183,8 @@ struct CellularAction {
std::int16_t move_x{}, move_y{};
bool has_intake_target{};
std::uint32_t intake_x_um{}, intake_y_um{};
// v10 (ADR-0124): engulf a smaller contacted cell; exclusive with an intake target.
bool engulf{};
friend bool operator==(const CellularAction&, const CellularAction&) = default;
};
// v10 reliable choice. The server binds these values to the authenticated account and