Enable durable cellular session actions
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 37s
Foundation / checks (ecs) (push) Successful in 1m53s
Foundation / checks (postgres) (push) Failing after 50s
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 2m38s
Foundation / checks (tsan) (push) Canceled after 22s
Foundation / checks (client) (push) Canceled after 3m18s

This commit is contained in:
dingo
2026-10-10 23:31:36 -04:00
parent 0ddba31d42
commit eeb663d696
7 changed files with 179 additions and 15 deletions
+16 -2
View File
@@ -151,7 +151,8 @@ std::expected<std::unique_ptr<RegionSessionClient>, network::quic::EndpointError
RegionSessionClient::connect(RegionSessionClientConfig config, Clock::time_point now) {
if (config.protocol_version != network::session_protocol_version &&
config.protocol_version != network::session_protocol_v5 &&
config.protocol_version != network::session_protocol_v6)
config.protocol_version != network::session_protocol_v6 &&
config.protocol_version != network::session_protocol_v7)
return std::unexpected(network::quic::EndpointError::configuration);
auto endpoint = network::quic::Endpoint::connect(config.transport);
if (!endpoint)
@@ -252,9 +253,22 @@ bool RegionSessionClient::send_action(std::uint64_t action_id, network::ActionKi
static_cast<std::uint16_t>(kind), tick});
}
bool RegionSessionClient::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) {
auto& m = *impl_;
return m.protocol_version == network::session_protocol_v7 &&
m.state == RegionSessionState::established && m.welcome && action_id != 0 && tick != 0 &&
m.send(network::CellularAction{m.welcome->session, m.welcome->epoch, action_id, tick,
move_x, move_y, intake_target.has_value(),
intake_target ? intake_target->first : 0,
intake_target ? intake_target->second : 0});
}
bool RegionSessionClient::query_action(std::uint64_t action_id) {
auto& m = *impl_;
return m.protocol_version == network::session_protocol_version &&
return (m.protocol_version == network::session_protocol_version ||
m.protocol_version == network::session_protocol_v7) &&
m.state == RegionSessionState::established && m.send(network::ActionQuery{action_id});
}