Integrate opt-in cellular v6 sessions
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m56s
Foundation / checks (client) (push) Failing after 4m30s
Foundation / checks (tsan) (push) Canceled after 0s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 3m1s
Foundation / checks (postgres) (push) Canceled after 34s
Foundation / checks (checks) (push) Canceled after 5m8s

This commit is contained in:
dingo
2026-10-10 21:46:33 -04:00
parent 04a50be9cd
commit 747b063c65
9 changed files with 163 additions and 18 deletions
+6
View File
@@ -7,6 +7,7 @@
#include <expected>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
// M10.3b client-side session login over QUIC (ADR-0091, schemas/network/session-v1.md).
@@ -49,6 +50,11 @@ class RegionSessionClient {
// refusal.
[[nodiscard]] std::optional<std::uint64_t>
send_intention(std::uint64_t tick, std::int16_t move_x, std::int16_t move_y);
// Protocol v6 only. Optional target fields name a visible food patch; they never claim
// position, speed, inventory or acquired stock.
[[nodiscard]] std::optional<std::uint64_t> send_cellular_intention(
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 = {});
// A discrete action with a caller-chosen id, unique for the account (stable across
// retries and reconnects). False unless established and sent.
[[nodiscard]] bool send_action(std::uint64_t action_id, network::ActionKind kind,
+6
View File
@@ -100,6 +100,8 @@ struct RegionSessionsConfig {
std::function<network::PrimitiveLifeOutcome(const network::AccountId&, std::uint64_t,
std::uint64_t)>
query_primitive_life;
// M11.3 v6 cellular intentions. Opt-in until a cellular state owner consumes them.
bool accept_cellular_intentions{};
};
// The region host's authority, read once per poll.
struct HostFacts {
@@ -129,6 +131,10 @@ class RegionSessions {
// Actions scheduled for ticks <= `tick`, to be recorded durably with the batch that
// simulates that tick (10.4b). Each action is returned once.
[[nodiscard]] std::vector<network::CarriedAction> carry(std::uint64_t tick);
// Read-only admitted v6 inputs for a tick. The host must inspect them before advancing
// HostFacts::simulated_tick past that tick; poll then publishes the cumulative watermark.
[[nodiscard]] std::vector<network::ScheduledCellularIntention>
cellular_intentions(std::uint64_t tick) const;
// These carried actions are durable in `commit_sequence` (each with the tick it rode):
// their outcomes go to each account's current session.
void committed(std::span<const network::CarriedAction> actions, std::uint64_t commit_sequence);