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
@@ -284,6 +284,34 @@ or worlds from the portal (a later gate: Git-generated manifests through the Git
Argo sync for one more region in the world; several concurrent regions or worlds need
per-region Deployments, volumes and routes).
### 14. Energy cycle (delivered 2026-10-28, live-tunable)
Matter a cell burns returns to the spent pool and drips back; energy it uses (upkeep, motion,
growth, mutation rebuilds, the share of a bubble lost in feeding, predation losses) went to the
region's heat store and never came back. Light is the only new energy, so a region without
photosynthesizers drained into heat: region 16's wildlife ate the region's energy and starved,
its spent pool held only matter, and the matter-only bubbles it dripped filled the 8,192
deposits.
- **Heat recycling.** `spent.heat_recycle_per_mille` (rules field `heat_recycle_per_thousand`,
0..1,000): at the end of every tick, before the drip, that share of the region's whole heat
store moves to the spent pool. 1,000 closes the loop, and adopting it also returns the heat
a region built up before. Energy is conserved as before (heat and spent are both region
stock). Below 1,000 the heat returns more slowly; nothing is lost.
- **Absorbing drip.** `spent.drip_absorb` (0/1): a drip at the deposit limit adds its amount
to an existing bubble, the first at or after its seeded spot in address order (wrapping),
instead of waiting. A habitat with no bubble at all still waits.
- **Encoding.** Both fields use the reserved word after the offer interval (the recycle share
in the low 16 bits, the absorbing drip in bit 16), so rules without them keep their exact
bytes, digests, checkpoints and replays. Both keys are optional in the tuning file and can be
adopted live as a tuning revision; the DEV file sets 1,000 and 1.
- **View and portal.** The region view reports `heat` and the drip's recycle share and absorb
flag; the region page counts heat in the region's energy and its ledger, and says when energy
is being lost as heat.
Not changed: a region with no living cell does not tick, so it neither recycles nor drips; an
empty region needs a spawn or a player before the cycle restarts.
## Delivery order
1. Read-only portal: login, accounts (from existing data), regions, region view (schema 61,