Correct cellular session test fixtures
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (checks) (push) Failing after 43s
Foundation / checks (postgres) (push) Failing after 52s
Foundation / checks (tsan) (push) Failing after 34s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (ecs) (push) Canceled after 1m52s

This commit is contained in:
dingo
2026-10-11 02:28:26 -04:00
parent ab9fbdec8f
commit 9ed2056806
2 changed files with 50 additions and 16 deletions
+11 -3
View File
@@ -6643,6 +6643,14 @@ MSVC 19.44 compiled the changed biology, lifecycle, client-session and
server-session translation units, the cellular step/lifecycle tests, the QUIC
session test, the client panel and remote-session test with `/W4 /WX /DNDEBUG`.
Visual Studio LLVM `clang-format --dry-run --Werror` and `git diff --check`
passed. The configured CMake/Ninja build remained at `Re-checking globbed
directories...` for 60 seconds and was stopped; the QUIC test executable,
cellular runtime test executables, CI run and live-region probe have not run.
passed. Freshly compiled source objects were manually linked with the existing
workspace libraries: the cellular step test passed, the cellular lives test
passed, and the QUIC session suite passed including v9 owner filtering and v8
compatibility. A freshly linked v9 client executable also passed its `--version`
startup check.
Direct CMake regeneration succeeded. The generated Ninja build still remained
at `Re-checking globbed directories...` before invoking target compilation, so
the CMake target/preset build itself has not completed. CI and the live-region
human probe remain pending; these automated checks do not assess playability or
fun.
+39 -13
View File
@@ -401,15 +401,22 @@ struct FakeLedger final : ControlLedger {
void durable_life_owner_redirects_before_control_claim(const Files& f) {
FakeLedger ledger;
ledger.life_owner = 12;
Harness h{f, 4, 64, &ledger, [](server::RegionSessionsConfig& c) {
c.life_owner_routes = {
server::LifeOwnerRoute{RegionAddress{region, "region-11.example.test:7400",
"region-11.example.test"}},
server::LifeOwnerRoute{RegionAddress{12, "region-12.example.test:7400",
"region-12.example.test"}}};
}};
Harness h{
f, 4, 64, &ledger, [](server::RegionSessionsConfig& c) {
c.create_primitive_life = [](const AccountId&, std::uint64_t, std::uint64_t request) {
return PrimitiveLifeOutcome{request, PrimitiveLifeResult::born, 77, 88};
};
c.query_primitive_life = [](const AccountId&, std::uint64_t, std::uint64_t request) {
return PrimitiveLifeOutcome{request, PrimitiveLifeResult::unknown, 0, 0};
};
c.life_owner_routes = {
server::LifeOwnerRoute{
RegionAddress{region, "region-11.example.test:7400", "region-11.example.test"}},
server::LifeOwnerRoute{
RegionAddress{12, "region-12.example.test:7400", "region-12.example.test"}}};
}};
const auto alice = account(0xB4);
auto client = h.connect(h.issuer.grant(alice, 1), session_protocol_v8);
auto client = h.connect(h.issuer.grant(alice, 1), session_protocol_v5);
CHECK(h.settled(*client) && client->state() == RegionSessionState::closed);
CHECK(client->close_reason() == Reason::moved && client->redirect());
CHECK(must(client->redirect()) ==
@@ -418,11 +425,18 @@ void durable_life_owner_redirects_before_control_claim(const Files& f) {
FakeLedger incomplete_ledger;
incomplete_ledger.life_owner = 12;
Harness incomplete{f, 4, 64, &incomplete_ledger, [](server::RegionSessionsConfig& c) {
c.life_owner_routes = {server::LifeOwnerRoute{RegionAddress{
region, "region-11.example.test:7400", "region-11.example.test"}}};
}};
auto no_route = incomplete.connect(incomplete.issuer.grant(alice, 2), session_protocol_v8);
Harness incomplete{
f, 4, 64, &incomplete_ledger, [](server::RegionSessionsConfig& c) {
c.create_primitive_life = [](const AccountId&, std::uint64_t, std::uint64_t request) {
return PrimitiveLifeOutcome{request, PrimitiveLifeResult::born, 77, 88};
};
c.query_primitive_life = [](const AccountId&, std::uint64_t, std::uint64_t request) {
return PrimitiveLifeOutcome{request, PrimitiveLifeResult::unknown, 0, 0};
};
c.life_owner_routes = {server::LifeOwnerRoute{
RegionAddress{region, "region-11.example.test:7400", "region-11.example.test"}}};
}};
auto no_route = incomplete.connect(incomplete.issuer.grant(alice, 2), session_protocol_v5);
CHECK(incomplete.settled(*no_route) && no_route->close_reason() == Reason::capacity);
CHECK(!no_route->redirect() && incomplete_ledger.claims.empty());
}
@@ -531,6 +545,18 @@ void cellular_v7_action_session(const Files& f) {
return owner == account_id && id == action_id ? record
: std::optional<DurableActionRecord>{};
}
std::expected<std::vector<std::optional<DurableActionRecord>>, ActionLedgerError>
find_all_records(std::span<const ActionKey> keys) override {
std::vector<std::optional<DurableActionRecord>> out;
out.reserve(keys.size());
for (const auto& key : keys) {
auto found = find_record(key.account, key.action_id);
if (!found)
return std::unexpected(found.error());
out.push_back(*found);
}
return out;
}
} actions;
FakeLedger control;
Harness h{f, 4, 64, &control, [&](server::RegionSessionsConfig& c) {