fix(server): sessions see the open batch's simulated tick
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 4m14s
Foundation / image (push) Successful in 4m40s

With commits every flush interval the session layer still read the committed
head as the simulated tick, so clients saw time advance 20 ticks at once and
scheduled their actions for ticks the server had already simulated, which were
refused (poor movement). Sessions now get the open batch's working tick, so
welcome ticks, receipts, the simulated watermark and action admission follow what
has actually been simulated. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-21 22:32:59 -04:00
co-authored by Claude Opus 5.5
parent e8c9f1fe17
commit 10be45ec55
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -1014,7 +1014,13 @@ int serve_cellular(Options& o) {
std::chrono::system_clock::now().time_since_epoch())
.count());
static_cast<void>(bridge->accepting(wall));
bridge->poll(status, wall);
// Sessions schedule and admit against what has been simulated: the open batch's
// working tick runs up to a flush interval ahead of the committed head.
auto session_status = status;
if (batch_builder)
session_status.simulated_tick =
std::max(session_status.simulated_tick, batch_builder->candidate().tick());
bridge->poll(session_status, wall);
deliver_finalized();
set_ready(status.ready);
if (!phase || *phase != status.phase) {
@@ -12,7 +12,7 @@ spec:
env:
- {name: REGION_SESSION, value: "dev"}
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
- {name: REGION_SESSION_WINDOW, value: "dev-20261022T015607-b508b4f9:1792648567"}
- {name: REGION_SESSION_WINDOW, value: "dev-20261022T023259-137c9cf6:1792650779"}
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
ports:
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.