Finish birth refusal integration and stabilize client panel checks
Foundation / checks (checks) (push) Successful in 42m5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (network) (push) Successful in 18m43s
Foundation / checks (postgres) (push) Successful in 44m0s
Foundation / checks (tsan) (push) Successful in 10m8s
Foundation / checks (client) (push) Successful in 15m13s
Foundation / postgres-tools (push) Successful in 31s
Foundation / server-image (push) Successful in 3m18s
Foundation / image (push) Successful in 3m23s

This commit is contained in:
dingo
2026-10-15 13:02:43 -04:00
parent 40426777a0
commit bda1631ded
8 changed files with 108 additions and 44 deletions
+40 -34
View File
@@ -635,16 +635,17 @@ void cell_vitals(const PanelView& v) {
void cell_food(const PanelView& v, PanelActions& a, FormBuffers& form) { void cell_food(const PanelView& v, PanelActions& a, FormBuffers& form) {
ImGui::TextColored(green, "FEED & SURVIVE"); ImGui::TextColored(green, "FEED & SURVIVE");
ImGui::Checkbox("Feed automatically", &form.cellular_controls.auto_feed); ImGui::Checkbox("Feed automatically", &form.cellular_controls.auto_feed);
ImGui::Checkbox("Slow near food", &form.cellular_controls.slow_near_food); disabled_wrapped("Map: gold E = energy / teal M = matter. Zoom in to read markers.");
ImGui::Checkbox("Precision steering (20%)", &form.cellular_controls.precision); if (ImGui::CollapsingHeader("Steering assistance")) {
ImGui::SetNextItemWidth(-1); ImGui::Checkbox("Slow near food", &form.cellular_controls.slow_near_food);
ImGui::SliderInt("##speed", &form.cellular_controls.speed_percent, 1, 100, "Speed: %d%%"); ImGui::Checkbox("Precision steering (20%)", &form.cellular_controls.precision);
disabled_wrapped( ImGui::SetNextItemWidth(-1);
"Map key: gold E = energy, teal M = matter; no letters = empty (zoom in to " ImGui::SliderInt("##speed", &form.cellular_controls.speed_percent, 1, 100, "Speed: %d%%");
"see letters). Auto feed prefers energy in contact. Choose a patch for manual feeding."); }
disabled_wrapped("Patch stock is finite and shared. Matter does not replenish energy. Uptake " if (ImGui::CollapsingHeader("Feeding & energy explained"))
"is limited by your cell; stock is not a promise of gain each tick. Upkeep is " disabled_wrapped("Patch stock is finite and shared. Matter does not replenish energy. "
"paid before feeding."); "Uptake is limited by your cell and upkeep is paid before feeding. "
"Auto feed prefers energy in contact. Choose a patch for manual feeding.");
const bool active = v.cellular_play && v.cellular_play->fresh() && v.cellular_play->life() != 0; const bool active = v.cellular_play && v.cellular_play->fresh() && v.cellular_play->life() != 0;
ImGui::BeginDisabled(!active); ImGui::BeginDisabled(!active);
if (v.cellular_feed_target && ImGui::Button("Stop feeding", {-1, 0})) if (v.cellular_feed_target && ImGui::Button("Stop feeding", {-1, 0}))
@@ -652,30 +653,35 @@ void cell_food(const PanelView& v, PanelActions& a, FormBuffers& form) {
if (const auto* p = v.cellular_perception) { if (const auto* p = v.cellular_perception) {
if (p->patches.empty()) if (p->patches.empty())
disabled_wrapped("No food is visible within sensor range."); disabled_wrapped("No food is visible within sensor range.");
for (const auto& patch : p->patches) { for (const bool target_first : {true, false}) {
ImGui::PushID(static_cast<int>(patch.x_um)); for (const auto& patch : p->patches) {
ImGui::PushID(static_cast<int>(patch.y_um)); const bool selected = v.cellular_feed_target == std::pair{patch.x_um, patch.y_um};
ImGui::Separator(); if (selected != target_first)
ImGui::Text("Patch %u / %u um", patch.x_um, patch.y_um); continue;
const bool has_matter = ImGui::PushID(static_cast<int>(patch.x_um));
std::ranges::any_of(patch.matter_fg, [](auto amount) { return amount != 0; }); ImGui::PushID(static_cast<int>(patch.y_um));
ImGui::TextColored(patch.energy_pj != 0 ? amber : green, "%s", ImGui::Separator();
patch.energy_pj != 0 ? "E ENERGY AVAILABLE" ImGui::Text("Patch %u / %u um", patch.x_um, patch.y_um);
: has_matter ? "M MATTER ONLY / NO ENERGY" const bool has_matter =
: "EMPTY / DEPLETED"); std::ranges::any_of(patch.matter_fg, [](auto amount) { return amount != 0; });
ImGui::Text("Energy stock: %llu pJ", static_cast<unsigned long long>(patch.energy_pj)); ImGui::TextColored(patch.energy_pj != 0 ? amber : green, "%s",
ImGui::TextWrapped("C %llu / N %llu / P %llu / other %llu fg", patch.energy_pj != 0 ? "E ENERGY AVAILABLE"
static_cast<unsigned long long>(patch.matter_fg[0]), : has_matter ? "M MATTER ONLY / NO ENERGY"
static_cast<unsigned long long>(patch.matter_fg[1]), : "EMPTY / DEPLETED");
static_cast<unsigned long long>(patch.matter_fg[2]), ImGui::Text("Energy stock: %llu pJ",
static_cast<unsigned long long>(patch.matter_fg[3])); static_cast<unsigned long long>(patch.energy_pj));
const bool selected = v.cellular_feed_target == std::pair{patch.x_um, patch.y_um}; ImGui::TextWrapped("C %llu / N %llu / P %llu / other %llu fg",
if (selected) static_cast<unsigned long long>(patch.matter_fg[0]),
ImGui::TextColored(green, "FEEDING TARGET"); static_cast<unsigned long long>(patch.matter_fg[1]),
else if (ImGui::Button("Feed here", {-1, 0})) static_cast<unsigned long long>(patch.matter_fg[2]),
a.feed_patch = {patch.x_um, patch.y_um}; static_cast<unsigned long long>(patch.matter_fg[3]));
ImGui::PopID(); if (selected)
ImGui::PopID(); ImGui::TextColored(green, "FEEDING TARGET");
else if (ImGui::Button("Feed here", {-1, 0}))
a.feed_patch = {patch.x_um, patch.y_um};
ImGui::PopID();
ImGui::PopID();
}
} }
} }
ImGui::EndDisabled(); ImGui::EndDisabled();
+6 -4
View File
@@ -1097,8 +1097,8 @@ int serve_cellular(Options& o) {
if (!builder) { if (!builder) {
bridge->dropped(actions, true); bridge->dropped(actions, true);
} else { } else {
auto appended = builder->append(tick, baseline, actions, held_births, auto appended = builder->append_with_birth_refusals(
host.queued_mutations()); tick, baseline, actions, held_births, host.queued_mutations());
if (!appended && !actions.empty()) { if (!appended && !actions.empty()) {
// ADR-0127: one account's unusable action (its life died, or it // ADR-0127: one account's unusable action (its life died, or it
// names an unperceived patch) refuses only that action, never the // names an unperceived patch) refuses only that action, never the
@@ -1112,8 +1112,8 @@ int serve_cellular(Options& o) {
.push_back(action); .push_back(action);
bridge->dropped(refused, true); bridge->dropped(refused, true);
actions = std::move(usable); actions = std::move(usable);
appended = builder->append(tick, baseline, actions, held_births, appended = builder->append_with_birth_refusals(
host.queued_mutations()); tick, baseline, actions, held_births, host.queued_mutations());
} }
if (!appended) { if (!appended) {
bridge->dropped(actions, true); bridge->dropped(actions, true);
@@ -1122,6 +1122,8 @@ int serve_cellular(Options& o) {
actions.end()); actions.end());
auto published = host.publish(builder->batch(), builder->actions(), auto published = host.publish(builder->batch(), builder->actions(),
builder->mutation_actions()); builder->mutation_actions());
if (published)
host.refuse_births(builder->refused_births());
if (!published && host.status().phase != server::HostPhase::resolving) { if (!published && host.status().phase != server::HostPhase::resolving) {
bridge->dropped(actions, true); bridge->dropped(actions, true);
std::erase_if(awaiting_outcomes, [&](const auto& action) { std::erase_if(awaiting_outcomes, [&](const auto& action) {
+3
View File
@@ -141,6 +141,9 @@ if(EVO_BUILD_CLIENT)
add_test(NAME client-init-failure COMMAND evo-client --frames 1) add_test(NAME client-init-failure COMMAND evo-client --frames 1)
set_tests_properties(client-lifecycle client-panels client-smoke PROPERTIES set_tests_properties(client-lifecycle client-panels client-smoke PROPERTIES
ENVIRONMENT "SDL_VIDEO_DRIVER=dummy" TIMEOUT 30 LABELS "client") ENVIRONMENT "SDL_VIDEO_DRIVER=dummy" TIMEOUT 30 LABELS "client")
# Multiple layouts and real software-rendered widget interactions, including
# disabled buttons. This is a correctness gate, not a runner speed benchmark.
set_tests_properties(client-panels PROPERTIES TIMEOUT 120)
set_tests_properties(client-init-failure PROPERTIES set_tests_properties(client-init-failure PROPERTIES
ENVIRONMENT "SDL_VIDEO_DRIVER=evo-invalid" WILL_FAIL TRUE TIMEOUT 20 LABELS "client") ENVIRONMENT "SDL_VIDEO_DRIVER=evo-invalid" WILL_FAIL TRUE TIMEOUT 20 LABELS "client")
endif() endif()
+1 -1
View File
@@ -21,7 +21,7 @@ change. UI does not infer action success from a receipt, empty view or vanished
`cellular_controls.hpp` selects only stocked patches in observed contact, scales `cellular_controls.hpp` selects only stocked patches in observed contact, scales
movement intentions for speed/precision/food assistance, and compares every mutation movement intentions for speed/precision/food assistance, and compares every mutation
cost channel with the displayed reserve. `cellular_scene.hpp` renders each patch cost channel with the displayed reserve. `cellular_scene.hpp` renders each patch
in at most three clipped rectangles; the application reserves that worst-case in at most eleven clipped rectangles (border, inset, energy/matter letters); the application reserves that worst-case
budget before drawing organisms. No dependency or simulation rule changes. budget before drawing organisms. No dependency or simulation rule changes.
The v10 panels consume this state and return actions; the app owns session sends. The v10 panels consume this state and return actions; the app owns session sends.
+38
View File
@@ -7572,3 +7572,41 @@ Limits: no live Keycloak token was exercised yet. DEV deployment waits for:
- the image promotion; - the image promotion;
- the out-of-band Secrets `aevolution-grant-issuer` and `aevolution-grant-broker-pg`; - the out-of-band Secrets `aevolution-grant-issuer` and `aevolution-grant-broker-pg`;
- the Ingress for `grants.aeternalisgames.com`. - the Ingress for `grants.aeternalisgames.com`.
## 2026-10-15 — finish food/restart fixes and repair client CI timeout
The supplied CI log compiled successfully and passed 12/13 client-probe checks;
`client-panels` hit its old 30-second timeout. Its cellular click scan now uses
half-frame spacing, which still crosses every button, and the correctness gate
allows 120 seconds for software rendering/sanitizers. Disabled/duplicate actions
remain covered. The optional screenshot rehearsal now settles tab-click events
and restores its mutation offer after resetting the energy baseline. A missing
action ledger in the new no-view birth fixture is supplied explicitly.
The food panel prioritizes the current target and collapses steering/help text,
so energy and matter stocks are visible without a wall of instructions. The
server scheduler call sites omitted from commit 817a830 now use the validated
birth-refusal builder and record refusals after confirmed publication.
Executed locally:
- Windows MSVC Release/NDEBUG client-package gate: 17/17, 117.72 s.
- Clang 19 Release client UI model, panels, real QUIC remote session and cellular
session batching: 4/4, 35.67 s; panels 6.06 s (previously about 11.5 s locally).
- Clang 19 ASan/UBSan UI model and panels: 2/2, 13.87 s; cellular batch regression
also passed under ASan/UBSan.
- Before the independent Keycloak commits, the isolated PostgreSQL C++ suite
passed with the birth-host regression in Release (422 s total) and ASan/UBSan
(250 s total). Current server/scheduler rebuilt against the new HEAD and its
batching regression passed. No live database was used.
- Production panels rendered and inspected at 640x480, 960x640 and 1280x800 in
build/food-review, including energy-free targets and the death screen.
- Clang 19 static analysis passed for the server integration with public-header
filtering and for the client/model/session sources. An expanded app-server
header scan additionally found five pre-existing findings in cellular_bridge,
m10_bridge and session_bridge; those unrelated helpers were not changed.
Limits: live DEV logs were unavailable (no configured kubectl context). The
nursery stall is reproduced locally, not confirmed as this player's precise live
refusal. This gate changes neither nursery resources nor simulation/replay rules.
No deployment or World0 operation ran. Authentication is a following gate under
ADR-0131. The unrelated deployment edit and untracked files were preserved.
+4 -2
View File
@@ -218,10 +218,12 @@ void durable_mutation_reservations_bind_to_the_exact_offer() {
auto revision_owner = owner.migrate_to_v3(); auto revision_owner = owner.migrate_to_v3();
CHECK(revision_owner); CHECK(revision_owner);
const auto offer = (*revision_owner)->mutation_offer(life_id); const auto offer = (*revision_owner)->mutation_offer(life_id);
CHECK(offer && *offer && !(*offer)->candidates.empty()); CHECK(offer && offer->has_value());
const auto offered_candidates = offer->value_or(biology::MutationOffer{});
CHECK(!offered_candidates.candidates.empty());
const auto& live = (*revision_owner)->lives()[0]; const auto& live = (*revision_owner)->lives()[0];
const auto action_tick = (*revision_owner)->tick() + 1; const auto action_tick = (*revision_owner)->tick() + 1;
const auto& candidate = (*offer)->candidates.front(); const auto& candidate = offered_candidates.candidates.front();
persistence::CellularMutationReservation reservation; persistence::CellularMutationReservation reservation;
reservation.account = live.account; reservation.account = live.account;
reservation.action_id = 42; reservation.action_id = 42;
+9 -3
View File
@@ -378,8 +378,8 @@ void cellular_panels(const std::filesystem::path& review) {
camera->world_to_screen({static_cast<double>(x), static_cast<double>(y)}); camera->world_to_screen({static_cast<double>(x), static_cast<double>(y)});
const auto high = camera->world_to_screen({x + 1.0, y + 1.0}); const auto high = camera->world_to_screen({x + 1.0, y + 1.0});
CHECK(low && high); CHECK(low && high);
patch_box(boxes, *low, *high, (x + y) % 4 != 0, (x + y) % 3 != 0, x == 2 && y == 3, patch_box(boxes, *low, *high, (x + y) % 4 != 0 && !(x == 2 && y == 3),
width, height); (x + y) % 3 != 0, x == 2 && y == 3, width, height);
} }
OrganismCell organism; OrganismCell organism;
organism.id = 901; organism.id = 901;
@@ -494,10 +494,12 @@ void cellular_panels(const std::filesystem::path& review) {
(review / ("cellular-food-" + std::to_string(width) + ".bmp")).string())); (review / ("cellular-food-" + std::to_string(width) + ".bmp")).string()));
draw(); draw();
choose_tab("Cell"); choose_tab("Cell");
const auto saved_offer = play.offer();
play.disconnected(); play.disconnected();
play.connected(); play.connected();
++perception.tick; ++perception.tick;
play.observe(perception); play.observe(perception);
play.observe_offer(saved_offer);
view.cellular_feed_target.reset(); view.cellular_feed_target.reset();
for (int i = 0; i < 3; ++i) for (int i = 0; i < 3; ++i)
draw(); draw();
@@ -511,7 +513,11 @@ void cellular_panels(const std::filesystem::path& review) {
// Click the first production choice. Pointer ownership prevents world selection. // Click the first production choice. Pointer ownership prevents world selection.
const auto probe = [&](const ImGuiWindow* panel, float x_fraction, const auto& done) { const auto probe = [&](const ImGuiWindow* panel, float x_fraction, const auto& done) {
const float x = panel->Pos.x + panel->Size.x * x_fraction; const float x = panel->Pos.x + panel->Size.x * x_fraction;
for (int offset = 90; static_cast<float>(offset) < panel->Size.y - 10; offset += 5) { // Every button is at least a frame high. Half-frame spacing still hits
// each button, including disabled ones, without rendering every five pixels.
const int stride = std::max(1, static_cast<int>(ImGui::GetFrameHeight() / 2));
for (int offset = 90; static_cast<float>(offset) < panel->Size.y - 10;
offset += stride) {
const float y = panel->Pos.y + static_cast<float>(offset); const float y = panel->Pos.y + static_cast<float>(offset);
mouse(id, SDL_EVENT_MOUSE_MOTION, x, y); mouse(id, SDL_EVENT_MOUSE_MOTION, x, y);
mouse(id, SDL_EVENT_MOUSE_BUTTON_DOWN, x, y); mouse(id, SDL_EVENT_MOUSE_BUTTON_DOWN, x, y);
+7
View File
@@ -503,6 +503,12 @@ void crossing_regions(const Files& f) {
CHECK(db1.claims == region1_claims && db2.claims == region2_claims + 1); CHECK(db1.claims == region1_claims && db2.claims == region2_claims + 1);
} }
void cellular_birth_without_view(const Files& files) { void cellular_birth_without_view(const Files& files) {
struct EmptyLedger final : ActionLedger {
std::expected<std::optional<ActionOutcome>, ActionLedgerError>
find(const AccountId&, std::uint64_t) override {
return std::nullopt;
}
} ledger;
test::WorldDb world; test::WorldDb world;
test::RegionDb control{world, region}; test::RegionDb control{world, region};
const auto owner = account(0xD1); const auto owner = account(0xD1);
@@ -510,6 +516,7 @@ void cellular_birth_without_view(const Files& files) {
auto answer = PrimitiveLifeResult::pending; auto answer = PrimitiveLifeResult::pending;
Region r{files, [&](server::RegionSessionsConfig& config) { Region r{files, [&](server::RegionSessionsConfig& config) {
config.ledger = &control; config.ledger = &control;
config.actions = &ledger;
config.accept_cellular_actions = true; config.accept_cellular_actions = true;
config.create_primitive_life = [&](const AccountId& a, std::uint64_t generation, config.create_primitive_life = [&](const AccountId& a, std::uint64_t generation,
std::uint64_t id) { std::uint64_t id) {