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
+42
View File
@@ -23,6 +23,7 @@
#include <stdexcept>
#include <string>
#include <thread>
#include <utility>
#include <vector>
namespace {
@@ -429,6 +430,46 @@ void primitive_v5_session(const Files& f) {
CHECK(!ledger.claims.empty() && ledger.claims.back().account == account(0xA5));
}
void cellular_v6_session(const Files& f) {
Harness h{f, 4, 64, nullptr,
[](server::RegionSessionsConfig& c) { c.accept_cellular_intentions = true; }};
const auto alice = account(0xA6);
auto client = h.connect(h.issuer.grant(alice, 1), session_protocol_v6);
CHECK(h.settled(*client) && client->state() == RegionSessionState::established);
CHECK(!client->set_interest(SessionInterest{})); // No M10 probe view in cellular v6.
CHECK(client->view() == nullptr);
h.server->set_default_interest({0, 0, 0, 1});
h.source = [](const SessionInterest&) { return ReplicationSource{.identity = world_id}; };
h.pump();
CHECK(client->view() == nullptr); // Default M10 snapshots are withheld too.
CHECK(!client->send_intention(101, 0, 0));
CHECK(!client->send_action(1, ActionKind::probe, 101));
std::optional<std::uint64_t> sequence;
CHECK(h.until([&] {
return (sequence =
client->send_cellular_intention(101, 250, -250, std::pair{3'000u, 2'000u}))
.has_value();
}));
CHECK(sequence == 1);
std::vector<IntentionReceipt> receipts;
CHECK(h.until([&] { return !(receipts = client->take_intention_receipts()).empty(); }));
CHECK(receipts.front() == IntentionReceipt{1, AdmitStatus::admitted, 100});
const auto pending = h.server->cellular_intentions(101);
CHECK(pending.size() == 1);
CHECK(pending.front().account == alice);
CHECK(pending.front().intention == CellularIntention{must(client->welcome()).session, 5, 1, 101,
250, -250, true, 3'000, 2'000});
h.tick = 101;
CHECK(h.until([&] { return client->simulated() && client->simulated()->sequence == 1; }));
CHECK(h.server->cellular_intentions(101).empty());
Harness legacy{f};
auto refused = legacy.connect(legacy.issuer.grant(account(0xA7), 1), session_protocol_v6);
CHECK(legacy.settled(*refused));
CHECK(refused->state() == RegionSessionState::closed);
CHECK(refused->close_reason() == SessionCloseReason::unsupported_version);
}
// M10.4: intentions, actions and their distinct answers against a simulated host.
void intentions_and_actions(const Files& f) {
Harness h{f};
@@ -1251,6 +1292,7 @@ int main() try {
const auto files = credentials();
login_rules(files);
primitive_v5_session(files);
cellular_v6_session(files);
limits(files);
durable_control(files);
intentions_and_actions(files);