Clarify cellular action feedback
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 40s
Foundation / checks (ecs) (push) Successful in 1m58s
Foundation / checks (postgres) (push) Failing after 53s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / checks (network) (push) Failing after 3m4s
Foundation / checks (client) (push) Failing after 4m23s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
dingo
2026-10-11 01:47:33 -04:00
parent e558ac00c6
commit a6a18dd6cd
4 changed files with 114 additions and 18 deletions
+62 -18
View File
@@ -45,6 +45,7 @@
#include <memory> #include <memory>
#include <optional> #include <optional>
#include <string> #include <string>
#include <string_view>
#include <vector> #include <vector>
#ifdef EVO_CLIENT_NETWORK #ifdef EVO_CLIENT_NETWORK
@@ -65,6 +66,55 @@
#endif #endif
namespace evo::client_app { namespace evo::client_app {
[[nodiscard]] inline std::string_view
cellular_admission_message(network::AdmitStatus status) noexcept {
using network::AdmitStatus;
switch (status) {
case AdmitStatus::admitted:
return "Action accepted";
case AdmitStatus::unknown_session:
return "Action refused: session is no longer active";
case AdmitStatus::stale_epoch:
return "Action refused: server session changed; reconnecting may be needed";
case AdmitStatus::outside_window:
return "Action refused: requested tick is outside the server window";
case AdmitStatus::rate_limited:
return "Action refused: too many requests in this server window";
case AdmitStatus::replayed:
return "Action refused: action sequence was already used";
case AdmitStatus::invalid_vector:
return "Action refused: movement vector is invalid";
case AdmitStatus::too_many_unresolved:
return "Action refused: too many earlier actions are unresolved";
case AdmitStatus::invalid_action:
return "Action refused: invalid action request";
case AdmitStatus::duplicate:
return "Duplicate action; waiting for its existing result";
case AdmitStatus::not_ready:
return "Action refused: region is starting, recovering, or draining";
}
return "Action refused: unrecognized server status";
}
[[nodiscard]] inline std::string cellular_outcome_message(network::ActionResult result,
std::uint64_t tick) {
using network::ActionResult;
switch (result) {
case ActionResult::committed_no_effect:
return "Action committed without a state change at tick " + std::to_string(tick);
case ActionResult::not_committed:
return "Action was not committed; the server made no change";
case ActionResult::pending:
return "Action is still waiting for a durable result";
case ActionResult::unknown:
return "The server has no durable result for this action";
case ActionResult::committed:
return "Action committed at tick " + std::to_string(tick) +
"; check cell position and patch stock for its effect";
}
return "Action ended with an unrecognized server result";
}
struct RemoteStatus { struct RemoteStatus {
std::string phase; // connecting / connected / reconnecting / out of grants std::string phase; // connecting / connected / reconnecting / out of grants
std::uint64_t session{}, epoch{}, server_tick{}, simulated_tick{}; std::uint64_t session{}, epoch{}, server_tick{}, simulated_tick{};
@@ -111,7 +161,7 @@ class RemoteSession {
static constexpr double silent_ticks = 3; // Extrapolation limit (2) plus the clock's lead. static constexpr double silent_ticks = 3; // Extrapolation limit (2) plus the clock's lead.
// Looks the endpoint up once (blocking); nothing connects until the first step(). // Looks the endpoint up once (blocking); nothing connects until the first step().
static std::optional<RemoteSession> open(const client::ConnectMaterial& m, static std::optional<RemoteSession> open(const client::ConnectMaterial& m,
bool cellular_trial = false) { bool cellular_trial = false) {
const auto address = network::quic::resolve_ipv4(m.endpoint.host); const auto address = network::quic::resolve_ipv4(m.endpoint.host);
if (!address || m.grants.empty()) if (!address || m.grants.empty())
return std::nullopt; return std::nullopt;
@@ -123,8 +173,8 @@ class RemoteSession {
session.transport_.authority_pem_file = m.authority_path; session.transport_.authority_pem_file = m.authority_path;
session.grants_ = m.grants; session.grants_ = m.grants;
session.cellular_trial_ = cellular_trial; session.cellular_trial_ = cellular_trial;
session.next_cellular_action_id_ = static_cast<std::uint64_t>( session.next_cellular_action_id_ =
std::chrono::system_clock::now().time_since_epoch().count()); static_cast<std::uint64_t>(std::chrono::system_clock::now().time_since_epoch().count());
if (session.next_cellular_action_id_ == 0) if (session.next_cellular_action_id_ == 0)
session.next_cellular_action_id_ = 1; session.next_cellular_action_id_ = 1;
session.cellular_birth_request_id_ = session.cellular_birth_request_id_ =
@@ -483,14 +533,14 @@ class RemoteSession {
void cellular_results() { void cellular_results() {
for (const auto& receipt : client_->take_primitive_life_receipts()) for (const auto& receipt : client_->take_primitive_life_receipts())
if (receipt.status != network::AdmitStatus::admitted) if (receipt.status != network::AdmitStatus::admitted)
cellular_action_status_ = cellular_action_status_ = "Birth request refused (status " +
"Birth request refused (status " + std::to_string(static_cast<unsigned>(receipt.status)) +
std::to_string(static_cast<unsigned>(receipt.status)) + ")"; ")";
for (const auto& outcome : client_->take_primitive_life_outcomes()) { for (const auto& outcome : client_->take_primitive_life_outcomes()) {
switch (outcome.result) { switch (outcome.result) {
case network::PrimitiveLifeResult::born: case network::PrimitiveLifeResult::born:
cellular_action_status_ = "Cell founded (life " + cellular_action_status_ =
std::to_string(outcome.life_identity) + ")"; "Cell founded (life " + std::to_string(outcome.life_identity) + ")";
break; break;
case network::PrimitiveLifeResult::insufficient_funding: case network::PrimitiveLifeResult::insufficient_funding:
cellular_action_status_ = "Birth refused: nursery funding is insufficient"; cellular_action_status_ = "Birth refused: nursery funding is insufficient";
@@ -515,15 +565,9 @@ class RemoteSession {
} }
for (const auto& receipt : client_->take_action_receipts()) for (const auto& receipt : client_->take_action_receipts())
if (receipt.status != network::AdmitStatus::admitted) if (receipt.status != network::AdmitStatus::admitted)
cellular_action_status_ = "Action refused (status " + cellular_action_status_ = cellular_admission_message(receipt.status);
std::to_string(static_cast<unsigned>(receipt.status)) +
")";
for (const auto& outcome : client_->take_action_outcomes()) for (const auto& outcome : client_->take_action_outcomes())
cellular_action_status_ = cellular_action_status_ = cellular_outcome_message(outcome.result, outcome.tick);
outcome.result == network::ActionResult::committed
? "Action committed at tick " + std::to_string(outcome.tick)
: "Action ended without commit (result " +
std::to_string(static_cast<unsigned>(outcome.result)) + ")";
} }
void receipts() { void receipts() {
for (const auto& r : client_->take_intention_receipts()) { for (const auto& r : client_->take_intention_receipts()) {
@@ -795,8 +839,8 @@ class RemoteSession {
[[nodiscard]] const std::string& cellular_action_status() const noexcept { [[nodiscard]] const std::string& cellular_action_status() const noexcept {
return action_status_; return action_status_;
} }
void set_cellular_feed_target( void set_cellular_feed_target(std::optional<std::pair<std::uint32_t, std::uint32_t>>) noexcept {
std::optional<std::pair<std::uint32_t, std::uint32_t>>) noexcept {} }
[[nodiscard]] RemoteStatus status() const { [[nodiscard]] RemoteStatus status() const {
RemoteStatus status; RemoteStatus status;
status.phase = "unavailable in this build"; status.phase = "unavailable in this build";
+6
View File
@@ -382,6 +382,12 @@ scoped change before starting the next segment.
on-screen perception work in a hands-on session. Those outcomes and the on-screen perception work in a hands-on session. Those outcomes and the
exploratory notes remain the 11.3e exit evidence. The 11.4 mutation expansion exploratory notes remain the 11.3e exit evidence. The 11.4 mutation expansion
stays behind that probe so its feedback can affect the next design decisions. stays behind that probe so its feedback can affect the next design decisions.
- 11.3e-5: the engineering client now translates cellular admission refusals and
durable action results into readable messages instead of numeric wire codes.
A committed action directs the player to inspect authoritative position and
patch-stock changes. This clarifies transport/scheduling failures; the protocol
still does not report per-tick reserve or itemized maintenance/movement costs,
so resource-cost legibility remains an open probe limitation.
## Exit boundary ## Exit boundary
+18
View File
@@ -6597,3 +6597,21 @@ bundle, and establishes there. Claim counters assert that region 1 did not take
control. GCC 13.2 strict-warning syntax compilation and Visual Studio LLVM control. GCC 13.2 strict-warning syntax compilation and Visual Studio LLVM
`clang-format` passed; the test binary has not run. CI execution remains `clang-format` passed; the test binary has not run. CI execution remains
required. required.
## 2026-10-11 — M11.3e-5 readable cellular action feedback (CI pending)
The cellular client now explains each protocol admission status and durable
action result in plain language. A committed action tells the player to inspect
authoritative position and patch-stock changes. This clarifies session and
scheduling failures; it does not add the missing reserve or per-tick
maintenance/movement-cost display.
The modified `tests/client_remote_session.cpp` translation unit compiled with
MSVC `/W4 /WX`, the standalone status/outcome checks passed, Visual Studio's
LLVM `clang-format` check passed, and `git diff --check` passed. The normal
`client-network` Ninja build still stalls at the CMake glob recheck. A manual
test link against the existing build libraries was not valid evidence: those
libraries predate v8, first missing the new client methods and then failing
during old server-session setup. The full remote-session test, fresh client
link, and CI run remain pending; no cellular runtime or playtest success is
claimed.
+28
View File
@@ -9,6 +9,7 @@
#include "fixtures/fake_handoff_world.hpp" #include "fixtures/fake_handoff_world.hpp"
#include "remote_session.hpp" #include "remote_session.hpp"
#include <algorithm> #include <algorithm>
#include <array>
#include <chrono> #include <chrono>
#include <cstdio> #include <cstdio>
#include <filesystem> #include <filesystem>
@@ -490,6 +491,33 @@ void crossing_regions(const Files& f) {
} // namespace } // namespace
int main() try { int main() try {
using namespace std::string_view_literals;
using evo::client_app::cellular_admission_message;
using evo::client_app::cellular_outcome_message;
using evo::network::ActionResult;
using evo::network::AdmitStatus;
const std::array admissions{std::pair{AdmitStatus::admitted, "accepted"sv},
std::pair{AdmitStatus::unknown_session, "no longer active"sv},
std::pair{AdmitStatus::stale_epoch, "session changed"sv},
std::pair{AdmitStatus::outside_window, "tick"sv},
std::pair{AdmitStatus::rate_limited, "too many"sv},
std::pair{AdmitStatus::replayed, "already used"sv},
std::pair{AdmitStatus::invalid_vector, "vector is invalid"sv},
std::pair{AdmitStatus::too_many_unresolved, "unresolved"sv},
std::pair{AdmitStatus::invalid_action, "invalid action"sv},
std::pair{AdmitStatus::duplicate, "Duplicate action"sv},
std::pair{AdmitStatus::not_ready, "recovering"sv}};
for (const auto& [status, phrase] : admissions)
CHECK(cellular_admission_message(status).find(phrase) != std::string_view::npos);
const std::array outcomes{
std::pair{ActionResult::committed_no_effect, "without a state change"sv},
std::pair{ActionResult::not_committed, "no change"sv},
std::pair{ActionResult::pending, "waiting"sv},
std::pair{ActionResult::unknown, "no durable result"sv},
std::pair{ActionResult::committed, "patch stock"sv}};
for (const auto& [result, phrase] : outcomes)
CHECK(cellular_outcome_message(result, 23).find(phrase) != std::string::npos);
const auto files = credentials(); const auto files = credentials();
{ {
Region r{files}; Region r{files};