M11-PT-001: name the owner's refusal when a cellular tick stalls
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (deploy) (push) Successful in 4m6s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / checks (network) (push) Successful in 19m48s
Foundation / checks (client) (push) Successful in 21m2s
Foundation / checks (checks) (push) Successful in 45m36s
Foundation / checks (postgres) (push) Successful in 45m54s
Foundation / postgres-tools (push) Successful in 24s
Foundation / server-image (push) Successful in 30s
Foundation / image (push) Successful in 3m33s
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (deploy) (push) Successful in 4m6s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / checks (network) (push) Successful in 19m48s
Foundation / checks (client) (push) Successful in 21m2s
Foundation / checks (checks) (push) Successful in 45m36s
Foundation / checks (postgres) (push) Successful in 45m54s
Foundation / postgres-tools (push) Successful in 24s
Foundation / server-image (push) Successful in 30s
Foundation / image (push) Successful in 3m33s
The session batch builder reported every refusal of the owner's own step or restore as "biology", which cannot tell a resume problem from any other. It now keeps the CellularLivesError behind that, and the stall line prints it as lives=N (-1 when the refusal was not the owner's). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -932,13 +932,13 @@ int serve_cellular(Options& o) {
|
||||
// A tick that cannot be built is retried every 50 ms; name each distinct cause once.
|
||||
std::optional<std::pair<std::string_view, server::CellularSessionBatchError>> stalled;
|
||||
const auto report_stall = [&](std::string_view where, server::CellularSessionBatchError error,
|
||||
std::uint64_t tick) {
|
||||
std::uint64_t tick, int lives_error = -1) {
|
||||
if (stalled && stalled->first == where && stalled->second == error)
|
||||
return;
|
||||
stalled.emplace(where, error);
|
||||
std::printf("cellular tick stalled tick=%llu at=%.*s error=%u\n",
|
||||
std::printf("cellular tick stalled tick=%llu at=%.*s error=%u lives=%d\n",
|
||||
static_cast<unsigned long long>(tick), static_cast<int>(where.size()),
|
||||
where.data(), static_cast<unsigned>(error));
|
||||
where.data(), static_cast<unsigned>(error), lives_error);
|
||||
};
|
||||
const auto set_ready = [&](bool now) {
|
||||
if (ready != now) {
|
||||
@@ -1129,7 +1129,9 @@ int serve_cellular(Options& o) {
|
||||
tick, baseline, actions, held_births, host.queued_mutations());
|
||||
}
|
||||
if (!appended) {
|
||||
report_stall("append", appended.error(), tick);
|
||||
const auto lives = builder->last_lives_error();
|
||||
report_stall("append", appended.error(), tick,
|
||||
lives ? static_cast<int>(*lives) : -1);
|
||||
bridge->dropped(actions, true);
|
||||
} else {
|
||||
stalled.reset();
|
||||
|
||||
@@ -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-20261016T153552-98691:1792175752"}
|
||||
- {name: REGION_SESSION_WINDOW, value: "dev-20261016T173635-64851:1792182995"}
|
||||
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
|
||||
ports:
|
||||
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -81,6 +82,10 @@ class CellularSessionBatchBuilder {
|
||||
[[nodiscard]] const CellularLives& candidate() const noexcept {
|
||||
return *working_;
|
||||
}
|
||||
// The owner's own refusal behind the last `biology` error, for operator logs.
|
||||
[[nodiscard]] std::optional<CellularLivesError> last_lives_error() const noexcept {
|
||||
return last_lives_error_;
|
||||
}
|
||||
|
||||
private:
|
||||
[[nodiscard]] std::expected<void, CellularSessionBatchError>
|
||||
@@ -96,5 +101,6 @@ class CellularSessionBatchBuilder {
|
||||
std::vector<CellularActionRecord> actions_;
|
||||
std::vector<CellularMutationActionRecord> mutation_actions_;
|
||||
std::vector<CellularBirthRefusal> refused_births_;
|
||||
std::optional<CellularLivesError> last_lives_error_;
|
||||
};
|
||||
} // namespace evo::server
|
||||
|
||||
@@ -234,9 +234,16 @@ std::expected<void, CellularSessionBatchError> CellularSessionBatchBuilder::appe
|
||||
|
||||
auto next = CellularLives::restore(working_->snapshot(), working_->world(), working_->region(),
|
||||
working_->frame(), working_->tick());
|
||||
if (!next ||
|
||||
!(*next)->advance_tick_with_mutations(prepared->intents.lives, prepared->intents.mutations))
|
||||
if (!next) {
|
||||
last_lives_error_ = next.error();
|
||||
return std::unexpected{CellularSessionBatchError::biology};
|
||||
}
|
||||
if (const auto advanced = (*next)->advance_tick_with_mutations(prepared->intents.lives,
|
||||
prepared->intents.mutations);
|
||||
!advanced) {
|
||||
last_lives_error_ = advanced.error();
|
||||
return std::unexpected{CellularSessionBatchError::biology};
|
||||
}
|
||||
|
||||
std::vector<CellularTickIntents::Birth> accepted_births;
|
||||
std::vector<CellularBirthRefusal> refused_births;
|
||||
|
||||
Reference in New Issue
Block a user