feat(client): recent actions show what each engulf or bud did
Foundation / checks (tsan) (push) Canceled after 0s
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 45s
Foundation / checks (checks) (push) Canceled after 49s
Foundation / checks (client) (push) Canceled after 49s
Foundation / checks (postgres) (push) Canceled after 48s
Foundation / checks (deploy) (push) Canceled after 54s
Foundation / checks (network) (push) Canceled after 53s
Foundation / checks (tsan) (push) Canceled after 0s
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 45s
Foundation / checks (checks) (push) Canceled after 49s
Foundation / checks (client) (push) Canceled after 49s
Foundation / checks (postgres) (push) Canceled after 48s
Foundation / checks (deploy) (push) Canceled after 54s
Foundation / checks (network) (push) Canceled after 53s
A history entry only said "Committed", so a refused engulf (membrane too thick) looked like a success. The engulf or bud result reported in the action's tick view is now attached to that entry: Recent actions shows the action, its tick and the region's result, green only when it took effect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -472,6 +472,30 @@ void cellular_play() {
|
||||
exhausted.initialize(std::numeric_limits<std::uint64_t>::max());
|
||||
CHECK(exhausted.allocate_id() == 0 && exhausted.allocate_id() == 0);
|
||||
}
|
||||
// Recent actions keep what the region did: the effect reported in the action's tick view
|
||||
// is attached to that engulf, even after its committed outcome moved it to the history.
|
||||
void cellular_action_effects() {
|
||||
using namespace evo::client_app;
|
||||
using namespace evo::network;
|
||||
CellularPlay play;
|
||||
play.initialize(50);
|
||||
play.connected();
|
||||
play.observe({200, 700, {}, CellularLifeDiagnostics{}});
|
||||
CHECK(play.queue(CellAction::engulf, 203));
|
||||
const auto id = required(play.pending()).id;
|
||||
play.sent();
|
||||
play.outcome({id, ActionResult::committed, 203, 1});
|
||||
CHECK(!play.pending() && !play.history().back().engulf);
|
||||
CellularLifeDiagnostics effect;
|
||||
effect.has_tick_effects = true;
|
||||
effect.engulf = CellularEngulfResult::membrane_too_thick;
|
||||
play.observe({203, 700, {}, effect});
|
||||
CHECK(play.history().back().engulf == CellularEngulfResult::membrane_too_thick);
|
||||
// A later engulf result does not overwrite the reported one.
|
||||
effect.engulf = CellularEngulfResult::engulfed;
|
||||
play.observe({204, 700, {}, effect});
|
||||
CHECK(play.history().back().engulf == CellularEngulfResult::membrane_too_thick);
|
||||
}
|
||||
void cellular_energy_and_birth_wait() {
|
||||
using namespace evo::client_app;
|
||||
using namespace evo::network;
|
||||
@@ -551,6 +575,7 @@ int main() try {
|
||||
outcome_log();
|
||||
session_host();
|
||||
cellular_play();
|
||||
cellular_action_effects();
|
||||
cellular_energy_and_birth_wait();
|
||||
cellular_assistance();
|
||||
cell_headings();
|
||||
|
||||
Reference in New Issue
Block a user