feat(cellular): energy cycles back through the spent pool (ADR-0182 section 14)
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m42s
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (client) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 31s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / server-image (push) Successful in 4m45s
Foundation / checks (network) (push) Successful in 4s
Foundation / image (push) Successful in 5m31s

Energy cells used went to the region's heat store and never returned, so a
region without photosynthesizers drained: region 16's wildlife ate its energy
and starved, and its matter-only drip filled the deposit limit.

Two optional rules-13 tuning keys, adoptable live: spent.heat_recycle_per_mille
moves that share of the heat store to the spent pool at the end of every tick,
before the drip (1,000 closes the loop and returns heat built up before), and
spent.drip_absorb lets a drip at the deposit limit join the first existing bubble
at or after its spot. Both use the reserved word after the offer interval, so
rules without them keep their bytes, digests, checkpoints and replays. The DEV
revamp file turns both on. The region view reports heat and the cycle; the
portal counts heat in the region's energy and ledger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-10-28 10:18:24 -04:00
co-authored by Claude Opus 5.5
parent 944f6719cf
commit cc2eaf2e05
14 changed files with 264 additions and 25 deletions
+17
View File
@@ -74,6 +74,9 @@ CellularRevampTuning trial(bool safety = true) {
t.reproduction_safety_version = 0;
t.body_growth_reserve_seconds = 0;
t.reproduction_split_launch_um_per_s = 0;
// The DEV revamp file cycles energy (ADR-0182 section 14).
t.spent_heat_recycle_per_mille = 1'000;
t.spent_drip_absorb = 1;
}
return t;
}
@@ -155,6 +158,20 @@ void refusals() {
historical.erase(at, historical.find('\n', at) - at + 1);
}
CHECK(parse_cellular_revamp_tuning(historical)->reproduction_safety_version == 0);
// The energy cycle keys (ADR-0182 section 14) are optional and bounded.
auto uncycled = base;
for (const auto* key : {"spent.heat_recycle_per_mille", "spent.drip_absorb"}) {
const auto at = uncycled.find(key);
uncycled.erase(at, uncycled.find('\n', at) - at + 1);
}
CHECK(parse_cellular_revamp_tuning(uncycled) == trial());
const auto cycled = parse_cellular_revamp_tuning(
with(with(base, "spent.heat_recycle_per_mille", "1_000"), "spent.drip_absorb", "1"));
CHECK(cycled && cycled->spent_heat_recycle_per_mille == 1'000 &&
cycled->spent_drip_absorb == 1);
CHECK(error_of(with(base, "spent.heat_recycle_per_mille", "1001")) ==
CellularTuningErrorKind::out_of_range);
CHECK(error_of(with(base, "spent.drip_absorb", "2")) == CellularTuningErrorKind::out_of_range);
CHECK(error_of(with(base, "playtest.starting_wildlife_cells", "256")) ==
CellularTuningErrorKind::out_of_range);
CHECK(error_of(with(base, "playtest.starting_wildlife_cells", "-1")) ==