Show what a mutation costs and why an engulf failed
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (deploy) (push) Successful in 4m7s
Foundation / checks (tsan) (push) Successful in 9m49s
Foundation / checks (client) (push) Successful in 17m12s
Foundation / checks (network) (push) Successful in 19m34s
Foundation / checks (checks) (push) Successful in 43m5s
Foundation / checks (postgres) (push) Successful in 44m57s
Foundation / server-image (push) Successful in 31s
Foundation / postgres-tools (push) Successful in 1m13s
Foundation / image (push) Successful in 3m24s

After the first M11.9 playtest (ADR-0129 amendment): each offered candidate now
carries its funded cost to the cell, construction energy and matter per channel,
so the client can grey out what the reserve cannot pay; a candidate is affordable
by that cost exactly when the owner would fund it. A failed engulf now reports no
contact, prey too large, or membrane too thick. The v10 candidate record grows to
64 bytes, so v10 clients must be rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-14 15:39:35 -04:00
co-authored by Claude Opus 5.5
parent dba73a97f5
commit 7c16a13dd9
16 changed files with 172 additions and 41 deletions
+5 -2
View File
@@ -170,17 +170,20 @@ void size_and_membrane_contest_engulfment() {
const std::array equal{cell(1, {0, 0}, 1'000, 1, true), cell(2, {0, 0}, 1'000, 1, false)};
const auto same = propose_cellular_region_step(4, {3'000, 2'000}, equal, *map, rules3);
CHECK(same && same->lives.size() == 2 && same->starved.empty());
CHECK(same->lives[0].engulf == CellularEngulfStatus::no_eligible_prey);
// The owner learns why: equal sizes are too large whatever the membrane.
CHECK(same->lives[0].engulf == CellularEngulfStatus::prey_too_large);
// A 3 um membrane raises the required ratio to 4.5; a 3x predator fails.
const std::array armored{cell(1, {0, 0}, 3'000, 1, true), cell(2, {0, 0}, 1'000, 3, false)};
const auto defended = propose_cellular_region_step(4, {3'000, 2'000}, armored, *map, rules3);
CHECK(defended && defended->lives.size() == 2 && defended->starved.empty());
// 3x would beat a 1 um membrane, so the membrane is the reason.
CHECK(defended->lives[0].engulf == CellularEngulfStatus::membrane_too_thick);
// Out of contact: no prey, whatever the size.
const std::array apart{cell(1, {0, 0}, 9'000, 1, true), cell(2, {2'000, 0}, 1'000, 1, false)};
const auto distant = propose_cellular_region_step(4, {3'000, 2'000}, apart, *map, rules3);
CHECK(distant && distant->lives.size() == 2 &&
distant->lives[0].engulf == CellularEngulfStatus::no_eligible_prey);
distant->lives[0].engulf == CellularEngulfStatus::no_contact);
}
void a_taken_cell_neither_acts_nor_is_taken_twice() {