Compare commits

...
203 Commits
Author SHA1 Message Date
dingoandClaude Opus 5.5 0d9cc122aa deploy(dev): promote 9de55e3's server image on region 16 (one action per account a tick)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m48s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Gitea run 576: server 9ba0d78a; postgres-tools unchanged (c200bd43). The
previous build 1d0585ef stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 08:40:17 -04:00
dingoandClaude Opus 5.5 9de55e352d fix(cellular): one action per account a tick, never a refused tick
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 1m39s
Foundation / server-image (push) Successful in 5m19s
Foundation / image (push) Successful in 6m54s
Region 16 playtest: a bud showed and was then undone, and several buds were
refused. The client scheduled a discrete action at server tick + lead, but
movement runs ahead of that once the lead shrinks (each movement takes the
tick after the last one sent), so a bud could name a tick a movement already
had. A tick takes one action per account: the region refused the whole tick
and dropped every player's actions on it ("tick stalled ... error=4").

- Server: keep_one_action_per_account keeps each account's discrete action
  (engulf, bud, become, emerge), else its newest, and refuses only the rest.
- Client: a discrete action is scheduled after every tick already sent, and
  movement is held off the tick a queued discrete action owns.
- Failed background commits now log their category, publication error,
  store error and SQLSTATE (never server text), to diagnose ok=0 commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 08:31:16 -04:00
dingoandClaude Opus 5.5 2ce8c3afb1 deploy(dev): promote 6de2b7b's images on region 16 (end a stranded life)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m40s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Gitea run 574: server 1d0585ef, postgres-tools c200bd43 (schema 69). The
previous build 441c25a5 stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 07:44:02 -04:00
dingoandClaude Opus 5.5 6de2b7b1ca feat(admin): end a stranded life from the portal (schema 69)
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 5m17s
Foundation / image (push) Successful in 6m23s
Foundation / server-image (push) Successful in 8m26s
ADR-0182 section 18. Region 16 refused every birth for an account with
"Existing cell is already bound to this account" although no cell in it
held the account: a published reservation was never ended, and the only
remedy was tools/ops/end-account-life.sql as the database owner.

- Account action POST /api/accounts/<uuid>/end-life?request=N. The admin
  API reads the life's region from the account's lives and refuses while
  that region's live view lists a cell holding the account (also a bud,
  split offspring or organism control moved to), a region it cannot view,
  an incomplete view, an unpublished request or a life no longer open.
- Schema 69: admin_end_account_life_v1 (admin role only) ends it at the
  region's latest commit and appends who and why to admin_life_endings.
- The account page shows End life for each published life not ended.
- A region refusing a birth because the account holds a cell (life_exists)
  could never record it: reject_primitive_life accepted reasons 1..3 only.
  The reservation stayed open and unpublished and refused every later
  birth. Schema 69 and the C++ wrapper accept existing_life (4).
- A region with no ticking cells ignored queued admin commands (such as a
  spawn) until something else woke it; a queued command now keeps it
  ticking until applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 07:32:08 -04:00
dingoandClaude Opus 5.5 8085392122 deploy(dev): promote 3c75397's images on region 16 (4,096-life ticks)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m33s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Gitea run 571: server 441c25a5 and postgres-tools 03a24875 (schema 68).
The previous server build a7ab3f34 stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 17:37:37 -04:00
dingoandClaude Opus 5.5 3c753970c8 feat(cellular): region ticks of up to 4,096 lives for testing (schema 68)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 31s
Foundation / server-image (push) Successful in 4m29s
Foundation / image (push) Successful in 5m43s
ADR-0182 section 17. The plan's 2,000-organism cap became the rules-12
key region.organism_cap, which was parsed but never enforced; the real
bound was max_cellular_tick_lives = 256 (ADR-0106), which rules 13's
organism cap could not exceed. The bound is now 4,096, for testing limits
only; the DEV tuning file keeps 256.

- max_cellular_tick_lives (4,096) bounds the raw region path: step, owner
  state, batch trace (cellular_batch_bytes_for) and current checkpoint
  traces. max_cellular_frozen_lives (256) keeps cohort populations,
  population batches, migration traces and pre-v3 cellular traces, whose
  database checks are fixed.
- Tuning: reproduction.organism_cap and wildlife_cap accept up to 4,096.
- Schema 68: the trace checker under the current publishers
  (cellular_births_v45) accepts 4,096 intents, births and mutations per
  tick; spawn_wildlife takes up to 256 cells a command.
- Region view and portal: the lineage archive's fill (births of 65,536,
  genomes of 4,096), at which a region stops ticking.
- PostgreSQL suite: 256 wildlife spawned in one command, then a 289-life
  tick published and recovered exactly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 17:30:22 -04:00
dingoandClaude Opus 5.5 8005e7c4ae deploy(dev): promote 7573044's images on region 16 (take, cull, wildlife cap)
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m43s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Gitea run 569: server a7ab3f34 and postgres-tools f2ce1192 (schema 67).
The previous server build 87d607f5 stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:20:28 -04:00
dingoandClaude Opus 5.5 757304437e feat(admin): take reserve, cull wildlife, wildlife cap, fresh bud costs (schema 67)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m34s
Foundation / postgres-tools (push) Successful in 26s
Foundation / server-image (push) Successful in 4m30s
Foundation / image (push) Successful in 5m46s
ADR-0182 section 16, from playtesting region 16 at its 256-life cap.

- Bud costs: the region host's cache of each genome's bud cost was keyed
  by genome only, so after a tuning adoption the client kept the old cost
  (or "cannot bud"). It now clears when the rules' encoding changes.
- Wildlife cap: reproduction.wildlife_cap (optional, 0..organism cap,
  0 = the organism cap) refuses buds of parents without an account at that
  many lives, keeping the slots above it for players. Bits 17-31 of the
  energy-cycle word, so older rules keep their bytes. DEV file: 200.
- Schema 67: admin command kinds take_reserve (8: up to the amounts from a
  life's reserve to the spent pool) and remove_wildlife (9: every life
  without an account, as remove_cell).
- Region view: caps; the portal shows lives against the cap.
- Portal: Take reserve in the inspector, Remove all wildlife, and marking
  cells on the map (shift+click, shift+drag) for bulk removal; the guided
  editor lists optional keys the base revision lacks.
- Client: a refused bud says the region may be full.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 16:06:56 -04:00
dingoandClaude Opus 5.5 51aa08446d deploy(dev): promote 9b854e6's server image on region 16 (open regions from the portal)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m39s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Gitea run 567: server sha256:87d607f5bc1cb6b8673767ad44d62d773fac4116b1f952cdb80fac61625b1d02
on the region, its hooks and the admin portal; 2f2d5c2b stays retained. The
postgres-tools image stays at run 556's (no schema change). This sync also
applies the portal's new egress and mounts Secret aevolution-admin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 14:04:35 -04:00
dingoandClaude Opus 5.5 9b854e6960 feat(admin): open a fresh region from the portal (ADR-0182 section 15)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m31s
Foundation / postgres-tools (push) Successful in 27s
Foundation / server-image (push) Successful in 4m33s
Foundation / image (push) Successful in 5m39s
The Regions page opens the next region in place of the one DEV serves: the
admin API reads the region overlay, its kustomization, the grant broker and the
portal deployment from main at one commit, rewrites only the region id, routes,
genesis commit and seeded wildlife range (refusing files whose layout differs),
commits them in one Gitea multi-file commit as aevolution-bot, then starts a full
Argo sync of exactly that commit. The page follows the sync until the region is
live, across the portal's own restart.

Credentials come from Secret aevolution-admin mounted read-only as files
(--deploy-config); without it the feature stays off. A small OpenSSL HTTPS
client talks to Gitea (verified) and argocd-server (verification per
ARGOCD_TLS_VERIFY). The portal's NetworkPolicy gains egress to the node's
ingress for Gitea and to the argocd-server pods, as approved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:51:36 -04:00
dingoandClaude Opus 5.5 e0f9512567 deploy(dev): promote 23ea240's server image on region 16 (guided tuning editor)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m44s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 6s
Gitea run 565: server sha256:2f2d5c2bd6baa68163d81cbdd75496e200e8446cf806f443834cd03bdb6eb828
on the region, its hooks and the admin portal; a8edb67c stays retained. The
postgres-tools image stays at run 556's (no schema change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:16:59 -04:00
dingoandClaude Opus 5.5 23ea24080e feat(admin): guided tuning editor that sends only the changes
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 4m48s
Foundation / image (push) Successful in 5m37s
DEV's ingress refuses request bodies over about 1 KB, so adopting a whole
revamp file (5 KB) failed with a 413 the portal misreported as the API's 64 KiB
limit. POST /api/tuning?base=baseline|REV now takes only changed `key = value`
lines, applies them to the baseline file or the newest revision (409 stale_base
for an older one), keeping its comments, then checks and stores as before.

The Tuning page becomes a guided editor: sections, a field per setting with its
unit, plain reading and comment, a changes list with Check and Apply (or Adopt
as is), and loading a past revision or the baseline as changes. The full-text
editor stays as Text mode and names a proxy refusal plainly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 12:09:54 -04:00
dingoandClaude Opus 5.5 8dedde454d deploy(dev): promote cc2eaf2's server image on region 16 (energy cycle)
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m43s
Foundation / server-image (push) Successful in 5s
Gitea run 563: server sha256:a8edb67c9b69edb5c2c750a068c6d89553691fccc47a4241c67c12f3f9e2a0b2
on the region, its hooks and the admin portal; 12e62108 stays retained. The
postgres-tools image stays at run 556's (no schema change). Region 16 keeps its
recorded rules until the energy cycle is adopted as a tuning revision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 10:31:25 -04:00
dingoandClaude Opus 5.5 cc2eaf2e05 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>
2026-10-28 10:18:24 -04:00
dingoandClaude Opus 5.5 944f6719cf deploy(dev): promote c481a7f's server image on region 16 (map canvas fix)
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / image (push) Successful in 6s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m41s
Foundation / checks (client) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / server-image (push) Successful in 5s
Gitea run 561: server sha256:12e62108f7b920bea0b91f50b21fcabd2463af6f1e94242140bbde786e42eee5
on the region, its hooks and the admin portal; 9f76430c stays retained. The
postgres-tools image stays at run 556's (no schema change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:42:05 -04:00
dingoandClaude Opus 5.5 c481a7fe5e fix(admin): keep the region map canvas out of the layout
Foundation / checks (postgres) (push) Successful in 2m22s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (client) (push) Successful in 2m26s
Foundation / postgres-tools (push) Successful in 1m38s
Foundation / checks (network) (push) Successful in 2m22s
Foundation / server-image (push) Successful in 5m14s
Foundation / image (push) Successful in 6m17s
Foundation / checks (checks) (push) Successful in 2m27s
Foundation / checks (deploy) (push) Successful in 2m27s
Foundation / checks (tsan) (push) Successful in 5s
The map canvas is absolutely placed in its stage, so its backing size can never
feed back into the page layout, and the backing store is capped at 2x and 4,096
pixels a side; a refused 2D context skips the paint instead of throwing. The tab
bar no longer shows a vertical scrollbar, the overlays drop backdrop blur, and
the theme icons are HTML entities.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:30:41 -04:00
dingoandClaude Opus 5.5 2fc50df26c deploy(dev): promote 6338cc9's server image on region 16 (admin region page)
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m40s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Gitea run 559: server sha256:9f76430c33a33d246384dc198b4df3d7e4abf28277a2f435cce25696d01a4863
on the region, its hooks and the admin portal; ec473b40 stays retained. The
postgres-tools image is unchanged (no schema change).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 08:07:47 -04:00
dingoandClaude Opus 5.5 6338cc9142 feat(admin): region page redesign, resource ledger, drip and dark mode
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m40s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m46s
Foundation / image (push) Successful in 5m34s
The region view adds the rules-13 drip and complete counts and totals over every
life and deposit. The region page is rebuilt around the map: a KPI strip (tick
pace, population, deposit capacity, region energy and matter, spent pool, next
drip), layer toggles that double as the legend, zoom and a scale, and tabs for
inspecting cells and deposits, resources (where each channel sits, the spent pool
and each channel's next drip), actions, the running tuning and session access.
The admin API serves the region tuning file read only (--region-tuning). Light
and dark themes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 07:54:28 -04:00
dingoandClaude Opus 5.5 68f2567253 deploy(dev): promote 7273b15's images on region 16 (live tuning)
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m44s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 4s
Server ec473b40 and postgres-tools 946de1a1 from Gitea run 556 (schema 66).
de1b4b32 stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:47:38 -04:00
dingoandClaude Opus 5.5 7273b157d6 feat(admin): live tuning revisions adopted at recorded ticks (schema 66)
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m47s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 4m42s
Foundation / image (push) Successful in 5m55s
ADR-0182 section 13. The admin portal's Tuning page edits the world's
rules-13 tuning (the Git revamp file format); the admin API checks it,
stores an append-only revision and queues an adopt_tuning admin command
(kind 7: revision and rules digest) for every region of the world.

- Lifecycle: adopt_tuning replaces the region's rules after births when
  a resolver names the rules for that revision and digest; the safety
  revision cannot change live. At most one adoption per batch.
- Host: fetches the revision text, rebuilds and digests the rules before
  appending the command; publication and recovery name the rules from
  the successor state, checked against the recorded digest.
- Schema 66: tuning_revisions, admin_set_tuning_v1, load_tuning_revision_v1
  (runtime), admin_tuning_revisions_v1, admin_tuning_text_v1.
- OpsServer: optional bounded request bodies (Content-Length, 413).
- Region view: rules_sha256, so the portal shows each region's revision.
- Portal: Tuning page; baseline from the mounted cellular-revamp.tuning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:35:09 -04:00
dingoandClaude Opus 5.5 7041c947a9 deploy(dev): promote 018b4b1's images on region 16 (resource schedules)
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m43s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Server de1b4b32 and postgres-tools ae4449c2 from Gitea run 554 (schema 65).
db678279 stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:43:52 -04:00
dingoandClaude Opus 5.5 018b4b1817 feat(admin): resource schedules for bubbles, pool releases and wildlife (schema 65)
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 23s
Foundation / server-image (push) Successful in 4m38s
Foundation / image (push) Successful in 5m35s
ADR-0182 section 12: the game source as recurring admin commands. A schedule
repeats add_bubbles, release_pool or spawn_wildlife every 1 s to 24 h while
enabled; the region's pending-command read queues each due run as an ordinary
command (recorded in the trace, bound once), never two waiting per schedule,
so an idle region builds no backlog. Append-only schedule versions; admin API
GET/POST /api/regions/<n>/schedules and a portal card to add, stop and start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:30:37 -04:00
dingoandClaude Opus 5.5 2485a028bb deploy(dev): promote 070c458's images on region 16 (bans, logout, time played)
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m42s
Foundation / image (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Server db678279 and postgres-tools 5c10dfe9 from Gitea run 552 (schema 64).
03ce069d stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 18:04:22 -04:00
dingoandClaude Opus 5.5 070c458dc5 feat(admin): bans, admin logout and time played (schema 64)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 2m9s
Foundation / server-image (push) Successful in 5m23s
Foundation / image (push) Successful in 6m10s
ADR-0182 section 11.
- Append-only account bans; a ban also revokes the account's grants (its live
  session closes at the next control renewal) and issue_account_grant refuses a
  banned account (EVL20 -> broker 403 account_banned). Lifting is another row.
- admin_logout_account_v1 revokes by account id.
- Session intervals recorded by claim/renew/release (signatures unchanged):
  time played, sessions and last seen per account.
- The region view carries each cell's lineage root; the portal counts living
  wildlife descended from an account's lives.
- Portal: Ban/Unban and Log out with reason and history; time played column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:50:34 -04:00
dingoandClaude Opus 5.5 b3eca78549 deploy(dev): promote b1cc3b1's images on region 16 (admin commands, schema 63)
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m42s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Server 03ce069d and postgres-tools e9f04a09 from Gitea run 550: queued admin
commands in trace 5 (spawn wildlife, bubbles, spent pool, remove, grant).
82e24842 stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:26:54 -04:00
dingoandClaude Opus 5.5 b1cc3b121b feat(admin): live admin commands in trace 5 (schema 63)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m44s
Foundation / image (push) Successful in 5m33s
The admin portal can now spawn wildlife, add bubbles, add to or release the
spent pool, remove a cell and grant a cell's reserve on a running rules-13
region (ADR-0182 section 10). No new owner format or region opening.

- Trace 5: trace 4 plus 64-byte command records counted in the tick header's
  last word; a batch without commands stays trace 4 (older builds replay it).
  Bundle 15 admits trace 5.
- CellularLives::admin_candidate applies a tick's commands after its births,
  each on a copy kept only when it applies and closes: imports through the
  boundary ledger, removals into the spent pool with a new `removed` corpse
  cause, spawned roots via the ADR-0180 seed (now a shared helper) funded by
  an exact import. Refused commands change nothing.
- Schema 63: the immutable admin_commands queue (spawn identities from the
  life allocator), pending/history reads, and binding of every recorded
  command exactly once inside both cellular publishers; the SQL trace parsers
  read trace 5 through its trace-4 normal form.
- The region polls pending commands every 2 s and appends up to 16 per tick;
  the admin API and portal gain region actions, per-cell Remove/Grant and the
  command history.
- Fixes an existing test that did not advance its head after a tick commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:14:04 -04:00
dingoandClaude Opus 5.5 b075198040 deploy(dev): promote 46c1064's images on region 16 (session windows in SQL)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m36s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 6s
Foundation / image (push) Successful in 5s
Server 82e24842 and postgres-tools 4ab36349 from Gitea run 548: schema 62
session windows and the admin group role. d4b62521 stays retained. Sync only
after the aevolution_admin role exists and aevolution-admin-pg uses its login;
sessions stay closed until a window is opened in the admin portal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:33:11 -04:00
dingoandClaude Opus 5.5 46c106409e feat(admin): session windows in SQL, opened from the admin portal (schema 62)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m33s
Foundation / postgres-tools (push) Successful in 2m14s
Foundation / server-image (push) Successful in 5m21s
Foundation / image (push) Successful in 6m18s
The dev session window moves from Git to SQL (ADR-0087 amendment): the admin
portal opens, extends (30 min to 4 h from now) and closes it, and the cellular
region re-reads it every 5 s with --session-window-source db. No push, sync or
restart per window; a closed window keeps the region running instead of
crash-looping.

- Schema 62: append-only session_windows (4 h cap, no rewrites),
  load_session_window_v1 for the runtime group, admin_set_session_window_v1
  and admin_session_windows_v1 for a dedicated admin group role, granted and
  audited each migration run when EVO_PG_ADMIN_ROLE is set (aevolution_admin in
  DEV). Schema 61's views are revoked from the runtime group.
- RegionSessions admission switch: while closed every Hello is refused before
  signature work and closing closes open sessions (new sessions were still
  admitted after expiry before).
- Admin API: GET/POST /api/regions/<n>/session-window, window state in the
  regions list; the portal's session-window card with history.
- Git: REGION_SESSION_WINDOW and the pre-push refresh rule are removed; the
  policy check requires the database source and refuses a committed window.

Needs the new image and the aevolution_admin role (with the portal's login in
aevolution-admin-pg) before a sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 15:13:02 -04:00
dingoandClaude Opus 5.5 510ecaee80 deploy(dev): promote 4adcc7b's server image on region 16; retain 1dd1ea05
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m41s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 6s
Server image d4b62521 from Gitea run 546 (4adcc7b: admin OAuth callbacks with
longer query strings); postgres-tools stays at run 544's schema-61 image.

Region 16 was quarantined (exit 4, crash loop) under c7347c2d: its head was
committed by 1dd1ea05, which the previous manifests dropped from
REGION_RETAINED. Both 1dd1ea05 and c7347c2d are retained now. Refreshes the
session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 13:59:39 -04:00
aevolution-gitops-bot 4adcc7b638 fix(admin): accept OAuth callback query strings
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m42s
Foundation / postgres-tools (push) Successful in 1m43s
Foundation / server-image (push) Successful in 5m17s
Foundation / image (push) Successful in 6m2s
2026-10-27 13:37:30 -04:00
dingoandClaude Opus 5.5 d851717b7b deploy(dev): promote bc1eeb9's images on region 16 (admin portal, schema 61)
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m37s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Server and postgres-tools images from Gitea run 544 (bc1eeb9): the read-only
admin API and portal, the region's /admin/view route and schema 61's read
functions, on top of d46de25's reproduction-safety build. Region 16 keeps its
recorded rules; f235d14 (provisioned under, never served) and 222fa3de stay
retained. The admin portal Deployment needs the out-of-band aevolution-admin-pg
Secret and Ingress before it is reachable. Refreshes the session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 12:58:22 -04:00
dingoandClaude Opus 5.5 bc1eeb970b deploy(dev): refresh the session window for the admin portal push
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m34s
Foundation / postgres-tools (push) Successful in 2m1s
Foundation / server-image (push) Successful in 4m59s
Foundation / image (push) Successful in 6m17s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 12:39:28 -04:00
dingoandClaude Opus 5.5 54beceb823 feat(admin): read-only admin portal and API (ADR-0182 step 1, schema 61)
evo-admin-api serves the portal at srs.aeternalisgames.com and read-only JSON
for world 100 behind Keycloak (realm role aevolution-admin, audience
aevolution-admin, client aevolution-admin-portal): accounts with session,
status, lives, deaths, resets and mutation choices; one account's lives; the
world's regions; and a live 2D region view of cells, wildlife, pools and
bubbles. The portal is plain HTML/CSS/JS with PKCE sign-in, a strict CSP and
no third-party code.

- Schema 61: three bounded SECURITY DEFINER read functions, fenced in the
  privilege audit; no table or existing function changes.
- Cellular regions answer GET /admin/view on the ops port (NetworkPolicy:
  Prometheus and the admin portal only); CellularLives::extent_of reads the
  existing phenotype budget. No simulation, checkpoint or wire change.
- TokenVerifier takes an optional realm role and returns the email; the ops
  server's response bound is configurable (16 KiB default unchanged).
- DEV component admin-portal-dev (Deployment, Service, NetworkPolicies); the
  Ingress and the aevolution-admin-pg Secret are created out of band.
- CI scripts pinned to schema 60 now expect 61.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 12:39:28 -04:00
dingoandClaude Opus 5.5 46e5ea6c5d test(postgres): provision the Git revamp rules without the DEV wildlife fixture
Since 054e485 the DEV revamp tuning file seeds 100 wildlife (ADR-0180), which
evo-world-clone provision refuses without an audited --playtest-wildlife-first-id
range, so the cellular-v10 provisioning test failed at region_store_tests line
826 (also Gitea run 542). The test now provisions the Git file's rules with its
DEV opening fixture set to zero; seeded wildlife keeps its own suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 12:39:28 -04:00
aevolution-gitops-bot f047cd8833 deploy(dev): restore evo-sim Harbor digest
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m40s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 5s
Foundation / server-image (push) Successful in 6s
2026-10-27 11:45:26 -04:00
dingoandClaude Opus 5.5 477ea8980b deploy(dev): promote d46de25's images on region 16; ADR-0182 admin portal
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m38s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Server and postgres-tools images from Gitea run 540 (d46de25, all checks green):
reproduction safety revision 1 and resizable cellular panels. Region 16 keeps
running on its recorded rules; the staged safety tuning profile stays unmounted,
so the safety trial still needs a fresh opening. 51f979a's build (222fa3de) is
retained. Refreshes the session window.

ADR-0182 records the admin portal direction: world tuning revisions in SQL,
adopted per tick and recorded in region history; admin commands with a named
game source; drip/source settings; data-defined mutations; bans and session
intervals; a Keycloak-gated admin API and portal at srs.aeternalisgames.com.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:10:05 -04:00
dingo d46de25bef Refresh session window for authenticated publication
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m38s
Foundation / server-image (push) Successful in 6m15s
Foundation / postgres-tools (push) Successful in 6m21s
Foundation / image (push) Successful in 7m42s
2026-10-27 09:38:54 -04:00
dingo d0e0e2cf87 Record reproduction trial publication authentication limit 2026-10-27 09:15:57 -04:00
dingo 5416590f9e Add reproduction safety trial and resizable cellular panels 2026-10-27 09:13:28 -04:00
dingo 7ca5f74f03 fix(client): keep nutrient readouts on stable single-line rows 2026-10-26 17:30:47 -04:00
dingoandClaude Opus 5.5 82d21e65b2 deploy(dev): open region 16 on 51f979a's image - even split, 130% collection
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / server-image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 21s
Foundation / image (push) Successful in 4m41s
Region 16 keeps region 15's tuning (100 seeded wildlife, triple food, half
the bud fee) and adds feeding.split_evenly = 1 and feeding.collection_percent
= 130: food sources share the matter limit equally between the nutrients they
hold. Its 100 wildlife take IDs 900000003716-900000003815. The grant broker
routes accounts to region 16; region 15 stays stored and 736bf98's build stays
retained. Refreshes the session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 16:44:16 -04:00
dingoandClaude Opus 5.5 51f979a664 feat(cellular): split collection evenly across a source's nutrients
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m31s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 4m21s
Foundation / image (push) Successful in 5m3s
Playtest: phosphorus held growth back everywhere. Per-nutrient collection
limits followed the body recipe (5% phosphorus), but the membrane is 10%
phosphorus, so no cell could collect phosphorus as fast as it builds with it.

Two optional revamp tuning keys, stored in a formerly reserved rules word so
regions opened without them keep their exact meaning:
- feeding.split_evenly: matter from one food source is split equally between
  the nutrients it holds (a carbon-only bubble gives the whole matter limit to
  carbon, carbon and phosphorus half each, all four a quarter each), each share
  scaled by the cell's collection trait;
- feeding.collection_percent: every collection limit per cent (100 default).

The DEV tuning file takes these keys with the image that reads them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 15:56:00 -04:00
dingoandClaude Opus 5.5 054e48579c deploy(dev): open region 15 - 100 seeded wildlife, triple food, half bud fee
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / server-image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 19s
Foundation / image (push) Successful in 4m50s
Maintainer tuning for the next playtest, on the current server image:
- 100 starting wildlife (was 32) on their own ADR-0180 identity range,
  900000003616-900000003715;
- every pool and bubble holds three times region 14's food;
- the nursery funds 256 founders' worth (was 64), so the wildlife leave room
  for player births;
- the bud fee scale drops to 50%.
The grant broker routes accounts to region 15; region 14 stays stored.
Refreshes the session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 15:19:29 -04:00
dingo d057374148 fix(client): stabilize HUD and anchor draggable panels
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 20s
Foundation / server-image (push) Canceled after 1m43s
Foundation / image (push) Canceled after 1m43s
2026-10-26 15:13:15 -04:00
dingoandClaude Opus 5.5 840816c541 deploy(dev): promote 736bf98's server image on region 14 (life endings)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
A player's death is now recorded under the reservation's lineage root, so an
account that became an offspring, a bud or an organism can be born again.
Region 14 keeps running; 8a48e40's build stays retained. Refreshes the session
window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:17:41 -04:00
dingoandClaude Opus 5.5 736bf98aaa fix(server): end a player's life under the reservation's root identity
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 26s
Foundation / server-image (push) Successful in 4m18s
Foundation / image (push) Successful in 5m4s
Playtest: after becoming a split's offspring and being engulfed, every new
birth was refused ("Existing cell is already bound to this account"). The
region recorded the ending under the dead cell's own identity, which was never
reserved, so the database ignored it and the founder's reservation stayed
open. After Adhesion the opposite happened: the merged founder's ending closed
the reservation while the player lived on as the organism.

An account's life now ends only when no life holds the account, and the ending
names the lineage root (cellular_lineage_root): the life born from the
reservation, reached through parent links in lives and corpses.

tools/ops/end-account-life.sql lets the operator end one stranded account's
reservation (dry run unless confirm=yes; exactly one match required).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 13:24:06 -04:00
dingoandClaude Opus 5.5 5dab8e4018 deploy(dev): promote 8a48e40's server image on region 14 (bud fee fix)
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 4s
Region 14 stalled at tick 6068 on the short bud fee; this image refuses such a
bud instead. Committed history is unchanged, so region 14 resumes. Run 529's
build stays retained. Refreshes the session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:55:43 -04:00
dingoandClaude Opus 5.5 8a48e405fd fix(lifecycle): a bud's fee comes on top of its cost, or the bud is refused
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 22s
Foundation / server-image (push) Successful in 4m21s
Foundation / image (push) Successful in 5m1s
DEV region 14 stalled at tick 6068 with a conservation error. The bud fee was
checked against the reserve before funding the bud, then deducted with a clamp
after: a parent whose reserve covered the bud but not the fee as well paid less
than the fee while the region reclaimed all of it, creating matter. The fee
was zero until the budding playtest tuning, so it never showed.

Funding now requires the reserve left after the bud to cover the fee; a parent
that cannot is refused for insufficient funding, and the fee is subtracted
exactly. No committed tick changes: a short-fee bud never committed. The
regression runs seeded wildlife under the DEV fee until a bud (it failed with
the conservation error before this fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:46:00 -04:00
dingoandClaude Opus 5.5 467402e404 deploy(dev): open region 14 on run 529's image (seeded wildlife, bud fee)
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m33s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Run 529 (ff121c3) adds the opt-in starting wildlife (ADR-0180) and the
budding playtest tuning. The server image moves to run 529's in the region and
store Jobs; run 18a64a2's build stays retained so region 13 stays recoverable.
The grant broker routes accounts to region 14. Refreshes the session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:20:17 -04:00
dingo ff121c3ed1 feat(cellular): seed dev wildlife and tune budding playtests
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 4m16s
Foundation / image (push) Successful in 4m54s
2026-10-26 12:01:57 -04:00
dingoandClaude Opus 5.5 18a64a29cd deploy(dev): promote run 15b4342's server image on region 13
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m39s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Shows what holds growth back and each nutrient's flows (session v14 body
block). Region 13 keeps running; run 525's build stays retained. Refreshes the
session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:59:32 -04:00
dingoandClaude Opus 5.5 15b4342934 feat(cellular): show what holds growth back and each nutrient's flows
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m23s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 4m18s
Foundation / image (push) Successful in 4m56s
Playtest: phosphorus jumped between ~100 fg and a few pg because growth spends
it as it arrives and only pauses when another nutrient runs short. The owner
now records, per owned life and tick, which channel narrowed the growth step
(or no room) and what the tick collected, built into the body and burned;
session v14 carries them (flag bits 2-4 and a 120-byte flows block).

The client shows "Growing 62% - waiting for phosphorus" or "Fully grown",
outlines the limiting nutrient's bar in amber, and gives each bar (and the
energy figure) a tooltip with the last second's flows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:48:37 -04:00
dingoandClaude Opus 5.5 6988cf39b2 deploy(dev): open region 13 on run 525's image (playtest fixes)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Run 525 (131ed5f) gates offers on a split, draws the region's walls and cell
count, adds mixed bubbles and keeps pools out of the currents. Region 13 is a
fresh cellular-v10 opening with 1,200 single-nutrient and 2,400 mixed bubbles
(about the earlier food in total), pools in still water, and splits at half
growth from the revamp tuning. The grant broker routes accounts to region 13.
Region 12 stays stored; run 521's build stays retained. Refreshes the session
window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:23:25 -04:00
dingoandClaude Opus 5.5 131ed5f254 feat(cellular): playtest fixes - edge, cell count, mixed bubbles, still pools
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 4m24s
Foundation / image (push) Successful in 4m58s
From the first rules-13 playtest:
- An earned offer waits until a single cell can split (keeping its count),
  so choices are no longer refused one after another.
- The client draws the region's walls (dimming outside), names the edge
  when the cell is against it, shows the region's cell count, and says when
  upkeep is burning kept matter because no energy is left.
- Mixed bubbles hold every nutrient at once (--mixed-motes; none leaves the
  scatter stream unchanged) and are drawn as small pools of their nutrients.
  With intake split by the body's recipe, single-nutrient phosphorus
  bubbles fed slowly; mixed ones carry it with everything else.
- Liquid openings move each pool out of the currents to the nearest still
  water (cellular_still_centre).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:02:43 -04:00
dingoandClaude Opus 5.5 e2da92768c feat(cellular): show growth and gate splits; DEV splits at half growth
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 4m21s
Foundation / image (push) Successful in 5m1s
Playtest: after one mutation every later choice came back "split refused"
because a split needs a grown cell, and the client gave no reason. The v14
body block now carries the body's growth per thousand (the reserved bytes)
and a split-ready flag; the client disables Stay / Become until the cell can
split ("Grow to split (now 62%)") and shows growth in the Body panel.
Adhesion and organism choices do not split and stay open.

The DEV revamp tuning splits once half grown (split_min_growth 500, was full
growth); it takes effect in the next region opened.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:28:57 -04:00
dingoandClaude Opus 5.5 542cefafce deploy(dev): grant broker routes accounts to region 12
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
The region 12 promotion left the broker issuing grants for region 11, which
no server serves now. New accounts start in region 12 and grants may name only
region 12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:10:54 -04:00
dingoandClaude Opus 5.5 5b69c3d4ec deploy(dev): open region 12 on cellular-v10 (rules 13) with run 521's images
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Run 521 (4bc5d5e) carries session v14, bundle 15 and schema 60. DEV now
serves region 12: the cellular-v9 genesis and upgrades followed by the
durable revamp upgrade from tuning/cellular-revamp.tuning, mounted beside
cellular.tuning. Region 11 stays stored; run 494's build stays retained.
The postgres-tools image applies schema 60. Refreshes the session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:04:38 -04:00
dingoandClaude Opus 5.5 4bc5d5eee7 feat(cellular): session v14, bundle 15 and rules-13 wildlife
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 24s
Foundation / server-image (push) Successful in 4m33s
Foundation / image (push) Successful in 4m59s
Session v14 carries the rules-13 revamp: a body block in the owner's view
(members, emergence threshold, exclusions, Emerge open, payable energy,
mass and the 20 traits), become, emerge and channel exclusions on actions,
become on mutation choices, catalog offers (id, chance, cost) and the
emerged ending. Older sessions never see a v14 field. The client shows
Stay / Become offspring offers named from the shared catalog, continuing
as a bud, the organism and its Emerge button, kept channels, the body and
the emerged end screen.

Bundle 15 (rules 13 on owner format 11) is durable: schema 60 admits it
raw-only, stores become as bit 15 of the choice's operator, widens the
action input and mutation results, and publishes the 14 -> 15 revamp
profile migration. evo-world-clone opens cellular-v10 (cellular-v9 plus the
revamp upgrade from --revamp-tuning), resumable and recoverable.

Wildlife counts reserve matter as energy, waits for the bud fee, grows
organisms one short of emerging, and hunts by the region step's rules-13
engulf test. The play summary adds organisms, offers and the spent pool.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 07:31:32 -04:00
dingoandClaude Opus 5.5 f454e038a1 feat(lifecycle): rules 13 multicellular organisms and Emerge
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 4m12s
Foundation / image (push) Successful in 4m52s
Adhesion turns a cell into a two-member organism: one life with a member
count, one genome and one reserve, developed as its genome with the target
size times its members. The single cell ends as an empty merged corpse.
An organism expresses accepted mutations as a whole, paid from its reserve;
its buds add internal members (wildlife stops one short of the threshold);
the extra members' mass loads its thrust. At the emergence threshold the
Emerge intent exports the body and reserve through the boundary ledger and
ends the life as emerged.

Records the maintainer's 2026-10-23 decisions in ADR-0179 and the project
vision (whole-organism mutations; the playtest form of Emerge).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 06:50:19 -04:00
dingoandClaude Opus 5.5 9f117c9545 feat(lifecycle): rules 13 mutation splits, stay-or-become and litter
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m22s
Foundation / postgres-tools (push) Successful in 22s
Foundation / server-image (push) Successful in 4m21s
Foundation / image (push) Successful in 5m6s
Phase 4 of the cellular revamp build plan (ADR-0179), server half.

- A chosen mutation now splits the cell (Cellular_reproduction_plan.md section
  4): split_cell divides body and reserve per channel by the tuned share, each
  cell develops the largest body its own genome builds from its part, and the
  rest joins its reserve, conserving every channel. Both plans carry the
  mutation; only the offspring expresses it. A split is refused, spending
  nothing and keeping the offer, below the tuned growth, without room beside
  the cell or at the region's organism cap.
- Stay or become: a choice (trace mutation byte 34) or a bud (step intent bit 2
  of byte 13) can hand control to the offspring; the parent becomes wildlife.
  Ownership now follows the account under rules 13, so validation and plan
  history accept a founder that became wildlife (ADR-0163 succession).
- Buds under rules 13: litter replaces the 25% twin (whole hundreds plus a
  chance, up to the tuned maximum, sharing one investment), the tuned bud fee is
  charged once and reclaimed, and births stop at the organism cap.
- New results split_applied and split_refused; owners below rules 13 refuse a
  become.

The revamp tuning file gains the reproduction keys. Tests cover the split's
conservation and refusals, stay and become splits with exact restore, a refused
second split, the cap, become validation and the litter count. Refreshes the DEV
session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:19:48 -04:00
dingoandClaude Opus 5.5 7e5775b6f7 feat(lifecycle): rules 13 behaviour-weighted mutation offers in the owner
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m34s
Foundation / postgres-tools (push) Successful in 22s
Foundation / server-image (push) Successful in 4m16s
Foundation / image (push) Successful in 4m47s
Phase 3 of the cellular revamp build plan (ADR-0179), server half.

- Every owned, active rules-13 life gathers its activity each tick from every
  phase (thrust and drift, brake presses, feeding and the collection limits,
  matter burned by channel, energy by use, contact with larger cells, engulf
  outcomes, growth blocked by a channel, buds made, refused or lost young, the
  reserve against the body) and advances its 98 triggers and 49 affinity scores.
- Active play earns an offer every interval: eligible catalog mutations of the
  life's plan, weighted by affinity, drawn with the floored and capped chances
  and a seeded systematic draw (a retry draws the same offer). Wildlife,
  newborns and frozen cells earn nothing; a plan without schema-7 traits has no
  catalog.
- A choice must name the life's own pending offer. It edits the offspring plan
  (phase 4 turns this into the split), pays the mutation's tuned cost from the
  reserve (matter may stand in for its energy, excluded channels excepted) and
  reclaims it as seeded random bubbles, merging into the farthest deposit at the
  deposit limit. Unaffordable choices keep the offer; declines clear it.
- Offspring inherit affinity scores and lineage progress. Growth speed scales
  the growth step with a carried fraction.
- Format 11 persists the offer tunables and each life's mutation state; the
  revamp tuning file gains the offer keys and optional per-mutation overrides
  (mutation.<key>.<field>), defaulting to the catalog with zero costs.

Tests cover per-mutation overrides and refusals, the collection-limit flags,
offers from active play, founder-5 plans never offered, exact restore of a
pending offer, a choice editing only the plan and reclaiming its cost with
closure, unaffordable choices, declines, foreign choices, and thrust moving
affinity. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:58:32 -04:00
dingoandClaude Opus 5.5 732d008aa1 feat(biology): rules 13 mutation catalog, behaviour triggers and offer draw
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m30s
Foundation / postgres-tools (push) Successful in 22s
Foundation / server-image (push) Successful in 4m10s
Foundation / image (push) Successful in 4m46s
Phase 3 of the cellular revamp build plan (ADR-0179), first part: the headless
pieces the owner will use.

- The named catalog: all 49 mutations of Cellular_mutation_plan.md as data
  (stable ids and tuning keys, name, pro, con, effect, availability, increase
  and decrease triggers, base weight). Applying one edits a schema-7 plan by
  fixed reference points (a point is a hundredth of the founder's value), with
  paired edits, spreads across a channel group, recipe shifts, photosynthesis
  acquire and shed, and Adhesion; bounds, gates (carbon burned, buds made) and
  the enabled switch close it. 43 mutations are open at birth, as planned.
- Triggers: per-tick activity signals and eight trigger kinds (accumulate,
  absence, count in a window, event, share over a window, regular recurrence,
  straight heading, sharp turns) move each mutation's affinity score within
  bounds; integer state only, so replay reproduces scores.
- Offers: weight = base x a score multiplier; chances clamp(k x weight, floor,
  cap) summing to the options, in parts per million (floor 0.001%, cap 70%),
  found exactly by water-filling over sorted weights; a systematic draw picks
  distinct mutations whose inclusion frequencies equal their chances exactly.

Tests cover the catalog's identities, the pool at birth, every kind of edit,
bounds and gates; every trigger kind; score bounds; weights; a 300-seed chance
ensemble; and an exhaustive draw over all million draws. Refreshes the DEV
session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:46:21 -04:00
dingoandClaude Opus 5.5 76d21b4815 feat(cellular): rules 13 feeding, matter as energy, spent pool and predation
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 31s
Foundation / server-image (push) Successful in 4m24s
Foundation / image (push) Successful in 5m3s
Phase 2 of the cellular revamp build plan (ADR-0179), server half.

- Matter as energy: when an energy cost exceeds the reserve's energy, reserve
  matter stands in for the rest at each channel's burn rate (pJ per 1,000 fg,
  scaled by the genome's burn efficiency), largest channel first. Upkeep may
  burn any channel; thrust only channels the player has not excluded. Burned
  matter adds no heat; it goes to the region's spent pool. A cell dies only when
  nothing can pay its upkeep.
- Collection: per-channel limits scaled by the genome's collection indices, a
  shared limit on all matter, a tunable cost per membrane point, and only the
  genome's kept share (energy conversion) of bubble energy reaching the reserve.
- Predation: engulf mass carries a tunable share of reserve matter, the
  predator's engulf capacity scales its side and the prey's membrane (now in
  nanometres) its own; kill absorption scales the predator's intake; the kill's
  remainder is split between bubbles at the prey and the spent pool, and a full
  habitat sends overflow to the pool.
- The spent pool is owner format 11 state, counted in conservation, and drips
  back as seeded random bubbles every interval tick.
- Reserve matter is carried as load: slower thrust and turning, costlier thrust.
- Channel exclusions are a 4-bit step intent field, trace byte 14; only owned
  lives under rules 13 may send them.

All values come from the revamp tuning file. Rules up to 12 are unchanged. Tests
cover payments and their conservation over 400 seeds, the rules-13 region step
(collection, membrane, kept energy, burning, engulfment and kill splits with
closure), the drip, load, exclusions, a 700-tick run with closure and exact
restore, and trace replay with exclusions. Session v14 and the client follow
the server phases (build plan). Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:35:31 -04:00
dingoandClaude Opus 5.5 c7b4846901 feat(lifecycle): rules 13 owner on format 11 with the revamp tuning file
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 3s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m30s
Foundation / postgres-tools (push) Successful in 22s
Foundation / server-image (push) Successful in 4m12s
Foundation / image (push) Successful in 4m40s
Phase 1 of the cellular revamp build plan (ADR-0179). The cellular owner gains
rules 13 on owner format 11: an explicit no-tick format-10/rules-12 upgrade
declares the region's revamp rules (so far the body's essential upkeep share),
existing lives keep their genomes, and founders born afterwards are founder 6
(genome schema 7, development 7). Format 11 is format 10 plus the revamp rules
block; it stays undeployed while later phases extend it. The tick, perception
and wildlife controller derive budgets with the declared body tuning, which
earlier development versions ignore.

Revamp tunables live in their own Git file,
deploy/kubernetes/region/dev/tuning/cellular-revamp.tuning, parsed by
parse_cellular_revamp_tuning with the same format and refusals as the rules-12
file, so images from before rules 13 never meet keys they do not know. Both
parsers now share read_tuning_lines; the rules-12 file's behaviour is unchanged.
The revamp file is not yet mounted into the region (build plan, phase 6).

Tests cover the upgrade and its refusals, mixed founder 5 and founder 6 lives
ticking with closure, exact restore and continuation, trace replay, and the new
tuning file including the checked-in DEV copy. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:19:18 -04:00
dingoandClaude Opus 5.5 c183021fd5 feat(biology): genome schema 7 traits, founder 6 and development 7
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 33s
Foundation / server-image (push) Successful in 4m14s
Foundation / image (push) Successful in 4m41s
Phase 1 of the cellular revamp build plan (ADR-0179). Genome schema 7 carries
twenty 16-bit cellular traits after the movement arrangement: density, upkeep
efficiency, growth speed, collection per channel (E/C/N/P/O), burn efficiency
per matter channel, engulf capacity, kill absorption, litter, the body recipe
(C/N/P/O per thousand, summing to 1000) and adhesion. Its membrane is held in
nanometres so it can change in 5% steps of the founder's 1 um. The largest
record still fits the 256-byte bound.

Development 7 and founder 6 serve rules 13: density sets how large a body is
for its mass, the recipe sets the body's composition (intake keeps the founder
shares), upkeep is an essential share no trait reduces plus the rest over upkeep
efficiency (region-declared BodyTuning, trial 25%), the producer speed penalty
is dropped, and the reproduction value is the bud's share of the body with the
construction discount fixed at the founder's level. Founder 6 builds exactly
founder 5's cell. Earlier schemas and development versions are unchanged.

The development and metabolism test mains now print the failing line. Refreshes
the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:09:06 -04:00
dingoandClaude Opus 5.5 0a5cf3e6bd docs: cellular revamp build plan and ADR-0179
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m34s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
ADR-0179 records the maintainer's cellular gameplay revamp (rules 13) and the
two locked-requirement questions it raises: whole-organism mutations versus
"structural changes are expressed in offspring", and what Emerge does before
the 3D world exists. The build plan stages the work in six phases (genome and
body, feeding and predation, mutation offers, reproduction, multicellular and
emergence, wildlife and the playtest), each pushed with CI green and deployed
once at the end. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 17:59:35 -04:00
dingoandClaude Opus 5.5 628721dff4 docs: cellular gameplay revamp plans
Plans for the cellular revamp, from the maintainer's decisions of 2026-10-22:
an overview of every gameplay system, the mutation offer system with a
49-mutation catalog, reproduction (on-demand buds, mutation splits,
multicellular organisms, emergence), feeding and energy (per-channel
collection, matter as energy, the spent pool), predation and defense, and
body and maintenance. Nothing is implemented by this commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 17:49:38 -04:00
dingoandClaude Opus 5.5 39ac0bf31f deploy(dev): promote run 507 (schema 59 durable mutation queue)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:37:21 -04:00
dingoandClaude Opus 5.5 71d195d4e8 feat: durable mutation queue (schema 59)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m24s
Foundation / postgres-tools (push) Successful in 1m31s
Foundation / server-image (push) Successful in 4m25s
Foundation / image (push) Successful in 4m50s
A mutation choice's reserved tick is now the earliest tick it may bind
at, not the only one (ADR-0121 amendment). With write-behind commits, a
choice reserved for head + 1 landed in ticks already being simulated or
committed: the batch was refused, or the reservation was orphaned for a
past tick and stalled the region.

Schema 59: a bound record carries the tick it applied at and the rest of
its input must equal the reservation's; the "omits a reserved mutation"
refusals are removed. Existing rows are unchanged, so an orphaned
reservation binds at the next commit that carries it.

The host keeps every unbound reservation queued and the open batch binds
those the commit in flight does not carry, at its next tick; the earlier
hold on new choices is removed. A choice that outlives its life binds as
life_died (owner, trace matching and recovery accept it when no life with
that ID remains). Recovery takes a bound choice's tick from its trace.

Tests: a choice skipped by one checkpoint binds a tick late and recovers;
builder late binding, refusal before the earliest tick, and a departed
life's life_died outcome. Full local PostgreSQL qualification passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:27:09 -04:00
dingoandClaude Opus 5.5 8a7e944942 deploy(dev): promote run 505's server image (held mutation choices)
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m31s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 09:42:17 -04:00
dingoandClaude Opus 5.5 d06c781819 fix(server): hold mutation choices while ticks past the head are open
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 25s
Foundation / server-image (push) Successful in 4m9s
Foundation / image (push) Successful in 4m33s
A choice reserves the tick after the committed head. With an open batch
or a background commit, that tick was already being simulated: the batch
committed without the choice (refused, losing its ticks) or, racing the
reservation, committed past it and left a reservation for a tick that had
gone, which stalled the region at its next fresh batch.

While a batch is open or a commit is in flight, the host now holds new
choices and answers not_ready (the client repeats them every 2 s). The
loop commits what it holds, waits for the head, then reserves the held
choices and starts a fresh batch with them. A queued choice the builder
still refuses makes the host reload its queue instead of stalling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 09:32:39 -04:00
dingo 8ce609d344 feat(client): add liquid presentation and clearer cellular HUD
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 26s
Foundation / server-image (push) Successful in 4m11s
Foundation / image (push) Successful in 4m36s
2026-10-22 09:08:03 -04:00
dingoandClaude Opus 5.5 c43a3b0837 deploy(dev): promote run 502's server image (background commits)
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m30s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 6s
Foundation / image (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:52:17 -04:00
dingoandClaude Opus 5.5 ff333d97c2 feat(server): commit cellular batches on a background thread
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 23s
Foundation / server-image (push) Successful in 4m27s
Foundation / image (push) Successful in 4m31s
The rules-12 loop blocked for ~411 ms per 20-tick commit, so players saw
one-second bursts. The host now commits a batch on a worker thread with
its own connection (begin_publish / poll_publish), using the builder's
already-simulated candidate. The next batch builds on that candidate
under a provisional head and is rebased when the commit lands. One commit
is in flight at a time; births and mutation choices wait for a batch that
starts on the durable head, and host reconciliation pauses meanwhile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:41:56 -04:00
dingoandClaude Opus 5.5 4112bef52c deploy(dev): give the tuning ConfigMap a fixed name
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m26s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
A hashed name left every superseded tuning ConfigMap behind for Argo to report as
out of sync. The provision Job is a sync hook that reads the mounted file afresh on
every sync, so an in-place update is enough. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 08:09:07 -04:00
dingoandClaude Opus 5.5 409ec5a31a deploy(dev): serve region 11 on run 499's image
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m31s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Region 11 is a fresh cellular-v9 opening with the current tuning (thrust cost at a
quarter of the metabolic full-speed cost) and random founder spawns; a region
keeps the tuning it opened with, so the new trial value needs a new region until
live retuning exists. Regions 1-10 stay stored. The grant broker routes new
accounts to region 11. Run 496's build stays retained. Refreshes the DEV session
window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 06:58:30 -04:00
dingoandClaude Opus 5.5 af32af36ee feat(cellular): random founder spawns, tunable thrust cost, commit timing
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 1m6s
Foundation / checks (deploy) (push) Successful in 5m41s
Foundation / postgres-tools (push) Successful in 1m33s
Foundation / image (push) Successful in 4m42s
Foundation / server-image (push) Successful in 4m55s
Playtest feedback on region 10.

Rules-12 founders now start at a seeded random spot anywhere in the region (1 mm
clear of the edges, clear of other cells; seeded by world, region and the life's
identity so replay is exact). The provisioned sites remain the fallback.

Thrust energy is tunable: founder.thrust_cost_per_mille scales the metabolic
full-speed movement cost for thrust and braking (trial 250, a quarter of today's
cost). It is part of the liquid rules declared when a region opens, persisted in
the format-10 block's reserved slot (zero stands for the original 1,000), so
existing regions keep their meaning.

The server logs every cellular commit slower than 50 ms (and one in 60) with its
tick count and duration, to find what stalls the loop once a second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 06:40:12 -04:00
dingoandClaude Opus 5.5 c94eca7d4e deploy(dev): promote run 496's server image (sessions follow the simulated tick)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Run 496 (10be45e) gives sessions the open batch's working tick, so clients no
longer see time in 20-tick bursts. Run 494's build stays retained. Refreshes the
DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 22:49:47 -04:00
dingoandClaude Opus 5.5 10be45ec55 fix(server): sessions see the open batch's simulated tick
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 4m14s
Foundation / image (push) Successful in 4m40s
With commits every flush interval the session layer still read the committed
head as the simulated tick, so clients saw time advance 20 ticks at once and
scheduled their actions for ticks the server had already simulated, which were
refused (poor movement). Sessions now get the open batch's working tick, so
welcome ticks, receipts, the simulated watermark and action admission follow what
has actually been simulated. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 22:32:59 -04:00
dingoandClaude Opus 5.5 e8c9f1fe17 deploy(dev): promote run 494's server image (liquid perception, 1 s commits)
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Run 494 (556d516) perceives format-3 deposits and commits the cellular session
batch every flush interval instead of every tick. Run 492's build stays retained.
Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 22:02:55 -04:00
dingoandClaude Opus 5.5 556d5164fb fix(cellular): perceive liquid deposits and commit every flush interval
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m32s
Foundation / postgres-tools (push) Successful in 27s
Foundation / server-image (push) Successful in 4m19s
Foundation / image (push) Successful in 4m53s
Region 10 showed no food: the habitat's perception treated only format 2 as pools
and bubbles, so a format-3 habitat fell into the square-patch path, whose entries
the server bridge skips. Format 3 is now perceived exactly like format 2.

It also ran at 3-4 ticks per second: the cellular loop published every tick, and
each publication writes the whole region payload (about 300 KB for 60 x 60 mm with
3,500 deposits) to the object store and commits it to PostgreSQL. The loop now
keeps one session batch open and commits every flush interval (ADR-0089: 1 s,
20 ticks). Players see the batch's working state immediately; mutation offers and
life endings still come from committed state, so choices stay durable. Births and
mutation choices commit promptly in a fresh batch, a batch commits when demand
ends, and it is dropped when the host loses authority or changes mode. Pacing
follows the simulated tick, never backwards within an epoch. Refreshes the DEV
session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 21:45:54 -04:00
dingoandClaude Opus 5.5 6dda25324b deploy(dev): promote run 492's server image (shared current fields)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 3s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Region 10 ran near one tick per second because every owner restore regenerated
its current field; run 492 (10aba32) shares fields and advances session batches in
place. Run 489's build stays retained. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:53:54 -04:00
dingoandClaude Opus 5.5 10aba324db perf(cellular): share current fields and advance session batches in place
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 1m9s
Foundation / server-image (push) Successful in 4m17s
Foundation / image (push) Successful in 4m41s
DEV region 10 ran at about one tick per second. Every owner restore regenerated
the region's current field (about 19 ms of a 29 ms restore for 60 x 60 mm), and
the server restores several times per tick: the session batch builder copies the
committed state, copied it again for each appended tick, and publication replays
from another copy. On the slower worker node that capped the region far below
20 ticks per second, which also left the client's view stale, so it sent no
movement.

Generated fields are now shared per process (they are immutable and fully
determined by their configuration): a 60 x 60 mm restore with 3,500 deposits
drops from 29 ms to 1.5 ms. The builder advances its private working state in
place when a tick has no births, after checking the batch and mutation-action
encodings first; a refused owner tick leaves it unchanged, so appends stay
all-or-nothing. Births keep the copying path. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:36:57 -04:00
dingoandClaude Opus 5.5 4921231311 deploy(argocd): let the dev project carry ConfigMaps
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m27s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 4s
Foundation / server-image (push) Successful in 4s
The rules-12 tuning file reaches the provision Job as a kustomize-generated
ConfigMap, which the dev AppProject refused ("ConfigMap is not permitted in
project aevolution-dev"), so the region-10 sync failed validation and applied
nothing. ConfigMaps carry only Git-managed, non-secret configuration; stage and
world0 projects already allow them. Projects are applied by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:55:33 -04:00
dingoandClaude Opus 5.5 1222e8bcf4 deploy(dev): serve liquid region 10 on run 489's images
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
DEV now provisions and serves region 10: a 60 x 60 mm cellular-v9 opening taken
to rules 12 with the currents, handling and moving food of the mounted Git tuning
file (generated ConfigMap, read only by the provision Job). The grant broker
routes new accounts to region 10; regions 1-9 stay stored but unserved.

Promotes run 489 (d2f603b, schema 58): the server image for the region host,
provision and store Jobs, and the postgres-tools image for the migration hook.
The previous build stays retained. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:47:08 -04:00
dingoandClaude Opus 5.5 d2f603b582 feat: durable liquid regions (bundle 14, schema 58), cellular-v9 and session v13
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m25s
Foundation / postgres-tools (push) Successful in 1m12s
Foundation / server-image (push) Successful in 4m20s
Foundation / image (push) Successful in 4m54s
ADR-0178. Bundle 14 (rules 12 on owner format 10) is admitted by schema 58
through parser-local normalization to bundle 13, with an exact fenced 13 -> 14
upgrade whose only input, the liquid rules, recovery reads from the target.
Schema 58 also widens the canonical action input: byte 13 bit 0 is brake.

evo-world-clone gains the cellular-v9 opening: cellular-v8 followed by the liquid
upgrade from --tuning FILE (region size must match) and an optional
--current-seed; resumable and idempotent at bundle 14.

Session v13 adds the owner's velocity, heading and the region's current
configuration to its perception, each deposit's world velocity, and a brake on
cellular actions; older sessions keep their layouts. A rules-12 server lists every
pool and the nearest 256 moving bubbles. The client speaks v13, brakes on Space
(rebindable; older controls files take the default), draws currents as drifting
streaks and carries bubbles along their velocities between perceptions.

Tests: protocol v13 round trips and refusals, action-input brake, controls files,
and a PostgreSQL cellular-v9 provisioning test whose player is born, swims and
brakes through the live host. Full local PostgreSQL qualification, the Linux debug
suite and the Windows client suite pass. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:08:59 -04:00
dingoandClaude Opus 5.5 3f82795c18 feat(lifecycle): rules 12 liquid owner on format 10 with brake traces
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m23s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 4m10s
Foundation / image (push) Successful in 4m31s
The cellular owner gains rules 12 on owner format 10: an explicit no-tick
format-9/rules-11 upgrade declares the region's liquid rules (current
configuration, founder handling and deposit motion, from the tuning file and a
seed when the region opens), converts the habitat to format 3 and starts lives at
rest. Founders born afterwards are founder 5 (genome schema 6).

Each tick derives every life's handling from its genome and the declared founder
handling, samples the current at its footprint and steps the shared liquid
motion; afterwards bubbles move with the current and the drift moving cells
induce, and touching bubbles merge. Format 10 persists the rules and each life's
motion state; restore regenerates the identical current field.

Brake is a new step intent, valid only under rules 12, carried in trace 4 as flag
bit 1 (SQL never parses that byte; player action records keep it zero). Tests
cover the upgrade, exact restore, swimming and braking, moving food with fixed
pools, restore continuing a live run, and brake traces replaying exactly. Genomes
from before schema 6 handle as founders. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 17:28:58 -04:00
dingoandClaude Opus 5.5 190a66ad5e feat(biology): liquid motion in the shared region tick
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 25s
Foundation / server-image (push) Successful in 4m3s
Foundation / image (push) Successful in 4m28s
Rules 12 lives carry a liquid input (motion state, handling, brake and the local
flow sample) and step through propose_liquid_cellular_step: maintenance first,
then one kinematic tick funded from what is left, so unfundable thrust coasts with
the current. A format-3 habitat requires liquid input on every life and older
habitats refuse it. Contact feeding sweeps each liquid cell's whole path so a fast
cell cannot pass over food; frozen cells keep their motion; corpse bubbles in a
format-3 habitat count one merged bubble and use the larger deposit limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:56:37 -04:00
dingoandClaude Opus 5.5 40dc2b12ad feat(biology): procedural currents, habitat format 3 and moving food
Phase 2 biology. CellularFlowField generates 2-n seeded closed looping currents
inside the region, each with its own width, speed and direction, strongest at the
centreline and still at the stream edges and walls, rasterized to a Q10 grid with
integer bilinear sampling. The field digest matches across g++-14, clang-19 and
MSVC, so clients regenerate it from the configuration.

Habitat format 3 adds per-deposit induced drift, sub-micrometre carry and a merged
count, with up to 8,192 deposits. advect_cellular_deposits moves bubbles with the
flow plus drift from passing cells (falloff and decay), merges touching bubbles
into the lower id up to the merged cap, keeps pools fixed and addresses unique.
A 2,000-tick run of 1,800 bubbles conserves stock exactly and leaves nothing piled
at the walls; it costs under 0.7 ms per tick optimized. The tuned grid pitch is
capped at 10 mm. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:50:45 -04:00
dingoandClaude Opus 5.5 2bffbc2095 feat(biology): genome schema 6 movement arrangement and derived handling
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m26s
Foundation / postgres-tools (push) Successful in 19s
Foundation / image (push) Successful in 3m57s
Foundation / server-image (push) Successful in 4m2s
Schema 6 genomes carry the body's movement arrangement for mutations 001-010 as
reference-point indices (100 = founder): output, efficiency, burst, steering,
streamlining, braking, anchor, coasting and colony drive. It is encoded after the
capability records and covered by the digest; older schemas refuse it, so their
capability tables and mutation catalogs are unchanged. Development version 6 and
founder 5 serve rules 12.

derive_cellular_handling scales the tuned founder handling by the arrangement:
output scales thrust, braking reverse thrust, steering turning; streamlining lowers
forward drag and coasting both drags. Full-output costs follow the metabolic
budget's movement cost times output over efficiency. Shed output or a missing
movement capability leaves only passive drift. Refreshes the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:39:09 -04:00
dingoandClaude Opus 5.5 ab5df35c3f feat(biology): liquid-relative cellular kinematics and the Git tuning file
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m24s
Foundation / postgres-tools (push) Successful in 27s
Foundation / server-image (push) Successful in 4m5s
Foundation / image (push) Successful in 4m17s
Phase 1 of the region and movement plan. Adds the shared integer motion step:
Q10 velocity relative to the liquid, a 16-bit heading with a rate-limited turn,
funded forward/reverse thrust (unfunded thrust coasts), braking, separate forward
and lateral drag that decays to exactly zero, local flow, and a sub-micrometre
carry with no rounding drift. A golden trajectory digest matches across g++-14,
clang-19 and MSVC, so the server and client predictor agree exactly.

Adds deploy/kubernetes/region/dev/tuning/cellular.tuning with every v0 trial value
and a strict parser (unknown, missing, duplicate, out-of-range and inconsistent
values are refused) plus founder handling derived from it. Refreshes the DEV
session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:30:51 -04:00
dingoandClaude Opus 5.5 816c83d68f ci: gate pushes on the deploy suite only and run the full matrix nightly
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m28s
Foundation / postgres-tools (push) Successful in 32s
Foundation / server-image (push) Successful in 4m3s
Foundation / image (push) Successful in 4m10s
Gameplay iteration needs images on DEV in minutes. A push to main now runs only
the deploy policy suite before the image jobs; the full check matrix runs nightly,
on pull requests and on manual dispatch, in its own concurrency group. Refreshes
the DEV session window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:13:20 -04:00
dingoandClaude Opus 5.5 34f544942f docs: cellular region and movement redesign with ADR-0177 and implementation plan
Records the maintainer's region decisions: regions linked to a world area rather
than a voxel, currents and a world-derived thermal map as conditions rather than
stock, capped regions, fresh-life region choice, scaled emergence and a protected
logout anchor. ADR-0098, 0172 and 0173 note the amendments. Adds the movement
draft decisions (fixed-point motion state, player-dropped 007 anchor) and the
phased implementation plan with a Git tuning file and bubble merging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:13:20 -04:00
dingo 9adaf6515b docs: add immediate division and prepared offspring mutation routes
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m22s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 4s
2026-10-21 11:32:22 -04:00
dingo 0bbe650265 docs: draft 150 cellular mutations and offer eligibility
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m24s
Foundation / server-image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 6s
Foundation / image (push) Successful in 5s
2026-10-21 11:07:09 -04:00
dingoandClaude Opus 5.5 6b1e5b1ad4 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
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>
2026-10-21 11:03:23 -04:00
dingoandClaude Opus 5.5 bed069e91c fix(wildlife): rules-11 foragers short of energy seek energy, not the nearest mote
The controller steered to the nearest non-empty deposit of any kind and held
still once touching it. A bud parked on a carbon mote fed on carbon until it
starved, and later buds stopped on the first bubble of a corpse's row rather
than its energy one. On rules 11 a wildlife cell whose energy reserve covers
fewer than 1,200 ticks (60 s) of its full demand now passes over energy-free
deposits while it perceives any energy; a fed cell, or one with no energy in
view, still takes the nearest food. Earlier rules are unchanged, so their
recorded and population histories replay exactly. The choice is the new
wildlife_food(), tested directly in photosynthesis-contracts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 11:03:23 -04:00
dingoandClaude Opus 5.5 3498da4130 fix(client): schedule cellular actions by an adaptive lead
Foundation / checks (ecs) (push) Successful in 2m36s
Foundation / checks (deploy) (push) Successful in 5m1s
Foundation / checks (checks) (push) Failing after 13m25s
Foundation / checks (network) (push) Successful in 19m48s
Foundation / checks (client) (push) Successful in 21m0s
Foundation / checks (tsan) (push) Successful in 46m45s
Foundation / checks (postgres) (push) Successful in 1h16m51s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Movement, feeding, engulf and bud actions named the view tick + 1, but the server admits only ticks still ahead of its own when an action arrives. The view trails the server by the replication delay, so most actions were refused as outside the server window and the cell froze while ticks advanced. They now use the same adaptive input lead as intentions (2..7 ticks, inside the server's 8-tick window): an outside-window refusal schedules further ahead, admitted receipts tune it, and movement ticks stay strictly increasing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:57:45 -04:00
dingoandClaude Opus 5.5 c0835c04a3 deploy(dev): promote run 478's server image with the provision fix
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m34s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 5s
Foundation / server-image (push) Successful in 6s
sha256:86b100f7 came from run 474 (97b338e), before the lease-free provision rerun, so the sync hook still failed with 'photosynthesis opening lease refused'. Run 478 built b154774 with both fixes as sha256:67e6bb3d. 86b100f7 never served region 9; f1183f44 stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 08:22:14 -04:00
dingoandClaude Opus 5.5 b154774e18 deploy(dev): promote the rules-11 session and provision fixes
Foundation / checks (ecs) (push) Successful in 29s
Foundation / checks (checks) (push) Successful in 1m36s
Foundation / checks (deploy) (push) Successful in 4m45s
Foundation / checks (network) (push) Successful in 16m17s
Foundation / checks (client) (push) Successful in 17m55s
Foundation / checks (tsan) (push) Successful in 40m27s
Foundation / checks (postgres) (push) Successful in 1h12m37s
Foundation / postgres-tools (push) Successful in 1m39s
Foundation / server-image (push) Successful in 4m23s
Foundation / image (push) Successful in 4m38s
Server image sha256:86b100f7 (run 476): session batches on bundle 13 publish, so births and player ticks on region 9 commit, and a rerun provision hook no longer needs region 9's lease. The previous build f1183f44 stays retained for region 9's existing commits; postgres-tools and schema 57 are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 06:41:58 -04:00
dingoandClaude Opus 5.5 212bf87508 ci(postgres): pass the formatter's absolute path to the format check
check-format.cmake requires an existing formatter path; the bare command name failed run 476's PostgreSQL image build before any test ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 06:41:58 -04:00
aevolution-gitops-bot 88dd1beb82 ci: parallelize native test execution
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 2m14s
Foundation / checks (tsan) (push) Successful in 42m49s
Foundation / checks (checks) (push) Successful in 47m58s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 4s
2026-10-20 21:56:21 -04:00
dingoandClaude Opus 5.5 6a9af9c514 ci: keep PostgreSQL-only tests out of the native suites; build with 4 jobs
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (deploy) (push) Successful in 4m54s
Foundation / checks (postgres) (push) Failing after 8m46s
Foundation / checks (network) (push) Successful in 15m41s
Foundation / checks (client) (push) Successful in 17m3s
Foundation / checks (tsan) (push) Successful in 45m3s
Foundation / checks (checks) (push) Successful in 1h27m38s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
A push's diff against its before SHA counts every commit it carries, and any
tests/ change selected checks, tsan and ecs. Run 475 spent 1h44m in checks
for two commits that only touched tests/region_store_tests.cpp, which the
native suites never build. Sources compiled only into evo-postgres-tests now
select the PostgreSQL suites alone; the PostgreSQL image runs the repository
format check so they stay formatted. Native CI stages compile with
CI_BUILD_JOBS (default 4, previously a fixed 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 18:22:44 -04:00
dingoandClaude Opus 5.5 60c034f066 fix(provision): rerun a finished cellular-v8 opening without the region lease
Every Argo sync reruns the provision hook while evo-region holds region 9's
lease. The cellular-v8 resume path acquired the lease before looking at the
head, so a finished bundle-13 region failed the hook ("photosynthesis
opening lease refused", exit 3) and the sync never reached the Deployment.
A head already at bundle 13 now needs no lease and reports
already-provisioned. The PostgreSQL suite reruns provisioning while a
running host holds the lease.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 18:22:44 -04:00
dingoandClaude Opus 5.5 aa65209601 deploy(dev): refresh the session window
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 5m2s
Foundation / checks (tsan) (push) Successful in 45m7s
Foundation / checks (postgres) (push) Successful in 1h4m37s
Foundation / checks (checks) (push) Successful in 1h44m18s
Foundation / server-image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 20s
Foundation / image (push) Successful in 6m22s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 16:07:50 -04:00
dingoandClaude Opus 5.5 d1030b7dd1 test(postgres): a cellular-v8 player feeds, is offered and chooses a mutation
A provisioned bundle-13 region with a contact pool at the spawn site runs
the live server's path end to end: host reservation, session batches with
the queued birth, contact feeding until an offer, host mutation admission
and its session publication with the mutation block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 16:06:32 -04:00
dingoandClaude Opus 5.5 bbafaf6957 test(postgres): a lost birth request on a restarted rules-11 host
The cellular-v8 provisioning test now drains the host before its reserved
birth publishes and restarts it. Claiming control under the new lease epoch
cancels the unpublished reservation (schema 17), so the account's next
request is reserved, queued and born instead of being refused for a life
the client can no longer reach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 15:56:55 -04:00
dingoandClaude Opus 5.5 97b338eb33 fix(session): tag rules 10/11 session batches with the inheritance trace format
Foundation / checks (checks) (push) Successful in 1h42m20s
Foundation / checks (client) (push) Successful in 22m8s
Foundation / checks (deploy) (push) Successful in 5m2s
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (network) (push) Successful in 20m56s
Foundation / checks (tsan) (push) Successful in 46m50s
Foundation / checks (postgres) (push) Successful in 1h2m47s
Foundation / postgres-tools (push) Successful in 27s
Foundation / server-image (push) Successful in 3m42s
Foundation / image (push) Successful in 7m2s
CellularSessionBatchBuilder left every batch at cellular_batch_format, but
replay accepts only the inheritance format on owners that retain offspring
plans (format >= 8, rules 10 and 11). On DEV region 9 (bundle 13) every
player tick, including a queued birth, was refused at publication as an
invalid batch, so births stayed pending forever. The builder now declares
the same format the unattended interval path already uses.

The PostgreSQL suite provisions cellular-v8 and drives a birth and an
ordinary tick through the host and session builder, as evo-server does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 11:27:59 -04:00
dingoandClaude Opus 5.5 54cf928dce deploy(dev): promote schema 57 images and serve producer region 9
Foundation / checks (checks) (push) Successful in 6s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m31s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Promote CI run 471's images for 2efb01d (server f1183f44..., postgres-tools
d3b8e520...) in the DEV region and stores overlays and the recorded build
identity, retaining the previous build so stored regions still recover.
The DEV database migrates to schema 57 and the provision hook writes
region 9 with the cellular-v8 opening at the trial light (40 pJ per square
um per tick). Region 8 stays stored but unserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 07:43:44 -04:00
dingoandClaude Opus 5.5 6e2b3f858c fix(deploy): keep DEV on region 8 until its image is promoted
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
The region 9 switch pointed the DEV provision hook at the cellular-v8
opening while the overlay still pinned a server image built before that
opening, so the old tool refused its arguments and the Argo sync failed at
region-provision. Restore region 8 / cellular-v7; the region 9 switch will
land together with the promotion of an image that contains schema 57,
cellular-v8 and session v12.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 06:06:38 -04:00
dingoandClaude Opus 5.5 2efb01d1a3 ci: give the checks job headroom and trim producer tests
Foundation / checks (ecs) (push) Successful in 2m29s
Foundation / checks (deploy) (push) Successful in 5m29s
Foundation / checks (network) (push) Successful in 23m57s
Foundation / checks (client) (push) Successful in 24m50s
Foundation / checks (tsan) (push) Successful in 47m40s
Foundation / checks (postgres) (push) Successful in 1h22m11s
Foundation / checks (checks) (push) Successful in 1h49m20s
Foundation / postgres-tools (push) Successful in 1m13s
Foundation / server-image (push) Successful in 3m45s
Foundation / image (push) Successful in 6m1s
Run 469 failed only the checks job, at exactly its 90-minute limit; full
checks runs had grown from 67 to 78 minutes through M12 and every step
passes locally. The limit is now 120 minutes. The producer test checks dark
and brighter light on the capture rule instead of growing two extra
histories, and the trace test takes over the grown population.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 23:21:29 -04:00
dingoandClaude Opus 5.5 b73ccbae9a feat(ecology): make photosynthesis regions playable on DEV
Foundation / checks (ecs) (push) Successful in 2m19s
Foundation / checks (deploy) (push) Successful in 4m47s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 16m48s
Foundation / checks (network) (push) Canceled after 16m46s
Foundation / checks (postgres) (push) Canceled after 16m47s
Foundation / checks (client) (push) Canceled after 16m53s
Foundation / checks (tsan) (push) Canceled after 14m33s
ADR-0176 and schema 57 admit raw cellular bundle 13 (rules 11 on owner
format 9) through parser-local normalization to bundle 12, and a fenced
no-tick 12 -> 13 upgrade that declares the region's light; recovery reads
the light from the target and re-derives the whole target from the source.
The resumable cellular-v8 opening provisions a cellular-v7 genesis, one
empty tick and the durable upgrades to bundle 13.

Session v12 adds the owner's captured light and the producers it can see
to its perception, and lets offers name photosynthesis; older sessions keep
their layouts and never receive photosynthesis candidates. The client
draws chloroplasts by efficiency, shows sunlight in the HUD and offers
photosynthesis cards. DEV now provisions and serves region 9 with the
trial light; region 8 stays stored but unserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 23:04:34 -04:00
dingoandClaude Opus 5.5 108f29eda5 feat(biology): evolve photosynthetic producers that capture light
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (deploy) (push) Successful in 5m15s
Foundation / checks (network) (push) Successful in 21m56s
Foundation / checks (client) (push) Successful in 22m54s
Foundation / checks (tsan) (push) Successful in 47m4s
Foundation / checks (postgres) (push) Successful in 1h15m49s
Foundation / checks (checks) (push) Failing after 1h30m4s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
ADR-0175 implements ADR-0136 step C with trial costs to be balanced after
playtesting. Genome schema 5 adds a photosynthesis efficiency (empty in
schemas 1-4, so earlier offers and draws are unchanged; mutation operators
29-32 are appended). Development version 5 builds the organelles as
internal membrane (p/4 of structure, upkept twice) and slows movement by
p/2 per thousand. Founder 4 and cellular rules 11 let lineages earn the
capability as an offspring plan that children express.

Owner format 9 declares the region's light. Inside each tick's detached
candidate, active unfrozen producers capture cross-section x irradiance x
efficiency (a quarter while moving), credited to the reserve and boundary
inflow together and replayed from recorded intentions. Well-lit wildlife
producers hold still. The joint owner keeps infall, water and radiation and
nests a rules-11 owner unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:06:02 -04:00
dingoandClaude Opus 5.5 51991ac7ff feat(persistence): admit durable cellular environment profile
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (deploy) (push) Successful in 4m51s
Foundation / checks (network) (push) Successful in 20m42s
Foundation / checks (client) (push) Successful in 21m53s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 40m19s
Foundation / checks (postgres) (push) Canceled after 40m9s
Foundation / checks (tsan) (push) Canceled after 37m53s
ADR-0174 and schema 56 add checkpoint profile 6, which stores the joint
cell/environment envelope nesting population envelope 2 (bundles 10 and
11). Entry from a committed population head is explicit, one-way and
no-tick, with the source commit, manifest and payload digests bound in
immutable evidence. Joint intervals use schema 45's owned admission and
settlement; conversions cannot overtake a pending interval. The fenced
publisher validates the joint trace structurally, including the complete
nested population batch, and records per-commit imported and radiated
totals. Recovery replays the head's link and requires the payload
exactly, refusing a forged but structurally valid trace. A trigger
refuses profile-6 commits from every other publisher; profile 4/5 bytes,
parsers and rules are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 17:16:50 -04:00
dingoandClaude Opus 5.5 fc6d26d7d6 feat(ecology): record and replay joint environment intervals
ADR-0173 adds joint batch AEVOEBT1: the unchanged population batch plus
each tick's recorded infall import and radiated heat. Unattended recording
applies each tick's exchange before the shared wildlife controller chooses,
so a recorded interval equals the same live joint ticks; replay applies the
same exchange and the recorded intentions and must re-derive every flow.
Forged flows or boundaries, missing ticks, wrong cuts, truncated input and
future formats are refused. Whole-group conversion replays exactly and
cohort intervals record identical biology and flows. A full habitat counts
infall bubbles skipped and imports nothing for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:22:05 -04:00
dingoandClaude Opus 5.5 4c70257883 feat(ecology): own cells and their local environment together
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (deploy) (push) Successful in 4m59s
Foundation / checks (network) (push) Successful in 20m56s
Foundation / checks (client) (push) Successful in 22m1s
Foundation / checks (tsan) (push) Successful in 45m41s
Foundation / checks (postgres) (push) Successful in 1h13m35s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 1h20m34s
ADR-0172 records the maintainer's M12.5 ownership decision: one owner per
patch of space for cells and their local environment, reserves belonging
to the biological individual, and an open planet boundary whose every
crossing is a recorded import or export.

The portable CellularEnvironment owner (envelope AEVOCEN1) holds an exact
population with tagged water and dissolved compartments, refuses declared
atmosphere, imports infall from finite per-source entitlements (ADR-0136
step B) and radiates retained heat. Each tick's exchange is a validated
swap on the nested owner, undone if the biological tick refuses. Closed
and source-off regions keep their biology byte for byte; raw and cohort
representations agree under infall. No existing format, trace, golden,
default opening or live version changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:05:17 -04:00
dingo a898a35e1b feat(lifecycle): preserve inherited plans in exact populations
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (deploy) (push) Successful in 4m57s
Foundation / checks (network) (push) Successful in 20m53s
Foundation / checks (client) (push) Successful in 22m12s
Foundation / checks (tsan) (push) Successful in 39m45s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 45m41s
Foundation / checks (checks) (push) Canceled after 45m43s
2026-10-19 15:19:43 -04:00
dingo fad79973e2 fix(deploy): constrain DEV workloads to worker nodes
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m24s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 6s
2026-10-19 15:08:00 -04:00
dingo dc7c0e1fa1 feat(ecology): distinguish inherited plans in verified census
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 (checks) (push) Canceled after 1m13s
Foundation / checks (client) (push) Canceled after 1m14s
Foundation / checks (postgres) (push) Canceled after 1m7s
Foundation / checks (deploy) (push) Canceled after 1m13s
Foundation / checks (ecs) (push) Canceled after 1m13s
Foundation / checks (network) (push) Canceled after 1m14s
2026-10-19 15:06:47 -04:00
dingo c60cdf8e19 feat(persistence): admit durable retained offspring plans
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 (client) (push) Canceled after 1m11s
Foundation / checks (checks) (push) Canceled after 1m13s
Foundation / checks (postgres) (push) Canceled after 1m8s
Foundation / checks (ecs) (push) Canceled after 1m13s
Foundation / checks (network) (push) Canceled after 1m14s
Foundation / checks (deploy) (push) Canceled after 1m18s
2026-10-19 15:04:30 -04:00
dingo 39509ecd40 feat(persistence): define retained-plan checkpoint upgrade candidates
Foundation / checks (ecs) (push) Successful in 2m51s
Foundation / checks (deploy) (push) Successful in 5m18s
Foundation / checks (network) (push) Successful in 25m49s
Foundation / checks (client) (push) Successful in 26m34s
Foundation / checks (tsan) (push) Successful in 37m12s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 47m59s
Foundation / checks (postgres) (push) Canceled after 47m53s
2026-10-19 14:17:41 -04:00
dingo c0c66fa11a feat(lifecycle): replay retained offspring plans with explicit trace version
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (deploy) (push) Successful in 4m29s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 12m39s
Foundation / checks (client) (push) Canceled after 12m44s
Foundation / checks (checks) (push) Canceled after 12m48s
Foundation / checks (tsan) (push) Canceled after 10m18s
Foundation / checks (postgres) (push) Canceled after 12m44s
2026-10-19 14:04:52 -04:00
dingo 2c3a3c65a6 feat(lifecycle): retain inherited offspring plans separately from bodies
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (deploy) (push) Successful in 4m6s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (client) (push) Canceled after 9m29s
Foundation / checks (tsan) (push) Canceled after 7m4s
Foundation / checks (network) (push) Canceled after 9m28s
Foundation / checks (postgres) (push) Canceled after 9m28s
Foundation / checks (checks) (push) Canceled after 9m34s
2026-10-19 13:55:29 -04:00
dingo 5d8aa4d2e3 feat(biology): fund offspring from a distinct inherited genome
Foundation / checks (ecs) (push) Successful in 2m27s
Foundation / checks (deploy) (push) Successful in 4m15s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m22s
Foundation / checks (tsan) (push) Successful in 31m40s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 45m38s
Foundation / checks (checks) (push) Canceled after 45m43s
2026-10-19 13:09:52 -04:00
dingo 936ce36b3f docs(gameplay): ratify structural inheritance and one-way succession
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m44s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
2026-10-19 12:59:38 -04:00
dingo 3a1b8c7923 test(ecology): qualify unscripted maturing wildlife generations
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (deploy) (push) Successful in 4m16s
Foundation / checks (network) (push) Successful in 20m53s
Foundation / checks (client) (push) Successful in 22m3s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 22m4s
Foundation / checks (postgres) (push) Canceled after 24m24s
Foundation / checks (checks) (push) Canceled after 24m33s
2026-10-19 12:35:18 -04:00
dingo d3a867a662 feat(persistence): admit durable maturing wildlife migrations
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m7s
Foundation / checks (network) (push) Successful in 21m2s
Foundation / checks (client) (push) Successful in 22m21s
Foundation / checks (tsan) (push) Successful in 28m57s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 38m8s
Foundation / checks (checks) (push) Canceled after 38m19s
2026-10-19 11:57:00 -04:00
dingoandClaude Opus 5.5 ae2a2d78ba Keep the cell through a lone empty view (no-cell panel blinking)
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (deploy) (push) Successful in 4m17s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m10s
Foundation / checks (tsan) (push) Successful in 28m58s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 42m32s
Foundation / checks (checks) (push) Canceled after 42m39s
The DEV server still runs a build that sends every session an empty view each tick
around the owner's real one. fcc6c57's client guard covered only an empty view after
the real one of the same tick; the next tick's empty view arriving first still made the
cell vanish for a frame, so the no-cell panel blinked a few times a minute.

While a cell is shown, the client now counts empty views only after 20 ticks (one
second) with no real view. A death is unaffected: it arrives as CellularLifeEnded. The
session test covers both orders and the grace running out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 11:14:36 -04:00
dingo 5e168d67c3 feat(lifecycle): qualify portable maturing wildlife transfers
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (deploy) (push) Successful in 4m12s
Foundation / checks (network) (push) Successful in 20m57s
Foundation / checks (client) (push) Successful in 22m9s
Foundation / checks (tsan) (push) Successful in 28m49s
Foundation / checks (postgres) (push) Successful in 1h5m2s
Foundation / checks (checks) (push) Successful in 1h17m42s
Foundation / postgres-tools (push) Successful in 1m10s
Foundation / server-image (push) Successful in 3m51s
Foundation / image (push) Successful in 4m54s
2026-10-19 09:09:15 -04:00
dingo 274f62cb89 feat(lifecycle): qualify census of funded maturing owners
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m29s
Foundation / checks (network) (push) Successful in 20m54s
Foundation / checks (client) (push) Successful in 22m0s
Foundation / checks (tsan) (push) Successful in 27m5s
Foundation / checks (postgres) (push) Successful in 1h4m20s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 1h12m23s
2026-10-19 07:56:58 -04:00
dingo 463b091056 feat(persistence): admit durable funded maturation upgrades
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (network) (push) Successful in 20m40s
Foundation / checks (client) (push) Successful in 21m57s
Foundation / checks (tsan) (push) Successful in 26m32s
Foundation / checks (postgres) (push) Successful in 1h3m17s
Foundation / checks (checks) (push) Successful in 1h14m29s
Foundation / postgres-tools (push) Successful in 34s
Foundation / server-image (push) Successful in 4m6s
Foundation / image (push) Successful in 4m52s
2026-10-19 06:23:51 -04:00
dingo a5307c768b feat(lifecycle): add opt-in funded cellular maturation
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 21m0s
Foundation / checks (client) (push) Successful in 22m13s
Foundation / checks (tsan) (push) Successful in 26m35s
Foundation / checks (postgres) (push) Successful in 1h1m27s
Foundation / checks (checks) (push) Successful in 1h14m29s
Foundation / postgres-tools (push) Successful in 1m19s
Foundation / server-image (push) Successful in 3m46s
Foundation / image (push) Successful in 4m57s
2026-10-18 21:48:27 -04:00
dingo 27ec5729bf M12.7: reconcile pending migration evidence in census snapshots
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (network) (push) Successful in 21m1s
Foundation / checks (client) (push) Successful in 22m9s
Foundation / checks (tsan) (push) Successful in 24m36s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 33m38s
Foundation / checks (checks) (push) Canceled after 33m49s
2026-10-18 21:14:53 -04:00
dingo 709dfb9557 M12.7: bind census evidence to database history domains
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (deploy) (push) Successful in 4m10s
Foundation / checks (network) (push) Successful in 21m32s
Foundation / checks (client) (push) Successful in 22m14s
Foundation / checks (tsan) (push) Successful in 24m30s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 41m43s
Foundation / checks (postgres) (push) Canceled after 41m39s
2026-10-18 20:33:16 -04:00
dingo 145e6e1445 M12.7: require registered regions in census snapshots
Foundation / checks (deploy) (push) Successful in 58s
Foundation / checks (ecs) (push) Successful in 2m36s
Foundation / checks (network) (push) Successful in 20m56s
Foundation / checks (client) (push) Successful in 22m19s
Foundation / checks (tsan) (push) Successful in 25m18s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 44m49s
Foundation / checks (postgres) (push) Canceled after 44m54s
2026-10-18 19:48:23 -04:00
dingo 7631f9d2e2 M12.6: capture consistent regional census snapshots
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (network) (push) Successful in 21m3s
Foundation / checks (client) (push) Successful in 22m14s
Foundation / checks (tsan) (push) Successful in 24m52s
Foundation / checks (postgres) (push) Failing after 36m19s
Foundation / checks (checks) (push) Successful in 1h10m25s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
2026-10-18 15:56:58 -04:00
dingo 82568da9cd M12.6: add scoped multi-region cellular census queries
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (network) (push) Successful in 20m57s
Foundation / checks (client) (push) Successful in 22m5s
Foundation / checks (tsan) (push) Successful in 24m37s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 45m14s
Foundation / checks (postgres) (push) Canceled after 45m8s
2026-10-18 15:11:51 -04:00
dingo a180c41ae7 M12.6: derive replayed census history from immutable commits
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 20m50s
Foundation / checks (client) (push) Successful in 22m7s
Foundation / checks (tsan) (push) Successful in 24m42s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 35m33s
Foundation / checks (checks) (push) Canceled after 35m43s
2026-10-18 14:36:14 -04:00
dingo da39fc8095 M12.6: add bounded regional cellular census and lineage queries
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m33s
Foundation / checks (network) (push) Successful in 21m15s
Foundation / checks (client) (push) Successful in 22m8s
Foundation / checks (tsan) (push) Successful in 25m2s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 38m24s
Foundation / checks (postgres) (push) Canceled after 38m24s
2026-10-18 13:57:52 -04:00
dingo df680810af M12.4: qualify migration storage failures and exact recovery
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m12s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 19m42s
Foundation / checks (checks) (push) Canceled after 19m48s
Foundation / checks (tsan) (push) Canceled after 19m49s
2026-10-18 13:38:05 -04:00
dingo e0a7c13f6b M12.4: qualify migration ownership across TLS path loss
Foundation / checks (ecs) (push) Successful in 2m29s
Foundation / checks (deploy) (push) Successful in 4m8s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 18m9s
Foundation / checks (client) (push) Canceled after 18m8s
Foundation / checks (network) (push) Canceled after 18m7s
Foundation / checks (tsan) (push) Canceled after 15m39s
Foundation / checks (postgres) (push) Canceled after 18m13s
2026-10-18 13:19:59 -04:00
dingo 0f071f3f8b M12.4: atomically publish and recover biological migration pairs
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m21s
Foundation / checks (network) (push) Successful in 20m51s
Foundation / checks (client) (push) Successful in 22m2s
Foundation / checks (tsan) (push) Successful in 22m59s
Foundation / checks (postgres) (push) Successful in 53m40s
Foundation / checks (checks) (push) Successful in 1h7m19s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 38s
Foundation / image (push) Successful in 4m31s
2026-10-18 10:02:55 -04:00
dingo 0515702964 M12.4: retain read-only destination migration stages
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 20m44s
Foundation / checks (client) (push) Successful in 21m57s
Foundation / checks (tsan) (push) Successful in 22m46s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 30m2s
Foundation / checks (postgres) (push) Canceled after 29m56s
2026-10-18 09:32:50 -04:00
dingo c625a4cb68 M12.4: retain migration source freezes and explicit aborts
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m24s
Foundation / checks (network) (push) Successful in 20m44s
Foundation / checks (client) (push) Successful in 22m3s
Foundation / checks (tsan) (push) Successful in 23m1s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 24m7s
Foundation / checks (postgres) (push) Canceled after 24m3s
2026-10-18 09:08:50 -04:00
dingo 1b5c0cdf7c M12.4: admit and replay durable boundary-accounting upgrades
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m15s
Foundation / checks (tsan) (push) Successful in 23m3s
Foundation / checks (postgres) (push) Successful in 51m33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 55m18s
2026-10-18 08:13:36 -04:00
dingo 2416735e2b M12.4: define explicit boundary-accounting checkpoint upgrades
Foundation / checks (deploy) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 2m38s
Foundation / checks (network) (push) Successful in 22m52s
Foundation / checks (client) (push) Successful in 23m48s
Foundation / checks (tsan) (push) Successful in 23m38s
Foundation / checks (postgres) (push) Successful in 53m31s
Foundation / checks (checks) (push) Successful in 1h9m6s
Foundation / postgres-tools (push) Successful in 2m0s
Foundation / server-image (push) Successful in 4m2s
Foundation / image (push) Successful in 4m40s
2026-10-17 22:33:19 -04:00
dingo 1e23dc3799 CI: repair sanitizer fixtures and client execution gates
Foundation / checks (ecs) (push) Successful in 2m33s
Foundation / checks (deploy) (push) Successful in 4m36s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 8m8s
Foundation / checks (checks) (push) Canceled after 10m47s
Foundation / checks (client) (push) Canceled after 10m49s
Foundation / checks (network) (push) Canceled after 10m48s
Foundation / checks (postgres) (push) Canceled after 10m49s
2026-10-17 22:22:34 -04:00
dingo 89f29fef3a M12.4: isolate continued population replay after transfer
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (client) (push) Canceled after 14m44s
Foundation / checks (checks) (push) Canceled after 14m44s
Foundation / checks (network) (push) Canceled after 14m43s
Foundation / checks (postgres) (push) Canceled after 14m42s
Foundation / checks (tsan) (push) Canceled after 14m43s
2026-10-17 22:07:47 -04:00
dingo 1e207b5ee4 M12.4: record and replay exact biological transfer pairs
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m30s
Foundation / checks (client) (push) Failing after 18m38s
Foundation / checks (network) (push) Successful in 22m21s
Foundation / checks (tsan) (push) Failing after 22m17s
Foundation / checks (postgres) (push) Successful in 51m32s
Foundation / checks (checks) (push) Failing after 59m20s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
2026-10-17 18:23:33 -04:00
dingo decd4f8043 M12.4: preserve exact biology across ownership candidates
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m18s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m33s
Foundation / checks (postgres) (push) Canceled after 5m29s
Foundation / checks (tsan) (push) Canceled after 5m28s
Foundation / checks (client) (push) Canceled after 5m37s
Foundation / checks (network) (push) Canceled after 5m39s
2026-10-17 18:17:59 -04:00
dingo 0a8962b57e M12.4: retain and settle owned population intervals
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m28s
Foundation / checks (tsan) (push) Failing after 18m22s
Foundation / checks (network) (push) Successful in 20m38s
Foundation / checks (client) (push) Failing after 21m6s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 46m54s
Foundation / checks (checks) (push) Canceled after 47m3s
2026-10-17 17:31:05 -04:00
dingo 627411983f M12.3: publish and recover durable exact populations
Foundation / checks (ecs) (push) Successful in 2m41s
Foundation / checks (tsan) (push) Failing after 18m12s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 20m41s
Foundation / checks (postgres) (push) Canceled after 20m43s
Foundation / checks (checks) (push) Canceled after 20m49s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (client) (push) Failing after 17m4s
Foundation / postgres-tools (push) Canceled after 0s
2026-10-17 17:10:17 -04:00
dingoandClaude Opus 5.5 d5d10a0cc7 Derive wildlife prey facts once per tick
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 3m57s
Foundation / checks (tsan) (push) Failing after 16m50s
Foundation / checks (network) (push) Successful in 20m31s
Foundation / checks (client) (push) Successful in 21m44s
Foundation / checks (postgres) (push) Failing after 41m8s
Foundation / checks (checks) (push) Failing after 41m12s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
The rules-7 engulf check derived every other cell's metabolic budget for each wildlife
cell, quadratic in budget derivations as buds multiply. The controller now derives each
cell's mass, extent and membrane once per call and compares those. Decisions are
unchanged; lifecycle and population tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:32:18 -04:00
dingo aff35863ce M12.4: keep cellular wildlife ticking and retain scheduling debt
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m35s
Foundation / checks (tsan) (push) Failing after 17m51s
Foundation / checks (network) (push) Successful in 21m13s
Foundation / checks (client) (push) Successful in 22m19s
Foundation / checks (postgres) (push) Successful in 48m25s
Foundation / checks (checks) (push) Failing after 50m8s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
2026-10-17 12:24:19 -04:00
dingo 5decaa0326 M12.3: persist exact population state and automatic conversion policy
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 3m16s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (client) (push) Canceled after 13m8s
Foundation / checks (checks) (push) Canceled after 13m12s
Foundation / checks (postgres) (push) Canceled after 13m2s
Foundation / checks (network) (push) Canceled after 13m4s
Foundation / checks (tsan) (push) Canceled after 13m9s
2026-10-17 12:11:10 -04:00
dingo 2b074b9ae1 M12.2: select and qualify exact cellular local cohorts
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m19s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 6m24s
Foundation / checks (network) (push) Canceled after 6m33s
Foundation / checks (postgres) (push) Canceled after 6m34s
Foundation / checks (checks) (push) Canceled after 6m44s
Foundation / checks (client) (push) Canceled after 6m44s
2026-10-17 12:04:39 -04:00
dingo bee57e5829 M12.2c: qualify the current cellular reference instrument
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m47s
Foundation / checks (tsan) (push) Successful in 13m32s
Foundation / checks (client) (push) Failing after 17m9s
Foundation / checks (network) (push) Successful in 19m58s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 20m34s
Foundation / checks (checks) (push) Canceled after 20m49s
2026-10-17 11:44:00 -04:00
dingo 8b54e7447a Close M11.9 for now and review the overhauled cellular UI
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 4s
2026-10-17 11:35:56 -04:00
dingoandClaude Opus 5.5 fcc6c57320 Stop the cell vanishing for a frame; eating glows instead of pulsing
Foundation / checks (deploy) (push) Successful in 26s
Foundation / checks (network) (push) Successful in 29s
Foundation / checks (ecs) (push) Successful in 53s
Foundation / checks (client) (push) Successful in 57s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 5m32s
Foundation / checks (tsan) (push) Canceled after 5m8s
Foundation / checks (postgres) (push) Canceled after 5m33s
Every tick the server sent each cellular session an empty view and then the owner's
real view. When the two landed in different client frames the client saw no cell:
steering stopped, the "no active cell" panel popped up, and every visible bubble
"vanished" at once and played its pop, a wave across the screen at random moments
(likelier with v11's larger views).

- Server: a session given a view this tick is no longer cleared in the same tick; the
  clear now follows every owner's view and reaches only sessions that got none.
- Client: an empty view never replaces a real one of the same tick (older servers).
- Only a bubble that was being eaten when last seen fades when it disappears; leaving
  the view or an empty view draws nothing.
- Eating is a soft glow in the bubble's colour, fading in and out about 1.5 times a
  second, instead of a size pulse; a finished bubble's glow shrinks and fades.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:56:27 -04:00
dingoandClaude Opus 5.5 43113e6c35 Refresh the DEV session window for the region 8 sync
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m48s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
The window pushed with 848c03b expired at 11:21 UTC, before the sync at 14:05, so the
region server refused to start ("error cellular-session-window"). A fresh three-hour
window; nothing else changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 10:09:25 -04:00
dingoandClaude Opus 5.5 848c03b49f Serve DEV region 8: pools and bubbles on a 30 x 30 mm arena (ADR-0136 step A)
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 3s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m56s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Promotes server 81515351 and postgres-tools bc5bf591 (schema v43) from the CI run for
be69cae; build 21507d43, which wrote region 7, stays retained. The region host,
provision Job, life routes and grant broker move to region 100/8, a cellular-v7 opening
(rules 8): 30 x 30 mm with region 7's total food, half in 9 pools of 500 um radius and
half in 1,800 single-nutrient bubbles scattered from the genesis commit, a 64-founder
nursery and 9 spawn sites. Region 7 stays in the stores, unserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 02:21:44 -04:00
dingoandClaude Opus 5.5 be69cae652 Cellular rules 8: pools and bubbles fed by contact (ADR-0136 step A)
Foundation / checks (checks) (push) Successful in 47m40s
Foundation / checks (client) (push) Successful in 17m27s
Foundation / checks (deploy) (push) Successful in 4m17s
Foundation / checks (ecs) (push) Successful in 4m31s
Foundation / checks (network) (push) Successful in 22m1s
Foundation / checks (tsan) (push) Successful in 13m10s
Foundation / checks (postgres) (push) Successful in 20m54s
Foundation / image (push) Successful in 4m15s
Foundation / postgres-tools (push) Successful in 5m32s
Foundation / server-image (push) Successful in 7m15s
Square patches invited camping and left the space between them empty. Rules 8 run on a
format-2 habitat of deposits:
- pools and single-nutrient bubbles at free micrometre centres, each with a stable id
  and a contact radius; the cellular-v7 opening scatters bubbles reproducibly from the
  genesis commit (three in ten in loose clumps) and lists pools with --pool;
- every cell drains what it touches, up to its intake rate per tick, with no target; a
  pool gives at most a quarter of that rate; an emptied deposit disappears;
- a dead cell's detritus breaks into one bubble per non-empty channel;
- wildlife swims to the nearest non-empty deposit and feeds by touch.

Bundle v9 (habitat 2) and schema v43 admit it. Session v11 carries the owner's 512
nearest deposits (id, centre, radius, shape, a drained flag and 16-bit amount codes)
instead of patches; every other cellular message is v10's. The client asks for v11,
draws bubbles (nutrient-coloured, pulsing while drained, popping when gone) and pools as
puddles, slows near food and sends no feed target; the HUD summarises food in range.
Earlier rules, regions and v10 clients are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:38:21 -04:00
dingoandClaude Opus 5.5 1d9af1d28e Serve DEV region 7: rules 7 on a 30 x 30 mm arena (ADR-0137)
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m51s
Foundation / server-image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 5s
Promotes server 21507d43 and postgres-tools 861048a0 (schema v42) from the CI run for
86ee800; build 5a77cf9e, which wrote region 6's later commits, stays retained. The
region host, provision Job, life routes and grant broker move to region 100/7, a
cellular-v6 opening (rules 7): 30 x 30 mm, 144 patches in a 12 x 12 grid at region 6's
food density, a 64-founder nursery and 9 spawn sites. Region 6 stays in the stores,
unserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:43:48 -04:00
dingoandClaude Opus 5.5 86ee800f32 Cellular rules 7: percentage mutations, skilled budding, hunting wildlife (ADR-0137)
Foundation / checks (ecs) (push) Successful in 3m21s
Foundation / checks (deploy) (push) Successful in 5m39s
Foundation / checks (tsan) (push) Successful in 11m43s
Foundation / checks (network) (push) Successful in 22m3s
Foundation / checks (client) (push) Successful in 22m35s
Foundation / checks (checks) (push) Successful in 46m53s
Foundation / checks (postgres) (push) Successful in 48m22s
Foundation / postgres-tools (push) Successful in 1m17s
Foundation / image (push) Successful in 3m31s
Foundation / server-image (push) Successful in 6m7s
The region 6 playtest found a speed mutation adding 6,667 um/s (1/300 of the range,
33x a founder), so buds seemed to teleport; reproduction made buds bigger and dearer;
and wildlife never hunted. Rules 7:

- genome schema 4: a step is a tenth of the current value (at least 1); an acquired
  capability starts at the founder's value instead of a minimum it could never grow from;
- development 4: a bud is always half the body, and reproduction takes value/2000 off
  its construction energy (founders save a quarter; matter is never discounted);
- twins: a seeded roll (reproduction/2 per thousand) splits one affordable bud's
  investment into two quarter-size buds;
- wildlife engulfs a touching cell the region step lets it take, players' included.

Founder 3, owner format 6 (no new state), bundle v8 and schema v42; the cellular-v6
opening provisions it. The client's mutation callout shrinks to a "Mutation [E]" pill and
its candidate texts describe the new steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:41:55 -04:00
dingoandClaude Opus 5.5 feac7aac4e Inspect cells by hovering them in the microscope view
Foundation / checks (ecs) (push) Successful in 4m39s
Foundation / checks (tsan) (push) Successful in 11m8s
Foundation / checks (deploy) (push) Failing after 16m14s
Foundation / checks (checks) (push) Failing after 16m15s
Foundation / checks (network) (push) Successful in 19m51s
Foundation / checks (client) (push) Successful in 20m58s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 39m38s
Hovering a cell outside the HUD rings it in amber and shows a card from its replicated
phenotype: size across and mass, how grown, swimming speed, membrane share of the body,
intake rate and energy conversion. A dead cell is labelled as food. Only what the
replication view already carries is shown; nothing hidden is revealed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:02:16 -04:00
dingoandClaude Opus 5.5 7c1c3170ae Propose open energy, scattered nutrients and photosynthesis (ADR-0136)
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m54s
Foundation / server-image (push) Successful in 6s
Foundation / postgres-tools (push) Successful in 6s
Foundation / image (push) Successful in 5s
The maintainer's design after the region 6 playtest: square patches invite camping and
leave dead space, and a closed energy budget fits no planet. Proposed: an audited
region boundary credits captured sunlight and rare infall (totals = opening + inflow);
scattered single-nutrient bubbles and a few puddle pools are fed by contact over a few
ticks, with detritus breaking into bubbles; photosynthesis is a mutation path (genome
schema 4) favoured by stillness; session v11 carries bubbles and pools. Delivery in
three steps: bubbles and contact feeding, infall, photosynthesis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:53:47 -04:00
dingoandClaude Opus 5.5 a3af969424 Allow winhttp.dll in the Windows client package
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4m25s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
The ADR-0131 browser sign-in and grant broker requests link winhttp.dll, a Windows
system DLL, but the package's import allowlist predates them, so package-windows.ps1
refused evo-client.exe ("imports winhttp.dll, which is not an allowed system DLL").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:40:54 -04:00
dingoandClaude Opus 5.5 7180182c2f Promote server 5a77cf9e to DEV: region 6 resumes past tick 7144
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m49s
Foundation / server-image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 6s
Server 5a77cf9e, from the CI run for 69b13d7, steers wildlife within the intent length
limit, so region 6's bud no longer fails every tick after 7144. It replaces a2ef0587,
which committed nothing (every tick stalled), so only e17c62bc stays retained for
region 6's history. Postgres-tools is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:19:12 -04:00
dingoandClaude Opus 5.5 69b13d7325 M11-PT-001: wildlife steering stays within the intent length limit
Foundation / checks (checks) (push) Successful in 45m24s
Foundation / checks (deploy) (push) Successful in 4m8s
Foundation / checks (ecs) (push) Successful in 2m18s
Foundation / checks (network) (push) Successful in 19m39s
Foundation / checks (postgres) (push) Successful in 44m48s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / checks (client) (push) Successful in 17m4s
Foundation / postgres-tools (push) Successful in 21s
Foundation / server-image (push) Successful in 3m10s
Foundation / image (push) Successful in 3m18s
DEV region 6 stopped at tick 7144 (stall log: append error=13 lives=10, region_step).
The wildlife controller steered toward food by scaling the larger component to 1000, so
a diagonal heading such as {1000, 800} was longer than a cellular intent may be; the
owner refused it, failing the tick, and the deterministic controller asked again every
tick. Earlier tests only had buds already touching food, so none moved.

wildlife_toward scales each component by the exact length, truncates toward zero and
pulls in any rounding excess. A regression test reproduces the refusal and accepts the
steered intent; another checks length, direction and speed over a grid of offsets.
No history changes: the refused ticks were never committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:05:28 -04:00
dingoandClaude Opus 5.5 ac1b518ddd Promote server a2ef0587 to DEV to name region 6's tick stall
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m49s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Region 6 has not advanced past tick 7144 since its owner returned, with nothing in its
log. Server a2ef0587, from the CI run for 44e748f, logs each distinct refusal that stops
a tick ("cellular tick stalled ... error=E lives=N"); it changes no simulation rule.
Build e17c62bc, which wrote region 6, stays retained. Postgres-tools is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:33:27 -04:00
dingoandClaude Opus 5.5 44e748f055 M11-PT-001: name the owner's refusal when a cellular tick stalls
Foundation / checks (ecs) (push) Successful in 2m22s
Foundation / checks (deploy) (push) Successful in 4m6s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / checks (network) (push) Successful in 19m48s
Foundation / checks (client) (push) Successful in 21m2s
Foundation / checks (checks) (push) Successful in 45m36s
Foundation / checks (postgres) (push) Successful in 45m54s
Foundation / postgres-tools (push) Successful in 24s
Foundation / server-image (push) Successful in 30s
Foundation / image (push) Successful in 3m33s
The session batch builder reported every refusal of the owner's own step or restore as
"biology", which cannot tell a resume problem from any other. It now keeps the
CellularLivesError behind that, and the stall line prints it as lives=N (-1 when the
refusal was not the owner's).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:36:35 -04:00
dingoandClaude Opus 5.5 521372607a Cells face where they move; a click outside closes the evolution window
Foundation / checks (checks) (push) Successful in 45m19s
Foundation / checks (deploy) (push) Successful in 3m45s
Foundation / checks (ecs) (push) Successful in 2m16s
Foundation / checks (network) (push) Successful in 19m17s
Foundation / checks (postgres) (push) Successful in 43m23s
Foundation / checks (tsan) (push) Successful in 11m39s
Foundation / checks (client) (push) Successful in 17m3s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 3m8s
Foundation / image (push) Successful in 3m25s
The microscope view orients each cell along its last movement of at least 20 um, with
the flagella trailing, easing into turns. The heading is projected with the current
camera, so panning never turns a cell; a cell that has not moved keeps its seeded
orientation. A left click outside the evolution window closes it (the offer stays;
E or the callout reopens it), except on the frame it opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:35:52 -04:00
dingoandClaude Opus 5.5 7929dea2fc M11-PT-001: log why a cellular tick cannot be built
Foundation / checks (network) (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 0s
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 (checks) (push) Canceled after 5s
Foundation / checks (client) (push) Canceled after 5s
Foundation / checks (deploy) (push) Canceled after 5s
Foundation / checks (ecs) (push) Successful in 2m26s
A tick whose batch the builder refuses was dropped silently and retried every 50 ms,
so a region could stop advancing with nothing in its log: after a restart DEV region 6
stayed at tick 7144 while its owner was connected. The server now prints each distinct
refusal once ("cellular tick stalled tick=N at=create|append error=E") until a tick
builds again.

Also covers a founder that buds, is suspended while its wildlife bud lives on, and
resumes on its owner's return (rules 6); that path resumes correctly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:35:51 -04:00
dingoandClaude Opus 5.5 926537ef3a Add an operator script that retires a region's player lives
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 4m1s
Foundation / postgres-tools (push) Successful in 6s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
DEV runs one region at a time and moves to a new one before test cells die. A life
left in the old region keeps its account's home there: the grant broker routes the
account to a region nobody serves (503 region_unavailable) and any other region
refuses its birth (existing life, one active life per world).

tools/ops/retire-region-lives.sql, run as the database owner, ends each published
life of the region at the region's latest commit (as end_cellular_lives does) and
cancels unpublished reservations. It refuses while a server holds the region's lease,
is a dry run unless confirm=yes, is idempotent, and leaves checkpoints and history
unchanged. Tested on a disposable migrated cluster.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:47:09 -04:00
dingoandClaude Opus 5.5 77d96eef46 Put DEV region 6's food patches on the 1,000 um patch grid
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m55s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 6s
8abc3df placed eight of the sixteen patches at 3,500 and 8,500 um. CellularHabitat
requires patch addresses on the 1,000 um pitch, so the provision hook refused the
habitat ("cellular habitat refused 1", invalid_patch) and the Argo sync failed before
anything for region 6 was written. The grid is now 1,000 / 4,000 / 6,000 / 9,000 um on
each axis; stocks, totals and the genesis commit are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:19:56 -04:00
dingoandClaude Opus 5.5 a820ff0984 M11-PT-001: read v10 perceptions from servers built before the bud cost
Foundation / checks (ecs) (push) Successful in 2m16s
Foundation / checks (deploy) (push) Successful in 4m4s
Foundation / checks (tsan) (push) Successful in 11m42s
Foundation / checks (network) (push) Successful in 19m59s
Foundation / checks (client) (push) Successful in 21m12s
Foundation / checks (checks) (push) Successful in 46m11s
Foundation / checks (postgres) (push) Successful in 46m18s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 3m12s
Foundation / image (push) Successful in 3m28s
The bud cost (d98d71e) grew the v10 cellular perception prefix from 82 to 122 bytes
without a version bump. A rebuilt client connected to the live DEV region (server
3e5b8cef, older) refused every perception as wrong_length, closed the session as a
protocol error and reconnected; each reconnect's birth request answered existing_life
and no view ever arrived ("Existing cell is already bound to this account").

The decoder now also accepts the earlier v10 layout, with no bud cost. The two lengths
never coincide (40 bytes is not a whole 48-byte patch). The client already hides a zero
bud cost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:11:41 -04:00
dingoandClaude Opus 5.5 28629e1001 Cellular microscope UI: living cells, nutrient food, HUD and evolution cards
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (deploy) (push) Successful in 4m12s
Foundation / checks (tsan) (push) Successful in 11m26s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 17m48s
Foundation / checks (postgres) (push) Canceled after 17m48s
Foundation / checks (checks) (push) Canceled after 17m53s
Foundation / checks (client) (push) Canceled after 17m58s
From the maintainer's design review. In cellular play the world sits in a rounded
eyepiece with a vignette:
- Cells are drawn from their phenotype: the membrane wall thickens with membrane
  mass, flagella follow speed, organelles follow energy conversion, and a dead
  cell's membrane is torn.
- Food patches are granules coloured by nutrient, so a nutrient that runs out
  loses its colour.

The side panels become a HUD:
- a status pill and Field notes;
- Vitals in readable units (nJ, ng) with bars toward the next bud;
- an action dock with the last result explained;
- a "Mutation ready [E]" callout opening an evolution window of cards with
  before/after drawings and per-nutrient costs, which also handles the end of a
  life.

New ink, lavender and amber palette. Client only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:53:55 -04:00
dingoandClaude Opus 5.5 ab5c29227c Point the ADR index and heading at ADR-0135
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m54s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 6s
Foundation / image (push) Successful in 5s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:34:15 -04:00
dingoandClaude Opus 5.5 05408a975e Renumber the behaviour-driven evolution ADR to 0135
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Canceled after 4s
Foundation / server-image (push) Canceled after 5s
Foundation / image (push) Canceled after 4s
ADR-0133 and ADR-0134 were already taken by the M12 ecology work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:34:00 -04:00
dingoandClaude Opus 5.5 8948ec881d Propose behaviour-driven evolution and budding colonies (ADR-0133)
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (deploy) (push) Canceled after 54s
The maintainer's direction after the sign-in playtests, as a proposed design for
three rules versions:
- Rules 7: offers are weighted by what each life does (moving, eating, budding,
  engulfing) and by its accept and decline history; declining lowers a trait's and
  related traits' odds but never rules them out; single candidates can be declined.
- Rules 8: buds roll attached (the player's colony) or detached (wildlife anchored
  near where the owner logged out), with colonization, budding efficiency and other
  new capabilities.
- Rules 9: the player steers the colony as one body with separate reserves, and
  can later choose a funded Coalesce transition into a multicellular organism.

Not implemented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:33:10 -04:00
dingo 87c1edcd2c M11.9: record solo feedback and living-cell reconnect blocker
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
2026-10-16 07:27:48 -04:00
dingo 214991c9a3 M12.2b: test exact reserve-strata population candidate
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m26s
Foundation / checks (tsan) (push) Successful in 11m44s
Foundation / checks (client) (push) Successful in 19m23s
Foundation / checks (network) (push) Successful in 19m45s
Foundation / checks (checks) (push) Successful in 45m39s
Foundation / checks (postgres) (push) Successful in 45m56s
Foundation / postgres-tools (push) Successful in 23s
Foundation / server-image (push) Successful in 31s
Foundation / image (push) Successful in 3m35s
2026-10-16 06:01:42 -04:00
dingo b3550298f7 Record successful M12 segment publication
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / server-image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 5s
Foundation / image (push) Successful in 4s
2026-10-15 22:50:52 -04:00
dingo caccc86fc3 M12.2a: reproduce rejected population fidelity baseline
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 6s
Foundation / image (push) Successful in 5s
2026-10-15 22:50:24 -04:00
dingo e238801d0b M12.1: define ecological identity and time evidence 2026-10-15 22:47:59 -04:00
dingoandClaude Opus 5.5 8abc3df4b6 Serve DEV region 6 on cellular-v5 with more food
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m49s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Promotes server e17c62bc and postgres-tools 370ea033 (schema v41) from the CI run
for 4d17a06; build 3e5b8cef, which wrote region 5, stays retained. The region host,
provision Job, life routes and the grant broker move to region 100/6, a rules-6
cellular-v5 opening (ADR-0132) with the 64-founder nursery and 16 patches holding
about 7.5x region 5's food. Region 5 stays in the stores, unserved. The images
also carry the bud cost display and offer declining.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 22:05:34 -04:00
dingoandClaude Opus 5.5 4d17a0651c Cellular balance rules 6 (ADR-0132, schema v41)
Foundation / checks (checks) (push) Successful in 42m33s
Foundation / checks (deploy) (push) Successful in 4m11s
Foundation / checks (ecs) (push) Successful in 2m27s
Foundation / checks (network) (push) Successful in 19m23s
Foundation / checks (postgres) (push) Successful in 44m44s
Foundation / checks (tsan) (push) Successful in 9m53s
Foundation / checks (client) (push) Successful in 16m19s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 3m14s
Foundation / image (push) Successful in 3m16s
The playtest found mutation offers the arena could never pay for. A mutation's
matter cost is the real body difference (ADR-0118), so it cannot be discounted.
Rules 6 cut it honestly:
- genome schema 3 steps a third as far (1/300 of the range);
- development version 3 charges a third of the construction energy (13 instead of
  40 pJ per 1000 fg).

Founder 2 uses both. The cellular-v5 opening creates rules-6 regions on bundle v7,
which schema v41 admits. Existing lineages, regions and committed history are
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:53:31 -04:00
dingoandClaude Opus 5.5 1446d36d26 Decline a mutation offer (ADR-0120 amendment, schema v40)
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m1s
Foundation / checks (tsan) (push) Successful in 9m49s
Foundation / checks (client) (push) Successful in 19m23s
Foundation / checks (network) (push) Successful in 19m31s
Foundation / checks (checks) (push) Successful in 42m41s
Foundation / checks (postgres) (push) Successful in 45m36s
Foundation / postgres-tools (push) Successful in 28s
Foundation / server-image (push) Successful in 3m15s
Foundation / image (push) Successful in 3m18s
An offer the cell cannot afford stayed open, and only one offer is issued at a
time, so banked feeding credit never became a new offer. A v10 choice naming
operator 0 now declines the exact outstanding offer. It is reserved and published
like any choice: schema v40 accepts operator 0 in the reserved input and trace
selections and stores result 3, declined. The owner consumes the offer and
changes nothing else, and the client reports it as committed. Old traces never
carry operator 0, so their replay is unchanged. The Evolution panel gets a
"Decline this offer" button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:43:36 -04:00
dingoandClaude Opus 5.5 d98d71e7c0 Show what a bud costs (ADR-0129 amendment)
Foundation / checks (ecs) (push) Successful in 2m20s
Foundation / checks (deploy) (push) Successful in 4m4s
Foundation / checks (tsan) (push) Successful in 9m59s
Foundation / checks (client) (push) Successful in 19m19s
Foundation / checks (network) (push) Successful in 19m24s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 32m13s
Foundation / checks (checks) (push) Canceled after 32m19s
The v10 cellular perception carries the bud cost after the diagnostics block: the
energy (construction plus the bud's provision) and matter per channel one bud takes
from a fully grown cell's reserve. biology::bud_cost reads it from fund_bud itself,
so the shown cost is exactly the charge; the server caches it per genome. The
client shows it and names the channels the reserve is short on. v10 clients must
be rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:11:28 -04:00
dingoandClaude Opus 5.5 a97f0c3fea ADR-0131: per-profile client sign-in for several clients on one machine
Foundation / checks (ecs) (push) Successful in 2m21s
Foundation / checks (deploy) (push) Successful in 4m9s
Foundation / checks (tsan) (push) Successful in 9m48s
Foundation / checks (client) (push) Successful in 19m17s
Foundation / checks (network) (push) Successful in 19m44s
Foundation / checks (checks) (push) Successful in 42m37s
Foundation / checks (postgres) (push) Successful in 45m40s
Foundation / postgres-tools (push) Successful in 30s
Foundation / server-image (push) Successful in 3m13s
Foundation / image (push) Successful in 3m27s
Only one client per machine could sign in: the saved login lived under a single
Credential Manager name, and Keycloak ignores prompt=select_account, so the
browser reused its single sign-on session. --profile NAME keeps one saved login
per profile (the default name is unchanged), and authorization asks for
prompt=login so the browser shows the login form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:35:53 -04:00
dingoandClaude Opus 5.5 898c921da8 Serve DEV region 5 with a 64-founder nursery
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m48s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
Region 4's cellular-v4 genesis funded exactly 8 founders, and ADR-0127 has no
refill, so every birth is now refused ("the region nursery lacks resources").
Region 100/5 uses the same opening and arena with 8x the nursery funding and a
new genesis commit id. The region host, provision Job, life-route catalog and
the grant broker's default region and route move to region 5. Region 4 stays in
the stores, unserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 17:05:23 -04:00
dingoandClaude Opus 5.5 2be85aba6c ADR-0131: mount the broker issuer key from Secret key issuer.key again
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m53s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
Foundation / image (push) Successful in 5s
The aevolution-grant-issuer Secret was recreated with key issuer.key and the
broker has run from it since 18:57 UTC; reverts 73a0c5a.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:39:31 -04:00
dingoandClaude Opus 5.5 73a0c5a360 ADR-0131: mount the broker issuer key from Secret key key.pem
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 3m44s
Foundation / image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
The existing aevolution-grant-issuer Secret stores the raw 32-byte issuer scalar
under key.pem; the broker reads it at /run/grant-issuer/issuer.key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:41:15 -04:00
dingoandClaude Opus 5.5 2a5c0d0e22 ADR-0131: Keycloak sign-in in the Windows engineering client
Foundation / checks (ecs) (push) Successful in 2m21s
Foundation / checks (deploy) (push) Successful in 4m1s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (tsan) (push) Canceled after 7m21s
Foundation / checks (network) (push) Canceled after 9m43s
Foundation / checks (checks) (push) Canceled after 9m49s
Foundation / checks (postgres) (push) Canceled after 9m43s
Foundation / checks (client) (push) Canceled after 9m48s
Sign In / Register opens the system browser (PKCE S256, loopback 127.0.0.1:47600)
and keeps the refresh token in Windows Credential Manager. The client then fetches
a 10-minute grant from grants.aeternalisgames.com and connects to the cellular DEV
region. It renews the grant about a minute before expiry through SessionRefresh,
and again after a lost connection. Sign Out closes the session and revokes the
login at the broker and at Keycloak. Grant replies are cross-checked against the
grant record before use. The manual grant-bundle path stays for developers.

The bounded JSON reader moves to evo_json (evo::serialization), shared by the
broker and the client. Adds the client-auth tests. Completes work started in
another session: main.cpp wiring, refresh expiry tracking, no requests for a
superseded session, and clang-tidy and Windows header-order fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:31:33 -04:00
dingoandClaude Opus 5.5 dec34f39e4 Promote schema v39 and the grant broker to DEV
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m53s
Foundation / server-image (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 4s
Foundation / image (push) Successful in 5s
Server 3e5b8cef and postgres-tools ceb7ea27, both from CI run 388 (bda1631). The
client job passed after a rerun; the first attempt hit a one-off Xvfb window-open
failure. The server image now contains evo-grant-broker, and region/dev enables
the grant-broker-dev component. Build 4a8b0a9d, which committed region 4 history,
stays retained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:15:04 -04:00
dingo bda1631ded 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
2026-10-15 13:02:43 -04:00
dingoandClaude Opus 5.5 40426777a0 ADR-0131: grant broker reachable only through HTTPS 443
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m47s
Foundation / image (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 5s
The broker NetworkPolicy no longer admits the node subnet. Port 8080 is the
in-cluster backend for ingress-nginx pods only; players use
https://grants.aeternalisgames.com on 443.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 12:19:46 -04:00
dingoandClaude Opus 5.5 68880ba3b4 ADR-0131: Keycloak grant broker and schema v39 account identities
Foundation / checks (checks) (push) Successful in 42m13s
Foundation / checks (deploy) (push) Successful in 4m5s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 19m18s
Foundation / checks (postgres) (push) Successful in 44m19s
Foundation / checks (tsan) (push) Successful in 9m48s
Foundation / checks (client) (push) Failing after 12m6s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
evo-grant-broker verifies realm aeternalis access tokens offline (RS256 against
the pinned JWKS; audience aevolution-grants, client aevolution-game, verified
email) and issues 10-minute session grants:
- POST /grant routes to the region holding the account's life, or the default.
- POST /logout makes every issued grant stale and expires current control.
- GET /healthz.

Schema v39 maps (issuer, subject) to stable accounts with strictly increasing
serials. The binary ships in the server image. The DEV manifests are in
deploy/kubernetes/grant-broker-dev and are not yet enabled in region/dev; that
waits for the image promotion and the out-of-band Secrets and Ingress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 10:20:27 -04:00
dingo 817a830a8a ADR 0127
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (tsan) (push) Successful in 10m11s
Foundation / checks (client) (push) Failing after 14m26s
Foundation / checks (network) (push) Successful in 18m54s
Foundation / checks (checks) (push) Successful in 42m9s
Foundation / checks (postgres) (push) Successful in 43m51s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
2026-10-15 09:32:51 -04:00
dingo 0a0f6c3bb1 Update Listener
Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 3m47s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 4s
Foundation / image (push) Successful in 4s
2026-10-15 07:42:45 -04:00
dingo 8148ef0a53 Record successful client upgrade push
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 4s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / image (push) Successful in 4s
Foundation / server-image (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 4s
2026-10-14 19:56:44 -04:00
dingo 1519287d5b Record verified v10 client package and publishing limit
Foundation / checks (deploy) (push) Successful in 5s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (client) (push) Canceled after 27s
Foundation / checks (checks) (push) Canceled after 29s
Foundation / checks (tsan) (push) Canceled after 22s
Foundation / checks (network) (push) Canceled after 28s
Foundation / checks (ecs) (push) Canceled after 28s
Foundation / checks (postgres) (push) Canceled after 29s
2026-10-14 19:56:18 -04:00
dingo 68958a9e54 Upgrade cellular client to v10 with readable play and assisted steering 2026-10-14 19:53:28 -04:00
460 changed files with 75152 additions and 1172 deletions
+18 -3
View File
@@ -5,10 +5,14 @@ on:
branches: [main]
pull_request:
workflow_dispatch:
# The full check matrix runs nightly; pushes only gate on the deploy policy suite.
schedule:
- cron: '0 9 * * *'
# Do not spend a full build on obsolete commits when pushes arrive quickly.
# Do not spend a full build on obsolete commits when pushes arrive quickly. Nightly runs
# use their own group so a push does not cancel them.
concurrency:
group: foundation-${{ gitea.ref || github.ref }}
group: foundation-${{ github.event_name }}-${{ gitea.ref || github.ref }}
cancel-in-progress: true
permissions:
@@ -29,7 +33,11 @@ env:
jobs:
checks:
runs-on: ${{ vars.CI_RUNNER_LABEL || 'ubuntu-22.04' }}
timeout-minutes: 60
# Captured cold/shared-runner checks reached 59 minutes before the ASan
# cohort timeout, with the remaining fuzz/benchmark steps still pending.
# Successful full runs grew from 67 to 78 minutes through M12; run 469
# (photosynthesis) reached the old 90-minute limit, so the job has headroom again.
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
@@ -45,6 +53,12 @@ jobs:
CHECK_SUITE: ${{ matrix.suite }}
run: |
set -eu
# Gameplay iteration (2026-10-21): a push publishes images after the deploy policy
# suite alone. The full matrix runs nightly, on pull requests and on dispatch.
if [ "$CI_EVENT" = push ] && [ "$CHECK_SUITE" != deploy ]; then
echo "Push build: $CHECK_SUITE runs nightly or on dispatch; gate skipped."
exit 0
fi
# The selector's own regression runs first, so a broken selector cannot
# silently skip the suites.
if [ "$CHECK_SUITE" = deploy ]; then bash tools/ci/ci-paths-check.sh; fi
@@ -70,6 +84,7 @@ jobs:
profile="$RUNNER_TEMP/aevolution-tsan-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}.json"
node tools/ci/tsan-profile.mjs "$profile"
docker run --rm --network none --read-only --user 10001:10001 \
--env EVO_TEST_TMPDIR=/tmp \
--cap-drop ALL --security-opt no-new-privileges \
--security-opt "seccomp=$profile" \
--tmpfs /source/build/tsan/Testing:rw,noexec,nosuid,size=16m,mode=1777 \
+3
View File
@@ -25,3 +25,6 @@ limits in docs/engineering/VALIDATION.md. Preserve uncommitted work by others.
After each completed and validated gate segment, commit its scoped changes and push
to the configured Git remote. Preserve unrelated untracked work; never stage secrets.
The dev session window lives in SQL and is opened from the admin portal (ADR-0087
amendment of 2026-10-27); Git carries no window. Do not deploy or claim live
reachability from a Git update alone.
+291 -10
View File
@@ -46,6 +46,12 @@ set(EVO_SANITIZER "none" CACHE STRING "none, address (ASan/UBSan), or thread")
set_property(CACHE EVO_SANITIZER PROPERTY STRINGS none address thread)
include(cmake/ProjectOptions.cmake)
if(EVO_BUILD_CLIENT OR EVO_BUILD_POSTGRES)
add_library(evo_json STATIC src/serialization/json.cpp)
target_include_directories(evo_json PUBLIC "${PROJECT_SOURCE_DIR}/include")
evo_owned_target(evo_json)
endif()
set(evo_simulation_sources src/simulation/world.cpp src/simulation/snapshot.cpp src/simulation/scheduler.cpp src/simulation/spatial.cpp)
add_library(evo_simulation STATIC ${evo_simulation_sources})
add_library(evo::simulation ALIAS evo_simulation)
@@ -69,7 +75,13 @@ evo_owned_target(evo_accounting)
add_library(evo_biology STATIC
src/biology/genome.cpp src/biology/development.cpp src/biology/metabolism.cpp
src/biology/mutation.cpp src/biology/lineage.cpp src/biology/founder.cpp
src/biology/cellular_motion.cpp src/biology/cellular_uptake.cpp
src/biology/cellular_motion.cpp src/biology/cellular_kinematics.cpp
src/biology/cellular_tuning.cpp src/biology/cellular_revamp_tuning.cpp
src/biology/cellular_burn.cpp src/biology/cellular_catalog.cpp
src/biology/cellular_triggers.cpp src/biology/cellular_offers.cpp
src/biology/cellular_currents.cpp
src/biology/cellular_deposit_motion.cpp
src/biology/cellular_uptake.cpp
src/biology/cellular_habitat.cpp src/biology/cellular_step.cpp
src/biology/cellular_region_step.cpp src/biology/budding.cpp)
add_library(evo::biology ALIAS evo_biology)
@@ -81,10 +93,19 @@ evo_owned_target(evo_biology)
# M11.2 portable lifecycle orchestration; no dependency from the foundation proof.
add_library(evo_lifecycle STATIC src/server/lifecycle/primitive_lives.cpp
src/server/lifecycle/primitive_batch.cpp src/server/lifecycle/cellular_lives.cpp
src/server/lifecycle/cellular_migration.cpp
src/server/lifecycle/cellular_migration_trace.cpp
src/server/lifecycle/cellular_census.cpp
src/server/lifecycle/cellular_census_set.cpp
src/server/lifecycle/cellular_batch.cpp src/server/lifecycle/wildlife_controller.cpp
src/server/lifecycle/cellular_play_summary.cpp)
src/server/lifecycle/cellular_play_summary.cpp src/server/lifecycle/cellular_population.cpp
src/server/lifecycle/cellular_population_codec.cpp src/server/lifecycle/cellular_population_policy.cpp
src/server/lifecycle/cellular_schedule.cpp src/server/lifecycle/cellular_population_batch.cpp
src/server/lifecycle/cellular_environment.cpp src/server/lifecycle/cellular_environment_batch.cpp
src/server/lifecycle/cellular_light.cpp src/server/lifecycle/cellular_liquid.cpp
src/server/lifecycle/cellular_revamp.cpp src/server/lifecycle/cellular_admin_view.cpp)
add_library(evo::lifecycle ALIAS evo_lifecycle)
target_link_libraries(evo_lifecycle PUBLIC evo::biology)
target_link_libraries(evo_lifecycle PUBLIC evo::biology evo::world)
evo_owned_target(evo_lifecycle)
add_library(evo_ecology STATIC src/ecology/cohort.cpp src/ecology/collapse.cpp src/ecology/population.cpp src/ecology/materialize.cpp)
@@ -116,7 +137,8 @@ target_include_directories(evo_ops PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_features(evo_ops PUBLIC cxx_std_23)
evo_owned_target(evo_ops)
# Portable checkpoint manifest codec and environmental-v1 payload validation.
add_library(evo_region_checkpoint STATIC src/persistence/region_checkpoint.cpp src/persistence/region_batch.cpp)
add_library(evo_region_checkpoint STATIC src/persistence/region_checkpoint.cpp src/persistence/region_batch.cpp
src/persistence/population_checkpoint.cpp src/persistence/environment_checkpoint.cpp)
add_library(evo::region_checkpoint ALIAS evo_region_checkpoint)
target_link_libraries(evo_region_checkpoint PUBLIC evo::region_lease evo::processes evo::lifecycle)
evo_owned_target(evo_region_checkpoint)
@@ -233,7 +255,8 @@ if(EVO_BUILD_POSTGRES)
endif()
find_package(PostgreSQL 18.6 EXACT REQUIRED)
find_package(Threads REQUIRED)
add_library(evo_postgres STATIC src/persistence/postgres.cpp src/persistence/region_lease_store.cpp)
add_library(evo_postgres STATIC src/persistence/postgres.cpp src/persistence/region_lease_store.cpp
src/persistence/population_interval_store.cpp)
add_library(evo::postgres ALIAS evo_postgres)
target_include_directories(evo_postgres PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(evo_postgres PUBLIC evo::region_lease PRIVATE PostgreSQL::PostgreSQL)
@@ -242,8 +265,11 @@ if(EVO_BUILD_POSTGRES)
find_package(OpenSSL 3 REQUIRED COMPONENTS Crypto)
add_library(evo_region_store STATIC src/persistence/sha256.cpp src/persistence/object_store.cpp
src/persistence/checkpoint_store.cpp src/persistence/primitive_checkpoint_store.cpp
src/persistence/cellular_checkpoint_store.cpp
src/persistence/region_clone.cpp)
src/persistence/cellular_checkpoint_store.cpp src/persistence/population_checkpoint_store.cpp
src/persistence/environment_checkpoint_store.cpp
src/persistence/cellular_history_store.cpp
src/persistence/cellular_census_snapshot.cpp
src/persistence/region_clone.cpp src/persistence/cellular_migration_store.cpp)
add_library(evo::region_store ALIAS evo_region_store)
target_link_libraries(evo_region_store PUBLIC evo::postgres evo::region_checkpoint
PRIVATE OpenSSL::Crypto)
@@ -276,6 +302,25 @@ if(EVO_BUILD_POSTGRES)
src/server/session/postgres_action_ledger.cpp src/server/session/postgres_handoff_ledger.cpp)
target_link_libraries(evo_control_ledger_postgres PUBLIC evo::postgres evo_network_protocol)
evo_owned_target(evo_control_ledger_postgres)
# ADR-0131 Keycloak grant broker (schema v39).
add_library(evo_grant_broker STATIC
src/server/broker/access_token.cpp src/server/broker/grant_broker.cpp)
target_link_libraries(evo_grant_broker PUBLIC evo_json evo::region_host evo_network_tls
PRIVATE OpenSSL::Crypto)
evo_owned_target(evo_grant_broker)
add_executable(evo-grant-broker apps/evo-grant-broker/main.cpp)
target_link_libraries(evo-grant-broker PRIVATE evo_grant_broker)
evo_owned_target(evo-grant-broker)
# ADR-0182 read-only admin API and portal host (schema v61).
# Section 15: its HTTPS client to Gitea and Argo CD (OpenSSL libssl) and the region switch.
find_package(OpenSSL 3 REQUIRED COMPONENTS Crypto SSL)
add_library(evo_admin_api STATIC src/server/admin/admin_api.cpp
src/server/admin/https_client.cpp src/server/admin/region_switch.cpp)
target_link_libraries(evo_admin_api PUBLIC evo_grant_broker PRIVATE OpenSSL::SSL OpenSSL::Crypto)
evo_owned_target(evo_admin_api)
add_executable(evo-admin-api apps/evo-admin-api/main.cpp)
target_link_libraries(evo-admin-api PRIVATE evo_admin_api)
evo_owned_target(evo-admin-api)
endif()
# M7.9 clone and history audit tool (ADR-0067).
add_executable(evo-world-clone apps/evo-world-clone/main.cpp)
@@ -285,6 +330,8 @@ if(EVO_BUILD_POSTGRES)
# Contention tests use one thread and one connection per contender.
add_executable(evo-postgres-tests tests/postgres_tests.cpp tests/region_lease_store_tests.cpp
tests/cellular_publication_tests.cpp
tests/population_publication_tests.cpp tests/environment_publication_tests.cpp
tests/fixtures/postgres_relay.cpp
tests/account_control_store_tests.cpp tests/probe_handoff_store_tests.cpp
tests/life_reservation_store_tests.cpp
tests/primitive_publication_tests.cpp
@@ -297,8 +344,10 @@ if(EVO_BUILD_POSTGRES)
target_link_libraries(evo-postgres-tests PRIVATE evo::region_host Threads::Threads)
if(EVO_BUILD_NETWORK)
# M9.7: real evo-server sessions over TLS (ADR-0083).
target_sources(evo-postgres-tests PRIVATE tests/region_session_tests.cpp)
target_link_libraries(evo-postgres-tests PRIVATE evo_network_session evo_control_ledger_postgres)
target_sources(evo-postgres-tests PRIVATE tests/region_session_tests.cpp
tests/grant_broker_tests.cpp)
target_link_libraries(evo-postgres-tests PRIVATE evo_network_session evo_control_ledger_postgres
evo_grant_broker evo_admin_api OpenSSL::Crypto)
target_compile_definitions(evo-postgres-tests PRIVATE EVO_POSTGRES_SESSIONS=1)
endif()
if(EVO_BUILD_QUIC)
@@ -306,7 +355,8 @@ if(EVO_BUILD_POSTGRES)
# M10.8d: two evo-server processes handing probes over (ADR-0096).
target_sources(evo-postgres-tests PRIVATE tests/region_m10_session_tests.cpp
tests/region_handoff_process_tests.cpp)
target_link_libraries(evo-postgres-tests PRIVATE evo_session_client)
target_link_libraries(evo-postgres-tests PRIVATE evo_session_client
evo_cellular_session_adapter)
target_compile_definitions(evo-postgres-tests PRIVATE EVO_POSTGRES_M10=1)
add_dependencies(evo-postgres-tests evo-session-probe evo-load)
endif()
@@ -447,6 +497,65 @@ if(BUILD_TESTING)
evo_owned_target(evo-cellular-motion-tests)
add_test(NAME cellular-motion-contracts COMMAND evo-cellular-motion-tests)
set_tests_properties(cellular-motion-contracts PROPERTIES TIMEOUT 60)
add_executable(evo-cellular-kinematics-tests tests/cellular_kinematics_tests.cpp)
target_link_libraries(evo-cellular-kinematics-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-kinematics-tests)
add_test(NAME cellular-kinematics-contracts COMMAND evo-cellular-kinematics-tests)
set_tests_properties(cellular-kinematics-contracts PROPERTIES TIMEOUT 60)
add_executable(evo-cellular-tuning-tests tests/cellular_tuning_tests.cpp)
target_link_libraries(evo-cellular-tuning-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-tuning-tests)
# The DEV tuning file is absent from native CI images, which copy no deploy/ tree.
set(evo_dev_tuning "${CMAKE_CURRENT_SOURCE_DIR}/deploy/kubernetes/region/dev/tuning/cellular.tuning")
if(EXISTS "${evo_dev_tuning}")
add_test(NAME cellular-tuning-contracts COMMAND evo-cellular-tuning-tests "${evo_dev_tuning}")
else()
add_test(NAME cellular-tuning-contracts COMMAND evo-cellular-tuning-tests)
endif()
add_executable(evo-cellular-revamp-step-tests tests/cellular_revamp_step_tests.cpp)
target_link_libraries(evo-cellular-revamp-step-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-revamp-step-tests)
add_test(NAME cellular-revamp-step-contracts COMMAND evo-cellular-revamp-step-tests)
add_executable(evo-cellular-offers-tests tests/cellular_offers_tests.cpp)
target_link_libraries(evo-cellular-offers-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-offers-tests)
add_test(NAME cellular-offers-contracts COMMAND evo-cellular-offers-tests)
add_executable(evo-cellular-catalog-tests tests/cellular_catalog_tests.cpp)
target_link_libraries(evo-cellular-catalog-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-catalog-tests)
add_test(NAME cellular-catalog-contracts COMMAND evo-cellular-catalog-tests)
add_executable(evo-cellular-burn-tests tests/cellular_burn_tests.cpp)
target_link_libraries(evo-cellular-burn-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-burn-tests)
add_test(NAME cellular-burn-contracts COMMAND evo-cellular-burn-tests)
add_executable(evo-cellular-revamp-tuning-tests tests/cellular_revamp_tuning_tests.cpp)
target_link_libraries(evo-cellular-revamp-tuning-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-revamp-tuning-tests)
set(evo_dev_revamp_tuning
"${CMAKE_CURRENT_SOURCE_DIR}/deploy/kubernetes/region/dev/tuning/cellular-revamp.tuning")
if(EXISTS "${evo_dev_revamp_tuning}")
add_test(NAME cellular-revamp-tuning-contracts
COMMAND evo-cellular-revamp-tuning-tests "${evo_dev_revamp_tuning}"
"${CMAKE_CURRENT_SOURCE_DIR}/deploy/kubernetes/region/dev/tuning/cellular-reproduction-safety.tuning")
else()
add_test(NAME cellular-revamp-tuning-contracts COMMAND evo-cellular-revamp-tuning-tests)
endif()
set_tests_properties(cellular-tuning-contracts PROPERTIES TIMEOUT 60)
add_executable(evo-cellular-currents-tests tests/cellular_currents_tests.cpp)
target_link_libraries(evo-cellular-currents-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-currents-tests)
add_test(NAME cellular-currents-contracts COMMAND evo-cellular-currents-tests)
set_tests_properties(cellular-currents-contracts PROPERTIES TIMEOUT 120)
add_executable(evo-cellular-deposit-motion-tests tests/cellular_deposit_motion_tests.cpp)
target_link_libraries(evo-cellular-deposit-motion-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-deposit-motion-tests)
add_test(NAME cellular-deposit-motion-contracts COMMAND evo-cellular-deposit-motion-tests)
set_tests_properties(cellular-deposit-motion-contracts PROPERTIES TIMEOUT 120)
add_executable(evo-cellular-liquid-step-tests tests/cellular_liquid_step_tests.cpp)
target_link_libraries(evo-cellular-liquid-step-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-liquid-step-tests)
add_test(NAME cellular-liquid-step-contracts COMMAND evo-cellular-liquid-step-tests)
set_tests_properties(cellular-liquid-step-contracts PROPERTIES TIMEOUT 60)
add_executable(evo-cellular-uptake-tests tests/cellular_uptake_tests.cpp)
target_link_libraries(evo-cellular-uptake-tests PRIVATE evo::biology)
evo_owned_target(evo-cellular-uptake-tests)
@@ -490,6 +599,11 @@ if(BUILD_TESTING)
evo_owned_target(evo-budding-tests)
add_test(NAME budding-contracts COMMAND evo-budding-tests)
set_tests_properties(budding-contracts PROPERTIES TIMEOUT 120)
add_executable(evo-offspring-tests tests/offspring_tests.cpp)
target_link_libraries(evo-offspring-tests PRIVATE evo::biology)
evo_owned_target(evo-offspring-tests)
add_test(NAME offspring-inherited-funding COMMAND evo-offspring-tests)
set_tests_properties(offspring-inherited-funding PROPERTIES TIMEOUT 120)
add_executable(evo-lineage-tests tests/lineage_tests.cpp)
target_link_libraries(evo-lineage-tests PRIVATE evo::biology)
evo_owned_target(evo-lineage-tests)
@@ -619,6 +733,173 @@ if(BUILD_TESTING)
set_tests_properties(resolution-sensitivity PROPERTIES TIMEOUT 120)
endif()
add_executable(evo-reserve-strata experiments/resolution/reserve_strata.cpp)
target_link_libraries(evo-reserve-strata PRIVATE evo::ecology)
evo_owned_target(evo-reserve-strata)
if(BUILD_TESTING)
add_test(NAME reserve-strata-qualification COMMAND evo-reserve-strata --verify)
set_tests_properties(reserve-strata-qualification PROPERTIES TIMEOUT 120)
endif()
add_executable(evo-cellular-reference experiments/resolution/cellular_reference.cpp)
target_link_libraries(evo-cellular-reference PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-reference)
add_executable(evo-cellular-generations experiments/resolution/cellular_generations.cpp)
target_link_libraries(evo-cellular-generations PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-generations)
if(BUILD_TESTING)
add_test(NAME cellular-population-reference COMMAND evo-cellular-reference --verify)
set_tests_properties(cellular-population-reference PROPERTIES TIMEOUT 180)
add_test(NAME cellular-unscripted-generations COMMAND evo-cellular-generations --verify)
set_tests_properties(cellular-unscripted-generations PROPERTIES TIMEOUT 180)
endif()
add_executable(evo-cellular-cohorts experiments/resolution/cellular_cohorts.cpp)
target_link_libraries(evo-cellular-cohorts PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-cohorts)
if(BUILD_TESTING)
# Sanitizer instrumentation and shared CI runner contention are not product
# performance gates. Keep the full matrix, with bounded instrumented budgets.
set(evo_cohort_timeout 180)
set(evo_migration_timeout 180)
if(EVO_SANITIZER STREQUAL "address")
set(evo_cohort_timeout 600)
set(evo_migration_timeout 360)
elseif(EVO_SANITIZER STREQUAL "thread")
set(evo_cohort_timeout 900)
set(evo_migration_timeout 600)
endif()
add_test(NAME cellular-cohort-qualification COMMAND evo-cellular-cohorts --verify)
set_tests_properties(cellular-cohort-qualification PROPERTIES TIMEOUT ${evo_cohort_timeout})
endif()
if(BUILD_TESTING)
add_executable(evo-cellular-population-tests tests/cellular_population_tests.cpp)
add_executable(evo-cellular-plan-population-tests tests/cellular_plan_population_tests.cpp)
target_link_libraries(evo-cellular-plan-population-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-plan-population-tests)
add_test(NAME cellular-retained-plan-population COMMAND evo-cellular-plan-population-tests)
add_test(NAME cellular-retained-plan-population-restart COMMAND "${CMAKE_COMMAND}"
"-DPOPULATION_TEST=$<TARGET_FILE:evo-cellular-plan-population-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/plan-population-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-retained-plan-population cellular-retained-plan-population-restart
PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_executable(evo-cellular-liquid-owner-tests tests/cellular_liquid_owner_tests.cpp)
target_include_directories(evo-cellular-liquid-owner-tests PRIVATE tests)
target_link_libraries(evo-cellular-liquid-owner-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-liquid-owner-tests)
add_test(NAME cellular-liquid-owner-contracts COMMAND evo-cellular-liquid-owner-tests)
set_tests_properties(cellular-liquid-owner-contracts PROPERTIES TIMEOUT 300)
add_executable(evo-cellular-revamp-owner-tests tests/cellular_revamp_owner_tests.cpp)
target_include_directories(evo-cellular-revamp-owner-tests PRIVATE tests)
target_link_libraries(evo-cellular-revamp-owner-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-revamp-owner-tests)
add_test(NAME cellular-revamp-owner-contracts COMMAND evo-cellular-revamp-owner-tests)
set_tests_properties(cellular-revamp-owner-contracts PROPERTIES TIMEOUT 300)
add_executable(evo-cellular-admin-view-tests tests/cellular_admin_view_tests.cpp)
target_include_directories(evo-cellular-admin-view-tests PRIVATE tests)
target_link_libraries(evo-cellular-admin-view-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-admin-view-tests)
add_test(NAME cellular-admin-view-contracts COMMAND evo-cellular-admin-view-tests)
add_executable(evo-photosynthesis-tests tests/photosynthesis_tests.cpp)
target_link_libraries(evo-photosynthesis-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-photosynthesis-tests)
add_test(NAME photosynthesis-contracts COMMAND evo-photosynthesis-tests)
add_executable(evo-cellular-environment-tests tests/cellular_environment_tests.cpp)
target_link_libraries(evo-cellular-environment-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-environment-tests)
add_test(NAME cellular-environment-contracts COMMAND evo-cellular-environment-tests)
add_test(NAME cellular-environment-restart COMMAND "${CMAKE_COMMAND}"
"-DPOPULATION_TEST=$<TARGET_FILE:evo-cellular-environment-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/environment-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-environment-contracts cellular-environment-restart
PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_executable(evo-cellular-inheritance-tests tests/cellular_inheritance_tests.cpp)
target_link_libraries(evo-cellular-inheritance-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-inheritance-tests)
add_test(NAME cellular-inherited-plans COMMAND evo-cellular-inheritance-tests)
set_tests_properties(cellular-inherited-plans PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_test(NAME cellular-inheritance-process-restart COMMAND "${CMAKE_COMMAND}"
"-DPOPULATION_TEST=$<TARGET_FILE:evo-cellular-inheritance-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/inheritance-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-inheritance-process-restart PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_executable(evo-cellular-inheritance-replay-tests tests/cellular_inheritance_replay_tests.cpp)
target_link_libraries(evo-cellular-inheritance-replay-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-inheritance-replay-tests)
add_test(NAME cellular-inherited-replay COMMAND evo-cellular-inheritance-replay-tests)
set_tests_properties(cellular-inherited-replay PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_test(NAME cellular-inherited-replay-process-restart COMMAND "${CMAKE_COMMAND}"
"-DPOPULATION_TEST=$<TARGET_FILE:evo-cellular-inheritance-replay-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/inheritance-replay-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-inherited-replay-process-restart PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_executable(evo-cellular-inheritance-checkpoint-tests tests/cellular_inheritance_checkpoint_tests.cpp)
target_link_libraries(evo-cellular-inheritance-checkpoint-tests PRIVATE evo::region_checkpoint)
evo_owned_target(evo-cellular-inheritance-checkpoint-tests)
add_test(NAME cellular-inherited-checkpoint-upgrade COMMAND evo-cellular-inheritance-checkpoint-tests)
set_tests_properties(cellular-inherited-checkpoint-upgrade PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_test(NAME cellular-inherited-upgrade-process-restart COMMAND "${CMAKE_COMMAND}"
"-DPOPULATION_TEST=$<TARGET_FILE:evo-cellular-inheritance-checkpoint-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/inheritance-upgrade-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-inherited-upgrade-process-restart PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_executable(evo-cellular-maturation-tests tests/cellular_maturation_tests.cpp)
target_link_libraries(evo-cellular-maturation-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-maturation-tests)
add_test(NAME cellular-funded-maturation COMMAND evo-cellular-maturation-tests)
set_tests_properties(cellular-funded-maturation PROPERTIES TIMEOUT ${evo_cohort_timeout})
add_test(NAME cellular-maturation-process-restart COMMAND "${CMAKE_COMMAND}"
"-DPOPULATION_TEST=$<TARGET_FILE:evo-cellular-maturation-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/maturation-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-maturation-process-restart PROPERTIES TIMEOUT ${evo_cohort_timeout})
target_link_libraries(evo-cellular-population-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-population-tests)
add_test(NAME cellular-population-transitions COMMAND evo-cellular-population-tests)
set_tests_properties(cellular-population-transitions PROPERTIES TIMEOUT 180)
add_executable(evo-cellular-census-tests tests/cellular_census_tests.cpp)
add_executable(evo-cellular-plan-census-tests tests/cellular_plan_census_tests.cpp)
target_link_libraries(evo-cellular-plan-census-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-plan-census-tests)
add_test(NAME cellular-retained-plan-census COMMAND evo-cellular-plan-census-tests)
set_tests_properties(cellular-retained-plan-census PROPERTIES TIMEOUT ${evo_cohort_timeout})
target_link_libraries(evo-cellular-census-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-census-tests)
add_test(NAME cellular-census-contract COMMAND evo-cellular-census-tests)
set_tests_properties(cellular-census-contract PROPERTIES TIMEOUT 180)
add_test(NAME cellular-population-process-restart COMMAND "${CMAKE_COMMAND}"
"-DPOPULATION_TEST=$<TARGET_FILE:evo-cellular-population-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/population-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_population_restart.cmake")
set_tests_properties(cellular-population-process-restart PROPERTIES TIMEOUT 180)
add_executable(evo-cellular-schedule-tests tests/cellular_schedule_tests.cpp)
target_link_libraries(evo-cellular-schedule-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-schedule-tests)
add_test(NAME cellular-unattended-schedule COMMAND evo-cellular-schedule-tests)
add_executable(evo-cellular-migration-tests tests/cellular_migration_tests.cpp)
target_link_libraries(evo-cellular-migration-tests PRIVATE evo::lifecycle)
evo_owned_target(evo-cellular-migration-tests)
add_test(NAME cellular-migration-contract COMMAND evo-cellular-migration-tests)
set_tests_properties(cellular-migration-contract PROPERTIES TIMEOUT ${evo_migration_timeout})
add_test(NAME cellular-migration-process-restart COMMAND "${CMAKE_COMMAND}"
"-DMIGRATION_TEST=$<TARGET_FILE:evo-cellular-migration-tests>"
"-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/migration-restart"
-P "${CMAKE_CURRENT_SOURCE_DIR}/tests/cellular_migration_restart.cmake")
set_tests_properties(cellular-migration-process-restart PROPERTIES TIMEOUT 180)
add_executable(evo-population-checkpoint-tests tests/population_checkpoint_tests.cpp)
target_link_libraries(evo-population-checkpoint-tests PRIVATE evo::region_checkpoint)
evo_owned_target(evo-population-checkpoint-tests)
add_test(NAME population-checkpoint-contract COMMAND evo-population-checkpoint-tests)
add_executable(evo-environment-checkpoint-tests tests/environment_checkpoint_tests.cpp)
target_link_libraries(evo-environment-checkpoint-tests PRIVATE evo::region_checkpoint)
evo_owned_target(evo-environment-checkpoint-tests)
add_test(NAME environment-checkpoint-contract COMMAND evo-environment-checkpoint-tests)
set_tests_properties(population-checkpoint-contract PROPERTIES TIMEOUT 180)
endif()
add_executable(evo-chunk-layout experiments/world/chunk_layout.cpp)
target_link_libraries(evo-chunk-layout PRIVATE evo::world)
evo_owned_target(evo-chunk-layout)
+3 -3
View File
@@ -21,12 +21,12 @@
{"name": "analysis", "configurePreset": "analysis"},
{"name": "asan", "configurePreset": "asan"},
{"name": "tsan", "configurePreset": "tsan"},
{"name": "client", "configurePreset": "client", "targets": ["evo-client-state-tests", "evo-client", "evo-client-lifecycle-tests", "evo-client-environment-tests", "evo-client-organism-tests", "evo-client-ui-model-tests", "evo-client-panel-tests", "evo-client-bindings-tests"]},
{"name": "client", "configurePreset": "client", "targets": ["evo-client-state-tests", "evo-client", "evo-client-lifecycle-tests", "evo-client-environment-tests", "evo-client-organism-tests", "evo-client-ui-model-tests", "evo-client-panel-tests", "evo-client-bindings-tests", "evo-client-auth-tests"]},
{"name": "client-probe", "configurePreset": "client-probe", "targets": ["evo-client-probe"]},
{"name": "network", "configurePreset": "network", "targets": ["evo-client-state-tests", "evo-network-tests", "evo-cellular-intent-protocol-tests", "evo-cellular-intent-admission-tests", "evo-session-fuzz-smoke", "evo-dev-session"]},
{"name": "quic", "configurePreset": "quic", "targets": ["evo-quic-smoke-tests", "evo-quic-transport-tests", "evo-quic-session-tests", "evo-quic-hol-measure", "evo-session-probe", "evo-load", "evo-network-tests", "evo-cellular-intent-protocol-tests", "evo-cellular-intent-admission-tests", "evo-session-fuzz-smoke"]},
{"name": "client-network", "configurePreset": "client-network", "targets": ["evo-client-state-tests", "evo-client", "evo-client-lifecycle-tests", "evo-client-environment-tests", "evo-client-organism-tests", "evo-client-ui-model-tests", "evo-client-panel-tests", "evo-client-bindings-tests", "evo-network-tests", "evo-cellular-intent-protocol-tests", "evo-cellular-intent-admission-tests", "evo-session-fuzz-smoke", "evo-dev-session", "evo-quic-session-tests", "evo-client-remote-tests", "evo-motion-trace", "evo-session-probe"]},
{"name": "client-package", "configurePreset": "client-package", "targets": ["evo-client-state-tests", "evo-client", "evo-client-lifecycle-tests", "evo-client-environment-tests", "evo-client-organism-tests", "evo-client-ui-model-tests", "evo-client-panel-tests", "evo-client-bindings-tests", "evo-network-tests", "evo-cellular-intent-protocol-tests", "evo-cellular-intent-admission-tests", "evo-session-fuzz-smoke", "evo-dev-session", "evo-quic-session-tests", "evo-client-remote-tests", "evo-motion-trace"]}
{"name": "client-network", "configurePreset": "client-network", "targets": ["evo-client-state-tests", "evo-client", "evo-client-lifecycle-tests", "evo-client-environment-tests", "evo-client-organism-tests", "evo-client-ui-model-tests", "evo-client-panel-tests", "evo-client-bindings-tests", "evo-client-auth-tests", "evo-network-tests", "evo-cellular-intent-protocol-tests", "evo-cellular-intent-admission-tests", "evo-session-fuzz-smoke", "evo-dev-session", "evo-quic-session-tests", "evo-client-remote-tests", "evo-motion-trace", "evo-session-probe"]},
{"name": "client-package", "configurePreset": "client-package", "targets": ["evo-client-state-tests", "evo-client", "evo-client-lifecycle-tests", "evo-client-environment-tests", "evo-client-organism-tests", "evo-client-ui-model-tests", "evo-client-panel-tests", "evo-client-bindings-tests", "evo-client-auth-tests", "evo-network-tests", "evo-cellular-intent-protocol-tests", "evo-cellular-intent-admission-tests", "evo-session-fuzz-smoke", "evo-dev-session", "evo-quic-session-tests", "evo-client-remote-tests", "evo-motion-trace"]}
],
"testPresets": [
{"name": "debug", "configurePreset": "debug", "output": {"outputOnFailure": true}},
+660
View File
@@ -0,0 +1,660 @@
# Cellular region changes
Status: discussion draft, 2026-10-21. Companion to
[Cellular_mutation_draft.md](Cellular_mutation_draft.md) and
[Cellular_movement_draft.md](Cellular_movement_draft.md). This document proposes
region changes needed for liquid movement, circulating food, and meaningful
thermal adaptations. It changes no runtime rules, public APIs, schema versions,
live worlds, or milestone status. No commit, push, or deployment is authorized
while the maintainer reviews these drafts.
## Purpose and scope
Make the early cellular habitat a readable, interactive liquid environment.
Regions should support useful travel, feeding routes, reproduction, and early
colonies rather than rewarding long periods of waiting on a pool.
The discussion establishes the following design direction:
- Cells propel themselves through liquid; food and cells also respond to flow.
- Quiet areas and stronger currents coexist. Main currents can circulate around
a region instead of carrying everything into one boundary.
- Generate each region procedurally with 2-n currents, each with its own direction
and speed. Currents can intersect; the maximum count and speed ranges need trials.
- Movement needs acceleration, passive deceleration, active braking, and turning.
- Generate a regional thermal map. The cell has its own temperature, and the UI
provides a compass, temperature gauge, and heat-map-style environmental colors.
- Thermal mismatch increases survival E use exponentially; cells can acclimate or
evolve cold, heat, and overall thermal adaptations. Extreme freezing/boiling
exposure can cause immediate death. Current cell temperature, preferred cell
temperature, and environmental temperature all contribute; the equation and
numeric thresholds remain open for balancing.
- Passing cells disturb nearby food bubbles in their direction of travel, with
distance falloff and decay of the induced drift.
- Ordinary active founders should be able to fund their first birth in about
three minutes. The intended solitary-cell stage is roughly 30-60 minutes,
without making a multicellular transition mandatory for every strategy.
Specific field layouts, temperatures, response curves, costs, representations,
phase ordering, and implementation stages below remain **proposals**. This is a
gameplay model to tune for useful choices, not a requirement for full fluid or
biochemical simulation. Presentation can be expressive without expanding the
authoritative simulation beyond what gameplay needs.
The scope is cellular 2D habitat behavior and its environmental ownership. No
macroscopic renderer, shared 2D/3D collision model, automatic World0 upgrade,
prebuilt wildlife, or new third-party dependency is introduced.
### Maintainer responses to the original ten questions
Recorded from the region review on 2026-10-21. These establish draft gameplay
direction, not runtime admission or a replacement for existing architecture.
| Original question | Recorded direction | Remaining scope |
| --- | --- | --- |
| 1. Motion/current values | Trial and error; include currents of different speeds. | Tune founder handling and current ranges in playtests. |
| 2. Current generation | Procedural regions with 2-n currents; determine direction per current; intersections allowed. | Bounded count, generation, intersection composition, and representation. |
| 3. Boundaries/contact | N/A for this gameplay discussion. | Retain technical ownership/contact constraints; do not reopen as a required player-facing feature. |
| 4. Thermal model/UI | Procedural thermal map; compass and temperature gauge; cells have an actual temperature and a preferred temperature. | Field accounting/response and readable presentation of all three temperatures. |
| 5. Thermal effects | Current cell, preferred cell, and environmental temperatures all matter. Drastic changes require more E; mismatch from preference keeps costs elevated after adjustment. Mutations modify cold, heat, or overall handling; extreme exposure can kill immediately. | Balance the combined exponential response, acclimation rates, protection costs, and death thresholds. |
| 6. Flow and speed | With the flow is faster; against it is slower; outside flow is baseline. | Relative-vector behavior, braking/reversing controls, and numeric tuning. |
| 7. Visible cues | Cellular mechanics have visual cues; terrain resembles a thermal heat map. | Readable palette, compass/gauge details, and local perception integration. |
| 8. Offline/lifecycle | Logout takes effect after a delay, then the cell is anchored, protected from engulfment, and frozen. See the follow-up decisions below. | Delay duration and resume behavior. |
| 9. Colony roles | Requires playtesting. | Viable support roles and whether distinct propulsion adaptations add value. |
| 10. Unattended feeding | Lower priority; expected to be slower and risky because other cells can engulf the player. | Verify in playtests; no separate anti-AFK layer proposed. |
### Maintainer follow-up decisions
Recorded 2026-10-21 and documented as accepted direction in
[ADR-0177](docs/adr/0177-cellular-regions-world-linkage.md), which amends
ADR-0172 and ADR-0173 for new cellular rules.
| Topic | Decision | Still open |
| --- | --- | --- |
| Current energy | Currents are a fixed environmental condition. No mechanical energy accounting; drifting never credits usable E. | None for playtests. |
| Thermal backing | A static maintained thermal map, not owned thermal energy. | Owned thermal energy only if gameplay later needs changing temperatures. |
| Versions and worlds | New rules start in new, disposable DEV worlds; no migration of existing DEV worlds. | None. |
| Habitat size and world link | A region is linked to an area of its world, not to one voxel. Its thermal map is that area's world thermal map scaled down. | Mapping scale and region dimensions. |
| Region capacity | Regions do not grow. Each has a hard organism cap; the world adds regions. Births are refused at the cap. Engulfment and death reopen slots. Operators can cull wildlife through an admin interface when a capped region has had no players for extended days. | Cap value; equation for adding a region to the world versus attaching it to a new world. |
| Region choice | A fresh cell is offered a choice of region when it begins. | Selection presentation. |
| Emergence exchange | Matter that emerges is lost to the cellular region (a recorded export). The organism enters the world scaled to world values. | Conversion scale, after regions per world and matter per region are known. |
| Emergence target | Rank several candidates in the region's mapped world area closest to the preferred temperature with needed nutrients; choose one at random. Finite resources self-penalize crowding. | Candidate count and ranking weights. |
| Group emergence | The emerging organism chooses individual or bulk. Bulk joins a selection queue; organisms emerging together with the same or close biology share one target pick. | Queue timing and similarity threshold. |
| Logout | A logout delay keeps the cell in play and vulnerable; logging out while about to be engulfed does not save it. Afterwards the cell is anchored, cannot be engulfed, is not moved by flow, and its metabolism and thermal response stop. | Delay duration. |
## Existing architecture and the changes needed
Read this proposal against:
- [Project vision](docs/PROJECT_VISION.md).
- [World architecture](docs/architecture/WORLD_ARCHITECTURE.md).
- [Environmental units and compartments](docs/world/ENVIRONMENTAL_UNITS.md).
- [Existing optional environmental fields](docs/world/ENVIRONMENTAL_FIELDS.md).
- [Energy and matter accounting](docs/biology/ENERGY_MODEL.md).
- [Bounded cellular motion trial](docs/adr/0102-cellular-spatial-trial.md).
- [Open energy, food bubbles, and pools proposal](docs/adr/0136-open-energy-and-scattered-nutrients.md).
- [Cellular environmental ownership](docs/adr/0172-cellular-environment-ownership.md).
- [Joint environmental batch](docs/adr/0173-cellular-environment-batch.md).
- [Local environmental scheduling](docs/architecture/ENVIRONMENTAL_SCHEDULING.md).
- [Photosynthesis producers](docs/adr/0175-photosynthesis-producers.md).
| Existing boundary | Required extension or decision |
| --- | --- |
| The spatial trial resolves phenotype-limited movement intentions and contact. | Add explicit velocity/response semantics for propulsion, turning, slowing, currents, and anchoring. Do not reinterpret old movement records. |
| The cellular environment owns tagged water, dissolved nutrients, and nested organic inventories. | Add currents and the thermal map as seeded environmental conditions under the same spatial authority. They are not stock and not a second resource store. |
| Waste heat and radiative export have accounting meanings. | Keep them unchanged. The thermal map is a maintained condition derived from the world, not accumulated waste heat. Specify the biological response. |
| The habitat sits inside one environmental voxel (ADR-0172). | Link the region to a world area instead, with a hard organism cap (ADR-0177). |
| Optional M6 fields and processes are scoped experiments. | Their existence does not automatically provide live cellular flow, temperature, feeding conversions, or damage. |
| Existing environmental intervals have explicit tick and replay boundaries. | Any new coupled process needs its own documented ordering, bounds, persistence, and restored continuation. |
| Presentation consumes immutable environmental/biological views. | Publish readable flow and temperature information without moving simulation authority into the client. |
These are design gaps to resolve before implementation, not permission to silently
extend an accepted ADR. New motion, thermal, and durability behavior need scoped
decisions and explicit versions. New rules start in new DEV worlds; existing DEV
worlds are disposable and are not migrated.
## Region layout and geometry
Keep the distinction between a logical region, its cellular habitat, environmental
field resolution, and any underlying world voxel/chunk. A current does not need
to follow server partitions, and a visual river-like path is not a new ownership
boundary or a solid corridor.
The habitat remains a bounded 2D area with a declared effective depth. Changing its
area, depth, or sampling resolution does not create water, nutrients, energy, or
extra organisms. Under ADR-0177 the habitat is no longer tied to one world voxel:
it is linked to an area of its world and can be as large as currents, quiet
pockets, and eddies need. Its size grows only by design, not with population; a
hard organism cap bounds each region and the world adds regions instead.
Proposed features within one habitat:
| Feature | Gameplay purpose | Design constraint |
| --- | --- | --- |
| Quiet pockets | Learn steering, collect initial food, and reproduce. | Still provide useful exits and resources; do not become the universally best AFK location. |
| Main circulating route | Carry food and provide a recognizable travel route. | Allow crossing/exiting; avoid a forced one-way ride. |
| Rejoining branches | Offer shortcuts, interception routes, and different risks. | Communicate where routes lead within perception limits. |
| Local eddies | Create recurring encounters and food gathering areas. | Do not trap all food permanently or manufacture replenishment. |
| Anchoring | Support anchored and stationary colony strategies. | The 007 anchor is player-triggered and holds where it hits; no prepared surface is needed. |
| Thermal gradients | Make habitat choice and thermal specialization useful. | Readable transitions and reachable alternatives; no hidden lethal line at a field boundary. |
Do not make every quiet area cold, every fast current hot, or every rich food site
hazardous. Independent combinations allow several viable strategies. Reproduction
needs enough physical space for resulting organisms, including when the parent
and offspring are being carried by a current.
## Flows
### Local velocity and circulation
Define local flow as a velocity vector sampled at an authoritative position and
tick, in the same spatial frame and compatible units as cell movement. Distinguish:
`world velocity = local liquid velocity + swimming velocity relative to liquid`
This decomposition does not mean adding current repeatedly as unlimited swimming
acceleration. Coupling to changing flow, response time, sampling, interpolation,
rounding, and motion limits need a defined model. Ordinary cells and loose bubbles
already drift; a mutation must add something beyond that baseline to be useful.
Generate 2-n current routes/areas per region from explicit procedural configuration
and seed, with an individually determined direction and speed for each. Evaluate
several speeds through trial and error rather than selecting one universal current
speed. The maximum n, route width, speed distribution, and quiet-area coverage remain
tunable and bounded before implementation. Seeded generation does not grant infinite
water, nutrients, or energy.
Currents may intersect. Cells and food must experience one consistent resulting
local flow at an intersection, not whichever current happens to be processed last.
Vector composition with bounded magnitudes is a candidate, not a selected rule;
opposing cancellation, crossing deflection, and limit handling need trials.
Use the same field/sample semantics for affected objects, subject to their explicit
response and attachment rules.
A bounded seeded velocity field is a possible representation; full computational
fluid dynamics is not required. Keep transitions readable and compatible with
boundaries. A static field means unchanging flow directions/strengths, not stationary
water. Whether currents later vary over time remains open and must preserve replay.
Main routes can loop inside the habitat, with slow pockets and rejoining branches.
This is a proposed initial layout, not a requirement that every future region be
hydrologically closed. There is no edge wrap or teleport returning a bubble to
the opposite side. Avoid outward flow that is merely clamped at a wall, producing
an artificial pile of every cell and food item.
At solid boundaries, the chosen flow/motion representation needs consistent
nonpenetration and no unintended stock loss. Future open boundaries need actual
handoff of organisms and material, not despawn-at-source/spawn-at-destination.
Cross-region flow belongs to a later explicitly qualified ownership contract.
### Propulsion and slowing
At the same supported propulsion output and body state, travelling with the current
increases progress through the region; travelling against it reduces progress.
Outside a current, ambient flow is zero and ordinary swimming is at the cell's
baseline for those conditions. Acceleration/braking transients still apply. Cross-flow
deflects world movement according to the eventual vector model; this is not a
universal scalar speed bonus. A sufficiently strong opposing current can prevent
upstream progress without reducing the cell's swimming capacity relative to water.
Do not separately add a matching speed buff/debuff after applying flow. Equal
output may have the same propulsion E/time while the time and E needed to reach a
fixed world destination differ. Station keeping still requires funded opposing work.
| Action/state | Required behavior | Cost meaning |
| --- | --- | --- |
| Propelling | Accelerate relative to liquid within available output and steering limits. | Fund applied output; do not charge maximum propulsion at every nonzero speed. |
| Releasing propulsion | Lose relative swimming speed through passive resistance while continuing to drift. | No active propulsion expenditure; dissipation is not usable cellular energy. |
| Active braking/reversing | Use opposing propulsion to slow or reverse faster. | Pay for actual opposing output. |
| Station keeping | Swim against flow to hold a position in the region. | Continuous funded work, not the default meaning of no input. |
| Anchored (007) | The player drops the anchor; the cell holds at the point it hits. | Construction, drop/release, load, and holding-capacity rules must be explicit. |
| Attached colony | Combine useful propulsion with total arrangement load/resistance. | No automatic speed multiplier from member count; no duplicate charge for shared work. |
Use the [movement draft's](Cellular_movement_draft.md) calculated profile:
propulsion and steering machinery, body shape, mass, and resistance produce speed, acceleration, passive
slowing, active braking, turning, and operating cost. Founder reference displays
can read 100% under fixed reference conditions; actual values still need tuning.
Zero/absent capabilities are not 100%, and account age confers no movement bonus.
Exact control behavior remains open: automatic versus deliberate braking,
reverse-thrust controls, how heading changes at different speeds, and how an
energy-starved cell passively drifts. Start with responsive founder handling;
extended uncontrollable coasting should not be required to learn the game.
### Environmental driving and energy
Decided: currents are a fixed environmental condition, like incident light. They
are not stock and carry no mechanical energy accounting; no driving source,
entitlement, or work/dissipation ledger is needed. Forces against an anchor or
attached body are likewise mechanical rules, not energy transfers.
Drifting never credits a cell's usable E reserve, and no process harvests flow
energy. Propulsion expenditure still transfers reserve E to heat as today.
## Food and material transport
| Material/object | Proposed behavior | Accounting requirement |
| --- | --- | --- |
| Loose nutrient/energy bubbles | Move with local flow under a stated response model; retain identity and finite stock. | Movement changes position, not amount or channel. |
| Finite resource pools | Can remain fixed where explicitly declared. | No replenishment from an animation or passing current; any resupply needs a source debit/import. |
| Living cells | Drift plus their funded relative swimming, subject to contact/attachment. | Existing bodies/reserves remain the same owned inventory while moving. |
| Corpses/detritus | Use explicit mobility/attachment rules, or the supported corpse-to-bubble process. | Conversion occurs once; no spendable corpse and duplicate bubbles. |
| Dissolved compartments | Only move/convert through defined conservative processes. | Bubble advection does not automatically implement dissolved transport or make dissolved stocks edible. |
| Visual particles/trails | Illustrate flow without being collectible resource objects. | Must not appear as edible stock or create a second food system. |
### Drift caused by passing cells
In addition to ambient currents, a passing cell disturbs nearby food bubbles so
they drift somewhat in the direction the cell was travelling. This is part of
the recorded gameplay direction, not just a client animation. The influence
decreases with distance from the passing cell, and the extra bubble drift speed
falls off over time, returning toward ordinary local-current drift.
Separate base flow from the temporary induced motion:
`bubble world velocity = ambient flow response + temporary cell-induced drift`
This is a conceptual decomposition, not a selected numerical solver. Influence
radius, near/far falloff, decay time, maximum induced speed, and dependence on cell
speed, size, or propulsion output need playtesting. Specify whether the disturbance
uses world travel or swimming relative to water; do not silently settle that choice.
Use a bounded deterministic combination when several cells pass the same bubble,
without dependence on connection or iteration order.
The disturbance changes position/motion, not nutrient identity or amount. It can
occur outside a main current too. It must not pull distant food through other cells,
grant unlimited extra collection range, or stack permanent velocity on every pass.
Like currents, it has no energy accounting and is never a source of usable cellular
E. Persist or deterministically reconstruct
any temporary bubble motion needed for identical restored continuation.
Equal drift does not make a cell catch a nearby bubble. Players still need useful
relative motion or contact. Active play can involve intercepting a cluster,
matching its drift while feeding, then exiting toward a quiet reproduction site.
Collecting a bubble should not automatically impose a generic speed penalty.
High flow or propulsion must not skip contact with food or pass through cells.
Choose swept contact or bounded motion subdivisions with explicit work limits;
do not change the biological tick duration or skip feeding costs to hide tunneling.
Contention and transfer order must remain stable and independent of connection
order. Collisions, sticking, pushing, and engulfment need their own supported
rules rather than one generic "speed through other cells" percentage.
Decided 2026-10-21: bubbles that touch merge into one bubble holding both
inventories, keeping the lower id, with radius from total stock. A tunable size cap
stops further merging. Merges resolve in id order. Each update carries a tunable
number of moving bubbles, nearest first; the client advances the rest with the
shared flow field. See the [implementation plan](Cellular_Region_Movement_Plan.md).
## Thermal conditions
### What temperature means
The selected draft direction is a **procedurally generated thermal map**, plus an
actual temperature state for each cell. Use explicit seed/configuration and
continuous/readable spatial differences. The map describes local environmental
temperature; it is not the cell's own temperature and is not a new edible resource.
The UI must expose a compass and temperature gauge for navigation and make thermal
differences visible in the habitat rather than rendering flat-color terrain.
Temperature is an environmental condition, not usable E or an amount of food.
The existing heat sink does not by itself define local temperature: we need an
explicit thermal reference, heat capacity, spatial ownership, and exchange model.
Stored units should follow the repository's dimensional conventions; a Celsius
display can be derived for readability. No gameplay temperature values are selected
by this draft, and missing thermal state is not zero kelvin or a safe default.
Decided backing: the region's thermal map is the thermal map of its linked world
area, scaled down to the habitat (ADR-0177). It is a static maintained condition,
not owned thermal energy, and needs no energy exchange accounting. Owned thermal
energy with heat capacity is deferred until gameplay needs temperatures that
change, for example colonies warming their surroundings. Waste heat is never
recovered into usable cell E.
### Layout, sources, and transport
Use broad, readable differences rather than a random checkerboard of lethal cells.
A founder-accessible comfortable area can border cooler/warmer opportunities with
gradual transitions. Extreme areas should initially be optional routes, not the
only source of a nutrient every founder needs to reproduce.
Because the map is maintained, currents do not carry heat and gradients stay
fixed. A warm vent illustration is presentation, not an energy source. Existing
radiative exports must not also be counted as heating local liquid.
Thermal map resolution may differ from flow or food resolution. Sampling,
organism footprint overlap, and boundary continuity need explicit semantics.
### Effects on organisms
The maintainer clarified that **all three temperatures contribute**, rather than
choosing a single reference:
| Temperature | Meaning | Role in the response |
| --- | --- | --- |
| Environmental temperature | The local liquid temperature experienced by the cell. | Determines current exposure and the conditions the body is adjusting to. |
| Current cell temperature | The cell's actual present temperature. | Responds over time; its difference from the environment contributes to the difficulty of handling a transition. |
| Preferred cell temperature | The cell's favored operating temperature, distinct from its actual temperature. | Keeps off-preference living more costly even after actual temperature approaches the environment. |
There are two connected cost behaviors to preserve when choosing an equation:
- **Transition/handling cost:** drastic changes between the current body state and
surrounding temperature require more E to handle. Rapidly entering a very different
environment can be especially demanding. This component can diminish as the cell
adjusts, depending on its acclimation and mutations.
- **Persistent off-preference cost:** settling toward the environmental temperature
does not automatically restore baseline. If the resulting conditions remain far
from the preferred temperature, survival still costs more than living near preference.
The overall thermal penalty should increase exponentially with relevant unsupported
mismatch, subject to balancing. Do not select an exponent, coefficient, comfort width,
or cap simply to fill this draft. Whether the terms add, multiply, share one response
curve, or use another relationship remains open. Avoid counting the same sustained
stress twice just because both body-to-preference and environment-to-preference
differences can describe it.
Use `survival E/time = baseline survival E/time * thermal multiplier` only as a
conceptual placeholder. The multiplier depends on all three temperatures, the cell's
acclimation state, and relevant mutations. It approaches 1 when conditions are well
handled and near preference; a supported adaptation can reduce or remove extra
thermal cost over its useful range. Ordinary movement, construction, and other
activity costs remain separate; do not indiscriminately multiply every resource
cost by a thermal factor.
Cells can **acclimate** over time or acquire **mutations** that change how well
they handle temperature. Actual temperature adjustment must not automatically
overwrite preferred temperature to equal the surroundings. Acclimation is
physiological adjustment, distinct from selecting structural offspring adaptations
or automatically rewriting the inherited genome. Its range/rate, whether it can
shift a preferred operating range within limits, and inheritance behavior need
balancing and explicit rules. Neither adjustment nor acclimation instantly erases
all extremes.
Example behavior, without choosing temperatures or coefficients: a cell leaves
its preferred environment for a much hotter area. It initially pays a high handling
cost. Its actual temperature then rises and its handling cost can decrease, but
remaining in that hot area still has an off-preference cost. A heat-adapted descendant
can reduce that burden; a cold specialist need not receive the same benefit.
| State relative to the organism's supported range | Proposed gameplay response | Decision still needed |
| --- | --- | --- |
| Current body and environment near preference | Survival E use approaches ordinary baseline. | Comfort band, baseline calibration, and the combined equation. |
| Abrupt transition away from current body temperature | Increased handling E demand while the cell responds. | Response rate, acclimation limits, mutation effects, and how abruptness enters the equation. |
| Body adjusted but environment/body still off preference | Extra survival cost persists despite a smaller body/environment difference. | Sustained stress curve and specialist/generalist tolerance. |
| Extreme freezing/boiling exposure | Can cause immediate permanent death, including rapid entry into an extreme area. | Organism-specific lethal thresholds and whether ambient or actual cell temperature triggers the event. |
This explicitly revises the earlier suggestion that thermal boundary crossings
should never kill instantly. Extreme areas may be immediately lethal; do not
silently grant a universal exposure grace period. Communicate danger before entry
through visible thermal cues, the gauge, and navigation. Ordinary gradients and
founder routes should remain usable without requiring entry into those extremes.
No universal 0/100-degree thresholds are adopted; temperature values and environmental
conditions must be explicitly chosen. Body-temperature change, acclimation, exposure,
and lethal thresholds are related but distinct. Partial footprint exposure still
needs defined treatment.
Thermal protection must occupy actual tissue or require actual operating resources
if shedding it is to save anything. A specialist can give up breadth for better
local performance only through a specified response/recipe. The current tolerance
parameter must not silently acquire new low/high/optimum meanings under old schemas.
Provide cold-specific, heat-specific, and overall thermal adaptation options.
Heat and cold handling may differ in the same cell. A broader adaptation may handle
both well enough to leave no extra thermal penalty across the supported practical
range. That does not silently grant immunity to every lethal threshold or eliminate
the actual construction/upkeep cost of the adaptation. Specify any such protection
explicitly; useful traits still need the catalog's meaningful tradeoffs.
The exact effects on handling cost, persistent cost, acclimation, preferred range,
and lethal limits need later review against the balanced equation. Do not revise
the 150 mutation entries incidentally while the maintainer reviews other groups.
Do not apply new temperature effects to food spoilage, nutrient conversion,
reproduction, mutation rates, or photosynthesis merely because a field now exists.
Each coupling needs a defined benefit, drawback, accounting treatment, and version.
## Mutation opportunities supported by the region
The mutation catalog remains the source for individual tradeoffs; this document
lists what the environment must provide for those offers to mean anything.
| Draft IDs | Environmental requirement | Offer/context treatment |
| --- | --- | --- |
| 001-005 propulsion/steering | Useful routes, readable resistance, acceleration/braking, and actual output costs. | Productive travel/interception/crossing can raise weights; inputs alone do not farm offers. |
| 006 active braking propulsion, proposed replacement | Funded opposing propulsion with useful capacity beyond ordinary founder braking. | Stop/reverse demands weight the option; old Current sail stays archived pending a distinct benefit. |
| 007, 099 anchoring | Currents that make holding position useful; paid anchor construction, drop, and release. | Costly station keeping/dislodging is relevant context; no need to suffer injury first. |
| 008 coasting-biased body, proposed replacement | Stored relative velocity and a body-resistance change distinct from 005 streamlining. | Useful open coasting can favor it; overshooting/precise-stop demands can reduce weight. Former food sensing is reclassified for later review. |
| 104 flow sensing | A useful information benefit beyond the visible current cues promised to all cells. | Sensing is information, not swimming speed; do not require it to see basic flow. |
| 009 shed propulsion | Real ongoing stationary supply or supported carried role. | Photosynthesis/pool proximity alone is insufficient; nutrient access must work. |
| 010 specialized colony propulsion | Attached movement/load and machinery beyond ordinary member propulsion. | Does not require 009; ordinary attached movement is not gated on 010. |
| 024-025, 100 light adaptation/sensing | Meaningful, perceivable spatial light differences. | Light is separate from temperature; shade is not automatically cold. |
| 091-095 thermal specialization | Real temperature-dependent benefits and disadvantages, plus reachable habitat choices. | Observed useful thermal conditions/transitions weight offers; dangerous exposure is not a prerequisite. |
| 097 shed thermal protection | Existing costly protection and functional thermal gameplay. | Stable safe conditions can favor shedding; no offer when there is no actual saved cost. |
| 098 protective rest | Supported hazards, funded protection, finite survival, and reactivation. | Optional specialization, not an enforced inactive opening. |
A region with thermal effects disabled offers no thermal adaptations. A thermal
map with only decorative color is still disabled for this purpose. Hard availability
comes before behavior/context weights; merely discovering an area does not create
the missing environmental mechanics.
## Readability and controls
- Flow cues should communicate direction and strength before the cell is committed.
Use trails, suspended specks, and actual food motion without making every visual
speck look collectible.
- Render terrain/habitat colors as a thermal heat map with readable cold-to-hot
differences instead of a flat background. Basic cellular conditions and interactions
have visible indicators/cues; their readability does not require a sensory mutation.
- Provide a compass and temperature gauge for navigating the cell. Distinguish local
ambient temperature, actual cell temperature, and preferred temperature/range.
Final gauge layout remains open, but it should explain why E demand stays high
after a cell's actual temperature has adjusted to an off-preference location.
- Distinguish comfortable, stressful, and dangerous conditions for the controlled
organism using contours/patterns and labels as well as color. Food channel colors
must remain distinguishable; visible heat must not hide current direction.
- Show whether the cell is swimming, drifting, actively braking, holding position,
or anchored. A world-space speed readout alone can conceal propulsion expenditure.
- Explain a changing budget: for example, station keeping uses E while passive
drift does not use propulsion E; basal maintenance remains separate.
- Respect perception/interest limits. A readable local current/thermal view does
not grant an exact global map or reveal out-of-range food.
- Any later sensory adaptation needs a benefit beyond these baseline visual cues;
it cannot merely restore information already promised to every cellular player.
- Show biological state under shared presentation rules for NPCs and players;
do not add account/owner labels to make flow or thermal behavior understandable.
The renderer consumes immutable views with frame, tick, revision, and field presence.
It can interpolate presentation, but client animation cannot move authoritative
food/cells, determine temperature injury, or alter collection outcomes.
## Ownership, lifecycle, and persistence
Keep one authoritative owner per patch of space, including cells and their local
environment. Several regions scale the world; one global fluid owner is not implied.
Environmental fields, organic stock, corpses, independent descendants, and transfer
escrow must remain disjoint resource representations.
Before a coupled implementation, specify and persist or deterministically derive:
- Field definitions, units, frame/mapping, immutable seed/configuration, and rules.
- The linked world area and scaling used for the thermal map, so it reconstructs
exactly; currents and the map have no time-dependent stock or entitlement.
- Actual movement state needed for acceleration, braking, and restored continuation.
- Attachment state, loads, member identities, and valid release/breakage outcomes.
- Temperature/exposure state needed by the chosen organism response model.
- Atomic flow/thermal/resource/movement outcomes and their recorded replay inputs.
Choose one explicit tick order for environmental exchange, motion/contact, feeding,
metabolism, thermal response, reproduction, and terminal transfers. The list here
does not select that order. Restore, recorded replay, and differently partitioned
batches must produce the same authoritative outcomes under the chosen rules.
No database write per simulation tick is required by this proposal.
Cross-region transport needs paired conservation and durable authority handoff.
It must include the relevant organism motion/thermal state and any in-transit stock;
an adjacent field's read-only view cannot authorize spending its inventory. The
initial closed circulation experiment can defer open transport without declaring
future regional boundaries impermeable world walls.
Offline controlled organisms still cannot move, feed, reproduce, mutate, or progress
passively. Logout takes effect after a delay; during it the cell stays in play and
vulnerable, so logging out while about to be engulfed does not prevent it. After
the delay the cell is anchored in place, cannot be engulfed, is not moved by
currents, and its metabolism and thermal response are frozen. There is no offline
catch-up on return. Independent NPC relatives continue under ordinary active-world
rules. Resume restores the cell's frozen velocity and temperature state; its
surroundings may have changed.
## Region capacity and world linkage
Each region maps to an area of its world and takes its thermal map from that area.
Regions do not grow with population. A hard organism cap bounds each region:
- At the cap, births are refused. Engulfment and death return matter to the region
and reopen slots for players and wildlife alike.
- If a capped region has had no players for extended days, an operator can cull
wildlife through an admin interface. Culling is a recorded operator action, not
automatic despawning presented as selection.
- The world adds regions as demand requires. A later equation decides whether a
new region joins the same world or a region attaches to a new world.
- A fresh cell is offered a choice of region when it begins, so friends can share one.
A new region starts without life under player-origin biology; its founders shape it.
## Emergence into the world
When an organism evolves out of the 2D stage, it leaves its cellular region:
- Its matter is a recorded export and is lost to the cellular scale. The organism
enters the world scaled to world values. The conversion scale is selected once
the number of regions per world and the matter per region are known.
- Target selection uses the region's mapped world area. Rank several candidates
closest to the organism's preferred temperature with the nutrients it needs and
choose one at random. Finite world resources penalize crowded sites; no separate
spreading rule is added.
- The emerging organism chooses individual or bulk emergence. Bulk joins a
selection queue; organisms emerging together with the same or close biology share
one target pick. Because players and wildlife look alike by design, this does not
depend on knowing who is a player.
Thermal adaptation in the cellular stage therefore shapes where an organism starts
in the world.
## Pacing and ecological checks
All fresh primitive lives receive equivalent starting biology. Starting locations
need useful reachable food, a tolerable thermal setting, and sufficient control
to follow more than one viable route. This does not require permanent protected
zones or invulnerable founders.
Evaluate net E and each material channel over actual routes, including propulsion,
maintenance, flow encounters, and newborn investment. Faster E collection alone
does not satisfy the three-minute first-birth target if P or another material
creates a long wait. Thermal protection must not become a required prerequisite
for every founder's ordinary reproduction route.
The maintainer expects unattended feeding to be slower than active gathering and
risky because other organisms can engulf an unattended cell. Treat a separate
anti-AFK system as low priority; do not add input challenges, forced movement,
unattended-play timers, or new surveillance mechanics for this draft. Verify the
assumption through playtesting rather than claiming predation guarantees it in
every population. The mutation draft's proposed activity-credit rules remain a
separate review item, not a new anti-AFK feature approved by this decision.
Compare active collection with fixed-pool camping and passive drifting in trials.
If a circuit or pool outperforms active routes, tune food, flow, intake, and costs
before adding an anti-idle layer. Viable stationary producers still need useful
interactions and births without meaningless movement/input requirements.
Observe whether offspring establish, compete, feed, die, recycle, and form supported
groups. Flow must not sweep every newborn away before attachment is possible or
concentrate all life into one dominant trap. Finite resource depletion and deaths
remain ecological outcomes; do not conceal failures by automatically spawning food
or wildlife. Adjust documented openings/inflows and trial parameters instead.
## Proposed implementation segments, after design review
These are possible bounded segments for later work, not authorization to code,
commit, push, migrate, or deploy during this document review.
| Segment | Concrete result | Qualification needed before broadening |
| --- | --- | --- |
| Design contracts | Agree motion/flow, thermal accounting/response, boundaries, and rule-version scope. | Reconcile existing ADRs, resource owners, public contracts, and lifecycle behavior. |
| Portable flow and propulsion | Deterministic fields, funded motion/braking, loose-food movement, and conservative contact. | Bounds, conservation, no tunneling, no free station keeping, replay/restore. |
| Portable thermal model | Explicit thermal sources/capacity/exchange and one readable biological response. | Energy accounting, gradients, warning time, supported adaptation tradeoffs. |
| Coupled region integration | One-owner joint outcomes, durable state, publication, recovery, and supported attachments. | Atomicity, crash/retry safety, batch equivalence, offline policy, version admission. |
| Client presentation | Readable local flow/thermal cues and movement/energy feedback. | Matches authority and perception; founder handling evaluated interactively. |
| Controlled pacing experiment | New disposable/versioned test region with ordinary founding and births. | First-birth distributions, active-vs-passive feeding, adaptation usefulness, colony opportunity timing. |
Keep the headless simulation independent of graphics, networking, storage, Steam,
and Kubernetes. Specialized dependencies need the repository's evidence/ADR process;
none are proposed merely to supply a fluid effect. This design does not change
foundation-proof scope or authorize any World0 action.
## Future verification checklist
These are checks a later implementation must perform, not results claimed here:
- Still liquid, uniform flow, circulating flow, and smooth transition cases.
- Procedural 2-n current generation, differing speeds/directions, intersections,
and identical reconstruction from saved generation configuration.
- Relative swimming versus world movement; braking does not imply free station keeping.
- Useful founder control across ordinary currents, with no high-speed contact skips.
- Finite food survives repeated circuits without gain, loss, or boundary piles.
- Passing-cell food drift has bounded distance falloff and temporal decay, combines
predictably across cells, and restores identically without changing food stock.
- Attachment, release, force/load handling, and ordinary multi-cell propulsion.
- Thermal map reconstruction from the linked world area, gradient crossings, and
scaling continuity.
- Region cap birth refusal, slot reopening, operator culling records, emergence
export and target selection, and logout delay followed by protected anchoring.
- Combined three-temperature E response: transition cost can diminish after
adjustment while off-preference cost persists; near-preference operation approaches
baseline. Check the balanced exponential curve without double-counting stress.
- Bounded acclimation, lethal extreme entry, and meaningful asymmetric cold/heat
and broad thermal-adaptation effects, including any supported zero-extra-cost range.
- Heat-map cues, compass, and gauge distinguish ambient/cell state and communicate
hazards before entry without requiring a mutation for basic visibility.
- Unsupported/missing fields rejected or explicitly disabled, never treated as safe defaults.
- Deterministic motion/thermal continuation through restore, retry, and batch partitioning.
- One-owner and cross-boundary conservation, including escrow and terminal events.
- No offline controlled-organism drift, feeding, exposure catch-up, or earned mutation credit.
- Perception limits and equivalent biological presentation for player/NPC organisms.
- Ordinary first-birth timing across seeds and novice routes, plus progression-time tails.
## Remaining tuning and implementation details
The original ten responses are recorded near the beginning. Do not present settled
procedural generation, visible cues, flow-speed effects, or exponential thermal
cost as unanswered gameplay questions. Remaining work is:
- **Thermal equation:** combine current cell, preferred cell, and environment
temperatures with acclimation and mutations. Preserve extra cost for drastic
transitions and sustained off-preference conditions; the coefficients and exact
relationship require balancing, not another choice of a single reference.
- **Playtesting:** founder/current speed ranges, crossing/escape control, proposed
006 braking and 008 coasting tradeoffs, exponential
E curve, acclimation rates/limits, lethal thresholds, colony roles, and whether
active feeding naturally outperforms risky unattended feeding.
- **Generation and composition:** maximum n, route/thermal-map generation rules,
intersecting-current composition, bounded work, and recorded configuration.
- **Food disturbance tuning:** induced-drift radius, strength, distance falloff,
decay, multiple-cell combination, and world-versus-relative driving velocity.
- **Thermal map scaling:** how the world area's thermal map is scaled to the habitat;
ambient/cell response and lethal-event semantics.
- **Controls/presentation:** exact coasting/braking/reversing/anchoring inputs in
the focused movement draft, and gauge layout, with baseline visible cues established.
- **Lifecycle:** logout delay duration and spawn placement within a chosen region.
- **Capacity and emergence:** region cap value, region-or-world creation equation,
emergence conversion scale, candidate count, and bulk-queue timing/similarity.
- **Engineering contracts:** ownership/contact, conservative boundaries, deterministic
recovery, explicit version changes, and eventual cross-region transport. The
maintainer marked original question 3 N/A for the gameplay discussion; these
existing technical constraints remain without becoming new required gameplay.
## Document validation scope
Check local reference targets, Markdown structure, unique headings, required design
sections, and whitespace. Preserve the separately reviewed mutation draft. These
checks establish document integrity only; no fluid behavior, thermal response,
ecological balance, implementation availability, or pacing result is qualified by
creating this file.
+268
View File
@@ -0,0 +1,268 @@
# Cellular region and movement implementation plan
Status: approved for implementation, 2026-10-21. Implements
[Cellular region changes](Cellular_Region_Changes.md),
[Cellular movement draft](Cellular_movement_draft.md) and
[ADR-0177](docs/adr/0177-cellular-regions-world-linkage.md). Movement mutation
weights and timing start from the values chosen here and are tuned through the
tuning file; the separate [mutation review](Cellular_mutation_draft.md) can
replace them later.
## Approach
- **Test on the live DEV system.** Every phase ends in a deployable image and a new
DEV region opened with the new rules, then a playtest. No local-simulation gate.
- **Fast pushes (Phase 0, done).** A push to `main` gates only on the deploy policy
suite, then builds and publishes images. The full check matrix runs nightly, on
pull requests and on manual dispatch.
- **Disposable DEV worlds (ADR-0177).** New rules get new versions and a fresh
opening. No upgrade paths from existing bundles, checkpoints or envelopes.
- **One tuning file in Git.** Every tunable value lives in one file; see
[Tuning file](#tuning-file). Retuning is a Git change and a full Argo sync; no
image build.
- **Client and server together.** Each phase ships its client half, so every DEV
deploy is playable.
- **One shared motion step.** The same integer code runs on the server and in the
client predictor.
## Current code this plan changes
| Area | Today | File(s) |
| --- | --- | --- |
| Motion | Stateless per-tick proposal: position from intent x speed, cost proportional to distance, instant stop. | `include/evo/biology/cellular_motion.hpp`, `src/biology/cellular_motion.cpp` |
| Life step | Maintenance, then movement, then intake (ADR-0104). | `src/biology/cellular_step.cpp` |
| Region step | Lives in life-id order, shared deposit contention, engulfment, corpses become bubbles. | `src/biology/cellular_region_step.cpp` |
| Food | Habitat format 2: up to 4,096 static deposits, ordered and updated by address. | `include/evo/biology/cellular_habitat.hpp`, `src/biology/cellular_habitat.cpp` |
| Environment | Joint owner `AEVOCEN1`: one ambient temperature, infall, heat export. | `src/server/lifecycle/cellular_environment.cpp` |
| Lives and population | Owners 7/8, rules up to 11, bundle 13, schema 57. | `src/server/lifecycle/cellular_lives.cpp`, `cellular_population*.cpp` |
| Wildlife | Shared controller choosing intents. | `src/server/lifecycle/wildlife_controller.cpp` |
| Sessions | Session v12 perception lists in-range deposits by id (max 512, 26 bytes each). | `src/network/protocol/session_protocol.cpp`, `src/server/session/region_sessions.cpp` |
| Client | Probe-style own-marker predictor and interpolation. | `src/client/prediction/*.cpp`, `src/client/views/*.cpp` |
| Opening | `cellular-v8`: 30 x 30 mm, 9 pools, 1,800 bubbles, 20 C ambient. | `apps/evo-world-clone/main.cpp`, `deploy/kubernetes/region/dev/region-values.yaml` |
The world has no thermal map yet: each cellular region has one ambient temperature.
Phase 3 adds a seeded world thermal field for regions to sample.
## Tuning file
- **Location:** `deploy/kubernetes/region/dev/tuning/cellular.tuning`, mounted into
the region pod by a kustomize `configMapGenerator`, so a change restarts the
region through a normal Argo sync.
- **Format:** plain `key = value` lines with `#` comments; units in key names
(for example `founder.thrust_um_per_s2 = 400`). Integer values only, matching the
simulation. No new dependency.
- **Validation:** unknown keys, missing keys, duplicates and out-of-range values
are refused at startup, so a typo fails the sync visibly instead of running with
a default. The file carries a `tuning.version` key.
- **Determinism:** the region persists the tuning values with its checkpoint. When
a restarted region finds different values, it records a tuning change at the
next tick boundary and uses the new values from that tick. Replay of earlier
intervals uses the values in force at the time.
- **Scope:** every value in [v0 trial values](#v0-trial-values) plus movement
mutation weights, offer timing and future tunables as they are added. Values
that only shape a new region (size, current routes, seed) apply when a region
opens; the rest apply on restart.
## v0 trial values
Starting values for the tuning file, none locked.
| Quantity | v0 value | Reasoning |
| --- | --- | --- |
| Region size | 60 x 60 mm | Founder crosses in about 5 min; room for 2-4 routes and quiet pockets. Within the existing 1,000,000 um axis limit. |
| Perception radius | 5 mm (unchanged) | About 25 s of founder travel. |
| Founder top speed | 200 um/s (unchanged) | Top speed = thrust / drag. |
| Founder drag | k = 2 /s (95,163 ppm per tick) | 0.5 s time constant: responsive, coasts about 100 um from top speed. |
| Founder thrust | 400 um/s^2 | Gives the 200 um/s top speed at k = 2. Reverse thrust equal. |
| Founder turn rate | 1 turn/s | Responsive founder handling. |
| Currents | 2-4 per region, 3-6 mm wide, 60-300 um/s | 0.3x-1.5x founder speed (accepted). |
| Flow grid pitch | 250 um | Smooth at cell scale, 240 x 240 grid. |
| Ambient range | 5-40 C across the region | Gradual gradients; extremes optional. |
| Founder preferred | 20 C, comfort band +/- 5 C | Matches today's 20 C ambient. |
| Body response | tau = 20 s | Readable lag; gives warning before lethal. |
| Lethal (body temperature) | <= 0 C or >= 45 C | Applied to body, not ambient. |
| Thermal multiplier | `min(8, exp(0.08 * off_pref_C + 0.04 * transition_C))` | Two costs from the region draft, capped. |
| Region organism cap | 2,000 | Above today's population; tune from census. |
| Deposit limit | 8,192 | Larger region; raises the 4,096 limit. |
| Merged bubble cap | 8x a scattered bubble's stock | Bounds clumping; see moving food. |
| Visible moving bubbles | 256 per update, nearest first | Fits the snapshot budget with velocities. |
| Logout delay | 10 s | Same as the existing linger. |
| Movement mutation step | +/- 5 reference points, paired -/+ 2 | From the movement draft. |
| Recovery weight | `max(0.10, (index/100)^2)` below 100 | From the movement draft. |
| Offer cadence | 25 s of productive active play, 3 options per offer | Midpoint of the draft's 20-30 s. |
## Moving food
- **Merging.** When two bubbles touch, they become one bubble holding both
inventories. Its radius follows its total stock, and it keeps the lower id.
Bubbles at the merged-size cap stop merging, so currents cannot collapse all food
into a few huge bubbles. Merging is conserved by construction (one inventory sum)
and resolved in id order for determinism.
- **Multi-channel bubbles.** A merged bubble can hold several channels; contact
feeding already drains per channel. The client draws a merged bubble with its
channel colors.
- **Update limit.** Each update carries at most the configured number of moving
bubbles, nearest first. Farther ones are dropped from that update; the client
keeps advancing them with the shared flow field until a later update corrects
them. Bubbles overlapping on screen are indistinguishable, so this is not visible.
## Phases
Each phase lists server and client deliverables, then what is verified on DEV.
### Phase 0: pipeline (done)
- `.gitea/workflows/build.yaml`: on push only the deploy suite runs before the image
jobs; the full matrix runs nightly (09:00 UTC), on pull requests and on dispatch.
Nightly runs have their own concurrency group so pushes do not cancel them.
### Phase 1: motion core and tuning file
Server:
- `CellularMotionState`: Q10 velocity, 16-bit heading, sub-micrometre accumulator.
- Checked-in integer sine/cosine table with golden tests.
- Per-tick step from the movement draft's numeric representation: turn, funded
thrust, drag toward exactly zero, add flow, displacement with carried remainder.
- Cost proportional to thrust used, divided by efficiency, not to distance.
Unfundable thrust is not applied; the cell coasts. Maintenance failure still
kills (existing behavior).
- Swept contact against deposits and cells, subdividing so no step exceeds half
the smallest contact radius, with a fixed work bound per tick.
- `CellularMovementProfile` derived from the genome: thrust, efficiency, burst
capacity and reserve, turn rate, forward and lateral drag, reverse thrust, anchor
capacity, colony drive. Ten fields for 001-010.
- Genome schema 6 with movement records at reference 100 for the founder; founder
version 5; development version 6.
- Tuning file parser and validation, shared by the server and `evo-world-clone`.
Client:
- Shared motion step linked into the client; the cell predictor uses it.
- Brake and reverse controls (rebindable, ADR-0085); movement-state indicator.
Verify: golden trajectories, decay to zero, no tunneling at 2x the top current
speed, equal results across restore points, thrust-cost properties, tuning file
refusals.
### Phase 2: currents, moving food and persistence
Server:
- Habitat format 3: deposits keyed and updated by stable id (not address), each
with Q10 velocity for induced drift; a fixed-pitch spatial bucket index for
contact; deposit limit from tuning.
- Seeded current generator: 2-n looping routes with width, direction and speed,
rasterized to the Q10 flow grid. Intersections add as vectors and are clamped to
the larger route speed.
- Bubbles move with the flow each tick in id order, merge on contact (see moving
food), and deflect along solid edges so nothing piles up.
- Induced drift from passing cells: radius, falloff, decay and maximum speed from
tuning; contributions combine in life-id order.
- Region step tick order: maintenance, turn and thrust, motion and swept contact,
deposit advection, induced drift and merging, contact feeding, engulfment,
deaths, births.
- Persistence: rules 12, owner format 10, population envelope 4 and joint envelope
format 2 carry motion state, deposit velocities and current configuration;
durable bundle 14 and schema 58, entered only by a fresh `cellular-v9` opening.
Joint batch 2 re-derives currents from configuration.
- Opening `cellular-v9` in a new DEV region (`evo-world-clone`).
Client:
- Session v13: own-life motion state; deposits with velocity under the update limit;
current configuration sent once at admission so the client builds the same grid.
- Bubbles advanced with the flow field between updates; merged bubbles drawn with
their channel colors.
- Flow cues: trails and drifting specks that are clearly not food.
Verify on DEV: food circulates and merges without loss or piles; founder handling
in and across currents; restart resumes identical trajectories; tick time against
the load governor (ADR-0097).
### Phase 3: thermal map and thermal biology
Server:
- World thermal field: seeded and coarse per world, sampled over the region's world
area and scaled down to the habitat (ADR-0177). The region configuration stores
the world-area reference and scale.
- Per-cell thermal state: body temperature (mK) and acclimation offset.
- Genome thermal fields: preferred temperature, comfort band, tau, lethal cold and
heat limits; the parameters thermal mutations (091-095, 097) edit.
- Integer exp table (Q16) for the capped multiplier on survival E. A body-temperature
lethal check feeds the existing corpse-to-bubbles path with a new death cause.
Client:
- Heat-map terrain; compass; temperature gauge showing ambient, body and preferred
band; contours or patterns for stressful and lethal areas, not color alone.
- Thermal death shown as its own cause on the end-of-life screen.
Verify on DEV: costs rise and settle as expected crossing gradients; lethal areas
are reached only by choice; first-birth time stays near 3 minutes.
### Phase 4: movement mutations 001-010
Server:
- Operators for all ten as fixed-reference percentage edits on the Phase 1 fields,
including acquisition and shedding for 003, 007, 009 and 010.
- 007 anchor: a player-triggered drop that fixes the cell at the point it hits
until released; holding capacity against flow load.
- 009 and 010 are offered only where colony attachment makes them meaningful.
- Offer weights, recovery factor and cadence from the tuning file.
Client:
- Offer screen previews: before and after movement profile at matched conditions.
- Anchor drop/release control and anchored state.
- Visual body changes from the movement draft's tentative indicators (001-006),
shared by NPCs and players.
Verify on DEV: each option changes handling in the expected direction.
### Phase 5: wildlife
- The wildlife controller plans with inertia (brakes before targets), uses currents
(rides toward food), avoids lethal temperatures, seeks its preferred range and
drops its anchor when it has one. Same rules as players.
- Verify on DEV: wildlife survives and reproduces in the new regions without
collapsing into one site.
### Phase 6: logout, capacity and region choice
Server:
- Logout: a delay with the cell vulnerable, then anchored, protected, and with
metabolism and thermal response frozen; resume restores frozen motion state.
Replaces the ADR-0098 linger for rules 12.
- Region cap: births refused at the cap with a recorded reason; the wildlife
controller stops attempting them.
- Admin culling: an operator endpoint on the existing ops HTTP server
(`src/server/ops_http.cpp`) that records each cull as an operator action.
- Fresh-life region choice: list a world's regions with open capacity at admission,
and route the new life through the existing redirect and handoff path (ADR-0096).
Client:
- Region choice screen for a fresh life; logout countdown; a notice when a birth is
refused because the region is full.
Verify on DEV: cannot escape a closing predator by logging out; a capped region
refuses births and reopens after deaths; two accounts choose the same region.
### Later: emergence
Emergence (scaled export, candidate selection, bulk queue) needs multicellularity
and the 3D world. This plan keeps it possible: the region's world-area link and the
thermal field from Phase 3 are what emergence targeting will use.
## Instrumentation for every playtest
Extend `src/server/lifecycle/cellular_play_summary.cpp` with first-birth time,
solitary-stage length, deaths by cause (starved, engulfed, thermal), time spent in
currents versus quiet water versus anchored, propulsion E share of total E, bubble
merges, and per-tick region work. These answer whether the 3-minute and
30-60-minute targets hold.
## Risks
| Risk | Mitigation |
| --- | --- |
| Moving deposits raise tick cost | Spatial bucket index and merging reduce work; measure against the load governor in Phase 2. |
| Merging collapses food into few large bubbles | Merged-size cap from tuning; watch merge counts. |
| Prediction feels rubbery | Shared motion code in the client; measure prediction error on DEV. |
| Ten movement parameters interact badly | Instrumentation plus removal of options that do not fit, as decided. |
| Determinism drift between server and client | One library, golden trajectory tests in both builds. |
| Less CI on pushes lets regressions reach DEV | Nightly full matrix; fix red nightly runs before the next phase. |
+214
View File
@@ -0,0 +1,214 @@
# Cellular revamp build plan
Status: approved for implementation, 2026-10-22. Builds the
[cellular gameplay plan](Cellular_gameplay_plan.md) and its system plans:
[mutation](Cellular_mutation_plan.md), [reproduction](Cellular_reproduction_plan.md),
[feeding and energy](Cellular_feeding_energy_plan.md),
[predation and defense](Cellular_predation_defense_plan.md) and
[body and maintenance](Cellular_body_maintenance_plan.md). Decision record:
[ADR-0179](docs/adr/0179-cellular-gameplay-revamp.md). Continues from phases 1-2 of
the [region and movement plan](Cellular_Region_Movement_Plan.md), which shipped as
rules 12.
## Approach
- **Build every phase, then playtest once.** Each phase is committed and pushed with
CI green (AGENTS.md), but nothing is deployed until the last phase. The playtest
runs on a fresh DEV region opened with the new rules.
- **New versions, disposable DEV worlds.** Rules 13, genome schema 7, development 7,
founder 6, a new owner format, bundle and schema, and a fresh `cellular-v10`
opening. No upgrade from existing rules-12 regions (ADR-0177).
- **One revamp tuning file.** Every new tunable goes in
`deploy/kubernetes/region/dev/tuning/cellular-revamp.tuning`, beside the rules-12
`cellular.tuning`, with the same format and validation.
- **Server phases first, then one session version.** Phases 1-5 build and test the
server halves. The wire changes in every one of them (body values, offers, bud
choices, organisms), so session v14 and the client screens for all of them are one
step after phase 5, rather than a protocol revision per phase. Nothing deploys before
that step anyway.
- **Shared biology.** Derivations stay in the headless library, so the client
predictor and the server agree.
## Phases
### Phase 1: genome and body (rules 13 foundation) - done
Server:
- Genome schema 7: every heritable value the plans name, in points (founder 100)
unless stated:
- size, density, membrane, body recipe (per thousand, C/N/P/O), upkeep
efficiency, growth speed;
- collection per channel (E/C/N/P/O), shared intake, burn efficiency per matter
channel, energy kept per bubble (`energy_conversion`), light capture;
- engulf capacity, kill absorption;
- bud share, litter (founder 0), Adhesion flag;
- the existing movement arrangement.
- Development 7 and founder 6: size, density and recipe set mass, footprint and
surface; upkeep = essential floor + adjustable part / efficiency; membrane mass
from points; no legacy photosynthesis speed penalty.
- Rules 13 owner skeleton (new owner format) and tuning keys for every body value.
Client: in the session v14 step.
Verify: founder 6 derives the same body as founder 5 where the plans say "today's
value"; the essential floor holds; encode/decode and bound checks for schema 7.
### Phase 2: feeding, energy and predation - server done
Server:
- Collection per channel with the shared intake limit; the membrane collection penalty.
- Energy kept per bubble; the rest to heat.
- Matter as energy: burn the largest non-excluded channel, upkeep overrides
exclusions, death only when nothing can pay.
- Region spent pool with a seeded drip back as bubbles; waits at the deposit limit.
- Reserve matter in mass for handling and movement energy, not upkeep.
- Engulf check with engulf capacity and `engulf_reserve_mass_percent`; kill
absorption; the kill remainder split between bubbles and the spent pool.
- Channel exclusions are a 4-bit step intent field, carried in the trace's byte 14.
Client (session v14 step): energy display including what matter can stand in for;
channel exclusion toggles; spent-pool drips drawn like infall; hover and HUD show the
phase 1 body values.
Verify: conservation per channel and energy across burning, the pool, kills and
drips; no burn of excluded matter except for upkeep; replay determinism.
### Phase 3: mutation offers - server done
Server:
- Catalog of the 49 mutations as data: effect, eligibility, triggers, base weight,
steps, cost and `enabled`, all from the tuning file.
- Per-cell affinity scores, inherited at birth; activity counters for every trigger.
- Chance allocation (`clamp(k x weight, floor, cap)`, summing to the option count)
and a seeded systematic draw; the draw and chances are recorded so a retry never
rerolls.
- Offer cadence from the tuning file; one pending offer.
- Cost paid from the reserve (matter may stand in for energy) and reclaimed as seeded
random bubbles, merging into the farthest bubble at the deposit limit.
Until phase 4, a chosen mutation edits the offspring plan (as rules 10-12 do); phase 4
turns the choice into the split.
Client (session v14 step): offer screen with name, pro, con, chance, cost and shortfall.
Verify: chances sum to the option count and respect floor and cap; the draw's
marginal frequencies match the chances over a seed ensemble; triggers fire as
specified; costs conserve.
### Phase 4: reproduction - server done
Server:
- On-demand bud with the control choice (stay or become the bud), the tunable fee and
bud share; one-way control transfer (ADR-0163).
- Mutation split: write the mutation into both plans, split body and reserve by
`split_share`, the offspring expresses it, the player chooses the cell; refusals
leave the offer pending.
- Litter: guaranteed and chance extra offspring sharing one investment, limited by
free spots and the region cap.
- Wildlife buds from its own plan with litter; wildlife never mutates.
Client: Bud with Stay / Become; offer options with Stay as founder / Become offspring;
refusal reasons.
Verify: control transfer is one way and exactly once across retries and restarts;
splits and litters conserve; a refused split spends nothing.
### Phase 5: multicellular organisms and emergence - server done
Unblocked 2026-10-23: the maintainer accepted whole-organism mutations and the
playtest form of Emerge (ADR-0179).
Server:
- Adhesion forms the organism at once. The organism is one life with a member count,
one genome, one reserve and a body that is the sum of its members.
- Internal buds add members; mutations are expressed by the whole organism; whole-
organism engulfment by total mass; mass-scaled handling.
- Emergence threshold (members, mass, reserve energy) and the Emerge action; the
wildlife member limit as a safeguard.
As built:
- An organism develops as its genome with the target size times its members, so mass,
footprint, upkeep, intake and engulf mass all follow from it. Its corpse records the
single-cell extent.
- Adhesion ends the single cell's life as `merged` (an empty corpse) and starts the
organism as a new life (bud identity, two members) holding the whole body and reserve,
at the cell's spot and with its account, affinity and progress.
- An organism's mutation is recorded as a direct expression (no split); its changed
tissue is paid from the reserve with construction energy. Unaffordable keeps the offer.
- An organism's bud pays the bud fee and adds litter members at the current growth.
Wildlife organisms stop one member short of the threshold. An organism cannot become
its bud.
- Handling adds `organism.load_per_mille` of the extra members' mass as load.
- Emerge (intent bit, exclusive with bud, engulf, intake and frozen) at the threshold
exports the body and reserve through the boundary ledger and ends the life as
`emerged`. Below the threshold the request is ignored.
Client: organism drawn as its member cells; Emerge button at the threshold.
Verify: one reserve and one genome across members; whole engulfment conserves; the
Emerge action only at the threshold.
### Session v14 and the client - done
- Session v14: the phase 1 body values in perception; payable energy; the exclusion
control; named offers with pro, con, chance, cost and Stay / Become; the bud choice;
organisms and the Emerge action.
- Client screens for all of the above.
As built ([schema](schemas/network/session-v14-cellular-revamp.md)): a 64-byte body block
(members, threshold, exclusions, Emerge open, payable energy, mass, the 20 traits); become,
emerge and exclusions on actions; become on choices; catalog offers (id, chance, cost) named
by the client from the shared catalog; the emerged ending. The client shows Stay / Become
offspring on each offer (one Choose for an organism or Adhesion), "Continue as the bud",
the organism's size and the Emerge button, the channels kept from burning, the body, and the
emerged end screen.
### Durable plumbing - done
Bundle 15, schema 60 and the `cellular-v10` opening (ADR-0179 "Durable form"): the
14 -> 15 revamp profile migration with recovery, become stored as bit 15 of the durable
choice's operator, the action input's new bits, and mutation results 0-6.
### Phase 6: wildlife, instrumentation and the playtest
- Wildlife controller: matter-as-energy aware, budding with litter, engulfing with the
new eligibility. Done: hunger counts payable energy, buds wait for the bud fee (litter is
the owner's), an organism adds members until one short of the threshold, and hunting uses
the region step's rules-13 engulf test (reserve share, capacity, membrane in nanometres).
- Play summary: first-birth time, time to Adhesion, deaths by cause, energy share paid
by matter, offers seen and chosen, mutations held per lineage.
- Mount `tuning/cellular-revamp.tuning` into the provision Job beside `cellular.tuning`
(kustomize `configMapGenerator`) in the push that promotes the new images. Revamp keys
live in that separate file so images from before rules 13 never read them.
- Opening `cellular-v10` in a new DEV region; promote the images; full Argo sync.
- Playtest.
## Playtest feedback (2026-10-26)
- Choices stalled after one split: a split needs a grown cell. The view now carries growth and
a split-ready flag; the client gates Stay / Become; an offer waits until a single cell can
split; DEV splits once half grown (region 13).
- The region edge is drawn and named when the cell is against it; the region's cell count is
shown; the client says when upkeep is burning kept matter.
- Mixed bubbles (every nutrient, recipe proportions) via `--mixed-motes`, drawn as small pools;
liquid openings move pools out of the currents into still water.
- Phosphorus: intake per channel follows the body's recipe, so single-nutrient phosphorus
bubbles fed slowly while growth used it at once; mixed bubbles carry it with everything else.
## Open items
| Item | Phase |
| --- | --- |
| Retuning bubble energy or founder `energy_conversion` (keep 40% vs today's 100%) | 2 |
| Organism pace: in tests a two-member organism at half growth swims about 7.5 µm per tick and needed about 5,000 ticks on a rich mote to fund one internal member | 6 |
| Region migration does not carry rules-13 per-life state (affinity, members); an organism's move would be refused | 6 |
## Risks
| Risk | Mitigation |
| --- | --- |
| Many new genome fields exceed the 256-byte genome bound | Measure in phase 1; widen the bound in schema 7 if needed. |
| Matter-as-energy makes cells nearly unkillable by starvation | Burn rates and drip rate are tunable; instrument the matter share of energy paid. |
| 49 triggers add per-tick work | Counters are integer and per cell; measure tick time in phase 6. |
| Control transfer across retries duplicates or loses control | Durable action receipts, as for existing births. |
| One deploy at the end hides integration problems | Every phase ships its client half and runs end to end in local tests. |
+135
View File
@@ -0,0 +1,135 @@
# Cellular body and maintenance plan
Amendment, 2026-10-26: [ADR-0181](docs/adr/0181-cellular-reproduction-safety.md)
adds an opt-in growth fuel buffer. Automatic construction spends only what leaves
the resulting body its declared survival reserve; tissue prices remain unchanged.
Status: planning draft, 2026-10-22. Records the maintainer's decisions on body size,
body recipe, upkeep, density, growth and bud size. Part of the
[Cellular gameplay plan](Cellular_gameplay_plan.md). Replaces the 031-050 notes in
[Cellular_energy_photosynthesis_draft.md](Cellular_energy_photosynthesis_draft.md).
No code, runtime rule or live region is changed by it.
All indices below are stored in points with the founder at 100, and change in the
mutation plan's 5-point steps unless stated otherwise.
## 1. Size
The genome's `target_size` (the full-grown body mass) moves to points; 100 is today's
founder (8,000,000 fg).
| Larger | Smaller |
| --- | --- |
| Harder to engulf; can engulf bigger prey | Easier to engulf; limited to smaller prey |
| More upkeep (upkeep follows body mass) | Less upkeep |
| Costlier buds and regrowth | Cheaper buds and regrowth |
| Heavier, so slower to move | Lighter, so quicker |
| Bigger footprint, so it touches more food | Smaller footprint |
None of these are separate penalties; they follow from mass and size.
## 2. Body recipe
The body's share of each matter channel (C, N, P, O, in per thousand, summing to
1000) becomes a heritable trait. The founder's recipe is today's fixed composition.
- A recipe mutation moves a tunable step (trial 20 per thousand) from one channel to
another.
- Each channel has a tunable minimum share, so no body drops a channel entirely.
- The recipe changes what the body needs to build, regrow and bud. It has no
performance effect: its value is fitting the body to what the region supplies.
- Together with separate collection rates, this lets a lineage specialize, for example
a nitrogen-poor body that thrives where nitrogen is scarce.
## 3. Upkeep efficiency
Upkeep can be made cheaper but never zero:
```text
upkeep = essential part + adjustable part x 100 / upkeep efficiency
```
- The essential part is a tunable share of the founder's upkeep (trial 25%), which no
mutation reduces.
- Upkeep efficiency is an index, founder 100.
- Upkeep stays on the body only (feeding and energy plan).
Flexible upkeep (switching unused machinery off, draft 030) is postponed.
## 4. Density
Tissue density is an index, founder 100. Body mass is set by size, so density changes
how large the body is for that mass:
| Denser | Lighter |
| --- | --- |
| Smaller footprint for the same mass | Larger footprint for the same mass |
| Less surface, so slower collection and less membrane mass | More surface, so faster collection but more membrane mass and upkeep |
| Touches less food and fewer cells | Touches more food and more cells |
Body mass is unchanged by density; only membrane mass changes, because it follows the
surface.
Shape traits (elongated, flattened, rounded, flexible, rigid) and flexible adult size
are dropped: the body is a square and there is no shape or deformation model.
## 5. Growth
- Growth speed is an index, founder 100, scaling a tunable base rate (trial 5 per
thousand of full size per tick, today's value).
- Faster growth spends the same matter and energy in less time; it does not make
growth cheaper.
- After a mutation split, each half starts at the size its half of the body covers and
regrows at its growth speed.
## 6. Bud size
The reproduction capability sets the size of an on-demand bud, as a share of the
parent's body, in points (founder 100, which is 500 per thousand: half the body),
built from the parent's reserve. Extra offspring per bud come from litter (mutation
plan, section 9). Bigger buds cost more but start larger and are harder to engulf; smaller
buds are cheap but vulnerable.
## 7. Dropped
| Draft | Why |
| --- | --- |
| 031-034 storage | No storage caps. |
| 039-040 recycling and leakage | No tissue turnover or leakage model. |
| Dropping food to provision offspring | Splits already share resources. |
| 043-047 shape, 050 flexible size | No shape model. |
## 8. Genome indices and mutations
| Index | Founder | Mutations |
| --- | --- | --- |
| Size | 100 | Larger Body, Smaller Body (mutation plan, section 8) |
| Body recipe | Today's composition | Carbon-, Nitrogen-, Phosphorus- and Other-Thrifty Body (section 8) |
| Upkeep efficiency | 100 | Efficient Upkeep, Rapid Growth (section 8) |
| Density | 100 | Dense Tissue, Light Tissue (section 8) |
| Growth speed | 100 | Rapid Growth, Efficient Upkeep (section 8) |
| Bud share | 100 | Bigger Buds, Smaller Buds (section 9) |
## 9. Tunables
| Setting | Trial |
| --- | --- |
| Recipe step | 20 per thousand |
| Minimum share per channel | To be selected in playtesting |
| Essential upkeep share | 25% of the founder's upkeep |
| Base growth rate | 5 per thousand per tick |
| Size, density, efficiency and growth index bounds | To be selected in playtesting |
## 10. Implementation map
| Piece | State today |
| --- | --- |
| Size from `target_size` | Exists, in femtograms; points are new. |
| Body recipe | Fixed per development version; heritable shares are new. |
| Upkeep with an essential floor and efficiency | New. |
| Density | Fixed per development version; heritable index is new. |
| Funded regrowth | Exists (funded maturation, rules 9); the growth index is new. |
| Bud size from the reproduction capability | Exists; the new bud flow is in the reproduction plan. |
Every new behaviour goes in a new rules version; regions on earlier rules keep their
meaning.
+165
View File
@@ -0,0 +1,165 @@
# Cellular feeding and energy plan
Status: planning draft, 2026-10-22. Records the maintainer's decisions on how cells
collect resources and pay for energy. Part of the
[Cellular gameplay plan](Cellular_gameplay_plan.md). Replaces the collection and fuel
sections of [Cellular_feeding_draft.md](Cellular_feeding_draft.md) and the energy
sections of [Cellular_energy_photosynthesis_draft.md](Cellular_energy_photosynthesis_draft.md).
No code, runtime rule or live region is changed by it.
## 1. Resources
| Channel | Unit | Used for |
| --- | --- | --- |
| E (energy) | picojoules | Upkeep, thrust, construction, mutation costs |
| C (carbon) | femtograms | Body tissue; energy stand-in |
| N (nitrogen) | femtograms | Body tissue; energy stand-in |
| P (phosphorus) | femtograms | Body tissue; energy stand-in |
| O (other matter) | femtograms | Body tissue; energy stand-in |
Resources enter a region through its infall sources (as today), and come from light
for producers. They return to the region through deaths, kills (predation and defense
plan), mutation costs and the spent pool (section 3).
There are no storage caps. Reserve matter counts toward the cell's mass (section 4).
## 2. Collection
### Separate rates per channel
Each cell has a **collection index per channel** in its genome, with the founder at
100 on every channel:
```text
collection: energy 100, carbon 100, nitrogen 100, phosphorus 100, other 100
```
- A channel's collection rate is the founder's rate for that channel scaled by its
index (105 collects that channel 5% faster).
- The existing ingestion capability stays as the **shared limit**: total matter taken
per tick cannot exceed it, so raising every channel does not bypass the cell's
overall intake.
- Collection is still by contact, as today: the cell drains what it touches.
This gives lives real variation: a nitrogen gatherer and a carbon gatherer feed
differently in the same region. The founder rates, the shared limit and how they
interact need serious tuning.
## 3. Matter as energy
### The rule
When an energy cost is larger than the reserve's energy, the cell pays the remainder
with **reserve matter** instead. The matter is not converted into energy; it stands in
for it. It covers every energy cost: upkeep, thrust, growth and bud construction, and
the energy part of mutation costs.
- **Burn rate:** each channel has a tunable rate, the picojoules 1,000 fg of it stands in
for, scaled by the cell's burn efficiency for that channel (founder 100). Matter pays
at a worse rate than the energy bubbles carry, so burning matter is always the
expensive way to stay alive (trial: 2,000 pJ per 1,000 fg).
- **Only reserve matter burns.** The body is never burned.
- **Death:** a cell dies when its upkeep cannot be paid by energy or any reserve
matter.
### Which matter burns
- The cell burns the channel it has the **most** of (in femtograms). If that channel
runs out mid-payment, it moves to the next largest. Ties go in the order C, N, P, O.
- The player can **exclude** channels (for example, keep phosphorus for budding).
Excluded channels are not burned for thrust, construction or mutation costs. The
controlled cell keeps its exclusions through splits and buds; wildlife excludes
nothing.
- **Upkeep overrides exclusions.** If upkeep cannot be paid any other way, it burns
excluded matter rather than let the cell die with matter on board.
### Where the burned matter goes
Burned matter goes into the region's **spent pool**, one amount per channel. The pool
drips back into the region as new bubbles at random points, at a tunable rate. If the
region is at its deposit limit, the drip waits.
- The region keeps all its matter; nothing is destroyed.
- Burned matter cannot be collected straight back, so matter is not an endless energy
supply. The drip rate decides how scarce energy is.
- Energy paid with real energy still goes to heat, as today.
### Presentation
The energy display shows the reserve's energy plus what the usable (non-excluded)
matter can stand in for, and roughly how long the cell can live on it.
## 4. Mass
Carried reserve matter counts toward the cell's total mass, alongside its body. Mass
slows acceleration and turning and raises movement energy (see the reproduction plan's
mass rule). Hoarding mass for emergence makes an organism slower and costlier to move.
Upkeep is charged on the **body only**. Reserve matter adds to movement costs, not to
upkeep, so hoarding is paid for once.
## 4a. Energy-bubble efficiency
The founder's `energy_conversion` capability (400 per thousand, unused in cellular play
today) becomes the share of collected energy-bubble E the cell keeps as reserve
energy. The rest goes to heat. Matter is collected whole; this applies to E only.
This gives extraction mutations a real axis: a higher share means more energy per
bubble, paid for by the mutation's paired change.
Today a cell keeps 100% of bubble energy. At the founder's 400 per thousand it would
keep 40%, cutting its energy income by more than half. Either the founder's value or
the energy in bubbles must be retuned when this is turned on.
## 5. Photosynthesis
- **Unlock:** Acquire Photosynthesis becomes available after the cell has burned a
tunable amount of carbon as energy. The count carries to offspring, like affinity
scores.
- **Weights:** burning carbon raises its chance; burning other channels lowers it.
Cells that live on carbon drift toward becoming producers.
- **Mass:** producer tissue slows the cell through the mass model only. The legacy
speed penalty is dropped in the new rules.
- **Light:** constant; there is no day/night cycle and no spatial light. The light
specialists (024/025) are dropped.
## 6. Genome indices and mutations
| Index | Founder | Mutations (mutation plan, section 6) |
| --- | --- | --- |
| Collection per channel (E, C, N, P, O) | 100 each | Carbon, Nitrogen, Phosphorus and Other Matter Gatherer |
| Shared intake limit | 100 | Big Appetite, Small Appetite |
| Burn efficiency per matter channel | 100 each | Carbon, Nitrogen, Phosphorus and Other Matter Metabolism |
| Energy kept per bubble (`energy_conversion`) | 100 | Thorough Extraction, Rapid Extraction |
| Light capture | Absent; 100 when acquired | Acquire, Expand, Reduce and Shed Photosynthesis |
## 7. Tunables
| Setting | Trial |
| --- | --- |
| Founder collection rate per channel | From today's derived limits |
| Shared ingestion limit | Founder ingestion capability |
| Burn rate per channel (pJ per 1,000 fg) | 2,000 |
| Spent-pool drip rate | To be selected in playtesting |
| Carbon burned before photosynthesis is offered | To be selected in playtesting |
## 8. Open questions
None.
## 9. Implementation map
| Piece | State today |
| --- | --- |
| Contact feeding with per-channel limits | Exists; limits derive from one ingestion rate. |
| Collection index per channel | New genome field (new genome schema). |
| Matter paying energy costs | New, in every place an energy cost is charged. |
| Burn order and player exclusions | New per-cell state and a new client control. |
| Region spent pool and drip | New region state; releases bubbles like infall. |
| Reserve matter in mass | New in handling and movement energy; upkeep unchanged. |
| Energy-bubble efficiency from `energy_conversion` | Capability exists; applying it to cellular E intake is new. |
| Carbon-burned count, inherited | New per-cell state. |
| Photosynthesis without the legacy speed penalty | New rules; light capture exists (rules 11+). |
Every new behaviour goes in a new rules version; regions on earlier rules keep their
meaning.
+106
View File
@@ -0,0 +1,106 @@
# Cellular gameplay plan
Status: planning index, 2026-10-22. Tracks every cellular gameplay system, its state,
and the maintainer's decisions. Each system gets its own plan; once all are settled,
the mutation catalog is reworked across them. After the cellular game is finished,
every mutation is reviewed for its effect on the 3D organism.
Plans so far:
- [Cellular_mutation_plan.md](Cellular_mutation_plan.md): what a mutation is, offers,
weights, costs, and the full catalog (49 mutations).
- [Cellular_reproduction_plan.md](Cellular_reproduction_plan.md): budding, mutation
splits, multicellular organisms, emergence.
- [Cellular_feeding_energy_plan.md](Cellular_feeding_energy_plan.md): collection,
matter as energy, the spent pool, photosynthesis.
- [Cellular_predation_defense_plan.md](Cellular_predation_defense_plan.md): engulfment,
what a predator gets, membrane defense.
- [Cellular_body_maintenance_plan.md](Cellular_body_maintenance_plan.md): size, body
recipe, upkeep, density, growth, bud size.
The earlier drafts (feeding, energy/photosynthesis, defense, movement, mutation) are
source material. They were written against superseded policies and are rewritten
into plans rather than merged.
## Systems
| System | Today | Status | Plan |
| --- | --- | --- | --- |
| Movement | Liquid motion with the movement arrangement | Planned | Mutation plan |
| Reproduction and multicellular | Budding into wildlife | Planned | Reproduction plan |
| Collection | One ingestion rate split into per-channel limits; contact feeding | Planned | Feeding and energy plan |
| Energy sources | Energy bubbles; light (rules 11+) | Planned | Feeding and energy plan |
| Engulfment | Instant; attacker mass vs prey mass x membrane | Planned | Predation and defense plan |
| Defense | Membrane thickness | Planned | Predation and defense plan |
| Body and maintenance | Upkeep from mass and membrane | Planned | Body and maintenance plan |
| Temperature | Tuning keys read, unused | **Postponed** | - |
| Sensing and communication | None | **Postponed** | - |
| Multicellular mutations | None | **Postponed** | - |
| Damage and repair | Damage field exists, unused | **Out for now** | - |
## Decisions, 2026-10-22
### Feeding and energy
- **Matter as energy.** When the reserve's energy cannot cover an energy cost, the
cell pays it with reserve matter instead, at a higher rate than pure energy. The
matter is not converted into energy; it stands in for it. A cell dies only when
neither energy nor usable matter can pay. The cell burns the channel it has most of;
the player can exclude channels. Burned matter goes to a region spent pool that drips
back as random bubbles.
- **Separate collection rates per channel** (E, C, N, P, O). More variation between
lives; needs serious tuning.
- **Carried reserve matter counts toward mass** for movement and movement energy, not
upkeep. Hoarding for emergence slows an organism down.
- **No storage caps.**
### Predation and defense
- **Engulfment stays instant** for this pass.
- **Prey recovery:** the predator absorbs up to its per-tick collection limit; half the
remainder becomes bubbles at the prey's spot, half goes to the spent pool.
- **Everyone engulfs**, wildlife included.
- **Membrane** is stored in points (founder 100); thicker membrane also slows
collection.
- **Reserve matter in engulf mass** is a tunable percentage (0% turns it off).
- **Armor is postponed.** Membrane thickness is the defense for now.
- Postponed with live capture: prey retention, slippery coating, adhesive grip,
defensive expulsion, siphoning.
### Photosynthesis
- **Legacy speed penalty dropped** in the new rules. Producer tissue slows a cell
through the mass model only.
- **Light specialists dropped** (024/025): there is no day/night cycle and no spatial
light.
- **Unlock:** offered after burning a tunable amount of carbon as energy; burning
carbon raises its chance, burning other channels lowers it.
### Body and maintenance
- **Size** moves to points; Larger and Smaller follow from mass.
- **Body recipe** (C/N/P/O shares) becomes heritable.
- **Upkeep efficiency** is in, with an essential floor; flexible upkeep is postponed.
- **Density** is kept as an index; all shape traits are dropped.
- **Growth speed** is a trait with a tunable base rate.
- **Bud size** comes from the reproduction capability.
- **Dropped:** storage (031-034), recycling and leakage (039-040), food provisioning.
### Catalog scope
- Mutation deep dive covers the planned systems: movement, feeding and energy,
predation and defense, body and maintenance, reproduction.
- **Draft groups 071-150 are on hold**: colonies and colony architecture, producers and
exchange, environmental adaptation, sensing, metabolic regulation, loss and
simplification, habitat specializations. Sensing and multicellular mutations are
postponed as systems.
## Order
1. Done: system plans for movement, reproduction, feeding and energy, predation and
defense, body and maintenance; the mutation catalog for this pass.
2. Build the plans in phases ([build plan](Cellular_Revamp_Build_Plan.md),
[ADR-0179](docs/adr/0179-cellular-gameplay-revamp.md)), then playtest at the end.
3. Later: temperature, damage and repair, armor, live capture, sensing, multicellular
mutations, draft groups 071-150.
4. After the cellular game: each mutation's effect on the 3D organism.
+718
View File
@@ -0,0 +1,718 @@
# Cellular movement draft
Status: discussion draft, 2026-10-21. This is the focused movement review for
draft mutations 001-010. It documents verified source behavior separately from
planned changes and proposed replacement adaptations. No code, runtime rule,
public contract, live region, or deployment changes are made here. No commit or
push is authorized during the maintainer's draft review.
Companions:
- [Cellular mutation draft](Cellular_mutation_draft.md): overall selection,
expression, reproduction, and the 150-entry catalog index.
- [Cellular region changes](Cellular_Region_Changes.md): procedural currents,
thermal conditions, food disturbance, presentation, and region ownership.
### Maintainer decisions, 2026-10-21
| Topic | Decision |
| --- | --- |
| Scope | 001-010 are the cellular movement mutation options. All ten stay in the first implementation; options that do not fit in play are removed afterwards. |
| Drag and top speed | Accepted: lowering passive drag (008) also raises top speed, because top speed is thrust divided by drag. |
| Precision | Fixed-point motion state, as specified in [Numeric representation](#numeric-representation). |
| Scale | Currents start at 0.3x-1.5x founder swimming speed, so the strongest cannot be swum against. Region size is chosen with founder speed and current speed together. |
| Client prediction | The client runs the same motion step and flow field as the server. |
| Energy exhaustion | Unchanged: a cell that cannot pay maintenance dies and its corpse becomes food bubbles at its death location. Thrust that cannot be funded in a tick is not applied; the cell coasts and drifts. |
| 007 anchor | Player-triggered, like a boat anchor: the anchor drops and the point it hits becomes where the cell stays. It needs no prepared surface. |
| Logout anchor | A lifecycle state ([ADR-0177](docs/adr/0177-cellular-regions-world-linkage.md)), not the 007 mechanic. |
| Offer volume | Edits are percentage-based +/- steps off the fixed base, offered three at a time from a large catalog. No per-axis cap is needed now: extreme movement investment is limited by its own energy cost. |
## 1. How movement currently works
This section describes the inspected repository implementation, not a claim
about which version is currently deployed or how the proposed liquid controls
already feel in play. Test descriptions below refer to inspected test source;
the tests were not executed for this documentation change.
### Authoritative motion and input
The motion API is in
[cellular_motion.hpp](include/evo/biology/cellular_motion.hpp), implemented in
[cellular_motion.cpp](src/biology/cellular_motion.cpp). Its historical design is
[ADR-0102](docs/adr/0102-cellular-spatial-trial.md).
- A tick is 50 ms. The cellular motion resolver accepts per-second budgets and
converts them to that tick duration.
- A movement intention is an X/Y direction-and-magnitude vector. Each component
is between -1000 and 1000, and its squared length cannot exceed 1,000,000.
It does not authorize a client-supplied position or speed.
- Maximum per-tick travel is the current phenotype's movement speed multiplied
by the tick duration, rounded down to integer micrometres.
- Each axis displacement is the intention component times that maximum step,
divided by 1000 with integer truncation. The resulting position is clamped
to keep the square body footprint inside the declared rectangular area.
- The position identifies the lower-left footprint corner. This helper permits
areas up to 1,000,000 micrometres per axis; that bound is not a selected new
region size or a planetary layout.
- There is no stored velocity, acceleration, facing/turn-rate limit, passive
deceleration, coasting, active braking, or local-flow input in this resolver.
Releasing input immediately requests zero displacement. Reversing requests the
other direction on the next tick without an acceleration/braking transition.
- Bounds clamp position; there is no wraparound. The square-footprint contact
helper counts an exact edge touch. It is not a liquid obstacle/pushing solver.
### Current movement energy
The resolver derives a full-speed tick cost from the metabolic budget, rounded
up, then scales it by actual bounded travel. Conceptually:
`movement E = ceil(full-speed tick E * conservative travelled distance / maximum tick distance)`
Travel distance is the integer ceiling of the Euclidean distance between the
old and final clamped position. A zero-distance move costs zero movement E.
This means pressing against the region boundary with no resulting displacement
does not pay an active station-keeping cost under the current model.
The funded helper either transfers the entire movement cost from reserve E to
heat in its detached candidate or refuses the move. It does not apply a reduced
affordable fraction of a requested move. Reserve matter channels are not consumed
by that movement transfer. Basal maintenance remains a separate charge.
The composed step in [cellular_step.cpp](src/biology/cellular_step.cpp) charges
maintenance before movement, then handles applicable intake. Underfunded movement
leaves the cell in place while the step can continue; later food cannot retroactively
fund earlier movement. See
[ADR-0104](docs/adr/0104-cellular-single-life-tick-order.md). Later region/deposit
rules extend feeding and lifecycle behavior; this motion helper is not by itself
the complete ecology, collision, or publication contract.
### Current founder, size, and other traits
The inspected [founder parameters](include/evo/biology/founder.hpp) specify
**200 micrometres/second** movement for an ordinary primitive founder. With no
speed-reducing producer trait, that permits a maximum 10-micrometre step per
50 ms tick. This is an existing tunable, not acceptance of the future founder
speed or proof that the three-minute first-birth target is met.
[Development](src/biology/development.cpp) reads the movement capability as a
speed, not as thrust or a set of acceleration/steering properties. An absent
capability yields zero speed. Ordinary growth-size changes do not independently
scale speed in the inspected derivation. The
[metabolic budget](src/biology/metabolism.cpp) makes full-speed movement demand
depend on total mass and phenotype speed, with versioned integer coefficients
and rounding. Mass and membrane changes can therefore change movement cost
without changing the basic movement-speed parameter.
Under that approximately linear mass-and-speed budget, increasing the speed
parameter raises full-speed E/time but does not independently create a less
efficient E/distance motor, apart from integer rounding. The simple derivation
also does not build extra propulsion tissue merely because movement is acquired
or raised. Real machinery investment and independent efficiency/output properties
are planned extensions, not existing costs to describe as already implemented.
Development version 5 adds photosynthetic organelle mass/upkeep and reduces
movement speed according to the existing producer rule: at efficiency p per
thousand, retained speed is `(1000 - p/2) / 1000`, with integer arithmetic.
See [ADR-0175](docs/adr/0175-photosynthesis-producers.md). This is a versioned
existing coupling, not the new general body-drag model.
[Mutation implementation](src/biology/mutation.cpp) currently offers generic
adjust-up/down/acquire/shed operations over capability records. Schemas 4 and 5
use a step of one tenth of the current parameter, at least one. These are not
the proposed compound movement adaptations below, and their runtime operator IDs
must not be confused with this document's draft IDs.
### Source checks inspected
| Test source | Behavior specified by the existing checks |
| --- | --- |
| [cellular_motion_tests.cpp](tests/cellular_motion_tests.cpp) | Full/partial/diagonal movement, zero input, boundary clamping, invalid vectors, low-speed quantization, funded refusal, heat transfer, and footprint contact. |
| [cellular_step_tests.cpp](tests/cellular_step_tests.cpp) | Maintenance before movement/intake and conservation of the composed candidate. |
| [development_tests.cpp](tests/development_tests.cpp) | Zero speed without capability and unchanged speed under ordinary size changes in the tested derivation. |
| [metabolism_tests.cpp](tests/metabolism_tests.cpp) | Derived movement budgets, founder values, and membrane/mass relationships. |
| [photosynthesis_tests.cpp](tests/photosynthesis_tests.cpp) | Producer tissue costs and the version-5 speed reduction. |
| [mutation_tests.cpp](tests/mutation_tests.cpp) | Versioned capability operations, prerequisites, and mutation adjustment behavior. |
These existing checks are useful baselines; they do not validate liquid flows,
propulsion controls, thermal changes, or the proposed ten movement adaptations.
## 2. Planned movement model
### Liquid-relative propulsion and world travel
Cells propel themselves through liquid while procedural currents carry both
cells and loose food. The region design specifies 2-n currents with individual
directions/speeds, possible intersections, quiet areas, and circulating routes.
The bounded maximum n, flow combinations, and speed ranges remain trial values.
`world velocity = local liquid velocity + swimming velocity relative to liquid`
This is a conceptual decomposition, not a finalized integrator or repeated
unbounded acceleration. At comparable propulsion output, travelling with flow
increases world progress, travelling against it decreases progress, and zero
ambient flow gives ordinary swimming for the current body/conditions. Cross-flow
deflects travel; a strong current can prevent upstream progress.
Do not apply an additional same-direction speed bonus after adding current.
Passive drift does not consume propulsion E, but ordinary maintenance and any
thermal survival cost continue. A cell drifting beside a bubble at the same speed
still needs relative motion or useful contact to collect it.
### Acceleration, slowing, and controls
| Behavior | Planned response | Resource consequence |
| --- | --- | --- |
| Propel | Accelerate relative to liquid toward the requested direction within available output/steering limits. | Fund actual output; extra machinery can have construction/upkeep costs. |
| Release propulsion | Passive resistance reduces relative swimming velocity; world drift can continue. | No active propulsion expenditure; dissipation does not refill usable E. |
| Brake/reverse | Opposing propulsion changes swimming velocity faster than passive slowing alone. | Fund actual braking/reverse output. |
| Hold world position | Counter local flow rather than treating no input as a free stop. | Sustained funded output while resisting current. |
| Anchor (007) | Player drops the anchor; the cell holds at the point it hits until released. | Anchor construction, drop/release, and any supported maintenance costs. |
| Move an attached group | Useful member propulsion moves the whole arrangement against its combined resistance/load. | No free member-count speed multiplier or duplicate charging of shared work. |
Start founders with responsive handling. Exact controls for automatic/manual
braking, reverse thrust, turning at speed, and steering assistance remain open.
Do not impose long uncontrollable coasting just to demonstrate acceleration.
Passive deceleration has a two-sided consequence: stronger slowing improves
precise stops but sacrifices coasting; weaker slowing preserves motion but makes
overshooting more likely. Active braking can address that weakness, at its actual
machinery/output cost. Stopping relative to liquid is not stopping relative to
the region.
### Numeric representation
Biology stays integer-only and deterministic; server and client run the same code.
| State | Representation | Notes |
| --- | --- | --- |
| Position | Existing integer micrometres plus a per-cell sub-micrometre accumulator. | Public position and contact keep whole micrometres. |
| Velocity relative to liquid | Signed 32-bit, 1/1024 micrometre per second (Q10). | About 1 nm/s resolution; far beyond any trial speed range. |
| Heading | Unsigned 16-bit angle, 65,536 steps per turn. | Turn rate limits heading change per tick. |
| Direction vectors | Checked-in integer sine/cosine table (Q14). | Golden-tested; no floating point or platform math. |
| Flow sample | Q10 velocity grid at a fixed pitch, bilinear integer interpolation. | Rounds toward zero; seeded and versioned. |
Per tick:
1. Turn: move heading toward the intent direction by at most the turn rate.
2. Thrust: add funded acceleration along heading (reverse thrust for braking).
3. Drag: `v -= trunc(v * drag_ppm_per_tick / 1,000,000)`, rounding toward zero so
speed decays to exactly zero; a speed below a small threshold snaps to zero.
4. World velocity: add the flow sample at the cell's position.
5. Displacement: `acc += v_world * tick_us`; whole micrometres are
`floor(acc / (1024 * 1,000,000))`, carried into position, with the remainder kept
in `acc`. There is no rounding drift across ticks.
6. Contact: sweep the path against food and cells, subdividing so no step exceeds
half the smallest contact radius, with a fixed per-tick work bound.
All arithmetic is 64-bit with overflow checks. The motion state (velocity,
heading, accumulator) is persisted with the cell so restore and replay continue
exactly.
### Derive one profile from the current organism
Use propulsion capacity, efficiency, steering arrangement, body shape, mass,
and resistance as contributors. Derive a consistent resulting movement profile.
Do not independently assign unrelated percentage changes to every output merely
to manufacture a pro/con pair.
| Displayed comparison | Definition | Founder reference |
| --- | --- | --- |
| Maximum swimming speed | Supported speed relative to liquid under reference conditions. | 100%. |
| Propulsion energy cost | E/distance at a stated reference speed; also show E/time at actual output when useful. | 100%; lower is cheaper. |
| Acceleration | Rate of increasing relative swimming velocity. | 100%. |
| Passive deceleration | Rate of losing swimming velocity without propulsion. | 100%; faster stopping also reduces coasting. |
| Active braking | Available opposing propulsion response. | 100% for ordinary supported founder braking, not possession of specialized 006 machinery. |
| Turning control | Ability/rate to redirect movement at a stated reference speed. | 100%. |
Percentages compare against a fixed founder at stated body/growth/environment
conditions; they do not reset after every mutation. Store actual quantities and
derive the display. An absent burst or anchor is absent, not 100%. Every fresh
primitive life has the same baseline biology regardless of account age.
The future founder's absolute values and mutation magnitudes require playtesting.
The numeric trial map below supplies starting steps for review, not qualified
balance. Do not automatically carry forward the existing 200-micrometre/second
speed or generic ten-percent mutation step as a selected propulsion rule.
Keep previews at matched conditions, then explain actual newborn size, reserves,
flow, and temperature separately. Thermal cost uses current cell, preferred cell,
and environment temperatures as recorded in the region draft; it is not an
automatic multiplier on every movement cost.
### Combining one to many adaptations
Mutation changes the current body/offspring plan. The history remains an archive,
not a stack of named buff cards applied indefinitely.
| Combination | Useful resulting strategy | Cost or limit that remains |
| --- | --- | --- |
| 001 strong propulsion + 004 agile steering | Fast, responsive interception. | Actual machinery, operating demand, and capacity allocation. |
| 002 economical propulsion + 005 straight swimmer | Efficient sustained directional travel. | Reduced pursuit output and close turning. |
| 006 active braking + 008 coasting-biased body | Coast between targets, then brake deliberately. | Dedicated brake structure/output; overshooting if braking is delayed or unfunded. |
| 001 strong + 002 economical propulsion | Potentially a balanced power/economy design. | Valid only if output and efficiency are genuinely separate properties; opposite edits to one property are not two permanent bonuses. |
| 004 agile steering + 005 straight swimmer | Intermediate or mixed arrangement. | Recalculate one body geometry; do not keep mutually contradictory shape bonuses. |
| 009 shed propulsion + a supported propelling group | Nonpropelling specialist carried by others. | Donors supply force; group still carries its mass and needs viable material/E supply. |
Resistance is counted once. In particular, 005 changes directional streamlining
and 008 changes passive/coasting response; if the chosen body model cannot express
them as distinct changes, merge/revise them rather than applying the same drag
reduction twice. Bound changes, reject no-op candidates, and preview the complete
combined outcome and construction requirements.
### Frequent offers and percentage-step convention
The maintainer wants frequent opportunities to tweak the organism while playing.
Propose a small-tuning offer approximately every **20-30 seconds of productive
active play**, including an early first offer in that range, rather than the
earlier 60-90-second interval. These timing values are trial targets, not a
wall-clock entitlement or a selected activity-credit formula. Do not gate basic
reproduction on getting any particular offer.
Keep one pending offer rather than an accumulating queue of forced menus. Existing
earned opportunities remain available; no immediate free reroll follows a decline.
The first three minutes could therefore contain several small plan decisions
without demanding a separate division for every decision. Structural changes still
develop through funded offspring. Evolve now requires a viable division/succession;
Prepare offspring can accumulate edits to the next plan. Frequent offers do not
authorize free live reconstruction or automatic mutation of an offline cell.
For the initial movement experiment, use **percentage points of a fixed reference**
for parameter edits, not a percentage of the current value:
- An ordinary tuning step adds or removes 5 reference points on its primary axis.
- A paired specialization tradeoff initially moves 2 reference points on the
specified competing axis, where the proposed tissue arrangement supports it.
- 100 -> 105 -> 110 is two +5-point edits. It is not 100 -> 105 -> 110.25.
- These are changes to underlying normalized parameters, not promises that every
derived final speed/acceleration value changes by those same points.
- No amount or step may bypass a parameter's physical/recipe bounds. Reject or
clearly preview a bounded partial step; never advertise a full change then silently
truncate it. Bounds and rounding remain to be specified before implementation.
- Acquisition and complete shedding are structural cases, not a +5/-5 edit to
an absent trait. They need a real developed module/removal and explicit funding.
The same reference remains valid across successive mutations and one-way succession.
Compare equal body/environment conditions; temporary low reserves, small newborn
size, flow, thermal stress, and damage do not redefine inherited parameter values.
### Initial numeric map for movement adaptations
This is a **proposed first trial matrix**. Each row names an underlying arrangement,
its primary improvement, and its competing change. Values do not create independent
RPG buffs: development must realize the arrangement with actual tissue, supported
geometry, costs, and a consistent movement model. If the proposed pair cannot be
realized meaningfully, revise it instead of inventing a flat penalty.
| ID | Primary parameter and proposed change per tuning selection | Competing change or numeric consequence | Meaning of a positive direction |
| --- | --- | --- | --- |
| 001 | Propulsion-output capacity +5 points. | Propulsion-efficiency index -2 points for the proposed high-output arrangement; additional tissue funded where needed. | More available useful output. |
| 002 | Propulsion-efficiency index +5 points. | Propulsion-output capacity -2 points in the economical arrangement. | More useful propulsion work per E, not a higher displayed E cost. |
| 003 | Burst-output capacity +5 points after acquisition. | Sustained-output allocation -2 points at comparable investment; actual burst E is spent and replenished. | More supported short-term output. |
| 004 | Steering-authority allocation +5 points. | Forward-output allocation -2 points at comparable investment. | More useful redirection authority. |
| 005 | Axial streamlining index +5 points. | Steering-authority allocation -2 points for that directional arrangement. | Less resistance along the chosen body axis. |
| 006 | Opposing/braking-output allocation +5 points beyond ordinary supported braking. | Forward-output allocation -2 points at comparable investment; active braking still spends E. | More supported opposing output. |
| 007 | Anchor holding capacity +5 points after acquisition. | Holding-tissue investment +5% of its reference module recipe; no arbitrary whole-body speed penalty. | More supported attachment load. |
| 008 | Coasting-response time index +5 points. | Passive slowing rate changes reciprocally in the candidate response model: 100/105 of baseline at index 105, about 95.24%. No second drag debit. | Longer preservation of swimming velocity, with slower passive stops. |
| 009 | Remove independent propulsion: its available output becomes 0. | Avoid that module's future construction/upkeep, not 100% of total maintenance; lose independent swimming/braking. | Reacquisition is a separate funded positive change, not +5 to an absent motor. |
| 010 | Dedicated colony-drive capacity +5 points after acquisition. | Dedicated propulsion-tissue investment +5% of its reference module recipe; extra mass and donor operating costs are derived. | More useful group-driving capacity. |
The paired 5/2 values are deliberately modest starting proposals for frequent
offers. Construction, upkeep, drag, total mass, final speed, and E/time are derived
from the resulting recipe; they are not also assigned all the table's percentages.
Efficiency is normalized useful work per E, with a physically valid actual range;
an index above 100 does not mean conversion efficiency above 100%.
For a module absent in the founder, a provisional acquisition reference of 100
means the performance of its explicit first module recipe, not that the founder
already owns it. Its initial construction and any displacement of other tissue
must be previewed; acquisition does not provide free mass. Repeated 007/010 scaling
uses that same module reference, without increasing all whole-body costs by 5%.
The initial burst recipe/capacity, anchor recipe, and colony-drive recipe still need
definition before those acquisition options can be offered.
For 008, reciprocal slowing is one candidate lumped response: increasing a decay
time by 5% reduces the corresponding decay rate to approximately 95.24%, not 95%.
This illustrates why coasting and passive deceleration cannot be assigned unrelated
percentages. It does not select the full velocity integrator or add usable E.
Example of composable edits: starting at output 100 and efficiency 100, one 001
selection proposes output 105 / efficiency 98. A subsequent 002 selection would
produce output 103 / efficiency 103 before bounds and physical derivation. This
does not erase the funded machinery or any construction/upkeep its final recipe
requires. Show the complete combined result, not only the primary green number.
### Decreasing a movement trait
A supported lower-investment variant should also have a reason to choose it.
Use the following inverse steps as trial proposals, without creating another ten
catalog IDs. They are directional variants of the reviewed adaptations, not a
requirement to offer every inverse in every context.
| ID | Proposed lower-primary variant | Benefit in return | Lost capacity |
| --- | --- | --- | --- |
| 001 | Output capacity -5 points. | Efficiency index +2 points in the inverse arrangement. | Maximum useful output. |
| 002 | Efficiency index -5 points. | Output capacity +2 points in the higher-throughput arrangement. | Work obtained per E. |
| 003 | Burst capacity -5 points. | Sustained-output allocation +2 points. | Short escape/interception output. |
| 004 | Steering authority -5 points. | Forward-output allocation +2 points. | Close maneuvering. |
| 005 | Axial streamlining -5 points. | Steering authority +2 points in the less directional arrangement. | Long-axis swimming economy. |
| 006 | Braking allocation -5 points. | Forward-output allocation +2 points. | Rapid stopping/reversal. |
| 007 | Anchor holding capacity -5 points, within a viable module. | Holding-tissue recipe investment -5% of reference. | Maximum supported attachment load. |
| 008 | Coasting-response time -5 points. | Faster passive stopping; at index 95 the candidate slowing rate is 100/95 of baseline, about 105.26%. | Preserved motion between propulsion intervals. |
| 009 | Full shedding is already the loss direction. | Avoid future propulsion-module investment. | All independent propulsion; restoration needs an explicit viable reacquisition recipe. |
| 010 | Dedicated group-drive capacity -5 points, within a viable module. | Dedicated propulsion-tissue investment -5% of reference. | Supported group-driving output. |
Inverse edits affect the next developed recipe; they do not refund the unchanged
parent's existing tissue. Partial reduction cannot cross a capability's minimum
supported recipe or accidentally become complete removal. A lower-primary variant
must have the stated benefit in the physical model; otherwise exclude it rather
than offering a plain detrimental decrease.
### Below-baseline traits and positive-offer weighting
The maintainer's direction is that **the further into the negative a trait goes,
the less likely a positive mutation for that trait should be offered**. Interpret
this draft's negative position as a net reduction of the relevant inherited
capacity/investment index below its fixed 100 reference. "Positive" here means
increasing that option's named primary axis, not a mutation with no drawbacks.
For example, output 70 is -30 reference points; output 90 is -10. Merely falling
from output 150 to 120 is not yet below the founder baseline.
Use the primary underlying axis rather than the color/sign of every displayed
result. Lower E/distance can be an improvement: an economical motor must not be
classified as genetically negative merely because its displayed energy cost is
80%. Coasting likewise has a useful positive axis and a stopping disadvantage.
Propose a persistent **recovery weight factor** for a positive movement candidate:
`recovery = max(0.10, (index / 100)^2)` when `0 <= index < 100`; otherwise `1`.
| Inherited primary index | Offset from reference | Relative weight for its positive-direction candidate |
| --- | --- | --- |
| 100 or higher | At/above reference. | 100% of otherwise applicable weight. |
| 95 | -5 points. | 90.25%. |
| 90 | -10 points. | 81%. |
| 80 | -20 points. | 64%. |
| 70 | -30 points. | 49%. |
| 60 | -40 points. | 36%. |
| 50 | -50 points. | 25%. |
| 40 | -60 points. | 16%. |
| 30 or lower | -70 points or more. | 10% floor. |
These are **relative sampling weights, not the probability of seeing an option
in a whole offer**. Actual appearance depends on all eligible candidates, their
weights, the number of slots, and sampling without replacement. If there are only
three eligible candidates and three slots, all three appear regardless of weights;
do not present the table as an appearance guarantee in that situation.
Apply the factor to that candidate's primary beneficial axis after checking hard
eligibility and alongside the master draft's behavior/context/preference weights.
Do not suppress every positive movement candidate because one trait is low.
Its paired drawback is not a second multiplicative suppression. Net inherited
reductions count regardless of which adaptation produced them, not the number
of historical "negative clicks". Do not impose an extra probability reduction
merely for being above 100; any upper-bound or advanced-body rule needs separate review.
The factor follows the inherited plan through succession and changes when the
underlying index changes; it does not expire after several offers. This differs
from transient decline preferences, which still decay. It applies to mutation
opportunities for the offspring plan, not temporary performance lost to current,
temperature, energy starvation, growth, or damage.
Complete loss requires a distinct acquisition option. First acquisition of a
capability the founder never had is not automatically penalized as a below-baseline
defect. Reacquiring a deliberately shed propulsion module can use the proposed
10% floor, subject to a viable supported recipe; no requirement to swim first may
make a nonpropelling lineage permanently ineligible. Ordinary and alternate viable
strategies must remain available. This does not guarantee a recovery option on
the next offer, reset a body, refund its costs, or grant a free reroll.
Both the quadratic shape and 10% floor are initial tuning proposals, not accepted
probabilities. The intended consequence is commitment that becomes harder to
reverse, without a permanent hidden class lock. Preview that consequence alongside
large reductions and removal. Frequent offers are important here: a low recovery
weight must not produce an unusable session-length wait or invalidate the overall
30-60-minute cellular pacing target. Measure the long tail, not only average draws.
## 3. Revised movement mutations 001-010
These ten draft entries are **proposals for review**, not ten approved mechanics
or mandatory movement unlocks. Changes to 006 and 008 below are proposed replacements
for options that lacked a distinct movement purpose. The numeric matrix above
provides trial percentage steps; no price, final derived movement equation, or
qualified balance is selected. IDs are discussion references, not runtime operator IDs.
| ID | Movement candidate | Review disposition |
| --- | --- | --- |
| 001 | Strong propulsion | Core candidate; increases available output with real costs. |
| 002 | Economical propulsion | Core candidate; economy versus peak output. |
| 003 | Burst propulsion | Conditional on a funded, bounded burst mechanism. |
| 004 | Agile steering | Core candidate; steering allocation versus forward output. |
| 005 | Straight swimmer | Core candidate; directional streamlining versus maneuverability. |
| 006 | Active braking propulsion | Proposed replacement for Current sail. |
| 007 | Anchor | Core candidate; player-triggered, holds the cell where the anchor hits. |
| 008 | Coasting-biased body | Proposed movement replacement for Food-gradient sensing. |
| 009 | Shed independent propulsion | Only for an actually supported stationary/carried role. |
| 010 | Specialized colony propulsion | Only if it adds machinery beyond ordinary member propulsion. |
### Tentative visual indicators
The maintainer proposed the following starting ideas for recognizing movement
adaptations on the cell. They are **visual concepts for review, not strong shape
definitions, accepted anatomy, or proof of a particular movement equation**.
"Limbs" here means visible cellular appendages; it does not require macroscopic
limbs or introduce a fixed species/body class.
| ID | Initial visual idea | Intended readability |
| --- | --- | --- |
| 001 | More limbs, thicker limbs, or a combination. | A visibly stronger propulsion arrangement. |
| 002 | Longer limbs. | A distinct economical-propulsion form. |
| 003 | Shorter limbs. | A distinct burst-propulsion form. |
| 004 | Additional limbs along the cell's sides. | More lateral steering structures. |
| 005 | Small limbs at the cell's front. | A recognizable forward-oriented arrangement. |
| 006 | A hook-shaped limb at the back. | A recognizable braking/reversing structure. |
Front, back, and sides refer to the cell's body orientation, not compass direction
or the current's flow direction. Visuals for 007-010 remain open; do not fill them
with arbitrary anatomy just to complete the table.
Frequent percentage steps should produce readable gradual changes where practical;
each +5-point selection does not have to add a whole limb. Continuous thickness,
length, or arrangement changes and later count thresholds are possible approaches,
not selected rules. Preview the difference at useful viewing scale without promising
an exact one-to-one mapping from a numeric point to an appendage.
When adaptations combine, render one coherent resulting body. In particular, 002's
longer-limb idea and 003's shorter-limb idea need a combined design: perhaps different
appendage roles or a resulting intermediate arrangement. Neither approach is selected
here. Opposing edits must not leave contradictory cosmetic layers or continually
accumulate disconnected limbs.
Tie any eventual physical appendage choice to the developed body's actual capacity,
mass, and construction recipe. These concept sketches do not add a new fee or assert
that the proposed shapes already provide their intended mechanical advantages.
Structural changes appear on the offspring that develops them, including immediate
succession's new organism; an unchanged parent keeps its existing appearance.
Apply the same biological visual rules to NPCs and players, with a before/after
preview for the player considering a mutation.
### 001: Strong propulsion
- **Mechanism:** enlarge/support propulsion machinery to increase usable output.
Speed, acceleration, braking, body load, and E demand follow from that body.
- **Reason to choose:** cross currents, intercept food/prey, or escape faster.
- **Drawback:** additional construction/upkeep and greater E demand when high
output is used. Slow travel does not always pay maximum operating cost.
- **Available when:** enlargement changes actual capacity and its physical costs
are modeled; no fixed number of prior movement mutations is required.
- **Increases chance:** productive long routes, relevant pursuits, useful current
crossings where output is limiting.
- **Decreases chance:** reliable local feeding, little propulsion use, or construction
already being the dominant shortage.
### 002: Economical propulsion
- **Mechanism:** configure machinery for efficient sustained swimming at lower
maximum output; explicitly define efficiency rather than granting a flat discount.
- **Reason to choose:** reach more food per unit of propulsion E and sustain routes.
- **Drawback:** weaker pursuit, rapid escape, and upstream performance.
- **Available when:** output/efficiency tradeoff actually works. It does not require
first becoming inefficient or approaching starvation.
- **Increases chance:** propulsion consumes a large share of acquired E during useful
travel; repeated ordinary routes do not need maximum output.
- **Decreases chance:** repeated peak-output pursuits or necessary strong-current
crossings; abundant E makes economy less useful.
### 003: Burst propulsion
- **Mechanism:** support a short high-output interval using a defined reserve and
machinery capacity. Recovery means funded replenishment, not free timed refilling.
- **Reason to choose:** briefly escape a current/predator or intercept a moving cluster.
- **Drawback:** burst machinery occupies tissue/resources and high output drains the
available reserve rapidly; lower sustained performance than a sustained-output
arrangement at comparable construction investment.
- **Available when:** the burst capacity, cost, exhaustion, and replenishment work.
- **Increases chance:** short useful escapes/interceptions where ordinary output
falls short; observed opportunities, not deliberate repeated failed input.
- **Decreases chance:** long uninterrupted swimming or lack of E to replenish bursts.
### 004: Agile steering
- **Mechanism:** allocate more machinery/geometry to redirecting useful propulsion.
- **Reason to choose:** navigate current intersections, track drifting food, and
change course around supported obstacles or organisms.
- **Drawback:** at comparable investment, less machinery is available for sustained
forward propulsion. Turning is not an independent free speed multiplier.
- **Available when:** heading/force redirection has real movement consequences.
- **Increases chance:** frequent productive turns and close interceptions.
- **Decreases chance:** mainly straight travel with little need to redirect.
### 005: Straight swimmer
- **Mechanism:** streamline geometry/propulsion along the main travel axis.
- **Reason to choose:** reduce directional resistance on long routes.
- **Drawback:** poorer tight turning or lateral maneuvering; route commitment matters.
- **Available when:** direction-dependent geometry/resistance and turning work.
- **Increases chance:** sustained directional foraging, pursuit, or useful current routes.
- **Decreases chance:** dense turning/interception demands and frequent route reversal.
- **Combination note:** ordinary drift is already free of propulsion expenditure;
this must improve relative swimming, not duplicate a with-flow bonus.
### 006: Active braking propulsion
- **Mechanism:** allocate machinery to useful opposing/reverse output beyond the
founder's ordinary braking capacity. It changes relative velocity, not ambient flow.
- **Reason to choose:** stop near food, recover from overshooting, and reverse swimming
quickly without waiting for passive slowing.
- **Drawback:** additional or reallocated machinery reduces another capacity at matched
investment, and using stronger braking consumes E. The exact forward-output versus
construction tradeoff must be selected and measured before offering it.
- **Available when:** active braking works and improved capacity changes outcomes.
- **Increases chance:** productive routes with repeated stopping/reversal demands or
overshooting despite useful collection opportunities.
- **Decreases chance:** long uninterrupted travel, sufficient ordinary braking, or a
viable anchored strategy that seldom moves.
- **Restriction:** braking to zero relative speed leaves world drift; it is not free
station keeping. Current sail is archived below, not quietly treated as approved.
### 007: Anchor
- **Mechanism:** the player triggers the anchor, like dropping a boat anchor. The
point it hits becomes the location the cell holds until the player releases it.
No prepared surface is required.
- **Reason to choose:** stay at a productive fixed site without continuously swimming
against the current.
- **Drawback:** anchor construction investment, and the cell cannot travel while
anchored; release is needed before independent movement. Excessive loads can
exceed supported holding capacity.
- **Available when:** currents exist so that holding position has value.
- **Increases chance:** costly station keeping or repeated drifting away from useful sites.
- **Decreases chance:** frequent relocation or still liquid.
- **Distinct from logout:** the logout anchor is a lifecycle state (ADR-0177), not 007.
### 008: Coasting-biased body
- **Mechanism:** reduce passive slowing through a supported body-resistance arrangement.
Recalculate the whole profile; do not grant free extra momentum or a second drag bonus.
- **Reason to choose:** preserve relative travel between propulsion intervals.
- **Drawback:** slower passive stopping and more overshooting; precise stops may require
paid braking. It must differ meaningfully from 005 or the two candidates should merge.
Lower drag also raises top speed (accepted); 005 lowers forward drag only.
- **Available when:** relative velocity/passive resistance are modeled and changing
them has a demonstrable control/energy tradeoff.
- **Increases chance:** productive long, open travel with useful propulsion-release intervals.
- **Decreases chance:** frequent precise stops, short crowded routes, or repeated uncontrolled
overshooting without enough braking capacity.
- **Classification:** this is a proposed replacement movement entry; the former food
sensor remains a sensing review item, not a forgotten adaptation.
### 009: Shed independent propulsion
- **Mechanism:** future offspring omit independent propulsion machinery and its actual
construction/upkeep. Their bodies/reserves still exist and require maintenance.
- **Reason to choose:** devote resources to feeding, production, or another supported
role while stationary or carried by propelling colony members.
- **Drawback:** no independent swimming, propulsion braking, or escape. Passive drift
remains; being carried is not the ability to choose a new position independently.
- **Available when:** propulsion exists and a demonstrated stationary E/material supply
or supported carried role makes the resulting offspring viable. Exclude unsupported
solitary founders; photosynthesis alone does not supply C/N/P/O.
- **Increases chance:** reliable support, useful specialization, and little independent
propulsion use.
- **Decreases chance:** independent foraging, uncertain transport, depleting local food,
or temperature changes requiring relocation.
- **Restriction:** 010 is not a required partner unlock. Ordinary propelled neighbors
can provide transport where attachment mechanics support it.
### 010: Specialized colony propulsion
- **Mechanism:** add dedicated group-propelling machinery beyond ordinary attached
member contributions; specify what new capacity the tissue actually provides.
- **Reason to choose:** move useful attached mass that ordinary member output struggles
to carry, including supported nonpropelling specialists.
- **Drawback:** propulsion roles spend E moving other members, occupy material, and
sacrifice feeding/other functional capacity. More tissue still adds load.
- **Available when:** attached motion/load and differentiated machinery work, with a
distinct benefit. Neither shedding movement nor an arbitrary large colony is a
prerequisite; required group/body geometry must follow the actual mechanism.
- **Increases chance:** useful growing groups with a measured propulsion shortfall.
- **Decreases chance:** solitary life, adequate ordinary member output, or insufficient
feeding/transport support for a dedicated role.
- **Restriction:** ordinary colony movement is baseline attachment behavior, not gated
by 010. Coordination/polarity belongs to catalog 078 unless a clearly distinct
mechanism justifies both; do not charge twice for the same improvement.
### Reclassified and archived concepts
| Previous draft entry | Disposition in this review |
| --- | --- |
| 006 Current sail | On hold: ordinary cells/bubbles already drift. Reconsider only if it adds a distinct supported benefit and drawback. It is not accepted merely because currents now exist. |
| 008 Food-gradient sensing | Reclassified as sensing, retained here as an archived concept pending that category's review. No new catalog ID is assigned, and it is not a propulsion modifier. |
Basic cellular visual cues, including the current/thermal environment, are already
promised to every player in the region draft. A future food sensor must add useful
information beyond those cues within a defined perception model. Do not reintroduce
it just to refill a movement slot. The master catalog retains 150 indexed entries;
archived concepts are not additional approved mutations or runtime IDs.
## 4. Food, temperature, reproduction, and colony integration
- Loose food follows flow. Passing cells also induce short-lived food drift with
spatial falloff and temporal decay, as recorded in the region draft. The driving
velocity, influence radius, multiple-cell combination, and work budget remain open.
- Food collection does not automatically slow the cell. High-speed crossing needs
conservative contact detection so neither food nor organisms are skipped.
- Existing food identities and E/C/N/P/O remain finite while moving; circulating,
disturbed, or visually clustered food does not duplicate stock.
- Temperature contributes to survival E use through the region draft's three-temperature
model. Cold/heat adaptations can affect handling/support, but do not automatically
change movement stats without a defined coupling.
- Evolve now versus Prepare offspring follows the master mutation draft. Structural
propulsion/body changes develop in offspring; current-cell experience uses funded
division and immediate one-way succession, not free parent reconstruction.
- Offspring size/reserves influence actual load, capacity, and survival. A fixed-founder
percentage preview must not promise that a newly divided small body performs exactly
like a reference adult.
- The first birth must not require a movement mutation, a colony unlock, or a specific
random draw. Useful movement and flow routes must support the three-minute target.
- NPCs and players obey the same movement/resource rules. Offline controlled organisms
do not acquire passive drift, feeding, mutations, or thermal catch-up. After the logout
delay the cell is anchored, protected, and frozen (ADR-0177); it resumes with its
frozen velocity and heading.
## 5. Implementation boundaries and future verification
This is documentation, not authorization to implement these systems during review.
The new profile changes the current public motion/state model. Before code changes,
define versions, units, ranges, rounding, tick order, source/work accounting, contact,
perception, replay, persistence, migration, and lifecycle semantics. Do not silently
reinterpret earlier speed-only genomes, motion traces, or founder baselines.
Keep headless biology/world logic independent of graphics, transport, databases,
and Kubernetes. Client interpolation is presentation, not authority over motion.
No fluid dependency, placeholder service, or World0 operation is introduced here.
Later checks must cover:
- No-flow, with-flow, against-flow, cross-flow, intersections, and entry/exit behavior.
- Propulsion output costs, passive slowing, active braking, and funded station keeping.
- Combined body arrangements, directional drag, limits, no-op rejection, and fair previews.
- Exhausted E, zero propulsion, anchored roles, attachment release, and ordinary group load.
- Food contact at speed, passing-cell disturbance, finite stock, and stable contention.
- Deterministic continuation through restore, retry, and differently partitioned batches.
- Valid references/IDs and shared NPC/player biological presentation.
- Playtested founder handling, active feeding, first-birth time, and useful mutation tradeoffs.
- Frequent small-step offers, fixed-reference arithmetic, paired body allocation,
below-baseline recovery weights, and viable reacquisition after loss.
- Recovery-offer tail times across extreme specialization without making reversal
guaranteed or trapping ordinary active players beyond the intended stage length.
Unselected balancing choices include the founder's future absolute quantities,
output-cost curve, braking controls, limits on mutation effects, exact recipes,
005/008 distinctness, 006's machinery tradeoff, and 010's extra group machinery.
All must be concrete before candidates become implemented offers. The trial 5/2-point
matrix, module scaling, 20-30-second cadence, and quadratic recovery factor also
require review and measured balancing; documenting them does not qualify them.
Document checks for this segment verify source/reference targets, ten unique
movement draft IDs, consistent master-index links, unchanged 011-150 entries,
and Markdown/whitespace structure. They do not claim executed C++ tests or
qualified movement/flow behavior.
+694
View File
@@ -0,0 +1,694 @@
# Cellular mutation draft
Status: discussion draft, 2026-10-21. No runtime rules, public contracts, schemas,
live regions, or implementation milestones are changed by this document.
## Purpose and authority
Design a cellular opening about reproduction, ecological consequences, and early
colonies. Solitary bubble collection must quickly lead to something new to do.
This catalog contains **150 candidate adaptations**, not 150 features required
for the first playable release. Every option needs a reason to choose it, a real
drawback, and understandable conditions for appearing.
The maintainer's pacing direction from the discussion is:
- First funded bud within about **three minutes of active, purposeful play**.
- Several births quickly establish visible life around the player.
- Around **five successful buds**, attachment/colony opportunities become much
more likely. Five is a proposed tuning point, not an accepted hard unlock.
- A player pursuing progression should have an opportunity to move beyond
solitary cellular play in about **30 minutes**, with roughly **one hour** as
the outer target rather than an enforced waiting period.
- Remaining unicellular can be viable. No mandatory species class, intelligence
endpoint, or fixed cell-to-animal ladder is introduced.
The catalog, numeric offer tuning, eligibility details, and bad-luck protection
below remain proposals. They must not silently become accepted game rules.
Read this draft alongside:
- [Project vision](docs/PROJECT_VISION.md).
- [Genome and development model](docs/biology/GENOME_MODEL.md).
- [Energy and matter accounting](docs/biology/ENERGY_MODEL.md).
- [Behavior-weighted evolution and colonies proposal](docs/adr/0135-behaviour-driven-evolution-and-colonies.md).
- [Structural inheritance and succession](docs/adr/0163-structural-inheritance-and-offspring-succession.md).
- [Retained offspring plans](docs/adr/0165-retained-cellular-offspring-plans.md).
- [Environmental ownership and compartments](docs/adr/0172-cellular-environment-ownership.md).
- [Photosynthesis producers](docs/adr/0175-photosynthesis-producers.md).
The existing colony proposal contains historical provisional rules and policy
choices. Linking it does not adopt its colony ownership, death, logout, or
coalescence details. Those need reconciliation with later accepted requirements.
## Mutation costs and expression
Recommended starting policy: **no separate resource fee to select a mutation**.
Earned opportunities create choices; actually building a changed organism spends
resources. This is consistent with the offspring-plan selection mode described
in ADR-0165, not a claim that every historical mutation mode already works so.
Separate four kinds of cost:
| Cost | Meaning |
| --- | --- |
| Construction | Energy, C, N, P, and Other Matter transferred into actual tissue at development/birth. |
| Operation | Energy and any substrates consumed while a capability operates. |
| Maintenance | Upkeep of tissue that actually exists; do not invent upkeep for an unexpressed plan. |
| Specialization | Physical capacity, performance, habitat access, or independence surrendered elsewhere. |
A drawback must arise from a specified mechanism. Do not charge every mutation
an arbitrary flat energy penalty. A resource-poor organism can select an expensive
offspring plan without being able to build it immediately; show the additional
requirements and permit revising the plan through subsequent earned choices.
Do not make the three-minute first bud depend on acquiring a particular mutation.
Structural changes affect future offspring, not the parent's existing anatomy.
Removing a structure avoids building it in future offspring; it does not refund
the parent's current body. Live physiological adjustment, damage, and ordinary
growth need separate expression classifications. Birth-time succession remains
one-way; nothing here grants possession of independent relatives or rescue after
death. New autonomous NPC mutations are outside this draft's authorization.
## Two mutation routes: evolve now or prepare offspring
Discussion addition, 2026-10-21: offer two ways to commit an earned adaptation.
The current-cell route gives immediate experience at the cost of dividing now;
the offspring route lets the player observe a genetic direction before committing
their controlled organism to it. This section records design intent and a proposed
resolution through offspring succession, not implemented reproduction rules.
| | Evolve now (current-cell experience) | Prepare offspring |
| --- | --- | --- |
| Trigger | Select the adaptation and perform a viable funded division now. | Select a heritable plan, then choose when to reproduce. |
| Player control | Continue immediately as the newly developed mutated offspring. | Keep playing the unchanged parent; a newborn can become the controlled organism at a later birth. |
| Main benefit | Immediate experience of the adaptation, with another organism added to the habitat. | Observe autonomous offspring and evaluate whether that genetic direction suits the habitat. |
| Main drawback | Commit to a smaller organism with fewer reserves and the adaptation's consequences immediately. | No immediate experience of the changed body; gather, reproduce, and evaluate before transferring control. |
| Body and reserves | Start from roughly half the dividing organism's mass and resources, subject to viable allocation and actual development costs. | Transfer the funded offspring investment when reproduction is initiated; retain the parent's remaining body and reserves. |
| Changing direction | Earn another suitable adaptation to shed, replace, or counter the trait; fund another viable development event. | Revise the future-offspring plan through subsequent earned choices; existing offspring retain their actual inherited forms. |
### Immediate division and identity
For the current-cell experience, the player continues as the **mutated half**;
the unchanged half becomes independent wildlife, or remains attached where supported.
"Unchanged" means retaining the established traits, not retaining full original
mass and reserves after those have been divided.
For structural changes, interpret this as **division plus immediate one-way
offspring succession**, rather than rebuilding the existing adult. The unchanged
organism retains the original permanent identity and expressed developmental basis;
the mutated offspring has a new identity and its actual inherited plan. The
relinquished organism keeps its established behavior and selected reproductive
plan, separately from its unchanged expressed traits, as required by ADR-0163.
No control can return to it after transfer or after the controlled offspring dies.
The roughly half-and-half allocation is a starting design target, not a rule that
every nutrient must be split blindly when that makes either body invalid. Specify
actual tissue partitioning, viable size, reserves, placement, and development costs
before implementation. This needs an explicit division contract; existing budding
semantics must not be silently reinterpreted as division.
The resources the player gives up remain in the other organism. They are not a
mutation fee or destroyed stock. Development work can consume E into heat, and
material changes must account for every channel. Two full-sized, fully stocked
cells cannot emerge from one without additional funded growth.
An adaptation that cannot currently fund a viable division may be prepared for
later; **Evolve now** must not create missing tissue or force an invalid split.
Show why it is unavailable, without hiding the adaptation from the planning route.
Immediate commitment is consequential: disliking a trait does not grant a free
undo, guaranteed shed offer, or free reconstruction. The player must survive,
gather what the replacement body needs, and earn a useful subsequent choice.
Reversal opportunities must nevertheless remain discoverable under the weighting
and preference-decay rules; a bad fit must not become a permanent hidden class lock.
### Testing a lineage through offspring
The prepared route is:
1. Earn and select an adaptation for the offspring plan without rebuilding the parent.
2. Gather the resources and choose a useful time/location to reproduce.
3. Keep control of the parent and watch the actual offspring feed, move, survive,
and interact under its inherited traits.
4. Keep or revise the retained plan for subsequent births.
5. At a later birth, optionally continue as that newborn and relinquish the parent.
The later control choice concerns a **newborn at that birth**, not possession of an
older offspring observed earlier. Observing a successful sibling reduces uncertainty;
it does not guarantee that the next offspring will survive changed conditions.
Later plan revisions never rewrite an already born organism.
The parent does not keep the offspring's allocated material. The advantage is
retaining a familiar body and controlling the timing of investment, rather than
avoiding reproduction costs. A plan can also be selected solely to produce useful
autonomous descendants, with no obligation to transfer player control.
### Cost of divergence from the parent
Offspring may cost more when expressing a different body requires more construction,
reorganization, or provisioning. Price those requirements directly rather than
charging an arbitrary amount for each different trait:
| Difference | Proposed cost consequence |
| --- | --- |
| Small pigment or regulatory adjustment | Modest cost only where the actual recipe or developmental work changes. |
| New propulsion, shell, or other machinery | Fund the required material, assembly E, and relevant newborn operating reserves. |
| Changed body layout | Additional developmental work where supported, even if final mass is similar; quantify it rather than inventing a complexity tax. |
| Removal or simplification | May make offspring cheaper by avoiding tissue construction and upkeep. |
| Several interdependent changes | Account for the resulting integrated body once; do not charge for shared tissue repeatedly or count plan-edit history as anatomy. |
Division transfers existing material into resulting organisms; it must not also
charge the full cost of building that same transferred material from nothing.
Any breakdown/reassembly work and losses need an explicit funded model. Do not
automatically reuse the old budding bill for the proposed division route.
Preview both resulting organisms, E/C/N/P/O allocations, actual changed traits,
construction requirements, and which organism the player will control. Distinguish
estimated future operating budgets from guaranteed survival. Experimenting with a
divergent offspring must remain affordable enough to support the early pacing target.
### Ordinary reproduction and colony growth
Division remains possible **without a mutation**; random offers and declines must
not gate the first three-minute birth or the ability to populate the habitat.
Mutation selection also need not force an immediate split: the prepared route
exists for players gathering resources, travelling, or avoiding danger.
Proposed early default: ordinary division separates similar offspring; a selected
adaptation changes the new offspring; retained attachment keeps the resulting cells
together. Further adaptations support transport and specialized colony roles.
Budding can remain an alternative reproductive strategy rather than being removed
from every lineage.
The catalog's existing "bud/budding" wording is retained while the maintainer
reviews its 150 entries. Read the pacing targets here as **first funded birth**
(division in this proposed early default). Catalog adaptations that affect offspring
size, provisioning, or birth rate need explicit compatibility with division versus
budding; this note does not silently apply historical budding rules to division.
Avoid a mandatory regrow-to-full waiting period after each split, while retaining
minimum viable bodies and real material/energy requirements for further births.
## Resources and producer rules
Abbreviations: **E** = usable energy, **C** = carbon, **N** = nitrogen,
**P** = phosphorus, **O** = Other Matter. Here **O never means oxygen**.
Energy is not matter. Light-powered organisms may make nutrients accessible by
processing an environmental material source, not by turning sunlight into C/N/P/O.
For example, real photosynthesis uses light while drawing carbon from carbon
dioxide: [NASA carbon-cycle explanation](https://science.nasa.gov/earth/earth-observatory/the-carbon-cycle/).
The game can simplify chemistry without manufacturing conserved elements.
Every proposed producer must name its source, work cost, useful output, losses,
and environmental debit or recorded boundary import. A source does not exist
merely because an organism has the relevant mutation. Dissolved uptake, gases,
mineral extraction, and secretion require their own supported processes; existing
environmental compartments are not automatically edible. Other Matter is not a
wildcard that can be relabeled as C, N, or P.
Three different designs must remain distinct:
1. **Lower nutrient demand:** a different tissue recipe needs less of a channel.
2. **No need to collect that nutrient's bubbles:** obtain it through environmental
processing, recycling, prey, or a partner instead.
3. **No use of that nutrient at all:** an explicit alternative body chemistry with
fully specified replacement material and capability consequences. This larger
proposal is not approved by this catalog.
Recycling reduces replacement demand; it cannot supply the missing net material
for unlimited new offspring. Secretion transfers real resources out of the donor.
Giving nutrients to a neighbor does not duplicate either organism's inventory.
## When an offer is earned
**Offer timing is different from which options can appear.** The following is an
initial playtest proposal, not a timer the player should wait beside a pool:
- Aim for the first meaningful offer after roughly 45-60 seconds of active play,
then about one useful decision per 60-90 seconds of productive activity.
- Earn bounded activity credit through net useful food gathering, purposeful
travel with feeding/discovery, successful births, or relevant ecological
interactions. Contributions and thresholds need measurement before acceptance.
- Repeated failed budding, empty swimming loops, toggling inputs, and passing the
same empty location do not generate unlimited credit. Count outcomes, not clicks.
- Viable stationary producers can earn credit from actual capture, nutrient use,
births, and interactions. Moving is not the only legitimate activity.
- AFK camping, passive elapsed session time, and an offline player organism do
not earn progression. Defining engaged stationary play without intrusive input
requirements remains an open design/measurement question.
- Keep an earned offer available while the player navigates. No forced pause,
countdown dismissal, or need to inspect a menu during danger.
- Start by showing up to three distinct choices. A decline does not spend matter
and does not immediately reroll the offer. The next earned opportunity can draw
again. Exact cadence must avoid making a decline another long wait.
## Availability versus probability
### Hard availability checks
An option enters the eligible pool only when:
1. Its benefit, drawback, required resource processes, and presentation actually
work under the region's rules. An unimplemented thermal system means no thermal
offers, including supposedly beneficial shedding of unused tolerance.
2. Required anatomy is present in the offspring plan or supplied by the same
explicitly defined adaptation. A removal option requires something to remove.
3. The change is within the plan's supported bounds, has a nonzero effect, and
does not invalidate a dependent structure without a disclosed replacement.
4. Any required colony role, partner exchange, environmental source, or substrate
is supported and plausibly accessible. Use perceived/recorded context, not
hidden map knowledge. Row conditions referring to a habitat include a known,
reachable habitat, not only the precise spot occupied this tick.
5. There is an understandable survival strategy for the resulting offspring.
Do not offer shed-movement to an isolated feeder with no workable stationary
or carried role. This is a useful-context filter, not a promise of survival.
Resource affordability is shown separately from eligibility. Do not hide the
adaptation that solves a shortage because that same shortage makes it temporarily
unaffordable. Do not require injury, starvation, or five births to discover every
basic defensive, efficient, or colony adaptation. Those are weighting signals.
### Soft weighting proposal
For each eligible option, start with:
`weight = clamp(base * behavior * context * preference * direction, floor, cap)`
| Factor | Initial trial range | Purpose |
| --- | --- | --- |
| Base | 100 | A neutral eligible adaptation remains discoverable. |
| Behavior | 1-3x | Recent relevant outcomes increase related opportunities. |
| Context | 0.5-2x | Current scarcity, crowding, threats, and known habitats affect usefulness. |
| Preference | 0.5-1.5x | Recent accept/decline feedback nudges individual options, without permanent bans. |
| Direction | 1-3x | Sustained pursuit, especially early budding, supports a chosen direction. |
| Final floor/cap | 10 / 2000 | Keep alternatives possible and limit runaway preference loops. |
These are **relative sampling weights, not percentage probabilities**. Normalize
against the actual eligible pool; draw without replacement. Use at most the
strongest applicable signal inside each factor, rather than multiplying every
similar event. Repeatedly accepting a family must not create unbounded compounding.
Use a bounded window of approximately 90 seconds of active context, plus a few
explicit retained milestones. Long-past behavior should not trap a lineage in
one strategy. Soft preference suppression decays toward neutral over about five
subsequent earned offers; reacquisition remains possible after shedding a trait.
All durations and ranges need playtesting. Inheritable adaptation is separate
from whether transient preferences/context should carry through succession.
The row's **increases chance** and **decreases chance** columns are proposals for
these signals. Neither overrides a hard prerequisite. No listed decrease sets an
otherwise useful eligible adaptation permanently to zero. Dangerous behavior is
not required to qualify, and deliberately taking damage must not be the fastest
way to farm defensive offers. Only actual observed deficits or interactions count.
Explain the main reason in the UI, for example: "More likely because your recent
births were limited by phosphorus." Do not expose a fake exact probability when
the eligible pool changes. A later implementation must retain bounded authoritative
context and deterministic recorded draws; reconnects/retries cannot reroll them.
### Budding and colony opportunity protection
- Attachment can appear before the fifth bud. It is not locked behind a badge.
- Proposed direction multipliers: after one successful active controlled birth,
1.5x; three, 2x; five, 3x for relevant eligible colony opportunities.
- Count actual funded births along the controlled succession path. Carry that
bounded milestone through one-way succession without duplicating it; never use
account age or all births from autonomous/offline relatives as earned credit.
- After five births, if two earned offers provide no colony entry option, reserve
one slot in the next earned offer for a useful eligible entry adaptation, such
as retained daughter attachment. This is proposed bad-luck protection, not an
automatic selection, free attached cell, or guaranteed survival.
- If no entry option is eligible because required mechanics are absent, explain
that limit in the playtest report. Probability tuning cannot fix missing colony
gameplay or justify claiming the 30-minute progression target is met.
- Independent-cell strategies remain available. Declining colony direction can
suppress its reserved slot temporarily through the same decaying preference
mechanism; it does not ban future colonies.
### Catalog reading guide
IDs **001-100 preserve the discussion's original ordering**; 101-150 extend it.
These are draft reference IDs, **not runtime mutation/operator IDs**.
Every row assumes the global hard checks above. "Available when" names its extra
prerequisites, not an assertion that the feature is implemented today. All rows
remain design candidates; especially currents, sensing, damage/repair, chemical
processing, colony transport, specialized tissues, dormancy, and environmental
hazards require supporting mechanics before their offers can ship.
The two chance columns describe observed recent activity/context, not mandatory
quests. A cost saving must correspond to actual tissue, work, or recipe changes.
If balancing cannot demonstrate both the benefit and drawback, revise or remove
the option rather than inventing a tooltip explanation.
## 001-010: Movement and navigation
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 001 | Strong propulsion | Reach food and escape pursuit faster. | More E at high propulsion output. | Functional propulsion can be enlarged. | Long food trips; observed pursuits. | Feeding locally; propulsion seldom used. |
| 002 | Economical propulsion | Travel farther on limited E. | Lower maximum speed. | Propulsion has an economy/speed tradeoff. | Movement consumes much of acquired E. | Frequent chases require peak speed. |
| 003 | Burst propulsion | Briefly escape or intercept prey. | Depletes a limited burst reserve; weak sustained performance. | Propulsion and bounded burst storage work. | Short pursuits; repeated near interceptions. | Long uninterrupted travel. |
| 004 | Agile steering | Navigate dense bubbles and obstacles. | Less straight-line propulsion capacity. | Turning dynamics affect movement. | Productive routes require frequent turns. | Open, straight travel. |
| 005 | Straight swimmer | Cross open areas efficiently. | Wide turns hinder close maneuvering. | Body shape affects steering and drag. | Long straight feeding routes. | Dense obstacles; close turning. |
| 006 | Current sail | Travel using environmental flow. | Difficult upstream movement and precise positioning. | Perceivable currents and sail drag work. | Useful downstream foraging. | Still water; repeated upstream routes. |
| 007 | Surface anchor | Hold a productive location in flow. | Material investment; release needed before travel. | Suitable surfaces and anchoring work. | Productive local feeding disrupted by flow. | Frequent relocations; no useful surfaces. |
| 008 | Food-gradient sensing | Locate promising food before contact. | Sensory tissue consumes E and N. | Perceivable food gradients and sensing work. | Searches between discovered clusters. | Food is continuously within contact. |
| 009 | Shed independent propulsion | Cheaper stationary or carried offspring. | Cannot independently relocate or escape. | Propulsion exists; supported stationary/carried survival is plausible. | Producer surplus; reliable colony transport. | Independent travel; insufficient stationary intake. |
| 010 | Colony propulsion | Move several attached cells together. | Propulsion cells carry others and sacrifice feeding capacity. | Attached members and force transmission work. | Growing group struggles to move. | Solitary life; already ample group propulsion. |
## 011-020: Feeding and engulfing
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 011 | Broad collection fringe | Touch more bubbles per pass. | More drag and exposed footprint. | Collection geometry affects contact. | Many nearby bubbles missed during passes. | Narrow gaps; frequent predator contact. |
| 012 | Concentrated intake | Drain rich clusters quickly. | Large machinery; little advantage between clusters. | Intake capacity has a tissue/work cost. | Contact feeding repeatedly hits its rate limit. | Deposits empty before intake capacity is used. |
| 013 | Generalist digestion | Use diverse food sources. | More machinery; lower specialist throughput. | At least two mechanically distinct food substrates exist. | Useful mixed diets. | One reliable substrate dominates feeding. |
| 014 | Selective intake | Collect a limiting nutrient without unwanted loading. | Reduced collection of other resources. | Resource-specific uptake and storage limits work. | One shortage despite other surpluses. | Several channels simultaneously scarce. |
| 015 | Detritus digestion | Use remains other cells process poorly. | Slow processing displaces fresh-food machinery. | Detritus differs meaningfully from fresh food. | Repeated successful scavenging. | Fresh food dominates; little detritus observed. |
| 016 | Expanding engulfment chamber | Capture larger prey relative to body size. | Reduced movement while occupied. | Engulfment volume and occupied-state costs work. | Suitable prey just beyond chamber capacity. | Feeding mostly on bubbles. |
| 017 | Armor digestion | Extract resources from protected prey. | Costly machinery; poor throughput on ordinary food. | Armor and substrate-specific digestion work. | Encounters with edible armored organisms. | Soft prey and bubbles dominate. |
| 018 | Prey retention | Keep captured prey from escaping. | Holding structures add mass and reduce feeding space. | Capture and escape are distinct supported outcomes. | Prey escapes during digestion. | Captures already reliably succeed. |
| 019 | Shed engulfment apparatus | Cheaper producer or bubble-feeding offspring. | No living prey intake. | Apparatus exists; nonprey feeding supports offspring. | Little prey intake; strong alternative feeding. | Prey supplies an important resource. |
| 020 | External digestion | Feed on remains too large to swallow. | Secretion costs material; rivals can steal released food. | Finite digestive secretion and released food are modeled. | Large remains; limited engulfment space. | Few remains; heavy theft of released material. |
## 021-030: Energy and photosynthesis
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 021 | Acquire photosynthesis | Supplement E without energy bubbles. | Build and maintain light-capturing tissue. | Supported light capture; no photosynthesis in plan. | Lit feeding sites; E limits budding. | Persistently dark known habitat. |
| 022 | Expanded photosynthetic tissue | Produce more E in light. | More construction and tissue capacity occupied. | Photosynthesis exists and can expand. | Light capture useful but E still limiting. | Persistent E surplus; N/P construction shortage. |
| 023 | Mobile photosynthesis | Capture more light while travelling. | Lower peak stationary capture. | Mobile/stationary producer arrangements differ. | Productive movement by photosynthetic cells. | Successful stationary production. |
| 024 | Low-light pigments | Produce E in shade. | Lower maximum bright-light output. | Light intensity and pigment responses differ. | Shaded producer activity. | Consistently bright habitat. |
| 025 | Bright-light specialization | High output in exposed habitats. | Weak production in shade. | Distinct light intensity responses work. | Sustained strong light. | Frequent shade or variable illumination. |
| 026 | Shed photosynthesis | Remove unused producer costs. | Lose light-derived E. | Producer tissue exists; alternative E source works. | Dark habitat; feeding supplies E. | Light sustains maintenance or births. |
| 027 | Thorough energy extraction | Obtain more usable E per food unit. | Slower maximum processing rate. | Food-to-E yield and throughput trade off. | Food scarce; processing capacity underused. | E delivery rate limits abundant feeding. |
| 028 | Rapid energy extraction | Deliver E quickly during rich feeding. | Less E extracted per unit; more heat. | Actual yield/throughput tradeoff exists. | Abundant food; burst activity or rapid births. | Food scarcity; heat stress if modeled. |
| 029 | Expanded energy storage | Cross food-poor stretches. | Storage tissue and reserves add mass. | E capacity is bounded with physical storage costs. | Alternating abundance and shortages. | Continuous intake; mobility limited by carried mass. |
| 030 | Reduced energy storage | Lighter, cheaper offspring. | Shorter survival margin without intake. | E storage above a useful supported minimum exists. | Reliable local intake; costly carried reserves. | Long gaps between food or light. |
## 031-040: Nutrient demand, storage, and recycling
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 031 | Carbon storage | Bank C for later growth and births. | Extra mass and storage space. | Bounded C storage has a tissue cost. | C-rich visits followed by C-limited births. | C always nearby; other capacity limiting. |
| 032 | Nitrogen storage | Carry scarce N between habitats. | More investment and less other storage. | Bounded N storage works. | Intermittent N abundance and shortages. | Constant N supply; N surplus rarely spent. |
| 033 | Phosphorus storage | Leave a rare P site without delaying births. | Carried mass without immediate survival benefit. | Bounded P storage works. | Births blocked by P after leaving deposits. | P consistently accessible. |
| 034 | Other Matter storage | Bank O for demanding structures. | Competes with other reserve capacity. | O has defined uses and bounded storage. | Intermittent O supply; O-limited construction. | Current body plans use little O. |
| 035 | Carbon-thrifty structure | Build offspring using less C. | Reduced mechanical strength. | Alternative structural recipe and strength effects work. | C-limited births. | High contact forces; structural damage. |
| 036 | Nitrogen-thrifty machinery | Reproduce in N-poor areas. | Lower peak machinery throughput. | A defined lower-N recipe changes actual capacity. | N shortages; machinery seldom at peak. | Peak feeding/propulsion repeatedly needed. |
| 037 | Phosphorus-thrifty development | Lower P cost per offspring. | Lower maximum assembly rate. | Lower-P development has an explicit recipe. | P-limited births. | Rapid assembly is useful; P abundant. |
| 038 | Reduced Other Matter dependence | Grow where O is scarce. | Lose performance of O-dependent structures. | Valid lower-O replacement recipe exists. | O blocks development. | O-based protection/support frequently useful. |
| 039 | Internal material recycling | Recover part of replaced tissue material. | Recovery machinery costs E; losses remain. | Tissue turnover and recovery transfers work. | Repeated repair/turnover under scarcity. | Little turnover; abundant raw nutrients. |
| 040 | Nutrient-retaining membrane | Reduce nutrient leakage. | Slower passive exchange. | Leakage and exchange both have consequences. | Losses worsen a limiting nutrient. | Intake throughput limits productive feeding. |
## 041-050: Size, shape, and construction
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 041 | Larger adult size | Handle larger prey; resist some engulfers. | More upkeep and reproductive material. | Size changes both costs and interactions. | Useful prey outgrown; larger predators observed. | Reproduction repeatedly resource-limited. |
| 042 | Smaller adult size | Lower living and offspring costs. | Smaller reserves; more possible predators. | A smaller viable body is supported. | Scarce food; expensive births. | Large prey important; nearby size-based predation. |
| 043 | Elongated body | Spread contact along narrow feeding corridors. | Hard turning; exposed length. | Shape affects collision, feeding, and steering. | Long narrow food paths. | Tight turns; attacks along body. |
| 044 | Flattened body | More exposed feeding/light area. | Broad footprint harder to maneuver and protect. | Shape affects capture area and collision. | Surface feeding or light capture useful. | Crowded narrow routes; exposed-surface danger. |
| 045 | Rounded body | Compact geometry with less exposed surface. | Less capture/collection area per volume. | Geometry affects protection and exchange. | Surface damage; compact travel routes. | Uptake or light area limits growth. |
| 046 | Flexible body | Pass gaps and deform around obstacles. | Lower compression resistance. | Deformation and mechanical damage work. | Productive routes through tight gaps. | Compression or capture threats. |
| 047 | Rigid body | Resist deformation and transmit force. | Supporting material; cannot squeeze through gaps. | Rigidity affects mechanics. | Pushing, compression, or stable support useful. | Narrow passages; material-limited births. |
| 048 | Lightweight tissue | Move a broad footprint with less mass. | Less strength and contact force. | Density, mass, and strength differ by recipe. | Movement is costly; contact force seldom needed. | Forceful prey capture or collisions. |
| 049 | Dense tissue | Resist displacement and exert force. | Costly movement and construction. | Density affects force and material budgets. | Displacement disrupts feeding; force useful. | Long travel; frequent resource shortages. |
| 050 | Flexible adult size | Remain small in scarcity, grow in abundance. | Regulation costs; weaker peak specialization. | Bounded growth regulation and recipe costs work. | Repeated feast/famine transitions. | Stable conditions favor one size. |
## 051-060: Membranes and protection
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 051 | Thick membrane | Resist puncture and applicable engulfment. | More material, upkeep, and mass. | Thickness provides actual protection. | Relevant predators or damage observed. | Safe habitat; membrane cost limits births. |
| 052 | Thin membrane | Cheaper, lighter offspring. | Lower protection. | Thinning changes both cost and protection. | Safe productive feeding; material shortage. | Repeated relevant attacks. |
| 053 | Protective shell | Survive attacks that soft cells cannot. | Heavy build; restricted expansion and intake openings. | Shell mechanics and feeding restrictions work. | Persistent protection-limited survival. | Fast travel/growth useful; few threats. |
| 054 | Stretchable membrane | Expand around food and changing shape. | Weaker against concentrated attacks. | Elasticity affects feeding and protection. | Engulfment/deformation regularly useful. | Puncture-like threats dominate. |
| 055 | Permeable membrane | Rapid dissolved nutrient exchange. | Leakage and harmful exposure. | Dissolved uptake and leakage are modeled. | Rich dissolved sources; low hazards. | Toxic exposure; costly nutrient losses. |
| 056 | Selective membrane | Retain nutrients and exclude hazards. | Active transport E and lower peak exchange. | Selective transport processes work. | Leakage or contamination limits feeding. | Clean, rich sources need throughput. |
| 057 | Slippery surface | Escape adhesive capture. | Harder to maintain useful attachment. | Adhesion and detachment work. | Unwanted attachment or capture observed. | Stable colony junctions needed. |
| 058 | Adhesive surface | Hold food and establish contact. | Unwanted sticking; difficult detachment. | Surface adhesion has physical effects. | Useful surface feeding; neighboring buds. | Frequent escape/dispersal; debris fouling. |
| 059 | Active membrane repair | Recover from survivable damage. | Repair consumes E and materials. | Nonfatal damage and repair accounting work. | Damage interrupts otherwise viable feeding. | Little damage; nutrients needed for reproduction. |
| 060 | Shed protective shell | Restore mobility, growth, and intake access. | Lose shell protection. | Shell exists; viable unshelled strategy supported. | Shell hinders feeding/travel; threats absent. | Shell frequently prevents injury. |
## 061-070: Budding and offspring investment
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 061 | Small buds | Produce offspring with less material per birth. | Smaller newborn reserves and protection. | A smaller viable newborn recipe exists. | Birth cost limits expansion. | Small newborns repeatedly fail to establish. |
| 062 | Large buds | Offspring feed and defend themselves sooner. | Fewer births from the same reserves. | Variable funded newborn size is supported. | Small newborns struggle in observed habitat. | Parent cannot fund frequent births. |
| 063 | Split brood | Spread one investment among several offspring. | Each begins smaller; total matter is unchanged. | Multi-birth placement and partitioning work. | Several nearby establishment opportunities. | Individual newborn size is critical. |
| 064 | Rapid bud assembly | Use brief food surpluses quickly. | High assembly power; worse construction efficiency. | Assembly rate and energy efficiency differ. | Surplus lost before ordinary assembly completes. | E scarcity; stable supply. |
| 065 | Energy-provisioned buds | Give newborns fuel for dispersal. | More parent E transferred per birth. | Provisioning is explicit and funded. | Newborns face gaps before first feeding. | Nearby food; parent E limits reproduction. |
| 066 | Nutrient-provisioned buds | Let newborns grow away from nutrient deposits. | Transfer scarce material; fewer siblings. | Per-channel provisioning works. | Newborns encounter nutrient-poor habitat. | Parent nutrient shortages; reliable local deposits. |
| 067 | Compact budding apparatus | Lower reproductive tissue upkeep. | Lower maximum birth frequency. | Reproductive tissue cost and rate are modeled. | Intermittent reproduction; scarce resources. | Continuous surplus supports fast expansion. |
| 068 | Brood chamber | Protect developing buds. | Carry developing mass; clustered loss risk. | Exposed development and chamber protection work. | Developing buds encounter hazards. | Travel burden; safe open development. |
| 069 | Dispersing offspring | Establish descendants beyond local depletion. | Dispersal investment; fewer nearby collaborators. | Newborn dispersal has physical machinery/costs. | Crowded, depleted birth sites. | Useful local partners and abundant local food. |
| 070 | Dormant offspring | Preserve descendants through bad conditions. | No feeding or reproductive contribution while dormant. | Finite dormancy and activation conditions work. | Observed recurring unsuitable periods. | Stable productive conditions. |
## 071-080: Colonies and cooperation
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 071 | Retained daughter attachment | Keep buds together and form a colony. | Local competition and movement burden. | Funded attachment and viable attached feeding work. | Successful births; nearby descendants; five-bud direction. | Crowded depletion; recent attachment declines. |
| 072 | Loose attachment | Separate when trapped or locally starved. | Colony breaks apart under smaller stresses. | Attachment strength can vary. | Trapping; uneven local food. | Separation repeatedly harms members. |
| 073 | Flexible junctions | Bend around obstacles without separating. | Poorer force transfer. | Attached geometry and junction mechanics work. | Colony encounters narrow/curved routes. | Straight propulsion needs rigid force transfer. |
| 074 | Rigid junctions | Maintain shape and transmit pushing force. | Costly junctions; less maneuverable. | Junction stiffness affects movement. | Propulsive forces deform useful arrangements. | Gaps and turns impede travel. |
| 075 | Feeding channels | Supply food to interior members. | Fewer cells per footprint. | Colony geometry affects food access. | Interior feeding deficits; fed outer members. | Small groups with no sheltered interior. |
| 076 | Energy transfer junctions | Productive members support E-poor members. | Transfer losses and donor opportunity cost. | Paired E transfers and junction costs work. | Uneven E among connected members. | Members independently E-sufficient. |
| 077 | Nutrient transfer junctions | Supply growing or specialized cells. | Transport machinery; donor depletion risk. | Per-channel member transfers work. | Complementary nutrient surpluses/shortages. | Similar deficits across all members. |
| 078 | Coordinated polarity | Align feeding surfaces and propulsion. | Harder reversal/reorganization. | Shared orientation and force coordination work. | Members push against one another. | Frequently changing routes and food directions. |
| 079 | Branching colony growth | Expand exposed feeding surface in several directions. | Fragile connections; large defensive perimeter. | Controlled attachment geometry works. | Separated nearby food/light opportunities. | Strong shear; perimeter attacks. |
| 080 | Shed attachment | Leave a failing group and establish independently. | Lose collective transport and protection. | Attachment exists; independent offspring are viable. | Group depletion or trapping; independent resources nearby. | Strong dependence on transport or donors. |
## 081-090: Producers and resource exchange
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 081 | Carbon fixation | Use inorganic environmental C instead of C bubbles. | Work E and processing machinery. | Defined accessible carbon source and conversion work. | C scarcity beside suitable source. | Cheap organic C; source inaccessible. |
| 082 | Nitrogen fixation | Access environmental N unavailable to ordinary feeders. | High processing E and specialized tissue. | Explicit suitable N source and balanced conversion exist. | N shortage; useful source and E surplus. | N-rich food; E shortage. |
| 083 | Phosphate mobilization | Access P in otherwise unusable deposits. | Contact/process costs; source dependence. | Defined P-bearing deposits can be processed. | Births P-limited beside deposits. | Readily edible P; frequent relocation. |
| 084 | Other Matter extraction | Obtain O from a specified environmental source. | Machinery useless away from that source. | An O-bearing source and extraction recipe exist. | O scarcity with source access. | Little O demand; cheap edible O. |
| 085 | Energy-rich secretion | Supply descendants or useful neighbors. | Export E and secretion material; theft possible. | Finite secretion and uptake by recipients work. | E surplus; useful nearby recipients. | E shortage; secretion mostly stolen or wasted. |
| 086 | Nitrogen secretion | Support N-poor partners supplying another need. | Lose acquired N; depend on useful neighbors. | Explicit N secretion and recipient uptake work. | N surplus and productive complementary partners. | N shortage; no useful recipients. |
| 087 | Phosphorus recovery | Recover P from specified waste/remains. | Recovery E; limited source stock. | Waste has tracked recoverable P. | P shortage with recoverable local waste. | Fresh P abundant; little recoverable material. |
| 088 | Controlled resource exchange | Trade surplus for a limiting resource. | Exchange structures; partner dependence. | Paired bounded exchanges and compatible interfaces work. | Complementary observed surpluses and deficits. | No compatible partner; similar shortages. |
| 089 | Specialized daughter cells | Divide feeding, producer, and movement roles. | Dependent specialists need transport and support. | Role-specific development and colony support work. | Complementary roles; supported growing colony. | Repeated separation; inadequate transport. |
| 090 | Self-sufficient daughter cells | Survive separation and disperse. | Duplicate machinery and higher per-cell cost. | Generalist offspring can be developed. | Fragmentation; variable partners. | Stable colony with useful specialization. |
## 091-100: Environmental adaptation
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 091 | Heat specialization | Feed and reproduce in hot habitat. | Worse cool performance; protective costs. | Temperature changes actual survival/performance. | Useful hot feeding areas observed. | Cool habitat; little thermal variation. |
| 092 | Cold specialization | Remain productive in cold habitat. | Worse warm performance. | Functional temperature response exists. | Useful cold feeding areas observed. | Warm habitat dominates. |
| 093 | Broad thermal tolerance | Cross boundaries and survive fluctuations. | More machinery; lower specialist peak efficiency. | Thermal protection has real costs and benefits. | Repeated temperature changes on useful routes. | Stable narrow temperature band. |
| 094 | Narrow thermal specialization | Efficient operation in one stable band. | Vulnerability outside that band. | Defined specialist recipe saves actual costs. | Stable productive temperature. | Frequent thermal transitions. |
| 095 | Thermal acclimation | Adjust to gradual temperature change. | Adjustment time/E; abrupt shifts still dangerous. | Bounded acclimation and thermal effects work. | Gradual recurrent temperature changes. | Constant conditions or very abrupt shifts. |
| 096 | Toxin exclusion | Use contaminated food-rich areas. | Slower useful uptake; barrier costs. | Specific contaminants and exclusion work. | Valuable resources behind contamination. | Clean habitat; intake throughput limiting. |
| 097 | Shed unused thermal protection | Cheaper offspring in a safe band. | Lose the former protected range. | Costly protection exists and temperature gameplay works. | Stable safe habitat; protection rarely used. | Thermal transitions or exposed migration. |
| 098 | Protective resting state | Survive temporary environmental crisis. | Stop feeding, travel, and reproduction while protected. | Funded resting state and finite survival rules work. | Recurring short hazards. | Stable productive habitat. |
| 099 | Flow-resistant attachment | Stay at useful sites in strong currents. | Heavy attachment and costly relocation. | Flow and surface attachment work. | Current repeatedly dislodges feeding organisms. | Weak flow; frequent travel. |
| 100 | Light-direction sensing | Seek useful illumination or avoid excess. | Sensory and corrective-movement costs. | Spatial light differences and sensing work. | Productive routes between light zones. | Uniform illumination; light irrelevant to strategy. |
## 101-110: Additional sensing and communication
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 101 | Predator-cue sensing | Detect nearby biological danger earlier. | Sensory upkeep; imperfect cues can divert feeding. | Biological cues and readable detection limits work. | Nearby predators observed, without requiring injury. | Few threats; expensive unnecessary detours. |
| 102 | Chemical compatibility recognition | Attach or exchange with compatible cells more reliably. | Recognition machinery; rejects some usable unfamiliar partners. | Actual chemical interfaces exist; no account/owner labels. | Useful compatible contacts; failed incompatible contacts. | Solitary life; diverse beneficial partners. |
| 103 | Resource composition sensing | Choose deposits containing the limiting nutrient. | Sensor cost; cannot collect resources itself. | Deposits differ in composition and can be sensed. | Repeated one-channel shortages amid mixed deposits. | All nearby food has similar composition. |
| 104 | Flow sensing | Choose favorable currents and safer attachment sites. | Sensory E/N investment. | Spatial currents and limited local sensing work. | Flow strongly changes productive travel. | Still habitat; no benefit from route adjustment. |
| 105 | Contact feelers | Navigate obstacles without exposing the whole body. | Extra drag and vulnerable projections. | Contact geometry and obstacle feedback work. | Obstacle-rich productive routes. | Open routes; projections frequently damaged. |
| 106 | Prey-size sensing | Avoid costly futile engulfment attempts. | Sensory tissue instead of feeding capacity. | Prey geometry can be sensed within limits. | Encounters near engulfment thresholds. | Prey absent or uniformly easy to take. |
| 107 | Compact short-range sensing | Cheaper close-quarters sensing. | Less warning and discovery range. | Existing sensing can trade range for tissue cost. | Dense local food and short routes. | Widely separated targets; distant threats. |
| 108 | Shed food sensing | Cheaper feeders supplied locally or through a colony. | Cannot independently locate distant food. | Food sensor exists; local feeding strategy viable. | Reliable contact supply; colony guidance. | Independent foraging; patchy food. |
| 109 | Colony signal relay | Coordinate distant members without every cell sensing everything. | Signal production and relay costs; delay. | Bounded biological signaling and connected roles work. | Group coordination fails across distance. | Small group; little coordination need. |
| 110 | Shed signal relay | Remove unnecessary communication machinery. | Lose distant coordination. | Relay exists; independent/local behavior remains viable. | Solitary dispersal; tiny groups. | Distant members depend on relay. |
## 111-120: Metabolic allocation and physiological regulation
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 111 | Low idle metabolism | Spend less E between productive activities. | Slower return to full output. | Physiological activity and wake-up work are modeled. | Frequent short inactive intervals between useful actions. | Continuous pursuit or feeding. |
| 112 | High-output metabolism | Sustain intense feeding, propulsion, or assembly. | Higher basal upkeep of supporting machinery. | Tissue-backed metabolic throughput has a real limit. | Useful actions repeatedly hit delivery limits. | Low utilization; food scarcity. |
| 113 | Demand-responsive intake | Avoid spending transport E on already-full reserves. | Regulation costs and delayed response to new food. | Active uptake costs E and reserves have limits. | Frequent excess uptake effort. | Rapidly changing food; few full reserves. |
| 114 | Reserve rationing | Preserve maintenance E through short shortages. | Lower available movement and assembly output. | Explicit reserve allocation affects actual actions. | Brief predictable feeding gaps. | Peak escape power often needed. |
| 115 | Surplus storage synthesis | Package temporary E surplus into usable stored reserves. | Processing E/material costs and storage delay. | Reserve packaging has specified inputs and capacity. | Bursty capture exceeds immediate use. | Persistent scarcity; little surplus. |
| 116 | Reversible machinery shutdown | Reduce upkeep of temporarily unused functions. | Restart consumes time/E; regulation tissue costs. | Physiological suppression works without deleting anatomy. | Alternating use of expensive capabilities. | All functions continuously needed. |
| 117 | Emergency movement reserve | Keep escape fuel from ordinary growth spending. | Less reserve freely available for births and feeding. | Explicit bounded reserve partitioning works. | Encounters occur just after heavy construction. | Safe habitat; reserved fuel rarely used. |
| 118 | Flexible nutrient allocation | Redirect available material to the most useful ongoing tissue task. | Regulation overhead; slower peak assembly. | Competing growth/repair tasks and allocation work. | Alternating repair and growth shortages. | One stable construction task dominates. |
| 119 | Conservative reproductive provisioning | Avoid leaving the parent without basic survival reserves. | Smaller or less frequent births during marginal conditions. | Heritable provisioning policy and actual reserve bounds work. | Births followed by parent shortages. | Reliable immediate refilling after birth. |
| 120 | Shed broad digestive machinery | Cheap specialist offspring using a reliable substrate. | Lose access to other food types. | Generalist machinery exists; retained food source viable. | One substrate consistently supplies needs. | Mixed/variable diet important. |
## 121-130: Colony architecture and tissue precursors
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 121 | Junction scaffolding | Support larger attachments and future force-bearing tissue. | C/O construction and extra mass. | Explicit scaffold recipe and structural loads work. | Junction stresses limit useful group growth. | Small flexible groups; O scarcity. |
| 122 | Contractile specialist cells | Generate coordinated force for a group. | High N/E demand; reduced independent feeding. | Specialized force generation and support transport work. | A supported group lacks propulsion/force. | Nutrient transport absent; low force demand. |
| 123 | Support specialist cells | Protect soft members and maintain body shape. | Nonfeeding mass must be supported. | Role differentiation and physical support work. | Soft group deformation causes problems. | Small independent groups; scarce food. |
| 124 | Producer surface sorting | Place light-capturing cells where light reaches them. | Repositioning/junction cost; exposes producers. | Colony rearrangement and self-shading work. | Producers are shaded by other members. | Uniform exposure; little photosynthesis. |
| 125 | Peripheral feeding layer | Collect food around a group and transport it inward. | Outer feeders vulnerable; inner cells become dependent. | Spatial roles and member transport work. | Interior shortage despite exterior abundance. | Small group; transport bottlenecks. |
| 126 | Protected reproductive cells | Keep developing offspring inside a supported group. | Other cells must feed and protect a nonfeeding role. | Differentiation, brood development, and protection work. | Exposed births fail near viable colonies. | Low group surplus; dispersal priority. |
| 127 | Modular growth units | Limit damage spread between colony regions. | Duplicate junction/support machinery; slower integration. | Mechanical modules and localized damage work. | Local damage propagates through a group. | Small stable group; costs dominate. |
| 128 | Detachable dispersal lobe | Release a funded multicell fragment to establish elsewhere. | Lose group tissue and reserve investment. | Viable fragment development/separation work. | Local crowding; reachable new habitat. | Small group; strong mutual dependence. |
| 129 | Hollow colony arrangement | Expose inner surfaces to food flow. | Larger footprint and weaker compact support. | Food movement through explicit colony geometry works. | Interior access limits a growing group. | Crushing/shear threats; little interior shortage. |
| 130 | Radial colony arrangement | Feed and respond in several directions. | Poorer forward specialization and pursuit. | Attachment geometry affects feeding/propulsion. | Resources arrive from changing directions. | Long directional travel or hunting. |
Modules/fragments never restore a dead controlled organism. Autonomous survivors
keep their own identities; player control still follows accepted succession and
permadeath rules. Tissue-like precursors do not themselves authorize the separate
multicellular or 3D transition.
## 131-140: Loss, simplification, and alternative material use
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 131 | Shed expanded nitrogen storage | Lighter offspring with less storage tissue. | Cannot bank as much N between deposits. | Expanded N storage exists; baseline storage remains viable. | Continuous N supply; unused capacity. | Intermittent N; shortages between visits. |
| 132 | Shed expanded phosphorus storage | Lower storage construction and carried mass. | Shorter independence from P sources. | Expanded P storage exists. | Reliable P supply; capacity seldom used. | Rare P sites fund later births. |
| 133 | Shed expanded carbon storage | Free body capacity for active machinery. | Less C available for growth after leaving food. | Expanded C storage exists. | Constant C access; crowded tissue capacity. | Large intermittent growth demands. |
| 134 | Shed expanded Other Matter storage | Reduce investment in seldom-used O reserves. | Lose preparation for O-heavy construction. | Expanded O storage exists. | Low O use; reliable O access. | Planned O-dependent support/protection. |
| 135 | Shed nutrient exchange junctions | Cheaper independently feeding offspring. | Lose nutrient support and trade. | Nutrient junctions exist; independent feeding viable. | Members self-sufficient; transfers rarely used. | Specialized members need imported nutrients. |
| 136 | Shed energy exchange junctions | Reduce transport losses and junction upkeep. | Cannot support or receive E from neighbors. | E junctions exist; independent E budget viable. | Little beneficial transfer. | Producers support shaded/nonfeeding cells. |
| 137 | Shed nitrogen fixation | Remove costly unused processing tissue. | Depend again on food/partners for N. | Fixation exists; alternative N accessible. | N-rich food; processing E scarce. | Environmental processing supplies most N. |
| 138 | Shed carbon fixation | Remove unused carbon-processing machinery. | Lose access to inorganic C. | Fixation exists; organic C source viable. | Reliable organic food; little fixation output. | Inorganic source supports most construction. |
| 139 | Shed selective intake machinery | Restore broad intake and reduce sorting costs. | More unwanted loading; less targeted collection. | Selective uptake exists; broad feeding viable. | Several channels needed; little excess loading. | One persistent shortage amid other surpluses. |
| 140 | Carbon-rich protective covering | Replace an O-dependent covering where O is scarce. | More C and lower rigidity/protection. | Explicit replacement recipe conserves each channel. | O-limited covering development; C surplus. | C scarcity; rigid protection essential. |
These losses need actual savings. Merely deleting a parameter is not a benefit.
Replacing O with a C-rich structure changes the recipe; it does not convert O to C.
## 141-150: Further habitat and energy specializations
| ID | Adaptation | Reason to want it | Drawback | Available when | Increases chance | Decreases chance |
| --- | --- | --- | --- | --- | --- | --- |
| 141 | Osmotic buffering | Survive changes in external dissolved concentration. | Buffer material and regulation E. | Water exchange and osmotic stress work. | Useful routes cross concentration boundaries. | Stable concentration; buffer seldom used. |
| 142 | Salt specialization | Operate efficiently in a stable salty habitat. | Poor performance in dilute habitat. | Explicit salinity and supported response exist. | Productive saline sites. | Dilute sites or frequent salinity changes. |
| 143 | Acid specialization | Use acidic resource-rich habitat. | Poor neutral/alkaline performance; protection cost. | Acidity has actual supported effects. | Useful acidic sites observed. | Neutral/alkaline foraging dominates. |
| 144 | Alkaline specialization | Use alkaline resource-rich habitat. | Poor acidic performance; protection cost. | Alkalinity has actual supported effects. | Useful alkaline sites observed. | Acidic sites or frequent transitions. |
| 145 | Broad chemical buffering | Cross variable pH/salinity boundaries. | More machinery; lower specialist efficiency. | Each buffered hazard and its material cost work. | Recurrent chemical transitions on useful routes. | One stable chemical habitat. |
| 146 | Excess-light shielding | Remain productive under damaging illumination. | Shield blocks some useful light and costs material. | Excess light causes real damage or capture impairment. | Useful high-light sites cause overexposure. | Shade; weak illumination. |
| 147 | Oxygen-assisted energy extraction | Extract more E from food where oxygen is available. | Requires environmental oxygen and respiratory tissue. | Explicit oxygen compartment, reactants, and energy balance exist. | Food and oxygen coexist; yield limits survival. | Low oxygen; machinery rarely useful. |
| 148 | Oxygen-independent energy extraction | Remain active without environmental oxygen. | Lower food-to-usable-E yield and/or output. | Defined balanced oxygen-independent pathway exists. | Productive oxygen-poor habitat. | Stable oxygen-rich conditions favor another pathway. |
| 149 | Chemical energy capture | Gain usable E from a defined environmental chemical reaction. | Source dependence and processing machinery. | Finite reactants/potential, products, and conversion are modeled. | Useful chemical source; light/food E scarce. | No accessible reactants; ample ordinary E. |
| 150 | Shed chemical energy capture | Remove unused processing tissue. | Lose that environmental E source. | Capture machinery exists; another E source supports offspring. | Relocation away from reactants; unused machinery. | Chemical reaction sustains the current strategy. |
Oxygen in 147-148 is a separately modeled environmental species, never the O
inventory abbreviation. Neither pathway creates food energy from nothing;
conversion must debit the appropriate finite chemical energy and material inputs.
## Future evolutionary consequences
Consequences should follow anatomy, material recipes, and support relationships.
They are not permanent hidden class locks. Reacquisition/replacement is possible
through future eligible adaptations, with real construction costs.
| Earlier choices | Potential later consequence | Route to adapt again |
| --- | --- | --- |
| 036 nitrogen-thrifty machinery | High-output contractile tissue/limbs exceed the supported N recipe or throughput. | Improve N acquisition/transport and build a richer recipe, or use lower-output structures. |
| 037 phosphorus-thrifty development | Low-P construction cannot assemble a large new organ at specialist speed. | Restore faster assembly with more P, or retain thrift and build gradually. |
| 038 reduced O dependence | An O-requiring support or protective structure cannot be built from the current recipe. | Reintroduce O use or select an explicit alternative construction. |
| 009 shed propulsion | Independent mobile descendants lack a force-producing structure. | Reacquire propulsion or develop supported contractile tissue. |
| 021-025 photosynthetic specialization | Light-facing surface and nutrient supply constrain thicker bodies. | Rearrange producer surfaces, develop transport, mix feeding strategies. |
| 076-077 resource transfer | Support for internal specialists becomes possible, but separation is harder. | Retain transfer or produce self-sufficient dispersing descendants. |
| 089 specialized daughters | A detached specialist may not survive independently. | Provide viable generalist development or retain support until establishment. |
| 090 self-sufficient daughters | Duplicated machinery makes dense specialized tissue expensive. | Specialize some roles while establishing replacement support. |
| 053 shell or 074 rigid junctions | Flexible limbs/growth openings need an explicit mechanical arrangement. | Local joints/openings, flexible replacements, or shedding in future offspring. |
| 052 thin membrane | Exposed organs and transport paths may need reinforcement. | Add local protective tissue rather than forcing whole-body thickening. |
| 061 small buds | Small founders face limited reserves for large-organ construction. | Larger/provisioned offspring or staged funded growth. |
| 069 dispersal and 080 detachment | Local cooperating population is harder to retain. | Reacquire attachment or develop a mixture of retained and dispersing offspring. |
| 078 polarity and 130 radial arrangement | Different body layouts favor different directions of feeding and force. | Rearrange attachment/development rather than applying a universal speed penalty. |
| 093 broad tolerance versus 094 narrow specialization | Migration range and local efficiency diverge. | Rebuild broader protection or remain a habitat specialist. |
| 121-129 structural precursors | Make some integrated body plans feasible but increase support/transport demands. | Fund missing tissues and transport; no automatic free multicellular conversion. |
Example player-facing card:
> **Nitrogen-thrifty machinery**
>
> Your offspring need less nitrogen, making births easier in this habitat. Their
> maximum feeding and propulsion output will be lower.
>
> **Why offered:** recent births were limited by nitrogen while food was available.
>
> **Future consequence:** high-output organs need more nitrogen or a different
> construction strategy. This choice does not permanently forbid limbs.
>
> **Expression:** future offspring. Your existing body stays as it is.
## Initial subset and balancing work
Pick roughly 20-30 adaptations for an initial coherent experiment. Start with
movement, contact feeding, meaningful energy yield/throughput, small/large buds,
photosynthesis, and attachment. A suggested evaluation set is:
001, 002, 011, 012, 014, 016, 019, 021, 022, 026, 027, 028, 029, 030, 031,
032, 033, 041, 042, 061, 062, 063, 065, 066, 067, 071, 072, 073, 080.
This is **29 candidates to evaluate**, not a claim that 29 can ship now. For
example, 014 needs real selective uptake, 027-028 need a real yield/throughput
tradeoff, storage needs capacity costs, and colony options need working colony
behavior. Exclude an option until both its advantage and drawback are supported.
Prefer a smaller useful set over filling offers with inert possibilities.
Do not offer plain decreased energy conversion, unsupported thermal changes,
isolated shed-movement, or cosmetic numerical mutations with no changed decisions.
Inverse adaptations must each earn their place; no requirement says every trait
needs four automatically generated increase/decrease/acquire/shed buttons.
Measure the following in controlled playtests before accepting numeric rules:
| Question | Evidence needed |
| --- | --- |
| Can an ordinary active founder bud within three minutes? | Distributions across seeds and novice routes; energy and every material bottleneck. |
| Does active foraging beat camping? | Net useful intake after movement/maintenance, time spent stationary by reason, and actual birth times. |
| Does each choice change play? | Subsequent routes, food use, offspring investment, and observed downsides, not acceptance alone. |
| Are colony seekers progressing? | Successful birth count, eligible offers, misses, first attachment, and supported group survival. |
| Does bad luck respect the intended duration? | Median and tail times to useful attachment/progression, not only average draws. |
| Are other strategies still discoverable? | Eligible family diversity, observed choice diversity, and recovery after declines/shedding. |
| Does growth produce an ecosystem? | Offspring establishment, local depletion, interactions, recycling, and lineage persistence. |
| Are future consequences readable? | Players can explain a choice's present cost and later dependency before accepting it. |
Activity and draw records must be bounded, authoritative, reproducible, and
account-free in aggregate reports where possible. Player observations remain
consented playtest notes rather than silently expanded behavioral surveillance.
## Decisions still open
- Which trial timings/weights actually meet the three-minute and 30-60-minute
targets across ordinary players, seeds, and resource channels?
- Which exact adaptations form the first coherent set, and what physical recipe
and measured drawback does each use?
- What earns engaged stationary-play credit without rewarding unattended camping
or requiring meaningless input?
- Which bounded context/preferences carry through succession, and how quickly
should a player be able to change evolutionary direction?
- Should stronger bad-luck protection be opt-in through an expressed direction,
rather than inferred only from behavior?
- How are useful multi-change adaptations represented without hiding dependent
losses or turning the catalog into fixed classes?
- What exact tissue/reserve partition and viable-size rules support immediate
division, and which reproductive adaptations apply to division versus budding?
- How does the UI preview Evolve now versus Prepare offspring, including both
resulting organisms and the irreversible control choice?
- Which real developmental work makes a divergent offspring more expensive,
without double-charging transferred tissue or making experimentation too slow?
- Which traits can change physiologically during life, and which only develop in
offspring? Classify each operator explicitly before implementation.
- How do colony membership, resource ownership, control, death, and logout work
under the current accepted inheritance requirements?
- What separates an attached colony from funded integrated multicellular tissue,
and what additional qualification precedes entry to the 3D habitat?
- Is truly nutrient-free alternative chemistry desirable, or are lower demand and
different acquisition paths sufficient? No total C/N/P/O removal is accepted here.
- Are heritable mutation-frequency/replication traits desirable? Do not add them
merely to make a 150-option catalog: faster mutation opportunities need a useful
tradeoff and must not gate basic budding or create another waiting-time economy.
## Draft completion checks
This documentation segment should verify exactly 150 unique sequential draft IDs,
seven populated fields per catalog row, resolvable local source links, and no
trailing whitespace. These checks validate document structure only. They do not
validate ecological balance, implementation availability, or the pacing targets.
+400
View File
@@ -0,0 +1,400 @@
# Cellular mutation plan
Status: planning draft, 2026-10-22. Records the maintainer's decisions on what a
mutation is, how offers work, and the full catalog for this pass (49 mutations). Where this document
conflicts with [Cellular_mutation_draft.md](Cellular_mutation_draft.md) or
[Cellular_movement_draft.md](Cellular_movement_draft.md), this document wins. No code,
runtime rule or live region is changed by it.
For a single cell, accepting a mutation divides it: the offspring expresses the
mutation and both cells carry it in their heritable plan. A multicellular organism
expresses an accepted mutation directly, without dividing. See
[Cellular_reproduction_plan.md](Cellular_reproduction_plan.md), sections 4 and 6.
## 1. What a mutation is
A mutation is an opportunity to steer the evolution of your organism. Each one is a
catalog entry describing one change to the genome. Very few mutations are pure
upgrades: most carry a pro and a con, and both are shown to the player when choosing.
| Field | Meaning |
| --- | --- |
| Name / description | What the player sees. |
| Effect | The exact genome change, e.g. `output +5, efficiency -2`. |
| Pro / Con | Shown in the offer. Derived from the effect where possible, not a flat penalty. |
| Available | Prerequisites (anatomy, region features) and limits (never past an axis bound). |
| Increase trigger | Behaviour that raises the mutation's affinity score. |
| Decrease trigger | Behaviour that lowers it. |
| Cost | Tunable price in energy and matter, per channel (section 4). |
## 2. Offer cadence
Offers arrive periodically while the player is actively playing. One offer is pending
at a time; it stays available while the player moves and is not dismissed by a timer.
Tunable: `mutation.offer_interval_ms` (trial 25,000) and the definition of active play.
Both need playtesting.
## 3. Weights and the draw
### Affinity scores
- Every cell holds an integer **affinity score per mutation**, starting at 0.
- When a mutation's increase trigger completes, its score rises by that mutation's
`increase_points`; a decrease trigger lowers it by `decrease_points`. The trigger's
timer then restarts, so a held behaviour fires repeatedly.
- Scores are bounded to `[score_min, score_max]`.
- **No drift:** scores change only through triggers, never with time.
- **Inheritance:** offspring start with their parent's scores.
### From score to chance
1. **Eligible pool:** every mutation whose prerequisites are met and whose effect stays
within its limits. Ineligible mutations have no chance at all.
2. **Weight:** `weight = base_weight x multiplier(score)`. The multiplier is 1 at score 0
and rises or falls linearly to `max_multiplier` at `score_max` and `min_multiplier`
at `score_min`.
3. **Chance of appearing in the offer:** `p = clamp(k x weight, floor, cap)`, with `k`
solved so that the chances of the eligible pool sum to the number of options
(300% for three). `floor` = **0.001%** (anomalies always happen); `cap` = **70%**.
4. **Draw:** systematic sampling over the pool. One random number picks the options,
they are always distinct, and each mutation's real chance of appearing equals its
`p`. The draw is seeded per cell and offer, so a retry or reconnect never rerolls.
The pool always holds well over five eligible mutations, so the 70% cap is always
satisfiable.
### Tunable draw settings
| Setting | Scope | Trial |
| --- | --- | --- |
| `offer_options` | global | 3 |
| `cap`, `floor` | global | 70%, 0.001% |
| `score_min`, `score_max` | global | -1000, +1000 |
| `max_multiplier`, `min_multiplier` | global | 10x, 0x (the floor still applies) |
| `base_weight` | per mutation | 100 |
| `increase_points`, `decrease_points` | per mutation | 100 |
| Trigger thresholds (seconds, counts, angles) | per mutation | listed with each mutation |
| Step sizes: primary, paired, spread | per mutation | 5, 2, 1 points |
## 4. Choosing and cost
The player picks one of the options or declines. Declining is free; the next offer
draws again.
Each mutation has its own tunable **cost**: an amount per channel (energy E in
picojoules; carbon C, nitrogen N, phosphorus P and other matter O in femtograms), plus
one **scale** from 0% to 100% for fine tuning. The charged amount per channel is
`amount x scale`.
```text
mutation.strong_propulsion.cost_e_pj = 0
mutation.strong_propulsion.cost_c_fg = 0
mutation.strong_propulsion.cost_n_fg = 0
mutation.strong_propulsion.cost_p_fg = 0
mutation.strong_propulsion.cost_o_fg = 0
mutation.strong_propulsion.cost_scale_percent = 0
```
Every mutation starts with all amounts and the scale at 0. Playtesting decides whether
a mutation needs a cost at all, and further playtesting tunes it, one mutation at a
time.
The cost is paid from the reserve when the mutation is applied; reserve matter can
stand in for its energy part (feeding and energy plan, section 3). An unaffordable
option is still offered; it shows the shortfall and cannot be selected until the
reserve covers it.
**Where the cost goes:** the environment reclaims it. Each non-empty channel of the
paid cost becomes a new resource bubble of that amount at a random point in the
region, chosen by the region's seeded draw so a replay places it identically. Nothing
is destroyed; the region's totals are unchanged.
If the region is already at its deposit limit, the reclaimed amount merges into the
existing bubble **farthest** from the paying cell, so the cost cannot easily be
collected straight back.
This replaces the earlier draft policy of no separate fee for selecting a mutation.
### Testing the pool
For testing, every mutation can be switched on or off in the tuning file
(`mutation.<name>.enabled = 1`). A disabled mutation is not in the pool at all, even
at the floor. Together with `base_weight`, this lets a playtest narrow the pool to
the mutations under test or bias the draw toward them.
## 5. Movement mutations
Movement edits the genome's movement arrangement, in reference points where the founder
is 100. Steps add or remove fixed points; they never compound (100 -> 105 -> 110).
Global defaults: primary step `mutation.step_points` = 5, paired step
`mutation.paired_points` = 2; each mutation can override them (section 3).
Percentages below are at matched conditions against the arrangement before the edit,
from the current handling model (top speed ~ thrust / drag; thrust energy ~ output /
efficiency).
### Core mutations (available from birth)
#### Strong Propulsion
- **Effect:** output +5, efficiency -2.
- **Pro:** top speed and acceleration +5%.
- **Con:** energy per second at full thrust +7%; energy per distance +2%.
- **Increase:** thrust for 10 s in total.
- **Decrease:** no thrust for 30 min.
#### Economical Propulsion
- **Effect:** coasting +5 (lower drag, forward and sideways).
- **Pro:** drifts about 5% further after letting go; top speed +5%; cheaper travel when
thrust is pulsed.
- **Con:** stops more slowly, so precise stops need braking, which costs energy; slides
more in turns.
- **Increase:** thrust at least every 15 s for a minute, or move steadily for a minute.
- **Decrease:** no movement for 2 min.
#### Efficient Propulsion
- **Effect:** efficiency +5, output -2.
- **Pro:** energy per distance -5%; energy per second at full thrust -7%.
- **Con:** top speed and acceleration -2%.
- **Increase:** movement is over half the energy spent in a minute.
- **Decrease:** no thrust for 5 min.
#### Agile Steering
- **Effect:** steering +5, output -2.
- **Pro:** turns 5% faster.
- **Con:** top speed and acceleration -2%.
- **Increase:** 5 sharp turns (over 90 degrees) within 20 s.
- **Decrease:** hold one heading (within 20 degrees) for 60 s of thrust.
#### Streamlined Body
- **Effect:** streamlining +5, steering -2 (lower forward drag only).
- **Pro:** top speed +5% and longer forward glide.
- **Con:** turns 2% slower.
- **Increase:** thrust in a straight line (within 20 degrees) for 20 s.
- **Decrease:** 5 sharp turns within 20 s.
Distinct from Economical Propulsion: Streamlined lowers forward drag only and pays in
turning; Economical lowers drag in every direction and pays in stopping and sliding.
#### Strong Brakes
- **Effect:** braking +5, output -2.
- **Pro:** stops and reverses 5% faster.
- **Con:** top speed -2%; each brake draws 5% more energy.
- **Increase:** brake 5 times within a minute.
- **Decrease:** no braking for 10 min.
### Mirror mutations (kept for now)
Each core mutation has a mirror that moves the same axes the other way, so lowering a
trait is a real choice with its own benefit. A mirror's triggers are its core
mutation's triggers swapped.
| Mirror | Effect | Pro | Con | Increase | Decrease |
| --- | --- | --- | --- | --- | --- |
| Light Propulsion | output -5, efficiency +2 | Energy per second -7%, per distance -2% | Top speed -5% | No thrust for 30 min | Thrust for 10 s |
| Damped Body | coasting -5 | Stops sooner, slides less | Top speed -5%; energy per distance +5% | No movement for 2 min | Pulsed or steady movement for a minute |
| Overdriven Propulsion | efficiency -5, output +2 | Top speed +2% | Energy per second +7%, per distance +5% | No thrust for 5 min | Movement over half of energy spent |
| Forward Drive | steering -5, output +2 | Top speed +2% | Turns 5% slower | One heading for 60 s of thrust | 5 sharp turns in 20 s |
| Rounded Body | streamlining -5, steering +2 | Turns 2% faster | Top speed -5% | 5 sharp turns in 20 s | Straight thrust for 20 s |
| Light Brakes | braking -5, output +2 | Top speed +2% | Stops 5% slower | No braking for 10 min | Brake 5 times in a minute |
### Limits
Each axis has tunable bounds (trial: 25 to 1,000 points; the genome already caps at
1,000). A mutation that would cross a bound is not eligible. Efficiency divides thrust
cost, so it can never reach 0.
### Postponed
Burst, Anchor, Shed propulsion and Colony propulsion are postponed. They are not in the
pool, not even at the 0.001% floor, until their mechanics exist.
## 6. Feeding and energy mutations
Systems and terms are defined in the
[feeding and energy plan](Cellular_feeding_energy_plan.md). All indices are points with
the founder at 100. All available from birth unless stated.
**Spread pattern:** a channel mutation raises one matter channel by the primary step
(5) and lowers each of the other three matter channels by the spread step (1). The
steps are tunable per mutation.
### Feeding
| Name | Effect | Pro | Con | Increase | Decrease |
| --- | --- | --- | --- | --- | --- |
| Carbon Gatherer | C collection +5, N/P/O collection -1 each | Collects carbon 5% faster | Collects N, P, O 1% slower each | Carbon is at least half the matter collected in the last minute | No carbon collected for 5 min |
| Nitrogen Gatherer | N collection +5, C/P/O -1 each | Collects nitrogen 5% faster | Collects C, P, O 1% slower each | Same, for nitrogen | Same, for nitrogen |
| Phosphorus Gatherer | P collection +5, C/N/O -1 each | Collects phosphorus 5% faster | Collects C, N, O 1% slower each | Same, for phosphorus | Same, for phosphorus |
| Other Matter Gatherer | O collection +5, C/N/P -1 each | Collects other matter 5% faster | Collects C, N, P 1% slower each | Same, for other matter | Same, for other matter |
| Big Appetite | Shared intake limit +5, upkeep efficiency -2 | Takes in 5% more per second at rich food | More upkeep | Feeding at the intake limit for 10 s total | No feeding for 5 min |
| Small Appetite (mirror) | Shared intake limit -5, upkeep efficiency +2 | Less upkeep | Takes in 5% less at rich food | No feeding for 5 min | Feeding at the intake limit for 10 s total |
### Energy
| Name | Effect | Pro | Con | Increase | Decrease |
| --- | --- | --- | --- | --- | --- |
| Thorough Extraction | Energy kept per bubble +5, energy collection -2 | More energy from each energy bubble | Drains energy bubbles 2% slower | Burning matter for energy for 30 s total | No matter burned for 10 min |
| Rapid Extraction | Energy collection +5, energy kept per bubble -2 | Drains energy bubbles 5% faster | Keeps slightly less of each | Energy collection at its limit for 10 s total | No energy collected for 5 min |
| Carbon Metabolism | C burn efficiency +5, N/P/O -1 each | Carbon covers 5% more energy when burned | N, P, O cover 1% less each | Burning carbon for 30 s total | No carbon burned for 10 min |
| Nitrogen Metabolism | N burn efficiency +5, C/P/O -1 each | Nitrogen covers 5% more energy | C, P, O cover 1% less each | Burning nitrogen for 30 s total | No nitrogen burned for 10 min |
| Phosphorus Metabolism | P burn efficiency +5, C/N/O -1 each | Phosphorus covers 5% more energy | C, N, O cover 1% less each | Burning phosphorus for 30 s total | No phosphorus burned for 10 min |
| Other Matter Metabolism | O burn efficiency +5, C/N/P -1 each | Other matter covers 5% more energy | C, N, P cover 1% less each | Burning other matter for 30 s total | No other matter burned for 10 min |
Thorough and Rapid Extraction mirror each other. Energy kept per bubble can never
exceed 100% of the bubble's energy.
### Photosynthesis
Light capture is in points, with acquisition at 100.
| Name | Effect | Pro | Con | Available | Increase | Decrease |
| --- | --- | --- | --- | --- | --- | --- |
| Acquire Photosynthesis | Gain producer tissue at 100, energy collection -2 | Steady energy from light | Tissue adds mass (slower, more upkeep); drains energy bubbles slower | After burning a tunable amount of carbon; not a producer | Burning carbon for 30 s total | Burning other channels for 30 s total |
| Expand Photosynthesis | Light capture +5, energy collection -2 | 5% more energy from light | More tissue mass and upkeep; drains energy bubbles slower | Is a producer | Drifting without thrust for 60 s total | Thrust for 2 min total |
| Reduce Photosynthesis (mirror) | Light capture -5, energy collection +2 | Less tissue, lighter; drains energy bubbles faster | Less energy from light | Is a producer, above the minimum | Thrust for 2 min total | Drifting without thrust for 60 s total |
| Shed Photosynthesis | Remove producer tissue | No producer mass or upkeep | No light energy | Is a producer | Thrust for 5 min total | Drifting without thrust for 60 s total |
Shed Photosynthesis has `base_weight` 25 (others 100), so shedding is rarer than
trimming. A cell that sheds it can be offered Acquire again; the carbon it has already
burned still counts.
## 7. Predation and defense mutations
Systems and terms are defined in the
[predation and defense plan](Cellular_predation_defense_plan.md). All indices are points
with the founder at 100. All available from birth.
| Name | Effect | Pro | Con | Increase | Decrease |
| --- | --- | --- | --- | --- | --- |
| Reinforced Membrane | Membrane +5 | Predators need 5% more mass to engulf you | More membrane mass and upkeep, slower collection, heavier | In contact with a cell over 1.5x your mass for 5 s total | No contact with a larger cell for 10 min |
| Thin Membrane (mirror) | Membrane -5 | Faster collection, less mass and upkeep | Easier to engulf | No contact with a larger cell for 10 min | In contact with a cell over 1.5x your mass for 5 s total |
| Expanding Chamber | Engulf capacity +5, membrane -2 | Can engulf prey 5% bigger | Stretched wall: slightly easier to engulf yourself | 3 failed engulfs because the prey was too large or its membrane too thick | No engulf attempts for 10 min |
| Small Mouth (mirror) | Engulf capacity -5, membrane +2 | Tougher wall | Only smaller prey | No engulf attempts for 10 min | 3 failed engulfs because the prey was too large |
| Rapid Digestion | Kill absorption +5, shared intake -2 | Takes 5% more from a kill straight away, so less is left behind | Slower everyday feeding | A successful engulf | No successful engulf for 15 min |
| Grazer's Gut (mirror) | Kill absorption -5, shared intake +2 | Faster everyday feeding | Takes less from kills | No successful engulf for 15 min | A successful engulf |
Expanding Chamber links offense and defense: a better hunter is slightly easier prey.
Failed-engulf reasons (prey too large, membrane too thick) are already reported by the
server; contact with a larger cell is a new counter.
## 8. Body and maintenance mutations
Systems and terms are defined in the
[body and maintenance plan](Cellular_body_maintenance_plan.md). Indices are points with
the founder at 100; the body recipe is in per thousand. All available from birth.
**Recipe spread:** a thrifty body lowers one channel's share by the recipe step (20 per
thousand) and spreads the same amount evenly across the other three. Tunable per
mutation.
| Name | Effect | Pro | Con | Increase | Decrease |
| --- | --- | --- | --- | --- | --- |
| Larger Body | Size +5 | Harder to engulf, can engulf bigger prey, larger footprint touches more food | More upkeep, costlier buds and regrowth, heavier and slower | Reserve holds more matter than the body for 60 s total | Burning matter for energy for 30 s total |
| Smaller Body (mirror) | Size -5 | Less upkeep, cheaper buds and regrowth, quicker | Easier to engulf, smaller prey only | Burning matter for energy for 30 s total | Reserve holds more matter than the body for 60 s total |
| Carbon-Thrifty Body | Carbon share -20, N/P/O share +20 in total | Building, regrowth and buds need less carbon | Need more N, P and O | Growth or a bud blocked by lack of carbon for 10 s total | Carbon is at least half the matter collected in the last minute |
| Nitrogen-Thrifty Body | Nitrogen share -20, C/P/O share +20 in total | Need less nitrogen | Need more C, P and O | Same, for nitrogen | Same, for nitrogen |
| Phosphorus-Thrifty Body | Phosphorus share -20, C/N/O share +20 in total | Need less phosphorus | Need more C, N and O | Same, for phosphorus | Same, for phosphorus |
| Other-Thrifty Body | Other-matter share -20, C/N/P share +20 in total | Need less other matter | Need more C, N and P | Same, for other matter | Same, for other matter |
| Efficient Upkeep | Upkeep efficiency +5, growth speed -2 | Lower upkeep, never below the essential floor | Regrows 2% slower | Upkeep is over half the energy spent in the last 5 min | Regrowing for 60 s total |
| Rapid Growth | Growth speed +5, upkeep efficiency -2 | Regrows 5% faster after splits | More upkeep | Regrowing for 60 s total | Fully grown for 10 min |
| Dense Tissue | Density +5 | Smaller footprint for the same mass, lighter membrane, less upkeep | Less surface: slower collection, touches less food | In contact with a cell over 1.5x your mass for 5 s total | Feeding by contact for 60 s total |
| Light Tissue (mirror) | Density -5 | Larger surface: faster collection, touches more food | More membrane mass and upkeep, bigger target | Feeding by contact for 60 s total | In contact with a cell over 1.5x your mass for 5 s total |
Thrifty bodies have no performance effect; their value is fitting the region's supply,
and they pair with the Gatherer mutations. Efficient Upkeep and Rapid Growth mirror
each other. Dense Tissue and Reinforced Membrane share an increase trigger: both answer
the same threat.
## 9. Reproduction mutations
Systems and terms are defined in the
[reproduction plan](Cellular_reproduction_plan.md). Bud share is in points with the
founder at 100 (half the parent's body). Only on-demand buds count as reproductions;
mutation splits do not.
### Bud size
| Name | Effect | Pro | Con | Increase | Decrease |
| --- | --- | --- | --- | --- | --- |
| Bigger Buds | Bud share +5 | Buds start 5% larger: harder to engulf, more likely to survive | Each bud costs 5% more from the reserve | One of your buds is engulfed within 2 min of birth | A bud refused for lack of resources |
| Smaller Buds (mirror) | Bud share -5 | Each bud is cheaper | Buds start smaller and more vulnerable | A bud refused for lack of resources | One of your buds is engulfed within 2 min of birth |
### Multiple offspring
**Litter** is a heritable value, founder 0, giving extra offspring per bud:
- Each full 100 litter points is one guaranteed extra offspring; the remainder is the
percentage chance of one more. Litter 150 means one extra, plus a 50% chance of a
second.
- Every offspring of one bud shares the same investment, so more offspring means each
is smaller. The bud costs the same.
- The maximum offspring per bud is tunable (trial 10, so litter up to 900).
- Each extra offspring needs a free spot touching the parent and room under the region
cap. If fewer can be placed, fewer are born; the parent keeps the share of any that
were not.
- This replaces the current 25% twin chance: new founders start at litter 0.
| Name | Effect | Pro | Con | Increase | Decrease |
| --- | --- | --- | --- | --- | --- |
| Twinning | Litter +25 | More offspring per bud | Each offspring starts smaller and more vulnerable | Bud while the reserve covers at least twice the bud's cost | One of your buds is engulfed within 2 min of birth |
| Single Bud (mirror) | Litter -25 | Each offspring starts larger | Fewer offspring per bud | One of your buds is engulfed within 2 min of birth | Bud while the reserve covers at least twice the bud's cost |
Single Bud is not eligible at litter 0. Twinning is not eligible at the maximum.
### Becoming multicellular
| Name | Effect | Pro | Con | Available | Increase | Decrease |
| --- | --- | --- | --- | --- | --- | --- |
| Adhesion | Gain Adhesion | Become a multicellular organism: the path to emerging into the world | Permanent: no more splits, one shared reserve, the whole organism can be engulfed at once, heavier | After a tunable number of on-demand buds (trial 5) | Each on-demand bud | No bud for 15 min |
Adhesion has `base_weight` 50. Accepting it is a split whose offspring expresses
Adhesion and attaches, so the organism forms at once whichever cell the player keeps;
its offer shows Accept and Decline only.
Emerging into the world is a **button**, not a mutation: it appears once the organism
reaches the emergence threshold (reproduction plan, section 7).
## 10. Balance notes
- Economical Propulsion and Streamlined Body raise top speed without raising energy per
second. Their cost and weights must keep them from dominating.
- Big Appetite only matters where a channel's own limit is above the share of the
shared limit it gets; the shared limit and channel limits must be tuned together.
- Thresholds above are first guesses. "Thrust for 10 s" is cumulative and fires each
time 10 s of thrust accrues; "no thrust for 30 min" is continuous.
## 11. Implementation map
| Piece | State today |
| --- | --- |
| Movement arrangement in the genome | Exists (schema 6); not edited by any mutation yet. |
| Handling from the arrangement | Exists: output, efficiency, steering, streamlining, braking, coasting. |
| Step/paired points, interval, option count | Keys exist in `cellular.tuning`; unused by code. |
| Named catalog with pro/con, triggers and cost | New: replaces the 32 generic adjust/acquire/shed operators for new rules. |
| Per-cell affinity scores | New persisted state, inherited at birth (lives format bump). |
| Trigger tracking | New server-side activity counters from per-tick thrust, brake, heading and velocity. |
| Chance allocation and systematic draw | New: replaces the current uniform draw of 3. |
| Per-mutation cost and scale | New tuning keys and funding path; defaults all 0. |
| Reclaimed cost | New: paid channels become seeded random bubbles in the region. |
| Per-mutation `enabled` switch | New tuning key, for narrowing the pool in tests. |
| Per-mutation step sizes | New tuning keys (primary, paired, spread). |
| Feeding and energy genome fields | New: collection index per channel, shared intake, burn efficiency per channel; energy kept per bubble reuses `energy_conversion`. |
| Feeding and energy triggers | New counters: diet share per channel, time at intake limit, matter burned per channel, drifting time. |
| Predation genome fields | New: membrane in points, engulf capacity, kill absorption. |
| Predation triggers | Failed-engulf reasons exist; contact time with larger cells and kill timers are new. |
| Body genome fields | New: size in points, body recipe, upkeep efficiency, density, growth speed. |
| Body triggers | New: growth or bud blocked by a named channel, regrowth time, time fully grown, reserve-to-body ratio. |
| Reproduction genome fields | Bud share exists (reproduction capability, in points is new); litter and Adhesion are new. |
| Multiple offspring per bud | Twin budding exists (shared investment, room check); litter in place of the fixed 25% chance is new. |
| Reproduction triggers | New: on-demand bud count, bud refusals, early deaths of own buds, reserve-to-bud-cost ratio. |
| Offer UI | Shows name, pro, con, cost, shortfall and chance. |
Every new behaviour goes in a new rules version; regions on earlier rules keep their
meaning.
+108
View File
@@ -0,0 +1,108 @@
# Cellular predation and defense plan
Status: planning draft, 2026-10-22. Records the maintainer's decisions on engulfment
and membrane defense. Part of the [Cellular gameplay plan](Cellular_gameplay_plan.md).
Replaces the engulfment sections of [Cellular_feeding_draft.md](Cellular_feeding_draft.md)
and the active parts of [Cellular_defense_draft.md](Cellular_defense_draft.md). No code,
runtime rule or live region is changed by it.
## 1. Who can engulf
Every cell can try to engulf, wildlife included. The player engulfs by targeting a cell
it touches (the existing engulf action); wildlife uses the same action through its
controller. Engulfing is not a capability gained by mutation.
## 2. Eligibility
Engulfment is **instant**: if the attempt is eligible, the prey dies that tick.
```text
predator engulf mass x (predator engulf capacity / 100)
>= prey engulf mass x engulf ratio x (prey membrane points / 100)
```
Engulf capacity is a genome index, founder 100 (section 6).
- **Engulf mass** = body mass + reserve matter x `engulf_reserve_mass_percent`. At 100%
a hoarding cell is both harder to engulf and able to take larger prey; at 0% only
the body counts. Movement always counts all reserve matter; this setting affects
predation only.
- **Engulf ratio:** tunable; trial 1.5 (today's value), so at the founder's membrane a
predator needs 1.5 times the prey's mass.
- **Multicellular organisms** are engulfed whole or not at all, judged on the
organism's total engulf mass.
- Same-tick contests resolve in stable life order, as today.
## 3. What the predator gets
1. The predator absorbs up to its **per-tick collection limit** on each channel,
scaled by its kill absorption index (founder 100), from the prey's body and
reserve. Energy absorbed this way follows the energy-bubble efficiency rule
(feeding and energy plan, section 4a); the rest of it is heat.
2. The **remainder** is split:
- **Half becomes bubbles** at the prey's spot (one per non-empty channel), for the
predator to eat over the next ticks. Other cells and the currents compete for
them.
- **Half goes to the region's spent pool** and seeps back into the region as
random bubbles.
3. The prey's accumulated heat goes to the region's heat owner, as today.
If the region is at its deposit limit, the bubble half goes to the spent pool as well.
Staying to eat the bubbles is a risk: a predator that sits still long enough can
become prey itself.
## 4. Membrane defense
Membrane thickness is stored in **points**, with the founder at 100 (today's 1 µm), so
it can change in 5-point steps like movement.
| Thicker membrane | Thinner membrane |
| --- | --- |
| Harder to engulf (the ratio scales with points) | Easier to engulf |
| More membrane mass, which is upkept twice (exists) | Less mass and upkeep |
| Slower collection on every channel (new) | Faster collection |
| Heavier, so slower to move | Lighter |
The collection penalty is a tunable coefficient. Membrane points have a tunable
minimum (a viable cell wall) and maximum.
## 5. Postponed
Armor, live capture and escape, prey retention, slippery coating, adhesive grip,
defensive expulsion and siphoning wait for a live-capture system. They are not in the
mutation pool.
## 6. Genome indices and mutations
| Index | Founder | Mutations (mutation plan, section 7) |
| --- | --- | --- |
| Membrane points | 100 | Reinforced Membrane, Thin Membrane |
| Engulf capacity: scales the predator's side of the eligibility check | 100 | Expanding Chamber, Small Mouth |
| Kill absorption: scales the per-tick limit during a kill | 100 | Rapid Digestion, Grazer's Gut |
## 7. Tunables
| Setting | Trial |
| --- | --- |
| Engulf ratio | 1.5 |
| `engulf_reserve_mass_percent` | 100% |
| Kill remainder bubble share | 50% (the rest to the spent pool) |
| Membrane collection penalty | To be selected in playtesting |
| Membrane points minimum and maximum | To be selected in playtesting |
## 8. Implementation map
| Piece | State today |
| --- | --- |
| Instant engulfment by contact, in stable order | Exists (rules 3+). |
| Wildlife engulfing | Exists (rules 7+). |
| Engulf mass with tunable reserve share | New; today only body plus reserve as total mass. |
| Membrane in points | New genome representation (whole micrometres today). |
| Kill remainder split between bubbles and spent pool | New; today all of it becomes bubbles. |
| Membrane slowing collection | New. |
| Engulf capacity and kill absorption indices | New genome fields. |
| Whole-organism engulfment | New, with the multicellular organism. |
Every new behaviour goes in a new rules version; regions on earlier rules keep their
meaning.
+211
View File
@@ -0,0 +1,211 @@
# Cellular reproduction plan
Amendment, 2026-10-26: [ADR-0181](docs/adr/0181-cellular-reproduction-safety.md)
adds an opt-in DEV safety revision: controlled-cell split allocation, retained bud
provision and physical offspring separation. Historical declarations retain the
baseline below. All allocation/launch values remain trial tuning.
Status: planning draft, 2026-10-22. Records the maintainer's decisions on the
reproduction revamp. Companion to [Cellular_mutation_plan.md](Cellular_mutation_plan.md).
Where this document conflicts with the earlier drafts or with the unimplemented
proposals in ADR-0135, this document wins. No code, runtime rule or live region is
changed by it.
## 1. Purpose
Today reproduction has no purpose for the player: it costs resources, and the player
watches the offspring swim off, eat and reproduce until it dies.
The goal is one loop:
**gather energy and matter -> evolve and reproduce -> become a multicellular
organism -> break out of the region into the world.**
Reproduction becomes the way a lineage evolves, and the way a multicellular organism
grows.
## 2. Two genomes per cell
Every cell carries two genome references (they already exist from rules 10):
| Genome | Meaning |
| --- | --- |
| **Expressed** | What its own body is built from: its traits, handling, costs. |
| **Heritable plan** | What its offspring are born expressing. |
A newborn starts with both references naming the same genome: it expresses its plan.
## 3. Bud (on demand)
- **Trigger:** the player presses Bud.
- **Requires:** fully grown (`bud_min_growth`), a free spot touching the parent, and
the region below its organism cap.
- **Cost:** the parent's reserve pays the bud's body, the energy to build it and its
starting energy supply, as today. A tunable fee per channel (default 0, with the same
amount-and-scale model as mutation costs) is added on top and reclaimed by the
environment as random bubbles.
- **Offspring:** expresses the parent's heritable plan, so it carries every mutation
held in that plan.
- **Size:** the reproduction capability's share of the parent's body (founder: half),
built from the parent's reserve (body and maintenance plan, section 6).
- **Litter:** a heritable value (founder 0) can give extra offspring per bud, up to a
tunable maximum (trial 10). They share one investment, so each is smaller. See the
mutation plan, section 9.
- **Control:** the player chooses to stay as the parent or become the bud. The cell the
player leaves becomes wildlife. The choice is one way.
This section describes a single cell. A multicellular organism's bud becomes an
internal cell instead (section 6).
## 4. Mutation split
Accepting a mutation divides a single cell. (A multicellular organism expresses an
accepted mutation directly; section 6.)
1. The mutation's cost is paid and reclaimed by the environment (mutation plan,
section 4).
2. The mutation is written into the heritable plan of **both** cells.
3. The cell divides. Body and reserve are split per channel by `split_share` (trial
50%); a rounding remainder stays with the founder. Each half starts at the size its
half of the body covers and regrows by feeding (body and maintenance plan,
section 5).
4. The **offspring expresses the mutation**. The **founder does not**: its body is
unchanged, but its plan now carries the mutation.
5. The player chooses which cell to continue as. The other becomes wildlife. (When the
mutation is Adhesion, the two stay attached instead; section 6.)
The control choice is made in the offer itself: each option has **Stay as founder**
and **Become offspring**. Nothing waits on a decision window after the birth.
| Choice | The player controls | The other cell |
| --- | --- | --- |
| Stay as founder | The unchanged body, with half the resources. Every later bud expresses the mutation. | The mutated offspring becomes wildlife: the player watches how the mutation does. |
| Become offspring | The mutated body, with half the resources, not starting from nothing. | The founder becomes wildlife with an unchanged body; its own buds are mutated. |
Consequences:
- A player who always stays as the founder accumulates mutations in their plan, but
their own body never changes. To live in a mutated body, the player must at some
point become an offspring.
- If a mutation changes how much matter the body needs, the offspring funds the
difference from its half. If it cannot, the split is refused and nothing is spent.
- Both cells inherit the founder's affinity scores.
### When a split is not possible
A split needs a minimum growth (`split_min_growth`, trial: fully grown), a free spot
touching the founder, and the region below its organism cap. If any is missing, the
option shows why and cannot be chosen; the offer stays pending until the split is
possible or the player declines.
## 5. The cell the player leaves
It becomes autonomous wildlife, as today: it feeds, buds from its own heritable plan
and dies. Wildlife earns no mutation offers.
## 6. Becoming multicellular
### The transition
- **Adhesion** is a mutation, offered after a tunable number of on-demand buds (trial
5; mutation splits do not count). A newborn that expresses Adhesion stays attached to
its parent.
- The moment a newborn attaches, the parent and newborn become **one multicellular
organism**. There is no separate colony stage.
- Accepting Adhesion is a mutation split (section 4) whose offspring expresses
Adhesion, so it attaches at once: the organism forms immediately, whichever cell the
player would have kept. The offer shows Accept and Decline only.
- The organism expresses **one genome**: the founder's heritable plan at the moment of
attachment, which now includes Adhesion. Mutations the founder held in its plan
become expressed for the whole organism. Any tissue that change requires is funded
from the combined reserve; if it cannot be funded, the split is refused and nothing
is spent.
- A member can never be detached.
### Life as a multicellular organism
- **One reserve:** every member's reserve combines into the organism's reserve.
- **Mutations affect the whole organism.** Accepting one does not split anything; it is
expressed by the organism directly, paid from the organism's reserve, and changed
tissue is funded from it. The offer shows only Accept or Decline; there is no
Stay / Become choice.
- **Budding adds an internal cell.** The bud's body is built from the organism's
reserve and becomes part of the organism. It counts toward the emergence threshold.
- **The goal changes:** the organism gathers mass and energy to emerge into the world.
- **Region cap:** a multicellular organism counts once toward the region's organism
cap, however many members it has.
- **Mass drives movement and energy.** Every member adds to the organism's mass.
Heavier organisms accelerate and turn more slowly for the same thrust, and movement
energy rises with total mass, reserve matter included. Upkeep rises with body mass
only (feeding and energy plan, section 4). The coefficients are tuned in
playtesting.
### Wildlife organisms
Because Adhesion always forms the organism at once with the player's cell, and an
organism never releases a cell, wildlife cannot currently become multicellular. As a
safeguard, a wildlife organism **cannot emerge**: it stops budding one member short of
the emergence member threshold. Wildlife earns no mutation offers.
### Death
The organism lives and dies as one body.
- **Starvation:** with one reserve, members cannot starve individually. The organism
starves when its reserve cannot pay its maintenance, and the whole organism dies.
- **Engulfment:** a predator engulfs the whole organism or none of it, judged on the
organism's total mass.
- **On death:** every member becomes a corpse and its matter returns to the region as
food, as deaths do today.
This replaces the earlier rule that a dead member is recycled to the colony: with a
combined reserve, a member cannot die on its own.
## 7. Emergence
When the organism reaches the emergence threshold, an **Emerge** button appears. It is
not a mutation and is not drawn in offers. Pressing it leaves the region and enters the
world as ADR-0177 describes: the matter is a recorded export, and the organism arrives
at a world-scaled value at a location chosen near its preferred temperature and
nutrients. Individual or bulk emergence
follows ADR-0177.
The threshold is tunable: member count, total mass and reserve energy.
## 8. Tunables
| Setting | Trial |
| --- | --- |
| `bud_min_growth` | 1000 per thousand (fully grown) |
| `bud_fee` per channel, `bud_fee_scale_percent` | 0, 0 |
| `split_min_growth` | 1000 per thousand |
| `split_share` | 50% |
| Emergence threshold: members, total mass, reserve energy | To be selected in playtesting |
| Wildlife member limit | Emergence member threshold minus 1 |
| Mass coefficients for acceleration, turning, movement and maintenance energy | To be selected in playtesting |
## 9. Open questions
None. Organism size, drag and feeding contact by member count are tuned with the mass
coefficients above.
## 10. Implementation map
| Piece | State today |
| --- | --- |
| Expressed genome and heritable plan per cell | Exists (lives format 8, rules 10-12). |
| Bud funding with a different offspring genome | Exists (`fund_offspring`, ADR-0164). |
| Funding a mutation at the current growth | Exists (`fund_mutation_at_growth`, ADR-0157). |
| Funded regrowth after a split | Exists (funded maturation, rules 9). |
| Choosing parent or child at birth | Accepted direction (ADR-0163); not built. |
| On-demand bud with a control choice and a fee | New. |
| Mutation split: even division of body and reserve | New transition; not the bud bill. |
| Offer options with Stay / Become | New wire and UI. |
| Adhesion and the multicellular transition | New. |
| Multicellular organism: one genome, one reserve, internal buds | New. |
| Mass-scaled handling and energy for the organism | Partial: movement and maintenance energy already scale with a cell's body mass; reserve mass in movement and organism-level handling are new. |
| Wildlife member limit below the emergence threshold | New safeguard. |
| Emergence | Accepted direction (ADR-0177); not built. |
Every new behaviour goes in a new rules version; regions on earlier rules keep their
meaning.
+86 -4
View File
@@ -105,6 +105,8 @@ ctest --preset release
./build/release/evo-benchmark
./build/release/evo-spatial-benchmark
./build/release/evo-resolution-benchmark
./build/release/evo-cellular-reference --verify
./build/release/evo-cellular-cohorts --verify
./build/release/evo-chunk-layout
```
@@ -126,14 +128,61 @@ genome record, the deterministic development that derives a phenotype from it an
the metabolic budgets that give capability a cost, and the seeded mutation
catalog that proposes successors and the archive that keeps them. Synthetic
process fixtures remain separate from organism biology.
[Regional cellular census](schemas/ecology/regional-cellular-census-v1.md) provides
read-only local resident/presence/cohort and exact/descendant observations from
current cellular owners. Retained departed history is excluded from owned stock.
[Projection 2](schemas/ecology/regional-cellular-census-v2.md) additionally
observes raw and portable exact-population offspring plans separately from
expressed organisms and
inventory; old projection-1 plan measures remain unobserved.
[Committed regional history](schemas/ecology/committed-cellular-history-v1.md) now
derives bounded, fully replayed census pages from the existing atomic biological
journal. [Scoped multi-region queries](schemas/ecology/scoped-cellular-census-set-v1.md)
require exact declared coverage/boundaries, consistent immutable genomes and
disjoint resident identities before summing.
[Consistent scoped snapshots](schemas/ecology/consistent-cellular-census-snapshot-v1.md)
capture declared current heads in one short database snapshot, then fully replay
the immutable cuts; concurrent atomic migration cannot split a selected pair.
Schema 50's [registered-region coverage](schemas/ecology/registered-world-census-coverage-v1.md)
requires every region in the durable authority registry, including unavailable
owners, within the same selected database view. Schema 51's
[history domain](schemas/ecology/database-history-domain-v1.md) identifies that
database history and forks supported restores with parent/exact-cut provenance.
Schema 52 also returns [verified pending handoffs](schemas/ecology/census-pending-migrations-v1.md)
from that same view; staged ghosts never add census stock.
Complete world/branch reconciliation, client queries and terminal extinction
remain later gates.
`apps/evo-sim` owns CLI/file I/O
and reporting. `tests` holds contract,
fuzz and measurement programs. `src/server/lifecycle` owns funded primitive
founder creation and an in-memory cellular tick owner over the finite habitat.
The cellular owner now has durable profile-4 recovery/publication and an
adapter for reliable v7 session actions. `evo-server` still lacks the cellular
scheduler, player-life entry operation, and cellular view replication, so this
is not yet a playable client path. `evo::simulation` remains
The cellular owner has durable profile-4 recovery/publication and the cellular
worker/session path. Opt-in exact population profile 5 is described in
[M12 durable populations](docs/engineering/M12_DURABLE_POPULATIONS.md);
`--cellular-populations on|off` defaults to off. Its
[owned intervals](docs/engineering/M12_OWNED_POPULATION_INTERVALS.md) survive
replacement owners; biological migration, environmental coupling and production
qualification remain in progress. The
portable [biological transfer candidates](docs/engineering/M12_EXACT_BIOLOGICAL_TRANSFER.md)
preserve exact identity/history and regional boundary budgets. Their scoped
durable preparation/staging, atomic paired publication and verified recovery are
implemented; [TLS transport fault checks](docs/engineering/M12_MIGRATION_TRANSPORT_FAULTS.md)
cover independent local path loss and owner replacement. Linked ecology and
deployment qualification remain open. Portable opt-in
[rules-9 maturation](docs/adr/0157-funded-cellular-maturation.md) now funds real
juveniles through adulthood and budding in the same raw/cohort kernel.
[Schema 53's explicit durable upgrade](schemas/cellular-maturation-upgrade.md)
retains both representations and their full recovery evidence.
[Rules-9 census](docs/adr/0159-maturing-cellular-census.md) observes exact growing
stock through verified history and registered snapshots; mixed rule cuts fail.
[Portable rules-9 transfers](schemas/cellular-migration-trace-v2.md) retain exact
growing bodies under a distinct replay version.
[Schema 54](docs/adr/0161-durable-maturing-wildlife-transfer.md) admits those exact
pairs through fenced freeze/stage/paired publication and verified recovery/census.
Autonomous ecological and deployment qualification remain open.
The microscope client is the M11 playtest path.
`evo::simulation` remains
graphics-, network- and database-independent.
World0 is persistent state. No normal configure, build, test or CI job may create,
@@ -146,6 +195,39 @@ from a public dependency's license.
M4.6 reproduction, measurements and limits: [aggregate budget report](docs/engineering/AGGREGATE_BUDGET.md).
M12.2c's [current cellular reference](docs/engineering/M12_CELLULAR_REFERENCE.md)
checks rules-8 encoded replay and offline closure. `evo-cellular-reference --verify`
runs the short CTest matrix; without arguments it runs the full research matrix
with local cost observations. This is an exact control, not production aggregation.
[Unscripted generations](docs/engineering/M12_UNSCRIPTED_GENERATIONS.md) uses real
funded player-origin offspring under the unchanged controller. Build
`evo-cellular-generations`; `--verify` runs the short CTest contract and `--qualify`
runs the declared 80,000-tick development/hold-out matrix with raw/cohort equality,
whole-genome conversions, restores and resource controls. This is bounded ecology
evidence, not actual-days or product acceptance.
The opt-in [retained offspring-plan owner](docs/adr/0165-retained-cellular-offspring-plans.md)
keeps parent anatomy separate from earned inherited changes and repeatedly funds
offspring from the saved plan. Build `evo-cellular-inheritance-tests`; CTest
`cellular-inherited-plans` and `cellular-inheritance-process-restart` cover its
portable contract. [Format 8](schemas/cellular-lives-v8.md) is not admitted to
existing durable bundles or live entry. Control succession and behavior/UI
integration remain pending.
[Inherited-plan replay](schemas/cellular-region-batch-v4.md) uses explicit raw
trace 4 with owner 8/rules 10; old defaults remain trace 3. Build
`evo-cellular-inheritance-replay-tests`; CTest `cellular-inherited-replay` and
`cellular-inherited-replay-process-restart` compare recorded inputs and complete
results with direct execution, including same-tick selection/birth. This is a
portable prerequisite for durable admission.
The [portable inheritance checkpoint upgrade](schemas/cellular-inheritance-upgrade.md)
defines raw bundle 12 and an exact no-tick transformation from bundle 11. Build
`evo-cellular-inheritance-checkpoint-tests`; CTest covers the manifest/payload
contract and its separate-process reproduction. SQL publication and population
support remain subsequent work.
M5.1 local voxel/address API and scope: [local voxel contract](docs/world/LOCAL_VOXEL_CONTRACT.md).
M5.8 process restart proof and measured costs: [world proof](docs/engineering/WORLD_PROOF.md).
+261
View File
@@ -0,0 +1,261 @@
// ADR-0182 read-only admin API and portal host for one world (DEV).
//
// evo-admin-api --listen ADDRESS:PORT --world N --jwks JSON --oidc-issuer URL
// --audience NAME --client NAME --role NAME --assets DIR
// --pg-passfile F --pg-service F [--region REGION=HOST:PORT ...] [--baseline-tuning F]
// [--region-tuning F] [--deploy-config DIR]
//
// --assets holds the portal's index.html, app.js and style.css. Each --region names a
// region's operations address, whose /admin/view the portal may show; those regions adopt
// tuning revisions. --baseline-tuning is the revamp tuning file they opened with, shown
// until the first revision; --region-tuning the region tuning file they start with, shown
// read only. --deploy-config is the mounted Secret holding the Gitea and Argo CD settings and
// tokens (one file per key) that let the portal open a region (ADR-0182 section 15); without
// it, or with a key missing, that feature stays off. No token is printed.
#include "evo/persistence/postgres.hpp"
#include "evo/server/admin/admin_api.hpp"
#include <algorithm>
#include <charconv>
#include <chrono>
#include <csignal>
#include <cstdio>
#include <fstream>
#include <iterator>
#include <map>
#include <optional>
#include <string>
#include <string_view>
#include <thread>
#include <vector>
namespace {
using namespace evo;
using namespace std::chrono_literals;
volatile std::sig_atomic_t stop_requested = 0;
void on_stop(int) {
stop_requested = 1;
}
struct Options {
std::string listen, jwks, oidc_issuer, audience, client, role, assets, baseline_tuning,
region_tuning, deploy_config;
std::uint64_t world{};
std::map<std::uint64_t, std::string> regions; // Region to its operations address.
persistence::PgOptions pg;
};
std::optional<std::uint64_t> number(std::string_view text) {
std::uint64_t value{};
const auto [end, error] = std::from_chars(text.data(), text.data() + text.size(), value);
if (error != std::errc{} || end != text.data() + text.size())
return std::nullopt;
return value;
}
std::optional<Options> parse(int argc, char** argv) {
Options o;
std::string pg_service, pg_passfile;
for (int i = 1; i + 1 < argc; i += 2) {
const std::string_view flag = argv[i];
const std::string_view value = argv[i + 1];
const auto n = number(value);
if (flag == "--listen")
o.listen = value;
else if (flag == "--world" && n && *n > 0)
o.world = *n;
else if (flag == "--jwks")
o.jwks = value;
else if (flag == "--oidc-issuer")
o.oidc_issuer = value;
else if (flag == "--audience")
o.audience = value;
else if (flag == "--client")
o.client = value;
else if (flag == "--role")
o.role = value;
else if (flag == "--assets")
o.assets = value;
else if (flag == "--baseline-tuning")
o.baseline_tuning = value;
else if (flag == "--region-tuning")
o.region_tuning = value;
else if (flag == "--deploy-config")
o.deploy_config = value;
else if (flag == "--pg-service")
pg_service = value;
else if (flag == "--pg-passfile")
pg_passfile = value;
else if (flag == "--region") {
const auto equals = value.find('=');
const auto region =
equals == std::string_view::npos ? std::nullopt : number(value.substr(0, equals));
const auto address =
equals == std::string_view::npos ? std::string_view{} : value.substr(equals + 1);
if (!region || *region == 0 || address.empty() || address.size() > 128 ||
!o.regions.emplace(*region, std::string(address)).second)
return std::nullopt;
} else
return std::nullopt;
}
// Names are embedded in the portal's JSON settings: printable ASCII without quotes.
const auto plain = [](std::string_view text) {
return !text.empty() && text.size() <= 256 && std::ranges::all_of(text, [](char ch) {
return ch > ' ' && ch <= '~' && ch != '"' && ch != '\\';
});
};
if (argc % 2 != 1 || o.listen.empty() || o.world == 0 || o.jwks.empty() ||
!plain(o.oidc_issuer) || !o.oidc_issuer.starts_with("https://") || !plain(o.audience) ||
!plain(o.client) || !plain(o.role) || o.assets.empty() || pg_service.empty() ||
pg_passfile.empty())
return std::nullopt;
auto service = persistence::read_pg_service(pg_service, "evolution");
if (!service)
return std::nullopt;
o.pg = *service;
o.pg.password_file = pg_passfile;
return o;
}
std::optional<std::string> read_file(const std::string& path) {
std::ifstream file{path, std::ios::binary};
if (!file)
return std::nullopt;
std::string body{std::istreambuf_iterator<char>{file}, std::istreambuf_iterator<char>{}};
if (body.empty() || body.size() > (std::size_t{1} << 20U))
return std::nullopt;
return body;
}
std::uint64_t wall_seconds() {
return static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
.count());
}
} // namespace
int main(int argc, char** argv) {
const auto options = parse(argc, argv);
if (!options) {
std::fputs("usage: evo-admin-api (see apps/evo-admin-api/main.cpp)\n", stderr);
return 2;
}
std::signal(SIGTERM, on_stop);
std::signal(SIGINT, on_stop);
std::signal(SIGPIPE, SIG_IGN);
auto verifier = server::broker::TokenVerifier::from_jwks(
options->jwks,
{options->oidc_issuer, options->audience, options->client, 30, options->role});
if (!verifier) {
std::puts("error jwks");
return 2;
}
std::vector<server::admin::AdminAsset> assets;
for (const auto& [name, type] : {std::pair{"index.html", "text/html; charset=utf-8"},
std::pair{"app.js", "text/javascript; charset=utf-8"},
std::pair{"style.css", "text/css; charset=utf-8"}}) {
auto body = read_file(options->assets + "/" + name);
if (!body) {
std::printf("error assets %s\n", name);
return 2;
}
assets.push_back({std::string("/") + name, type, std::move(*body)});
}
// The realm's origin: sign-in redirects there and the portal exchanges tokens with it.
const auto origin_end = options->oidc_issuer.find('/', std::string_view{"https://"}.size());
const auto origin = options->oidc_issuer.substr(0, origin_end);
server::admin::AdminConfig config;
config.world = options->world;
for (const auto& [region, address] : options->regions)
config.view_regions.push_back(region);
if (!options->baseline_tuning.empty()) {
auto baseline = read_file(options->baseline_tuning);
if (!baseline) {
std::puts("error baseline-tuning");
return 2;
}
config.baseline_tuning = std::move(*baseline);
}
if (!options->region_tuning.empty()) {
auto region = read_file(options->region_tuning);
if (!region) {
std::puts("error region-tuning");
return 2;
}
config.region_tuning = std::move(*region);
}
config.portal_config_json = "{\"issuer\":\"" + options->oidc_issuer + "\",\"client_id\":\"" +
options->client + "\",\"world\":" + std::to_string(options->world) +
"}\n";
config.content_security_policy =
"default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data:; "
"connect-src 'self' " +
origin + "; form-action 'self' " + origin + "; frame-ancestors 'none'; base-uri 'none'";
auto listening = server::OpsServer::listen(options->listen,
server::OpsServer::max_configurable_response_bytes);
if (!listening) {
std::puts("error listen");
return 2;
}
const auto pg = options->pg;
const auto regions = options->regions;
server::admin::AdminApi api{std::move(config), std::move(*verifier),
[pg]() -> std::unique_ptr<persistence::Postgres> {
auto db = persistence::Postgres::connect(pg, 3s);
return db ? std::move(*db) : nullptr;
},
[regions](std::uint64_t region) -> std::optional<std::string> {
const auto found = regions.find(region);
if (found == regions.end())
return std::nullopt;
return server::admin::http_get(
found->second, "/admin/view", 1500ms,
server::OpsServer::max_configurable_response_bytes);
},
std::move(assets)};
// ADR-0182 section 15: the portal opens regions only when every deploy key is present.
if (!options->deploy_config.empty()) {
const auto key = [&](const char* name) {
auto text = read_file(options->deploy_config + "/" + name).value_or("");
while (!text.empty() &&
(text.back() == '\n' || text.back() == '\r' || text.back() == ' '))
text.pop_back();
return text;
};
server::admin::AdminDeployConfig deploy{.gitea_base = key("GITEA_BASE_URL"),
.gitea_repository = key("GITEA_REPOSITORY"),
.gitea_token = key("GITEA_TOKEN"),
.branch = "main",
.argo_server = key("ARGOCD_SERVER"),
.argo_application = key("ARGOCD_APPLICATION"),
.argo_token = key("ARGOCD_TOKEN"),
.argo_verify = key("ARGOCD_TLS_VERIFY") != "false"};
if (deploy.gitea_base.empty() || deploy.gitea_repository.empty() ||
deploy.gitea_token.empty() || deploy.argo_server.empty() ||
deploy.argo_application.empty() || deploy.argo_token.empty()) {
std::puts("deploy disabled (incomplete configuration)");
} else {
std::printf("deploy enabled repository %s application %s argo-verify %s\n",
deploy.gitea_repository.c_str(), deploy.argo_application.c_str(),
deploy.argo_verify ? "yes" : "no");
api.enable_deploy(std::move(deploy), server::admin::https_request);
}
}
std::printf("admin api listening %u world %llu\n", static_cast<unsigned>((*listening)->port()),
static_cast<unsigned long long>(options->world));
std::fflush(stdout);
while (stop_requested == 0) {
(*listening)
->serve_api(
[&](const server::ApiRequest& request) {
return api.handle(request, wall_seconds(), std::chrono::steady_clock::now());
},
server::OpsServer::max_api_body_bytes); // Tuning texts (ADR-0182 section 13).
std::this_thread::sleep_for(5ms);
}
std::puts("admin api stopped");
return 0;
}
File diff suppressed because it is too large Load Diff
+37
View File
@@ -0,0 +1,37 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>AEvolution Admin</title>
<link rel="stylesheet" href="/style.css">
<script type="module" src="/app.js"></script>
</head>
<body>
<header class="bar">
<a class="brand" href="#/accounts">AEvolution <span>admin</span></a>
<nav class="sections" aria-label="Sections">
<div class="section">
<span class="section-name">Cellular</span>
<a href="#/accounts" data-route="accounts">Accounts</a>
<a href="#/regions" data-route="regions">Regions</a>
<a href="#/tuning" data-route="tuning">Tuning</a>
</div>
</nav>
<div class="who">
<span id="env" class="env" hidden></span>
<div class="theme-switch" role="group" aria-label="Theme">
<button type="button" data-theme-choice="system" title="Follow the system">Auto</button>
<button type="button" data-theme-choice="light" title="Light">&#9728;</button>
<button type="button" data-theme-choice="dark" title="Dark">&#9790;</button>
</div>
<span id="who" class="muted small"></span>
<button id="sign-out" class="ghost" hidden>Sign out</button>
</div>
</header>
<main id="main" tabindex="-1">
<p class="muted">Loading…</p>
</main>
</body>
</html>
+625
View File
@@ -0,0 +1,625 @@
/* ADR-0182 admin portal. Tokens first: light by default, dark from the system or the header's
theme switch (html[data-theme]). The region map reads the map tokens when it paints. */
:root {
--bg: #f3f5f8;
--panel: #ffffff;
--panel-2: #f6f8fa;
--panel-3: #eef1f5;
--line: #e1e6ec;
--line-strong: #cfd6de;
--text: #17202a;
--muted: #5f6c79;
--faint: #8b96a2;
--accent: #2563eb;
--accent-soft: rgba(37, 99, 235, 0.1);
--on-accent: #ffffff;
--good: #15925f;
--good-soft: rgba(21, 146, 95, 0.1);
--warn: #b7791f;
--warn-soft: rgba(183, 121, 31, 0.12);
--bad: #d64545;
--bad-soft: rgba(214, 69, 69, 0.1);
--shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
--shadow-pop: 0 8px 24px rgba(16, 24, 40, 0.14);
/* Region map. */
--map-bg: #fbfcfd;
--map-grid: rgba(23, 32, 42, 0.05);
--map-edge: #cfd6de;
--map-glass: rgba(255, 255, 255, 0.86);
--player: #2f6fed;
--online: #06b6d4;
--wildlife: #16a34a;
--pool: rgba(37, 99, 235, 0.1);
--pool-edge: rgba(37, 99, 235, 0.45);
--patch: rgba(120, 90, 40, 0.14);
--select: #f59e0b;
--energy: #eab308;
--carbon: #4b5563;
--nitrogen: #8b5cf6;
--phosphorus: #f97316;
--other: #ec4899;
--radius: 10px;
--radius-sm: 7px;
--mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #0b0f14;
--panel: #121820;
--panel-2: #161e27;
--panel-3: #1c2531;
--line: #232d3a;
--line-strong: #2f3b4b;
--text: #e4eaf0;
--muted: #8d9aa8;
--faint: #64717f;
--accent: #5b9dff;
--accent-soft: rgba(91, 157, 255, 0.14);
--on-accent: #06101f;
--good: #3ecf8e;
--good-soft: rgba(62, 207, 142, 0.12);
--warn: #f2b84b;
--warn-soft: rgba(242, 184, 75, 0.13);
--bad: #ff6b6b;
--bad-soft: rgba(255, 107, 107, 0.12);
--shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
--shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.55);
--map-bg: #070b10;
--map-grid: rgba(140, 170, 200, 0.06);
--map-edge: #2a3646;
--map-glass: rgba(18, 24, 32, 0.86);
--player: #5b9dff;
--online: #5ff2ff;
--wildlife: #3ecf8e;
--pool: rgba(91, 157, 255, 0.12);
--pool-edge: rgba(91, 157, 255, 0.5);
--patch: rgba(200, 160, 90, 0.14);
--select: #ffd166;
--energy: #ffd84d;
--carbon: #a3adb8;
--nitrogen: #a78bfa;
--phosphorus: #ff9a3c;
--other: #ff6fb5;
color-scheme: dark;
}
}
:root[data-theme="dark"] {
--bg: #0b0f14;
--panel: #121820;
--panel-2: #161e27;
--panel-3: #1c2531;
--line: #232d3a;
--line-strong: #2f3b4b;
--text: #e4eaf0;
--muted: #8d9aa8;
--faint: #64717f;
--accent: #5b9dff;
--accent-soft: rgba(91, 157, 255, 0.14);
--on-accent: #06101f;
--good: #3ecf8e;
--good-soft: rgba(62, 207, 142, 0.12);
--warn: #f2b84b;
--warn-soft: rgba(242, 184, 75, 0.13);
--bad: #ff6b6b;
--bad-soft: rgba(255, 107, 107, 0.12);
--shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
--shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.55);
--map-bg: #070b10;
--map-grid: rgba(140, 170, 200, 0.06);
--map-edge: #2a3646;
--map-glass: rgba(18, 24, 32, 0.86);
--player: #5b9dff;
--online: #5ff2ff;
--wildlife: #3ecf8e;
--pool: rgba(91, 157, 255, 0.12);
--pool-edge: rgba(91, 157, 255, 0.5);
--patch: rgba(200, 160, 90, 0.14);
--select: #ffd166;
--energy: #ffd84d;
--carbon: #a3adb8;
--nitrogen: #a78bfa;
--phosphorus: #ff9a3c;
--other: #ff6fb5;
color-scheme: dark;
}
/* ---------- Base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
background: var(--bg);
color: var(--text);
font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
h3 { font-size: 13px; font-weight: 600; margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.error { color: var(--bad); }
.good { color: var(--good); }
.small { font-size: 12px; }
.center { display: grid; place-items: center; min-height: 55vh; text-align: center; }
.center h1 { margin-bottom: 6px; }
.center .muted { margin-bottom: 18px; }
button {
font: inherit;
font-weight: 500;
color: var(--text);
background: var(--panel);
border: 1px solid var(--line-strong);
border-radius: var(--radius-sm);
padding: 6px 13px;
cursor: pointer;
transition: background 0.12s, border-color 0.12s, color 0.12s;
white-space: nowrap;
}
button:hover { border-color: var(--accent); color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }
button:disabled:hover { border-color: var(--line-strong); color: var(--text); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.primary:hover { filter: brightness(1.08); color: var(--on-accent); }
button.ghost { background: transparent; border-color: transparent; color: var(--muted); }
button.ghost:hover { background: var(--panel-3); color: var(--text); }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
button.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
button.icon { padding: 5px 9px; line-height: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="search"], input[type="text"], input[type="number"], select {
font: inherit;
color: var(--text);
background: var(--panel);
border: 1px solid var(--line-strong);
border-radius: var(--radius-sm);
padding: 6px 10px;
min-width: 0;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="search"] { width: 280px; }
input[type="checkbox"] { accent-color: var(--accent); }
/* ---------- Top bar ---------- */
.bar {
display: flex;
align-items: center;
gap: 28px;
height: 56px;
padding: 0 22px;
background: color-mix(in srgb, var(--panel) 88%, transparent);
backdrop-filter: saturate(1.4) blur(10px);
border-bottom: 1px solid var(--line);
position: sticky;
top: 0;
z-index: 10;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand::before {
content: "";
width: 18px;
height: 18px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, var(--online), var(--player) 55%, var(--wildlife));
box-shadow: 0 0 12px color-mix(in srgb, var(--online) 45%, transparent);
}
.brand span { color: var(--muted); font-weight: 500; }
.sections { display: flex; gap: 20px; flex: 1; }
.section { display: flex; align-items: center; gap: 2px; }
.section-name {
text-transform: uppercase;
font-size: 10.5px;
font-weight: 600;
letter-spacing: 0.1em;
color: var(--faint);
margin-right: 10px;
}
.section a { padding: 6px 12px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 500; }
.section a:hover { color: var(--text); background: var(--panel-3); text-decoration: none; }
.section a.active { background: var(--accent-soft); color: var(--accent); }
.who { display: flex; align-items: center; gap: 12px; }
.env {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--warn);
background: var(--warn-soft);
border-radius: 999px;
padding: 2px 9px;
}
.theme-switch { display: flex; background: var(--panel-3); border-radius: 999px; padding: 2px; }
.theme-switch button {
border: 0;
background: transparent;
color: var(--muted);
border-radius: 999px;
padding: 3px 9px;
font-size: 13px;
line-height: 1.3;
}
.theme-switch button:hover { color: var(--text); }
.theme-switch button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
/* ---------- Page ---------- */
main { padding: 22px 24px 40px; max-width: 1760px; margin: 0 auto; }
main:focus { outline: none; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.head .crumb { display: inline-block; font-size: 12.5px; margin-bottom: 4px; color: var(--muted); }
.head .crumb:hover { color: var(--accent); }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.subtitle { color: var(--muted); margin-top: 3px; }
.card {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 16px 18px;
box-shadow: var(--shadow);
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.stats, .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat, .kpi {
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 12px 14px;
box-shadow: var(--shadow);
min-width: 0;
}
.stat .label, .kpi .label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.07em;
color: var(--muted);
display: flex;
align-items: center;
gap: 6px;
}
.stat .value, .kpi .value { font-size: 21px; font-weight: 650; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .value small { font-size: 12px; font-weight: 400; color: var(--muted); }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.kpi.warn .value { color: var(--warn); }
.kpi.bad { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); }
.kpi.bad .value { color: var(--bad); }
.kpi .meter { margin-top: 8px; }
.meter { height: 5px; border-radius: 999px; background: var(--panel-3); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter.warn > span { background: var(--warn); }
.meter.bad > span { background: var(--bad); }
.meter.smooth > span { transition: width 0.25s linear; }
/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--panel); }
table { border-collapse: collapse; width: 100%; background: var(--panel); }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--panel-2); cursor: pointer; user-select: none; }
th.sorted { color: var(--text); }
th.sorted::after { content: " ▾"; }
th.sorted.up::after { content: " ▴"; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--panel-2); }
tbody tr.clickable { cursor: pointer; }
table.compact { font-size: 12.5px; background: transparent; }
table.compact td { padding: 6px 4px; white-space: normal; vertical-align: top; }
table.compact tr:hover { background: transparent; }
.badge {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 11.5px;
font-weight: 500;
padding: 1px 9px;
border-radius: 999px;
background: var(--panel-3);
color: var(--muted);
white-space: nowrap;
}
.badge.alive { color: var(--good); background: var(--good-soft); }
.badge.dead { color: var(--bad); background: var(--bad-soft); }
.badge.online { color: var(--accent); background: var(--accent-soft); }
.badge.warn { color: var(--warn); background: var(--warn-soft); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge .dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.window-controls { display: flex; gap: 8px; margin: 12px 0 8px; flex-wrap: wrap; }
/* ---------- Region page ---------- */
.region-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(420px, 30vw, 560px); gap: 16px; align-items: start; }
@media (max-width: 1150px) { .region-grid { grid-template-columns: minmax(0, 1fr); } }
.map-card {
display: flex;
flex-direction: column;
height: max(560px, calc(100vh - 250px));
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--panel);
overflow: hidden;
box-shadow: var(--shadow);
}
.map-toolbar { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.map-stage { position: relative; flex: 1; min-height: 0; background: var(--map-bg); overflow: hidden; }
.map-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: crosshair; }
.map-stage canvas.dragging { cursor: grabbing; }
.glass {
background: var(--map-glass);
border: 1px solid var(--line);
border-radius: var(--radius-sm);
box-shadow: var(--shadow);
}
.map-layers { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
display: inline-flex;
background: var(--panel-2);
border: 1px solid var(--line);
align-items: center;
gap: 7px;
font-size: 12.5px;
font-weight: 500;
padding: 4px 10px 4px 8px;
border-radius: 999px;
color: var(--text);
cursor: pointer;
user-select: none;
}
.chip .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip.off { opacity: 0.45; }
.chip.off .swatch { background: transparent !important; }
.chip:hover { border-color: var(--accent); }
.map-zoom { display: flex; overflow: hidden; flex: none; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.map-zoom button { border: 0; border-radius: 0; background: transparent; padding: 5px 11px; font-size: 15px; line-height: 1.2; }
.map-zoom button + button { border-left: 1px solid var(--line); }
.map-zoom button:hover { background: var(--panel-3); }
.map-foot { position: absolute; left: 12px; right: 12px; bottom: 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; pointer-events: none; }
.map-hint { font-size: 12px; color: var(--muted); padding: 3px 9px; }
.mark-bar { position: absolute; left: 12px; top: 12px; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; font-size: 13px; font-weight: 500; }
.mark-bar button { padding: 3px 10px; }
.scale { font-size: 11.5px; color: var(--muted); padding: 4px 9px 3px; text-align: center; }
.scale .rule { height: 6px; border: 1.5px solid var(--muted); border-top: 0; margin-top: 2px; }
.map-banner {
position: absolute;
left: 50%;
top: 12px;
transform: translateX(-50%);
padding: 6px 14px;
font-size: 12.5px;
color: var(--warn);
border-color: color-mix(in srgb, var(--warn) 50%, var(--line));
}
.tooltip {
position: absolute;
pointer-events: none;
padding: 8px 10px;
font-size: 12px;
min-width: 170px;
max-width: 290px;
z-index: 3;
box-shadow: var(--shadow-pop);
}
.tooltip .tip-title { font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.tooltip .tip-row { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .tip-row span:first-child { color: var(--muted); }
.swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.swatch.player { background: var(--player); }
.swatch.online { background: var(--online); }
.swatch.wildlife { background: var(--wildlife); }
.swatch.pool { background: var(--pool); border: 1.5px solid var(--pool-edge); }
.swatch.patch { background: var(--patch); border: 1.5px solid var(--faint); border-radius: 2px; }
.swatch.energy { background: var(--energy); }
.swatch.carbon { background: var(--carbon); }
.swatch.nitrogen { background: var(--nitrogen); }
.swatch.phosphorus { background: var(--phosphorus); }
.swatch.other { background: var(--other); }
/* Side panel with tabs. */
.panel {
position: sticky;
top: 72px;
max-height: calc(100vh - 88px);
display: flex;
flex-direction: column;
background: var(--panel);
border: 1px solid var(--line);
border-radius: var(--radius);
box-shadow: var(--shadow);
overflow: hidden;
}
@media (max-width: 1150px) { .panel { position: static; max-height: none; } }
.tabs { flex: none; display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); background: var(--panel-2); overflow-x: auto; overflow-y: hidden; }
.tabs button {
border: 0;
border-radius: var(--radius-sm) var(--radius-sm) 0 0;
background: transparent;
color: var(--muted);
padding: 8px 12px 9px;
font-size: 13px;
border-bottom: 2px solid transparent;
margin-bottom: -1px;
}
.tabs button:hover { color: var(--text); background: transparent; }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); background: var(--panel); }
.tabs .tab-badge { margin-left: 6px; font-size: 10.5px; padding: 0 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.panel-body { overflow-y: auto; padding: 4px 18px 18px; flex: 1; }
.block { padding: 16px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.block-head .muted { font-size: 12px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty .big { font-size: 26px; margin-bottom: 6px; opacity: 0.6; }
/* Forms. */
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.field input, .field select { width: 100%; }
.form-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.form-row .grow { flex: 1; min-width: 120px; }
.form-row input.count { width: 84px; }
input.wide, .wide { width: 100%; }
.note { font-size: 12.5px; margin-top: 8px; min-height: 0; }
.note:empty { display: none; }
.segmented { display: inline-flex; background: var(--panel-3); border-radius: var(--radius-sm); padding: 2px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; color: var(--muted); padding: 4px 10px; font-size: 12.5px; border-radius: 5px; }
.segmented button.on { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
/* Resource ledger. */
table.ledger { font-size: 12.5px; background: transparent; }
table.ledger th { background: transparent; cursor: default; padding: 6px 6px; font-size: 10.5px; }
table.ledger td { padding: 6px 6px; }
table.ledger td:first-child, table.ledger th:first-child { padding-left: 0; }
table.ledger td:last-child, table.ledger th:last-child { padding-right: 0; }
table.ledger tr.total td { font-weight: 650; border-top: 1px solid var(--line-strong); }
table.ledger tr:hover { background: transparent; }
table.ledger th .swatch { margin-right: 4px; vertical-align: -1px; width: 8px; height: 8px; }
.split { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--panel-3); }
.split > span { display: block; height: 100%; }
.split-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.split-legend span { display: inline-flex; align-items: center; gap: 5px; }
.split-row { display: grid; grid-template-columns: 80px 1fr; gap: 10px; align-items: center; margin-top: 8px; font-size: 12px; }
/* Spent pool and drip. */
.drip-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.drip-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.drip-count { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; margin-top: 10px; }
.channel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 8px; min-width: 0; }
.channel .name { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.channel .amt { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel .sub { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel.empty-ch { opacity: 0.55; }
.callout {
display: flex;
gap: 10px;
padding: 10px 12px;
border-radius: var(--radius-sm);
font-size: 12.5px;
background: var(--warn-soft);
color: var(--text);
border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent);
margin-bottom: 12px;
}
.callout::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: var(--panel); font-weight: 700; display: grid; place-items: center; font-size: 12px; }
.callout.info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.callout.info::before { content: "i"; background: var(--accent); }
/* Lists in the panel. */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover .grow { color: var(--accent); }
.list-item .sub { color: var(--muted); font-size: 11.5px; }
/* Inspector. */
.inspect-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.inspect-head .swatch { width: 14px; height: 14px; }
.inspect-head h2 { margin: 0; }
.inspect-head .grow { flex: 1; }
/* Tuning settings. */
.settings-group { margin-top: 6px; }
.settings-group summary {
cursor: pointer;
list-style: none;
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
font-weight: 600;
font-size: 12.5px;
text-transform: capitalize;
border-bottom: 1px solid var(--line);
}
.settings-group summary::-webkit-details-marker { display: none; }
.settings-group summary::before { content: "▸"; color: var(--faint); margin-right: 8px; transition: transform 0.15s; display: inline-block; }
.settings-group[open] summary::before { transform: rotate(90deg); }
.settings-group summary .label { flex: 1; }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 6px 0 6px 16px; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.setting:last-child { border-bottom: 0; }
.setting .key { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.setting .val { font-family: var(--mono); font-size: 12px; font-weight: 600; text-align: right; }
.setting .why { grid-column: 1 / -1; color: var(--muted); font-size: 11.5px; }
.setting.changed .val { color: var(--accent); }
mark { background: var(--warn-soft); color: inherit; border-radius: 2px; }
/* ---------- Tuning editor ---------- */
.tuning-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .tuning-layout { grid-template-columns: 1fr; } }
.tuning-layout .side { display: flex; flex-direction: column; gap: 14px; }
.tuning-layout .side .card + .card { margin-top: 0; }
textarea.tuning {
display: block;
width: 100%;
min-height: 62vh;
font-family: var(--mono);
font-size: 12.5px;
line-height: 1.55;
color: var(--text);
background: var(--panel-2);
border: 1px solid var(--line);
border-radius: var(--radius-sm);
padding: 12px 14px;
resize: vertical;
tab-size: 4;
}
textarea.tuning:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.action { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.action .row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
/* Guided tuning editor: sections, fields, changes. */
.tuning-guided { display: grid; grid-template-columns: 230px minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1250px) { .tuning-guided { grid-template-columns: 210px minmax(0, 1fr); } .tuning-guided > .side { grid-column: 1 / -1; } }
@media (max-width: 800px) { .tuning-guided { grid-template-columns: minmax(0, 1fr); } }
.tuning-guided .side { display: flex; flex-direction: column; gap: 14px; }
.tuning-guided .side .card + .card { margin-top: 0; }
.nav-card { position: sticky; top: 72px; padding: 12px; }
.section-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.section-link { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; color: var(--text); padding: 7px 10px; border-radius: var(--radius-sm); font-weight: 500; }
.section-link .grow { flex: 1; }
.section-link:hover { background: var(--panel-3); color: var(--text); }
.section-link.on { background: var(--accent-soft); color: var(--accent); }
.tuning-section + .tuning-section { margin-top: 14px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 8px 20px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.field-row.changed .field-label { color: var(--accent); }
.field-row.changed .input-unit input, .field-row.changed .input-unit select { border-color: var(--accent); }
.field-row.bad .input-unit input { border-color: var(--bad); }
.field-label { font-weight: 600; }
.field-key { color: var(--faint); font-size: 11.5px; margin-top: 1px; overflow-wrap: anywhere; }
.field-note { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.field-input { display: flex; flex-direction: column; gap: 3px; }
.input-unit { display: flex; align-items: center; gap: 6px; }
.input-unit input, .input-unit select { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; text-align: right; }
.input-unit select { text-align: left; font-family: inherit; }
.input-unit .unit { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 48px; }
.gloss { color: var(--muted); font-size: 12px; text-align: right; padding-right: 86px; min-height: 0; }
.gloss:empty, .field-problem:empty { display: none; }
.field-problem { font-size: 12px; text-align: right; padding-right: 86px; color: var(--accent); }
.field-row.bad .field-problem { color: var(--bad); }
.changes-card { position: sticky; top: 72px; }
.changes-card .wide { margin-top: 10px; }
@media (max-width: 1250px) { .changes-card, .nav-card { position: static; } }
+118
View File
@@ -0,0 +1,118 @@
#pragma once
#include "evo/client/input.hpp"
#include "evo/client/organism_view.hpp"
#include "evo/network/session_protocol.hpp"
#include <algorithm>
#include <array>
#include <cmath>
#include <optional>
#include <utility>
namespace evo::client_app {
struct CellularControls {
bool auto_feed{true}, slow_near_food{true}, precision{};
int speed_percent{100};
// Rules 13 (v14): matter channels kept from burning as energy (bit 0 carbon .. bit 3
// other). Upkeep still burns them when nothing else can pay.
std::uint8_t exclude{};
};
struct CellularSteering {
client::Intention intention;
std::optional<std::pair<std::uint32_t, std::uint32_t>> patch;
};
// Assistance uses only the owner's copied view. It never predicts or moves a body.
// The cellular bridge currently encodes the footprint's lower-left position in x/y
// (ADR-0102), unlike the centre offsets used by the general organism fixture.
[[nodiscard]] inline CellularSteering
steer_cellular(const CellularControls& controls, client::Intention intention,
const network::CellularPerception* perception,
const client::OrganismPresentation* organisms,
std::optional<std::pair<std::uint32_t, std::uint32_t>> manual) {
CellularSteering result{intention, controls.auto_feed ? std::nullopt : manual};
double scale = static_cast<double>(std::clamp(controls.speed_percent, 1, 100)) / 100;
if (controls.precision)
scale *= 0.2;
if (perception && organisms && perception->life_identity != 0) {
const auto cells = organisms->cells();
const auto own =
std::ranges::find(cells, perception->life_identity, &client::OrganismCell::id);
if (own != cells.end()) {
const double x =
static_cast<double>(own->voxel.x) * 1'000'000 + static_cast<double>(own->x.value);
const double y =
static_cast<double>(own->voxel.y) * 1'000'000 + static_cast<double>(own->y.value);
const double extent = static_cast<double>(own->phenotype.extent);
bool target_has_energy = false;
// ADR-0136 (v11): deposits feed on contact, so no target; slow near any that
// holds something (within 1 mm of its disc).
for (const auto& d : perception->deposits) {
if (std::ranges::all_of(d.amount_codes, [](auto code) { return code == 0; }))
continue;
const double cx = static_cast<double>(d.x_um), cy = static_cast<double>(d.y_um);
const double gx = std::max({x - cx, cx - x - extent, 0.0});
const double gy = std::max({y - cy, cy - y - extent, 0.0});
if (controls.slow_near_food &&
std::hypot(gx, gy) <= 1000.0 + static_cast<double>(d.radius_um) &&
own->phenotype.movement_speed > 0)
scale =
std::min(scale, 500.0 / static_cast<double>(own->phenotype.movement_speed));
}
for (const auto& p : perception->patches) {
if (p.energy_pj == 0 &&
std::ranges::all_of(p.matter_fg, [](auto v) { return v == 0; }))
continue;
const double dx =
std::max({static_cast<double>(p.x_um) - x - extent, x - p.x_um - 1000, 0.0});
const double dy =
std::max({static_cast<double>(p.y_um) - y - extent, y - p.y_um - 1000, 0.0});
if (controls.auto_feed && dx == 0 && dy == 0 &&
(!result.patch || (!target_has_energy && p.energy_pj != 0))) {
result.patch = {p.x_um, p.y_um};
target_has_energy = p.energy_pj != 0;
}
// Presentation preference: approach food at at most 500 um/s (25 um/tick).
// Recomputed from the current phenotype after every mutation. Authority
// still determines displacement, contact, funding and intake.
if (controls.slow_near_food && dx <= 1000 && dy <= 1000 &&
own->phenotype.movement_speed > 0)
scale =
std::min(scale, 500.0 / static_cast<double>(own->phenotype.movement_speed));
}
}
}
const auto component = [scale](std::int16_t value) {
const auto scaled = static_cast<std::int16_t>(value * scale);
// The protocol has finite precision; never turn held movement into a stop.
return scaled == 0 && value != 0 ? static_cast<std::int16_t>(value > 0 ? 1 : -1) : scaled;
};
result.intention.move_x = component(intention.move_x);
result.intention.move_y = component(intention.move_y);
return result;
}
// ADR-0129 amendment: what one bud needs that the reserve lacks, per channel: energy
// first, then C, N, P and other matter. Nothing set when it can be paid; a genome that
// cannot bud reports a zero cost, which this treats as affordable (the button is the guide).
[[nodiscard]] inline std::array<bool, 5> bud_shortfall(const network::CellularLifeDiagnostics& d) {
std::array<bool, 5> short_on{};
short_on[0] = d.bud_cost_energy_pj > d.reserve_energy_pj;
for (std::size_t i = 0; i < d.bud_cost_matter_fg.size(); ++i)
short_on[i + 1] = d.bud_cost_matter_fg[i] > d.reserve_matter_fg[i];
return short_on;
}
[[nodiscard]] inline bool bud_affordable(const network::CellularLifeDiagnostics& d) {
const bool known =
d.bud_cost_energy_pj != 0 ||
std::ranges::any_of(d.bud_cost_matter_fg, [](auto amount) { return amount != 0; });
const auto short_on = bud_shortfall(d);
return known && std::ranges::none_of(short_on, [](bool missing) { return missing; });
}
[[nodiscard]] inline bool can_fund(const network::CellularOfferedCandidate& candidate,
const network::CellularLifeDiagnostics& reserve) {
if (candidate.cost_energy_pj > reserve.reserve_energy_pj)
return false;
for (std::size_t i = 0; i < candidate.cost_matter_fg.size(); ++i)
if (candidate.cost_matter_fg[i] > reserve.reserve_matter_fg[i])
return false;
return true;
}
} // namespace evo::client_app
+386
View File
@@ -0,0 +1,386 @@
#pragma once
#include "evo/network/session_protocol.hpp"
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <deque>
#include <limits>
#include <optional>
#include <utility>
namespace evo::client_app {
// Presentation and outstanding requests only. No biological prediction or saved authority.
struct MutationChoice {
std::uint64_t life{}, event{}, offer_tick{};
std::uint16_t operator_id{};
bool become{}; // Rules 13 (v14): continue as the offspring the choice splits off.
friend bool operator==(const MutationChoice&, const MutationChoice&) = default;
};
enum class CellAction : std::uint8_t { engulf, bud, mutation, emerge };
enum class CellActionState : std::uint8_t {
queued,
sent,
admitted,
unresolved,
committed,
no_effect,
refused
};
struct CellActionRecord {
CellAction kind{};
CellActionState state{CellActionState::queued};
std::uint64_t id{}, life{}, tick{};
MutationChoice choice{};
network::AdmitStatus refusal{network::AdmitStatus::admitted};
// The region's reported effect of this engulf or bud, once a view carries it.
std::optional<network::CellularEngulfResult> engulf;
std::optional<network::CellularBudOutcome> bud;
bool become{}; // A bud the player continues as (v14).
};
struct CellEnergyChange {
std::uint64_t from_tick{}, to_tick{}, amount{};
bool falling{};
};
// Rules 13 (v14): each channel's flows over the last second of views (energy, C, N, P, other).
struct CellFlows {
std::array<std::uint64_t, 5> collected{}, into_growth{}, burned{};
};
class CellularPlay {
public:
static constexpr std::size_t history_limit = 8;
void initialize(std::uint64_t first_id) {
next_id_ = first_id == 0 ? 1 : first_id;
birth_request_ = allocate_id();
birth_pending_ = true;
}
[[nodiscard]] std::uint64_t allocate_id() {
const auto id = next_id_;
if (next_id_ != 0)
next_id_ = next_id_ == std::numeric_limits<std::uint64_t>::max() ? 0 : next_id_ + 1;
return id;
}
void connected() {
connected_ = true;
}
void disconnected() {
connected_ = false;
fresh_ = false;
energy_sample_.reset();
energy_change_.reset();
offer_.reset();
if (pending_) {
if (pending_->state == CellActionState::queued) {
pending_->state = CellActionState::refused;
finish();
} else {
pending_->state = CellActionState::unresolved;
}
}
}
void observe(const network::CellularPerception& view) {
if (view.tick < view_tick_)
return;
view_tick_ = view.tick;
fresh_ = true;
if (ended_ && view.life_identity == ended_->life_identity)
return; // A retained pre-death view must never revive this identity.
if (view.life_identity != 0 && view.diagnostics) {
const auto energy = view.diagnostics->reserve_energy_pj;
if (energy_sample_ && energy_sample_->life == view.life_identity) {
if (view.tick > energy_sample_->tick)
energy_change_ = CellEnergyChange{energy_sample_->tick, view.tick,
energy < energy_sample_->energy
? energy_sample_->energy - energy
: energy - energy_sample_->energy,
energy < energy_sample_->energy};
} else {
energy_change_.reset();
}
energy_sample_ = EnergySample{view.life_identity, view.tick, energy};
// One sample per tick of this life, the last second (20 ticks) kept.
if (!flow_samples_.empty() && flow_samples_.back().life != view.life_identity)
flow_samples_.clear();
const auto& d = *view.diagnostics;
if (d.has_tick_effects &&
(flow_samples_.empty() || flow_samples_.back().tick < view.tick))
flow_samples_.push_back(
{view.life_identity, view.tick, {d.collected, d.into_growth, d.burned}});
while (!flow_samples_.empty() && flow_samples_.front().tick + 20 <= view.tick)
flow_samples_.pop_front();
}
// Never replay an intention onto a later life. Keep its uncertain result visible.
if (life_ != view.life_identity) {
offer_.reset();
engulf_feedback_.reset();
bud_feedback_.reset();
if (pending_) {
pending_->state = pending_->state == CellActionState::queued
? CellActionState::refused
: CellActionState::unresolved;
finish();
}
}
life_ = view.life_identity;
if (view.diagnostics && view.diagnostics->has_tick_effects) {
const auto& d = *view.diagnostics;
if (d.engulf != network::CellularEngulfResult::not_reported &&
d.engulf != network::CellularEngulfResult::not_requested) {
engulf_feedback_ = std::pair{view.tick, d.engulf};
if (auto* record = awaiting_effect(CellAction::engulf, view.tick))
record->engulf = d.engulf;
}
if (d.bud != network::CellularBudOutcome::not_reported &&
d.bud != network::CellularBudOutcome::not_requested) {
bud_feedback_ = std::pair{view.tick, d.bud};
if (auto* record = awaiting_effect(CellAction::bud, view.tick))
record->bud = d.bud;
}
}
if (life_ != 0) {
birth_pending_ = false;
birth_result_ = network::PrimitiveLifeResult::born;
if (ended_ && ended_->life_identity != life_)
ended_.reset();
}
}
void observe_offer(const std::optional<network::CellularMutationOffer>& offer) {
offer_ = offer && offer->life_identity == life_ && fresh_ && !ended_ ? offer : std::nullopt;
}
void observe_end(const network::CellularLifeEnded& ended) {
if (ended.life_identity == seen_end_ || (life_ != 0 && life_ != ended.life_identity) ||
(ended_ && ended_->tick >= ended.tick) || ended.tick < birth_tick_)
return;
seen_end_ = ended.life_identity;
ended_ = ended;
life_ = 0;
offer_.reset();
if (pending_ && pending_->state == CellActionState::queued) {
pending_->state = CellActionState::refused;
finish();
}
// The discrete action may still have a final result arriving in this poll.
}
[[nodiscard]] bool can_act() const {
return connected_ && fresh_ && life_ != 0 && !ended_ && !pending_ && !birth_pending_;
}
[[nodiscard]] bool queue(CellAction kind, std::uint64_t tick, MutationChoice choice = {},
bool become = false) {
if (!can_act() || tick == 0)
return false;
if (kind == CellAction::mutation &&
(!offer_ || choice.life != life_ || choice.event != offer_->event_index ||
choice.offer_tick != offer_->offer_tick || tick <= choice.offer_tick ||
(choice.operator_id != 0 && // Operator 0 declines the offer (ADR-0120 amendment).
!std::ranges::any_of(offer_->candidates, [&](const auto& c) {
return c.operator_id == choice.operator_id;
}))))
return false;
const auto id = allocate_id();
if (id == 0)
return false;
pending_ = CellActionRecord{kind,
CellActionState::queued,
id,
life_,
tick,
choice,
network::AdmitStatus::admitted,
std::nullopt,
std::nullopt,
kind == CellAction::bud && become};
return true;
}
void sent() {
if (pending_)
pending_->state = CellActionState::sent;
}
void rechecking() {
if (pending_ && pending_->state != CellActionState::queued)
pending_->state = CellActionState::unresolved;
}
void receipt(const network::ActionReceipt& receipt) {
if (!pending_ || pending_->id != receipt.action_id)
return;
if (receipt.status == network::AdmitStatus::admitted ||
receipt.status == network::AdmitStatus::duplicate) {
pending_->state = CellActionState::admitted;
} else if (pending_->kind == CellAction::mutation &&
receipt.status == network::AdmitStatus::not_ready) {
// The host can report not_ready after an uncertain durable reservation.
pending_->state = CellActionState::unresolved;
} else if (pending_->state != CellActionState::unresolved &&
pending_->state != CellActionState::admitted) {
pending_->state = CellActionState::refused;
pending_->refusal = receipt.status;
finish();
}
// A refused retry cannot disprove a previously admitted or uncertain action.
}
void outcome(const network::ActionOutcome& outcome) {
if (!pending_ || pending_->id != outcome.action_id) {
// Final replies may arrive after the life ended or the user kept an unknown.
for (auto& record : history_)
if (record.id == outcome.action_id && record.state == CellActionState::unresolved) {
if (outcome.result == network::ActionResult::committed)
record.state = CellActionState::committed;
else if (outcome.result == network::ActionResult::committed_no_effect)
record.state = CellActionState::no_effect;
else if (outcome.result == network::ActionResult::not_committed)
record.state = CellActionState::refused;
}
return;
}
using enum network::ActionResult;
switch (outcome.result) {
case committed:
pending_->state = CellActionState::committed;
break;
case committed_no_effect:
pending_->state = CellActionState::no_effect;
break;
case not_committed:
pending_->state = CellActionState::refused;
break;
case pending:
pending_->state = CellActionState::admitted;
return;
case unknown:
pending_->state = CellActionState::unresolved;
return;
}
finish();
}
// User may leave an uncertain result in the bounded record, never as a success/refusal.
void keep_unknown() {
if (pending_ && pending_->state == CellActionState::unresolved)
finish();
}
[[nodiscard]] bool can_restart() const {
const bool refused = birth_result_ == network::PrimitiveLifeResult::insufficient_funding ||
birth_result_ == network::PrimitiveLifeResult::no_placement ||
birth_result_ == network::PrimitiveLifeResult::cancelled;
return connected_ && (fresh_ || refused) && life_ == 0 && !birth_pending_ &&
(birth_result_ != network::PrimitiveLifeResult::existing_life || ended_);
}
[[nodiscard]] bool restart() {
if (!can_restart())
return false;
const auto id = allocate_id();
if (id == 0)
return false;
birth_request_ = id;
birth_pending_ = true;
birth_result_ = network::PrimitiveLifeResult::pending;
return true;
}
void birth(const network::PrimitiveLifeOutcome& result) {
if (result.request_id != birth_request_)
return;
birth_result_ = result.result;
birth_pending_ = result.result == network::PrimitiveLifeResult::pending ||
result.result == network::PrimitiveLifeResult::unknown ||
result.result == network::PrimitiveLifeResult::born;
if (result.result == network::PrimitiveLifeResult::born) {
ended_.reset();
birth_tick_ = view_tick_;
}
}
[[nodiscard]] std::uint64_t birth_request() const {
return birth_request_;
}
[[nodiscard]] bool birth_pending() const {
return birth_pending_;
}
[[nodiscard]] network::PrimitiveLifeResult birth_result() const {
return birth_result_;
}
[[nodiscard]] std::uint64_t life() const {
return life_;
}
[[nodiscard]] bool fresh() const {
return connected_ && fresh_;
}
[[nodiscard]] const auto& offer() const {
return offer_;
}
[[nodiscard]] const auto& ended() const {
return ended_;
}
[[nodiscard]] const auto& pending() const {
return pending_;
}
[[nodiscard]] const auto& history() const {
return history_;
}
[[nodiscard]] const auto& engulf_feedback() const {
return engulf_feedback_;
}
[[nodiscard]] const auto& bud_feedback() const {
return bud_feedback_;
}
[[nodiscard]] const auto& energy_change() const {
return energy_change_;
}
// Flows per second, scaled up when views were missed.
[[nodiscard]] CellFlows flows_per_second() const {
CellFlows total;
for (const auto& sample : flow_samples_)
for (std::size_t c = 0; c < 5; ++c) {
total.collected.at(c) += sample.flows.collected.at(c);
total.into_growth.at(c) += sample.flows.into_growth.at(c);
total.burned.at(c) += sample.flows.burned.at(c);
}
if (!flow_samples_.empty() && flow_samples_.size() < 20)
for (auto* channel : {&total.collected, &total.into_growth, &total.burned})
for (auto& value : *channel)
value = value * 20 / flow_samples_.size();
return total;
}
private:
void finish() {
if (!pending_)
return;
if (history_.size() == history_limit)
history_.pop_front();
history_.push_back(*pending_);
pending_.reset();
}
// The newest engulf/bud of this life, at or before `tick`, still without a reported
// effect: the view for its tick carries what the region did with it.
CellActionRecord* awaiting_effect(CellAction kind, std::uint64_t tick) {
const auto waiting = [&](const CellActionRecord& r) {
return r.kind == kind && r.life == life_ && r.tick <= tick &&
!(kind == CellAction::engulf ? r.engulf.has_value() : r.bud.has_value());
};
if (pending_ && waiting(*pending_))
return &*pending_;
for (auto it = history_.rbegin(); it != history_.rend(); ++it)
if (waiting(*it))
return &*it;
return nullptr;
}
std::uint64_t next_id_{1}, life_{}, view_tick_{}, birth_tick_{}, birth_request_{}, seen_end_{};
bool connected_{}, fresh_{}, birth_pending_{};
network::PrimitiveLifeResult birth_result_{network::PrimitiveLifeResult::pending};
std::optional<network::CellularMutationOffer> offer_;
std::optional<network::CellularLifeEnded> ended_;
std::optional<CellActionRecord> pending_;
std::deque<CellActionRecord> history_;
std::optional<std::pair<std::uint64_t, network::CellularEngulfResult>> engulf_feedback_;
std::optional<std::pair<std::uint64_t, network::CellularBudOutcome>> bud_feedback_;
struct EnergySample {
std::uint64_t life{}, tick{}, energy{};
};
std::optional<EnergySample> energy_sample_;
struct FlowSample {
std::uint64_t life{}, tick{};
CellFlows flows;
};
std::deque<FlowSample> flow_samples_;
std::optional<CellEnergyChange> energy_change_;
};
} // namespace evo::client_app
+120
View File
@@ -0,0 +1,120 @@
#pragma once
#include "evo/client/camera.hpp"
#include "evo/render/frame.hpp"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <optional>
#include <unordered_map>
#include <vector>
namespace evo::client_app {
inline constexpr std::size_t patch_rectangles = 11;
// The border keeps the 1 mm contact footprint readable; the inset is decorative.
// E (gold) and M (teal) identify energy and matter stock, without invented percentages.
inline void patch_box(std::vector<render::Rectangle>& out, client::ScreenPoint low,
client::ScreenPoint high, bool energy, bool matter, bool selected,
double width, double height, bool stale = false) {
const double minimum = selected ? 5 : 3;
const double hx = std::max((high.x - low.x) / 2, minimum);
const double hy = std::max((low.y - high.y) / 2, minimum);
const double x = (low.x + high.x) / 2, y = (low.y + high.y) / 2;
const auto rect = [&](double l, double t, double r, double b, render::Color color) {
l = std::max(l, 0.0);
t = std::max(t, 0.0);
r = std::min(r, width);
b = std::min(b, height);
if (stale) {
color.red /= 2;
color.green /= 2;
color.blue /= 2;
}
if (r > l && b > t)
out.push_back({static_cast<float>(l), static_cast<float>(t), static_cast<float>(r - l),
static_cast<float>(b - t), color});
};
rect(x - hx, y - hy, x + hx, y + hy,
selected ? render::Color{233, 182, 85, 255}
: energy ? render::Color{155, 117, 45, 255}
: matter ? render::Color{49, 112, 105, 255}
: render::Color{58, 69, 77, 255});
if (hx <= 6 || hy <= 6)
return;
const double border = selected ? 2 : 1;
rect(x - hx + border, y - hy + border, x + hx - border, y + hy - border,
selected ? render::Color{53, 49, 31, 255} : render::Color{17, 40, 43, 255});
if (hx >= 16 && hy >= 16) {
const double top = y - hy + 7;
if (energy) {
const double left = matter ? x - 12 : x - 4;
const render::Color gold{233, 182, 85, 255};
rect(left, top, left + 2, top + 12, gold);
rect(left + 2, top, left + 8, top + 2, gold);
rect(left + 2, top + 5, left + 7, top + 7, gold);
rect(left + 2, top + 10, left + 8, top + 12, gold);
}
if (matter) {
const double left = energy ? x + 3 : x - 5;
const render::Color teal{90, 185, 150, 255};
rect(left, top, left + 2, top + 12, teal);
rect(left + 8, top, left + 10, top + 12, teal);
rect(left + 2, top + 2, left + 4, top + 5, teal);
rect(left + 6, top + 2, left + 8, top + 5, teal);
rect(left + 4, top + 4, left + 6, top + 7, teal);
}
}
}
// 2026-10-16: a cell faces the way it last moved, flagella trailing. The heading comes
// from the last world displacement of at least `step_mm`, projected with the current
// camera (so panning never turns a cell), and eases toward it so a turn is visible.
class CellHeadings {
public:
static constexpr double step_mm = 0.02;
static constexpr float ease = 0.18F;
// Per frame, per drawn cell: its screen heading, or none before it has moved.
std::optional<float> update(std::uint64_t id, client::WorldPoint at,
const client::Camera& camera) {
auto& t = tracks_[id];
t.frame = frame_;
if (!t.anchored) {
t.anchor = at;
t.anchored = true;
} else if (std::hypot(at.x_mm - t.anchor.x_mm, at.y_mm - t.anchor.y_mm) >= step_mm) {
const auto from = camera.world_to_screen(t.anchor);
const auto to = camera.world_to_screen(at);
if (from && to && (to->x != from->x || to->y != from->y)) {
t.target = static_cast<float>(std::atan2(to->y - from->y, to->x - from->x));
if (!t.facing)
t.heading = t.target;
t.facing = true;
}
t.anchor = at;
}
if (!t.facing)
return std::nullopt;
constexpr float pi = 3.14159265F;
float turn = t.target - t.heading;
while (turn > pi)
turn -= 2 * pi;
while (turn < -pi)
turn += 2 * pi;
t.heading += turn * ease;
return t.heading;
}
// After the frame's cells: forget cells no longer drawn.
void end_frame() {
std::erase_if(tracks_, [&](const auto& entry) { return entry.second.frame != frame_; });
++frame_;
}
private:
struct Track {
client::WorldPoint anchor{};
float heading{}, target{};
bool anchored{}, facing{};
std::uint64_t frame{};
};
std::unordered_map<std::uint64_t, Track> tracks_;
std::uint64_t frame_{};
};
} // namespace evo::client_app
+2
View File
@@ -94,6 +94,8 @@ class ControlsFlow {
static_cast<void>(ui.notify(text, level, lifetime_ms).has_value()); // Bounded.
}
void apply(client::Application& app, client::UiState& ui) {
if (!editor_)
return;
const auto applied = editor_->apply();
if (!applied) {
problem_ = applied.error();
+437 -55
View File
@@ -1,5 +1,8 @@
#include "cellular_scene.hpp"
#include "controls_flow.hpp"
#include "evo/biology/cellular_currents.hpp"
#include "evo/client/application.hpp"
#include "evo/client/auth.hpp"
#include "evo/client/launcher.hpp"
#include "evo/client/selection.hpp"
#include "evo/client/session_host.hpp"
@@ -16,8 +19,10 @@
#include <cstdio>
#include <exception>
#include <filesystem>
#include <map>
#include <memory>
#include <optional>
#include <span>
#include <string_view>
#include <thread>
#include <utility>
@@ -33,10 +38,11 @@ constexpr std::uint32_t fixture_mask = (1U << 0) | (1U << 1) | (1U << 2) | (1U <
constexpr unsigned frames_per_authority_tick = 60;
// Frame composition: environment bound + organisms + 6 host rectangles (capture bar,
// intention dot, 4-sided selection highlight). Text and panels are the toolkit overlay.
constexpr std::size_t host_rectangles = 6 + evo::network::max_cellular_perceived_patches;
constexpr std::size_t host_rectangles =
6 + evo::client_app::patch_rectangles * evo::network::max_cellular_perceived_patches;
// M11.3: the cellular arena is millimetres across, far below the metre-scale default
// camera; the first view frames this much of it around the own cell.
constexpr double cellular_view_mm = 12;
constexpr double cellular_view_mm = 6;
constexpr std::size_t organism_budget =
evo::render::max_rectangles - evo::render::max_environment_rectangles - host_rectangles;
// Local in-memory stand-in for authoritative region views until M9.7. It is never
@@ -204,28 +210,6 @@ void marker_box(std::vector<evo::render::Rectangle>& out, double x, double y, bo
: own ? evo::render::Color{250, 190, 40, 255}
: evo::render::Color{90, 170, 250, 255}});
}
// A cellular food patch over its true 1 mm footprint (contact means overlapping it), dim so
// the cell stays visible on top; zoomed far out it shrinks to a bright marker instead.
void patch_box(std::vector<evo::render::Rectangle>& out, evo::client::ScreenPoint low,
evo::client::ScreenPoint high, bool stocked, bool selected, double width,
double height) {
const double minimum = selected ? 5 : 3;
const double half_x = std::max((high.x - low.x) / 2, minimum);
const double half_y = std::max((low.y - high.y) / 2, minimum);
const bool footprint = half_x > 6 && half_y > 6;
const double x = (low.x + high.x) / 2, y = (low.y + high.y) / 2;
const double x0 = std::max(x - half_x, 0.0), y0 = std::max(y - half_y, 0.0);
const double x1 = std::min(x + half_x, width), y1 = std::min(y + half_y, height);
if (x1 > x0 && y1 > y0)
out.push_back({static_cast<float>(x0), static_cast<float>(y0), static_cast<float>(x1 - x0),
static_cast<float>(y1 - y0),
selected ? (footprint ? evo::render::Color{120, 92, 24, 255}
: evo::render::Color{250, 190, 40, 255})
: stocked ? (footprint ? evo::render::Color{32, 100, 60, 255}
: evo::render::Color{80, 220, 130, 255})
: footprint ? evo::render::Color{52, 58, 64, 255}
: evo::render::Color{115, 125, 135, 255}});
}
void outline(std::vector<evo::render::Rectangle>& out, double l, double t, double r, double b,
double width, double height) {
const auto rect = [&](double x0, double y0, double x1, double y1) {
@@ -249,6 +233,12 @@ std::uint64_t milliseconds(std::chrono::steady_clock::time_point t) {
return static_cast<std::uint64_t>(
std::chrono::duration_cast<std::chrono::milliseconds>(t.time_since_epoch()).count());
}
// Wall-clock seconds: grant expiry is UTC (the session compares the server's welcome).
std::uint64_t utc_seconds() {
return static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
.count());
}
} // namespace
int main(int argc, char** argv) try {
@@ -264,6 +254,7 @@ int main(int argc, char** argv) try {
evo::client::ConnectForm form;
bool connect_now = false;
bool cellular_trial = false;
std::string auth_profile; // ADR-0131: one saved login per --profile.
for (int i = 1; i < argc; ++i) {
const std::string_view arg{argv[i]};
if (arg == "--version") { // Build identity for tester reports (ADR-0086).
@@ -279,7 +270,11 @@ int main(int argc, char** argv) try {
start_fixture = true;
else if (arg == "--cellular")
cellular_trial = true;
else if (arg == "--connect" && i + 1 < argc) {
else if (arg == "--profile" && i + 1 < argc) {
auth_profile = argv[++i];
if (auth_profile.empty() || !evo::client::auth_profile_valid(auth_profile))
return 2;
} else if (arg == "--connect" && i + 1 < argc) {
form.endpoint = argv[++i];
connect_now = true;
} else if (arg == "--server-name" && i + 1 < argc)
@@ -327,7 +322,7 @@ int main(int argc, char** argv) try {
" [--layer water|nitrogen|...|heat|moisture]\n"
" [--refresh-every 1..1000] [--pick X,Y] "
"[--screenshot FILE.bmp --frames N]\n"
" [--controls FILE] [--show-controls]\n"
" [--controls FILE] [--show-controls] [--profile NAME]\n"
"Without --fixture or --connect the launcher opens.\n",
stderr);
return 2;
@@ -371,6 +366,36 @@ int main(int argc, char** argv) try {
return host.connect(std::move(opened));
}
};
// ADR-0131: a broker grant names its region route; only the region CA comes from the
// form. The grant stays in memory and the session asks for the next one itself.
const auto grant_material = [&](const evo::client::AuthGrant& grant) {
auto f = buffers.form();
f.endpoint = grant.endpoint;
f.server_name = grant.server_name;
return evo::client::load_connect(f, std::span{&grant.bytes, 1});
};
const auto connect_signed_in = [&](const evo::client::AuthGrant& grant) {
form_error.reset();
if constexpr (!evo::client_app::remote_available) {
form_error = evo::client::LaunchError::no_session;
return false;
} else {
const auto material = grant_material(grant);
if (!material) {
form_error = material.error();
return false;
}
cellular_trial = true; // The DEV broker world is the cellular trial (ADR-0131).
auto opened = evo::client_app::RemoteSession::open(*material, cellular_trial);
if (!opened) {
form_error = evo::client::LaunchError::endpoint;
return false;
}
opened->manage_grants();
cellular_framed = false;
return host.connect(std::move(opened));
}
};
const auto enter_fixture = [&] {
if (!authority) {
authority = make_authority();
@@ -439,7 +464,35 @@ int main(int argc, char** argv) try {
return &remote->organisms();
return nullptr;
};
// ADR-0131 browser sign-in (Windows); elsewhere the panel offers manual grants only.
evo::client::AuthClient auth{evo::client::native_auth_platform(auth_profile)};
bool auth_connect = false; // Connect when the requested grant arrives.
auto grant_requested = std::chrono::steady_clock::time_point{};
int drawn_organisms = -1;
evo::client_app::CellularScene scene; // Rebuilt each frame in cellular play.
evo::client_app::CellHeadings headings; // Where each drawn cell last moved.
// ADR-0136: deposits seen in the last view (to notice a bubble that ran out) and the
// pops still fading, in world coordinates with their start time.
struct SeenDeposit {
double x_mm{}, y_mm{};
std::uint32_t radius_um{};
int channel{};
bool drained{}, bubble{};
};
struct LivePop {
SeenDeposit at;
std::chrono::steady_clock::time_point start;
};
std::map<std::uint32_t, SeenDeposit> seen_deposits;
std::uint64_t seen_deposit_tick{};
std::vector<LivePop> live_pops;
bool scene_active = false;
// Rules 12: the region's current field, regenerated when the perceived configuration
// changes, and when the latest perception arrived (to carry bubbles between views).
std::optional<evo::network::CellularCurrentsView> flow_config;
std::optional<evo::biology::CellularFlowField> flow_field;
std::uint64_t flow_view_tick = 0;
auto flow_view_at = std::chrono::steady_clock::now();
evo::client_app::PanelActions actions;
(*app)->set_overlay([&] {
evo::client_app::PanelView view;
@@ -448,6 +501,7 @@ int main(int argc, char** argv) try {
view.form_error = form_error;
view.remote_available = evo::client_app::remote_available;
view.cellular_trial = cellular_trial;
view.auth = auth.status();
view.environment = shown_environment();
view.organisms = shown_organisms();
view.selection = &selection;
@@ -456,9 +510,11 @@ int main(int argc, char** argv) try {
view.remote = remote->status();
view.outcomes = &remote->outcomes();
view.cellular_perception = remote->cellular_perception();
view.cellular_play = &remote->cellular_play();
view.cellular_feed_target = cellular_feed_target;
}
view.visible_organisms = drawn_organisms;
view.cellular_scene = scene_active ? &scene : nullptr;
view.bindings = &(*app)->bindings();
controls.fill(view);
actions = evo::client_app::draw_panels(view, buffers, display);
@@ -508,23 +564,90 @@ int main(int argc, char** argv) try {
disconnect_dialog.reset();
if (actions.dismiss_notice)
static_cast<void>(ui.dismiss(*actions.dismiss_notice));
if (actions.stop_feeding)
if (actions.stop_feeding) {
cellular_feed_target.reset();
if (actions.feed_patch)
buffers.cellular_controls.auto_feed = false;
}
if (actions.feed_patch) {
cellular_feed_target = actions.feed_patch;
if (auto* remote = host.session(); remote && mode() == Mode::remote)
buffers.cellular_controls.auto_feed = false;
}
if (auto* remote = host.session(); remote && mode() == Mode::remote) {
if (actions.cell_action &&
remote->request_cellular(*actions.cell_action, {}, actions.cell_become))
cellular_feed_target.reset();
if (actions.mutation)
static_cast<void>(remote->request_cellular(evo::client_app::CellAction::mutation,
*actions.mutation));
if (actions.restart_life && remote->restart_cellular()) {
cellular_feed_target.reset();
selection.clear();
}
if (actions.keep_unknown)
remote->keep_cellular_unknown();
remote->set_cellular_feed_target(cellular_trial ? cellular_feed_target : std::nullopt);
remote->set_cellular_controls(buffers.cellular_controls);
}
// ADR-0131 sign-in. One request at a time; grants arrive on a later frame.
if (actions.sign_in && auth.sign_in()) {
auth_connect = true;
grant_requested = now;
}
if (actions.auth_connect && auth.request_grant()) {
auth_connect = true;
grant_requested = now;
}
if (actions.cancel_sign_in) {
auth.cancel();
auth_connect = false;
}
if (actions.sign_out) {
host.cancel(); // Logout revokes every grant; do not keep a session behind it.
cellular_feed_target.reset();
selection.clear();
auth_connect = false;
static_cast<void>(auth.sign_out());
}
if (auto grant = auth.take_grant()) {
if (auth_connect) {
auth_connect = false;
if (connect_signed_in(*grant))
selection.clear();
} else if (auto* remote = host.session()) {
// Refresh or reconnect material for the live session (same account).
if (const auto material = grant_material(*grant))
static_cast<void>(remote->supply_grant(*material));
}
grant->bytes.fill(0);
}
if (const auto status = auth.status(); !status.busy && auth_connect && !status.signed_in)
auth_connect = false; // Sign-in failed or was cancelled; the panel shows why.
// About a minute before expiry, or after a lost connection; never for a session the
// launcher has given up on (superseded by another client, cancelled).
const bool live = launcher.phase() == evo::client::LaunchPhase::connecting ||
launcher.phase() == evo::client::LaunchPhase::connected;
if (const auto* remote = host.session();
live && remote && remote->needs_grant(utc_seconds()) &&
now - grant_requested >= std::chrono::seconds{5} && auth.request_grant())
grant_requested = now;
controls.step(actions, **app, ui);
actions = {};
// The launcher and modal dialogs own input: no world movement or selection.
const auto* input_session = host.session();
const bool cell_input_blocked = input_session && input_session->cellular_trial() &&
(!input_session->cellular_play().fresh() ||
input_session->cellular_play().life() == 0 ||
input_session->cellular_play().ended().has_value());
(*app)->set_ui_capture(mode() == Mode::launcher || ui.dialog().has_value() ||
controls.open());
controls.open() || cell_input_blocked);
const auto navigation = (*app)->take_navigation();
// Local input counter; in remote mode the session sets the server tick.
const auto intention = (*app)->sample_intention(count);
if (!intention)
return 1;
host.step(now, *intention, ui); // Only while connecting or connected.
if (const auto* remote = host.session(); remote && cellular_trial)
cellular_feed_target = remote->cellular_feed_target();
// M10.5c: the camera follows the server's view until the user moves it; from then
// on its centre is the session's interest (the server clamps and filters it).
if (auto* remote = host.session(); remote && mode() == Mode::remote) {
@@ -581,16 +704,20 @@ int main(int argc, char** argv) try {
&evo::client::OrganismCell::id);
if (own != cells.end()) {
const double pitch = evo::world::cell_pitch_mm;
const evo::client::WorldPoint centre{
static_cast<double>(own->voxel.x) * pitch +
static_cast<double>(own->x.value) / 1000,
static_cast<double>(own->voxel.y) * pitch +
static_cast<double>(own->y.value) / 1000};
evo::client::WorldPoint centre{static_cast<double>(own->voxel.x) * pitch +
static_cast<double>(own->x.value) / 1000,
static_cast<double>(own->voxel.y) * pitch +
static_cast<double>(own->y.value) /
1000};
const double scale =
cellular_framed ? camera->units_per_mm()
: static_cast<double>(std::min(state.logical_width,
state.logical_height)) /
cellular_view_mm;
// Keep the followed cell in the visible arena beside the journal.
const double shift = state.logical_width < 880 ? 171.0 : -10.0;
centre.x_mm -= shift / scale;
centre.y_mm += 29.0 / scale;
if (auto moved =
evo::client::Camera::create(camera->viewport(), centre, scale)) {
*camera = *moved;
@@ -620,10 +747,23 @@ int main(int argc, char** argv) try {
*camera, display))
return 1;
const double width = state.logical_width, height = state.logical_height;
// Cellular patches under the organisms, so the own cell draws on top of them.
if (const auto* remote = host.session();
remote && mode() == Mode::remote && cellular_trial)
if (const auto* perception = remote->cellular_perception())
// 2026-10-16 microscope view: in cellular play, patches and cells are a scene the
// panels draw as granules and living cells; elsewhere organisms stay rectangles.
scene.flows.clear();
scene.patches.clear();
scene.deposits.clear();
scene.pops.clear();
scene.cells.clear();
scene.region = scene.at_edge = false;
scene.region_cells = 0;
scene_active = false;
const auto* cellular_remote = host.session();
const bool microscope = cellular_remote && mode() == Mode::remote && cellular_trial;
if (microscope) {
const bool fresh = cellular_remote->cellular_play().fresh();
scene.camera_centre = camera->centre();
scene.stale = !fresh;
if (const auto* perception = cellular_remote->cellular_perception())
for (const auto& patch : perception->patches) {
const auto low =
camera->world_to_screen({static_cast<double>(patch.x_um) / 1000,
@@ -631,22 +771,264 @@ int main(int argc, char** argv) try {
const auto high = camera->world_to_screen(
{(static_cast<double>(patch.x_um) + 1000) / 1000,
(static_cast<double>(patch.y_um) + 1000) / 1000});
if (low && high)
patch_box(boxes, *low, *high,
patch.energy_pj != 0 ||
std::ranges::any_of(patch.matter_fg,
[](auto v) { return v != 0; }),
cellular_feed_target &&
cellular_feed_target->first == patch.x_um &&
cellular_feed_target->second == patch.y_um,
width, height);
if (!low || !high)
continue;
evo::client_app::ScenePatch p;
p.x = static_cast<float>((low->x + high->x) / 2);
p.y = static_cast<float>((low->y + high->y) / 2);
p.half = static_cast<float>(std::abs(high->x - low->x) / 2);
p.stock = {patch.energy_pj, patch.matter_fg[0], patch.matter_fg[1],
patch.matter_fg[2], patch.matter_fg[3]};
p.target = cellular_feed_target &&
cellular_feed_target->first == patch.x_um &&
cellular_feed_target->second == patch.y_um;
p.stale = !fresh;
p.seed = (static_cast<std::uint64_t>(patch.x_um) << 32U) ^ patch.y_um;
scene.patches.push_back(p);
}
const auto report = evo::render::append_organisms(
boxes, organism_budget, orgs,
org_layer ? org_layer->freshness() : evo::client::Freshness::none, *camera);
if (!report)
return 1;
drawn_organisms = static_cast<int>(report->drawn);
// Rules 12 (v13): the current field from the perceived configuration, drawn
// as streaks across the visible area.
if (const auto* perception = cellular_remote->cellular_perception()) {
if (perception->currents != flow_config) {
flow_config = perception->currents;
flow_field.reset();
if (const auto& c = flow_config) {
auto made = evo::biology::CellularFlowField::generate(
{c->seed, c->width_um, c->height_um, c->pitch_um, c->min_count,
c->max_count, c->min_route_width_um, c->max_route_width_um,
c->min_speed_um_per_s, c->max_speed_um_per_s});
if (made)
flow_field = std::move(*made);
}
}
if (perception->tick != flow_view_tick) {
flow_view_tick = perception->tick;
flow_view_at = std::chrono::steady_clock::now();
}
const auto low = camera->screen_to_world({0, height});
const auto high = camera->screen_to_world({width, 0});
if (flow_field && low && high) {
const double span =
std::max({high->x_mm - low->x_mm, high->y_mm - low->y_mm, 0.001});
const double step = std::max(0.4, span / 28);
const double first_x = std::floor(low->x_mm / step) * step;
const double first_y = std::floor(low->y_mm / step) * step;
const int columns =
std::clamp(static_cast<int>((high->x_mm - first_x) / step) + 1, 1, 30);
const int rows =
std::clamp(static_cast<int>((high->y_mm - first_y) / step) + 1, 1, 30);
for (int row = 0; row < rows; ++row)
for (int column = 0; column < columns; ++column) {
const double x = first_x + column * step, y = first_y + row * step;
const auto flow =
flow_field->sample(static_cast<std::int64_t>(x * 1000),
static_cast<std::int64_t>(y * 1000));
const double vx = flow.x_q10 / 1024.0, vy = flow.y_q10 / 1024.0;
const double speed = std::hypot(vx, vy);
if (speed < 5)
continue;
const auto at = camera->world_to_screen({x, y});
const auto ahead = camera->world_to_screen(
{x + vx / speed * 0.001, y + vy / speed * 0.001});
if (!at || !ahead)
continue;
const double sx = ahead->x - at->x, sy = ahead->y - at->y;
const double norm = std::max(std::hypot(sx, sy), 1e-9);
const double length = 8 + std::min(speed, 300.0) / 300 * 16;
scene.flows.push_back(
{static_cast<float>(at->x), static_cast<float>(at->y),
static_cast<float>(sx / norm * length),
static_cast<float>(sy / norm * length),
static_cast<float>(std::min(speed, 300.0) / 300),
static_cast<std::uint32_t>(
static_cast<std::int64_t>(x * 7919 + y * 104729))});
}
}
}
// ADR-0136 (v11): pools and bubbles, centred; a vanished bubble pops.
if (const auto* perception = cellular_remote->cellular_perception()) {
const auto now_pop = std::chrono::steady_clock::now();
// Rules 12: carry each bubble along its perceived velocity since the view
// arrived (at most 300 ms), so moving food glides between perceptions.
const double carried = std::min(
std::chrono::duration<double>(now_pop - flow_view_at).count(), 0.3);
std::map<std::uint32_t, SeenDeposit> current;
for (const auto& d : perception->deposits) {
std::array<std::uint64_t, 5> stock{};
for (std::size_t c = 0; c < stock.size(); ++c)
stock.at(c) = evo::network::deposit_amount_value(d.amount_codes.at(c));
int channel = 0;
for (std::size_t c = 1; c < stock.size(); ++c)
if (stock.at(c) > stock.at(static_cast<std::size_t>(channel)))
channel = static_cast<int>(c);
const SeenDeposit seen{
(static_cast<double>(d.x_um) + d.velocity_x_um_s * carried) / 1000,
(static_cast<double>(d.y_um) + d.velocity_y_um_s * carried) / 1000,
d.radius_um,
channel,
d.drained,
d.shape == evo::network::CellularDepositShape::bubble};
current[d.id] = seen;
const auto centre = camera->world_to_screen({seen.x_mm, seen.y_mm});
const auto edge = camera->world_to_screen(
{seen.x_mm + static_cast<double>(d.radius_um) / 1000, seen.y_mm});
if (!centre || !edge)
continue;
evo::client_app::SceneDeposit drawn;
drawn.x = static_cast<float>(centre->x);
drawn.y = static_cast<float>(centre->y);
drawn.radius = static_cast<float>(std::abs(edge->x - centre->x));
drawn.stock = stock;
drawn.pool = d.shape == evo::network::CellularDepositShape::pool;
drawn.drained = d.drained;
drawn.stale = !fresh;
drawn.seed = d.id;
scene.deposits.push_back(drawn);
}
// A bubble that was being eaten and is gone from a newer view of the
// same life ran out: it fades. Anything else that leaves the view (out
// of range, or an empty view) just stops being drawn.
if (perception->tick != seen_deposit_tick && perception->life_identity != 0) {
for (const auto& [id, old] : seen_deposits)
if (old.bubble && old.drained && !current.contains(id) &&
live_pops.size() < 64)
live_pops.push_back({old, now_pop});
seen_deposits = std::move(current);
seen_deposit_tick = perception->tick;
}
constexpr auto pop_life = std::chrono::milliseconds{350};
std::erase_if(live_pops, [&](const LivePop& pop) {
return now_pop - pop.start > pop_life;
});
for (const auto& pop : live_pops) {
const auto centre = camera->world_to_screen({pop.at.x_mm, pop.at.y_mm});
const auto edge = camera->world_to_screen(
{pop.at.x_mm + static_cast<double>(pop.at.radius_um) / 1000,
pop.at.y_mm});
if (!centre || !edge)
continue;
const auto age = std::chrono::duration<float>(now_pop - pop.start).count() /
std::chrono::duration<float>(pop_life).count();
scene.pops.push_back({static_cast<float>(centre->x),
static_cast<float>(centre->y),
static_cast<float>(std::abs(edge->x - centre->x)),
age, pop.at.channel});
}
}
const auto own = cellular_remote->cellular_play().life();
// The region's walls, from the perceived current configuration (mm).
double region_w_mm = 0, region_h_mm = 0;
if (const auto* perception = cellular_remote->cellular_perception();
perception && perception->currents) {
region_w_mm = static_cast<double>(perception->currents->width_um) / 1000;
region_h_mm = static_cast<double>(perception->currents->height_um) / 1000;
const auto low = camera->world_to_screen({0, 0});
const auto high = camera->world_to_screen({region_w_mm, region_h_mm});
if (low && high) {
scene.region = true;
scene.region_left = static_cast<float>(std::min(low->x, high->x));
scene.region_right = static_cast<float>(std::max(low->x, high->x));
scene.region_top = static_cast<float>(std::min(low->y, high->y));
scene.region_bottom = static_cast<float>(std::max(low->y, high->y));
}
}
if (orgs) {
scene.region_cells = static_cast<std::size_t>(
std::ranges::count_if(orgs->cells(), [](const auto& cell) {
return cell.state != evo::client::OrganismState::dead;
}));
// Against a wall: within 50 um of it (positions are the lower-left corner).
for (const auto& cell : orgs->cells()) {
if (own == 0 || cell.id != own || region_w_mm == 0)
continue;
constexpr auto pitch = static_cast<double>(evo::world::cell_pitch_mm);
const double x = static_cast<double>(cell.voxel.x) * pitch +
static_cast<double>(cell.x.value) / 1000;
const double y = static_cast<double>(cell.voxel.y) * pitch +
static_cast<double>(cell.y.value) / 1000;
const double extent = static_cast<double>(cell.phenotype.extent) / 1000;
constexpr double near = 0.05;
scene.at_edge = x <= near || y <= near ||
x + extent >= region_w_mm - near ||
y + extent >= region_h_mm - near;
}
}
// ADR-0176: the owner's view lists the producers it can see, by organism.
const auto* seen = cellular_remote->cellular_perception();
const auto photosynthesis = [&](std::uint64_t organism) -> std::uint32_t {
if (!seen)
return 0;
const auto found = std::ranges::lower_bound(
seen->producers, organism, {},
&evo::network::CellularPerceivedProducer::organism);
return found != seen->producers.end() && found->organism == organism
? found->photosynthesis_per_thousand
: 0;
};
if (orgs)
for (const auto& cell : orgs->cells()) {
const auto bounds = evo::render::organism_bounds(cell, *camera);
if (bounds.right < 0 || bounds.left > width || bounds.bottom < 0 ||
bounds.top > height)
continue;
const auto& ph = cell.phenotype;
evo::client_app::SceneCell c;
c.x = static_cast<float>((bounds.left + bounds.right) / 2);
c.y = static_cast<float>((bounds.top + bounds.bottom) / 2);
c.radius = static_cast<float>((bounds.right - bounds.left) / 2);
// One flagellum per 150 um/s of speed (a founder swims at 200).
c.flagella = ph.movement_speed == 0
? 0
: static_cast<int>(std::min<std::uint32_t>(
6, 1 + ph.movement_speed / 150));
const double wall = ph.total_mass == 0
? 0.0
: static_cast<double>(ph.membrane_mass) /
static_cast<double>(ph.total_mass);
c.membrane = static_cast<float>(std::clamp(1.0 + wall * 6.0, 1.0, 7.0));
c.organelles = 2 + static_cast<int>(std::min<std::uint32_t>(
3, ph.conversion_per_thousand / 250));
c.photosynthesis_per_thousand = photosynthesis(cell.id);
c.chloroplasts = c.photosynthesis_per_thousand == 0
? 0
: 1 + static_cast<int>(std::min<std::uint32_t>(
5, c.photosynthesis_per_thousand / 200));
c.own = own != 0 && cell.id == own;
c.dead = cell.state == evo::client::OrganismState::dead;
c.stale =
org_layer && org_layer->freshness() != evo::client::Freshness::current;
c.seed = cell.id;
// The organism projection's world position (organism_bounds).
constexpr auto pitch = static_cast<double>(evo::world::cell_pitch_mm);
const evo::client::WorldPoint at{
static_cast<double>(cell.voxel.x) * pitch +
static_cast<double>(cell.x.value) / 1000,
static_cast<double>(cell.voxel.y) * pitch +
static_cast<double>(cell.y.value) / 1000};
c.extent_um = ph.extent;
c.speed_um_s = ph.movement_speed;
c.conversion_per_thousand = ph.conversion_per_thousand;
c.grown_per_thousand = cell.growth.realized_per_thousand;
c.mass_fg = ph.total_mass;
c.membrane_fg = ph.membrane_mass;
c.ingestion_fg_s = ph.ingestion_rate;
if (const auto heading = headings.update(cell.id, at, *camera)) {
c.facing = true;
c.heading = *heading;
}
scene.cells.push_back(c);
}
headings.end_frame();
drawn_organisms = static_cast<int>(scene.cells.size());
scene_active = true;
} else {
const auto report = evo::render::append_organisms(
boxes, organism_budget, orgs,
org_layer ? org_layer->freshness() : evo::client::Freshness::none, *camera);
if (!report)
return 1;
drawn_organisms = static_cast<int>(report->drawn);
}
if (const auto* remote = host.session(); remote && mode() == Mode::remote) {
for (const auto& m : remote->markers())
if (const auto at = camera->world_to_screen({m.x_mm, m.y_mm}))
@@ -675,7 +1057,7 @@ int main(int argc, char** argv) try {
8,
8,
{240, 240, 240, 255}});
const auto frame = evo::render::Frame::create(boxes, {16, 20, 28, 255});
const auto frame = evo::render::Frame::create(boxes, {14, 12, 18, 255}); // Ink.
if (!frame)
return 1;
if (!screenshot.empty() && count + 1 == frames && !(*app)->request_screenshot(screenshot))
+1624 -20
View File
File diff suppressed because it is too large Load Diff
+83 -1
View File
@@ -2,7 +2,9 @@
// M9.8c engineering panels (ADR-0084). Drawn inside Application's overlay callback;
// they read presentation copies and report what the user asked for. Only this file
// pair and the platform adapter use the toolkit.
#include "evo/client/auth.hpp"
#include "evo/client/bindings.hpp"
#include "evo/client/camera.hpp"
#include "evo/client/environment_view.hpp"
#include "evo/client/launcher.hpp"
#include "evo/client/organism_view.hpp"
@@ -15,14 +17,86 @@
#include <cstdint>
#include <optional>
#include <utility>
#include <vector>
namespace evo::client_app {
enum class Mode : std::uint8_t { launcher, fixture, remote };
// The cellular microscope view (2026-10-16 UI), in logical window coordinates. The client
// loop builds it from copied presentations each frame; the panels draw it with the
// toolkit, since membranes, flagella and granules are not rectangles. Appearance comes
// from the phenotype only: size from extent, flagella from movement speed, wall
// thickness from membrane mass, organelles from energy conversion.
struct SceneCell {
float x{}, y{}, radius{}, membrane{};
int flagella{}, organelles{};
bool own{}, dead{}, stale{};
std::uint64_t seed{}; // Stable per organism: organelle layout (and orientation at rest).
bool facing{}; // Heading is known: the cell faces it, flagella trailing.
float heading{}; // Screen radians.
// What hovering the cell shows (its replicated phenotype; no hidden state).
std::uint32_t extent_um{}, speed_um_s{}, conversion_per_thousand{}, grown_per_thousand{};
std::uint64_t mass_fg{}, membrane_fg{}, ingestion_fg_s{};
std::uint32_t photosynthesis_per_thousand{}; // Zero unless the owner's view lists it.
int chloroplasts{}; // ADR-0176: green organelles in proportion to photosynthesis.
};
struct ScenePatch {
float x{}, y{}, half{}; // Centre and half side of the 1 mm contact footprint.
std::array<std::uint64_t, 5> stock{}; // Energy pJ, then C, N, P, other fg.
bool target{}, stale{};
std::uint64_t seed{};
};
// ADR-0136 (v11): a pool (a puddle) or a bubble, centred, with its contact radius in pixels.
struct SceneDeposit {
float x{}, y{}, radius{};
std::array<std::uint64_t, 5> stock{}; // Approximate (v11 amount codes), same channels.
bool pool{}, drained{}, stale{};
std::uint64_t seed{};
};
// A bubble that just ran out: an expanding, fading ring for a moment.
struct ScenePop {
float x{}, y{}, radius{}, age{}; // Age 0..1 over the pop's life.
int channel{};
};
// Rules 12: one streak of the local current; dx/dy in pixels, strength 0..1 by speed.
struct SceneFlow {
float x{}, y{}, dx{}, dy{}, strength{};
std::uint32_t seed{};
};
struct CellularScene {
std::vector<SceneFlow> flows;
std::vector<ScenePatch> patches;
std::vector<SceneDeposit> deposits;
std::vector<ScenePop> pops;
std::vector<SceneCell> cells;
// Camera mapping for the local observation map; no undiscovered world state.
client::WorldPoint camera_centre{};
bool stale{};
// The region's walls on screen (liquid regions, from the perceived current configuration),
// whether the owner's cell is against one, and how many cells the region holds.
bool region{};
float region_left{}, region_top{}, region_right{}, region_bottom{};
bool at_edge{};
std::size_t region_cells{};
};
// Notice layout (logical pixels); the window name is the prefix plus the notice id.
inline constexpr float notice_width = 320, notice_close_width = 22;
inline constexpr const char* notice_window_prefix = "##notice";
// Text-field storage for the connect form (bounded; never persisted).
// HUD positions are client-session preferences in normalized viewport coordinates.
struct HudPanelPlacement {
std::optional<std::pair<float, float>> anchor;
// Expanded size in unscaled UI units; collapse never overwrites it.
std::optional<std::pair<float, float>> size;
std::pair<float, float> drag_origin{};
std::pair<float, float> requested_size{};
};
// Connect form fields and presentation preferences; never persisted.
struct FormBuffers {
bool engineering{};
bool evolution_open{}; // The mutation window (E or the callout opens it).
bool notes_minimized{}, vitals_minimized{}, map_minimized{};
HudPanelPlacement notes_placement, vitals_placement, map_placement;
bool bud_become{}; // Rules 13: the next bud is the player's cell.
CellularControls cellular_controls;
std::array<char, client::max_field_bytes> endpoint{}, server_name{}, authority{}, grants{};
void load(const client::ConnectForm& form);
[[nodiscard]] client::ConnectForm form() const;
@@ -39,12 +113,15 @@ struct PanelView {
std::optional<client::LaunchError> form_error;
bool remote_available{};
bool cellular_trial{};
client::AuthStatus auth;
const client::EnvironmentLayer* environment{};
const client::OrganismLayer* organisms{};
const client::Selection* selection{};
const client::UiState* ui{};
std::optional<RemoteStatus> remote;
const network::CellularPerception* cellular_perception{};
const CellularPlay* cellular_play{};
const CellularScene* cellular_scene{}; // Drawn under the panels when present.
std::optional<std::pair<std::uint32_t, std::uint32_t>> cellular_feed_target;
const client::OutcomeLog* outcomes{};
int visible_organisms{-1}; // -1 when unknown.
@@ -56,6 +133,7 @@ struct PanelView {
};
struct PanelActions {
bool fixture{}, connect{}, cancel{}, retry{}, back{}, ask_disconnect{};
bool sign_in{}, sign_out{}, auth_connect{}, cancel_sign_in{};
std::optional<std::uint64_t> dismiss_notice, confirm_dialog, cancel_dialog;
bool open_controls{}, apply_controls{}, reset_controls{}, close_controls{}, cancel_capture{};
std::optional<ControlSlot> capture_key;
@@ -63,6 +141,10 @@ struct PanelActions {
std::optional<bool> cellular_trial;
std::optional<std::pair<std::uint32_t, std::uint32_t>> feed_patch;
bool stop_feeding{};
std::optional<CellAction> cell_action;
bool cell_become{}; // With a bud: continue as it (v14).
std::optional<MutationChoice> mutation;
bool restart_life{}, keep_unknown{};
};
// Draws every panel for this frame. `display` may be changed by the layer selector.
[[nodiscard]] PanelActions draw_panels(const PanelView& view, FormBuffers& form,
+233 -36
View File
@@ -2,7 +2,7 @@
// M10.5c remote dev session for the engineering client (ADR-0093, over ADR-0091/0092
// sessions). Without EVO_CLIENT_NETWORK (a build without EVO_BUILD_QUIC) remote mode is
// unavailable. The client only presents copies of replicated snapshots and sends bounded
// bounded intentions; the explicit cellular trial uses reliable v9 actions and its
// intentions; the explicit cellular trial uses reliable v10 actions and its
// owner-filtered perception view. Grant bytes stay inside the session: each is handed to one
// connection and wiped here; never printed, shown or persisted.
//
@@ -31,6 +31,8 @@
// is followed with a grant for that region. Grants are picked by their region claim (the
// session-grant-v1 layout is public; the claim only routes, the region still verifies), so a
// bundle may hold grants for several regions.
#include "cellular_controls.hpp"
#include "cellular_play.hpp"
#include "evo/client/camera.hpp"
#include "evo/client/environment_view.hpp"
#include "evo/client/input.hpp"
@@ -172,15 +174,11 @@ class RemoteSession {
session.transport_.authority_pem = m.authority_pem;
session.transport_.authority_pem_file = m.authority_path;
session.grants_ = m.grants;
std::copy_n(m.grants.front().begin() + 32, session.account_.size(),
session.account_.begin());
session.cellular_trial_ = cellular_trial;
session.next_cellular_action_id_ =
static_cast<std::uint64_t>(std::chrono::system_clock::now().time_since_epoch().count());
if (session.next_cellular_action_id_ == 0)
session.next_cellular_action_id_ = 1;
session.cellular_birth_request_id_ =
session.next_cellular_action_id_ ^ 0x43454C4C00000000ULL;
if (session.cellular_birth_request_id_ == 0)
session.cellular_birth_request_id_ = 1;
session.cellular_play_.initialize(static_cast<std::uint64_t>(
std::chrono::system_clock::now().time_since_epoch().count()));
session.used_.assign(m.grants.size(), false);
// The endpoint typed in the launcher is the first grant's region.
session.target_region_ = grant_region(m.grants.front());
@@ -191,6 +189,47 @@ class RemoteSession {
RemoteSession& operator=(RemoteSession&&) noexcept = default;
RemoteSession(const RemoteSession&) = delete;
RemoteSession& operator=(const RemoteSession&) = delete;
void manage_grants() {
managed_grants_ = true;
}
[[nodiscard]] bool needs_grant(std::uint64_t utc_now) const {
if (!managed_grants_)
return false;
if (!client_)
return exhausted_ || std::ranges::all_of(used_, [](bool used) { return used; });
const auto& welcome = client_->welcome();
return client_->state() == client::RegionSessionState::established && welcome &&
std::max(welcome->expires_at, refreshed_until_) <= utc_now + 60 && !refresh_waiting_;
}
// Grants are supplied by the authenticated broker, never written to a bundle.
[[nodiscard]] bool supply_grant(const client::ConnectMaterial& material) {
if (!managed_grants_ || material.grants.size() != 1 ||
material.authority_pem != transport_.authority_pem)
return false;
const auto& grant = material.grants.front();
const auto serial = grant_serial(grant);
if (serial < newest_serial_ || serial == UINT64_MAX ||
!std::equal(account_.begin(), account_.end(), grant.begin() + 32))
return false;
const auto region = grant_region(grant);
if (client_ && client_->state() == client::RegionSessionState::established) {
if (region != region_ || !client_->refresh(grant))
return false;
newest_serial_ = serial + 1;
refresh_waiting_ = true;
refresh_sent_at_ = Clock::now();
return true;
}
if (!learn_route({region,
material.endpoint.host + ":" + std::to_string(material.endpoint.port),
material.server_name}))
return false;
grants_.assign(1, grant);
used_.assign(1, false);
target_region_ = region;
exhausted_ = false;
return true;
}
~RemoteSession() {
if (client_)
client_->close(); // Close{client_closed}; unresolved intentions stay unknown.
@@ -212,16 +251,55 @@ class RemoteSession {
return cellular_trial_;
}
[[nodiscard]] const network::CellularPerception* cellular_perception() const noexcept {
return client_ && client_->cellular_perception() ? &*client_->cellular_perception()
: nullptr;
if (!client_)
return nullptr;
const auto& p = client_->cellular_perception();
return p ? &*p : nullptr;
}
[[nodiscard]] const std::string& cellular_action_status() const noexcept {
return cellular_action_status_;
}
[[nodiscard]] const CellularPlay& cellular_play() const noexcept {
return cellular_play_;
}
[[nodiscard]] bool request_cellular(CellAction kind, MutationChoice choice = {},
bool become = false) {
const auto lead = cellular_lead_.lead();
// A tick takes one action per account: never one a movement already named (movement
// runs ahead of the lead after the lead shrinks).
const auto tick = kind == CellAction::mutation
? server_tick_
: std::max(server_tick_ + lead +
(sent_tick_ && *sent_tick_ == server_tick_ ? 1 : 0),
cellular_sent_tick_ + 1);
if (!cellular_trial_ || !cellular_play_.queue(kind, tick, choice, become))
return false;
action_check_at_ = {};
if (kind != CellAction::mutation)
cellular_feed_target_.reset();
return true;
}
[[nodiscard]] bool restart_cellular() {
if (!cellular_trial_ || !cellular_play_.restart())
return false;
cellular_feed_target_.reset();
birth_check_at_ = {};
cellular_action_status_ = "New life requested; waiting for the server";
return true;
}
void keep_cellular_unknown() {
cellular_play_.keep_unknown();
}
void set_cellular_controls(CellularControls controls) {
cellular_controls_ = controls;
}
void set_cellular_feed_target(
std::optional<std::pair<std::uint32_t, std::uint32_t>> target) noexcept {
cellular_feed_target_ = target;
}
[[nodiscard]] auto cellular_feed_target() const noexcept {
return cellular_feed_target_;
}
[[nodiscard]] RemoteStatus status() const {
RemoteStatus s;
const bool live = client_ && client_->state() == client::RegionSessionState::established;
@@ -321,6 +399,13 @@ class RemoteSession {
return;
auto& c = *client_;
c.poll(now);
if (const auto refreshed = c.take_refresh_result()) {
refresh_waiting_ = false;
if (refreshed->status == 0) // Accepted: the session now runs to the new expiry.
refreshed_until_ = std::max(refreshed_until_, refreshed->expires_at);
} else if (refresh_waiting_ && now - refresh_sent_at_ >= std::chrono::seconds{5}) {
refresh_waiting_ = false;
}
if (c.state() == client::RegionSessionState::closed) {
end(now, ui, launcher);
return;
@@ -329,21 +414,28 @@ class RemoteSession {
return;
if (!established_)
welcome(ui, launcher);
if (cellular_trial_ && !cellular_birth_request_sent_ &&
c.request_primitive_life(cellular_birth_request_id_))
cellular_birth_request_sent_ = true;
server_tick_ = c.server_tick();
if (server_tick_ != observed_tick_) { // Every watermark or snapshot tick times the clock.
observed_tick_ = server_tick_;
clock_.observe(server_tick_, now);
}
if (cellular_trial_)
send_cellular(intention);
else
send(intention);
receipts();
cellular_results();
snapshot();
if (cellular_trial_) {
const auto old_life = cellular_play_.life();
if (const auto& p = c.cellular_perception())
cellular_play_.observe(*p);
if (const auto& ended = c.life_ended())
cellular_play_.observe_end(*ended);
cellular_play_.observe_offer(c.mutation_offer());
if (old_life != cellular_play_.life())
cellular_feed_target_.reset();
service_cellular(now);
send_cellular(intention);
} else {
send(intention);
}
present(now);
if (wanted_ && (!sent_interest_ || *wanted_ != *sent_interest_) &&
now - interest_at_ >= std::chrono::milliseconds{250} && c.set_interest(*wanted_)) {
@@ -413,7 +505,9 @@ class RemoteSession {
return false;
client::RegionSessionClientConfig config;
if (cellular_trial_)
config.protocol_version = network::session_protocol_v9;
// Rules 13: v14 is v13 (deposits, light, producers, liquid motion and brake) plus the
// revamp: become, emerge, exclusions, catalog offers and the body block.
config.protocol_version = network::session_protocol_v14;
const auto route = routes_.find(target_region_);
config.transport = route != routes_.end() ? route->second : transport_;
if (ticket_) { // A handoff: the ticket replaces a grant, once.
@@ -436,9 +530,12 @@ class RemoteSession {
if (pick == grants_.size()) {
if (!exhausted_) {
exhausted_ = true;
launcher.observe(client::ConnectSignal::exhausted);
std::printf("session grants for region %llu exhausted; issue a new bundle\n",
static_cast<unsigned long long>(target_region_));
if (!managed_grants_) {
launcher.observe(client::ConnectSignal::exhausted);
std::printf(
"session grants for region %llu exhausted; issue a new bundle\n",
static_cast<unsigned long long>(target_region_));
}
}
return false;
}
@@ -455,6 +552,8 @@ class RemoteSession {
}
client_ = std::move(*made);
established_ = false;
refreshed_until_ = 0; // A new session starts from its own welcome.
refresh_waiting_ = false;
return true;
}
void pause(Clock::time_point now) {
@@ -462,7 +561,10 @@ class RemoteSession {
backoff_ = std::min(backoff_ * 2, std::chrono::seconds{30});
}
void welcome(client::UiState& ui, client::Launcher& launcher) {
const auto& w = *client_->welcome();
const auto& welcome_message = client_->welcome();
if (!welcome_message)
return;
const auto& w = *welcome_message;
established_ = true;
welcomed_ = true;
backoff_ = std::chrono::seconds{2};
@@ -481,11 +583,15 @@ class RemoteSession {
predictor_.reset(); // A new session has a new marker.
smoother_.reset();
lead_.reset();
cellular_lead_.reset();
cellular_sent_tick_ = 0;
clock_.reset(); // Fresh baseline: the frozen view of a lost session is dropped.
interpolator_.reset();
markers_.clear();
observed_tick_ = 0;
stale_view_ = false;
cellular_play_.connected();
action_check_at_ = birth_check_at_ = {};
launcher.observe(client::ConnectSignal::welcome);
notify(ui, "Connected to the dev region (fresh baseline).", client::NoticeLevel::info);
std::printf("session welcome session=%llu epoch=%llu tick=%llu\n",
@@ -521,14 +627,62 @@ class RemoteSession {
}
void send_cellular(const client::Intention& intention) {
if (server_tick_ == 0 || (sent_tick_ && server_tick_ <= *sent_tick_) ||
next_cellular_action_id_ == 0)
!cellular_play_.fresh() || cellular_play_.life() == 0 || cellular_play_.ended())
return;
const auto tick = server_tick_ + 1;
if (!client_->send_cellular_action(next_cellular_action_id_, tick, intention.move_x,
intention.move_y, cellular_feed_target_))
// The server admits only ticks still ahead of it when the action arrives; the view
// trails it by the replication delay, so schedule by the adaptive lead.
// Strictly increasing even when the lead shrinks: one movement per tick.
const auto tick = std::max(server_tick_ + cellular_lead_.lead(), cellular_sent_tick_ + 1);
// A queued discrete action owns its tick; movement resumes after it is sent.
if (const auto& p = cellular_play_.pending(); p && p->state == CellActionState::queued &&
p->kind != CellAction::mutation &&
p->tick <= tick)
return;
const auto steering = steer_cellular(cellular_controls_, intention, cellular_perception(),
organisms_.current(), cellular_feed_target_);
cellular_feed_target_ = steering.patch;
const auto id = cellular_play_.allocate_id();
if (id == 0 || !client_->send_cellular_action(
id, tick, steering.intention.move_x, steering.intention.move_y,
cellular_feed_target_, false, false, steering.intention.brake, false,
false, cellular_controls_.exclude))
return;
++next_cellular_action_id_;
sent_tick_ = server_tick_;
cellular_sent_tick_ = tick;
}
void service_cellular(Clock::time_point now) {
if (cellular_play_.birth_pending() && now >= birth_check_at_) {
if (client_->request_primitive_life(cellular_play_.birth_request()))
birth_check_at_ = now + std::chrono::seconds{2};
}
const auto& pending = cellular_play_.pending();
if (!pending || now < action_check_at_)
return;
const auto& p = *pending;
cellular_play_.rechecking(); // A refused retry cannot settle a lost original reply.
bool sent = false;
if (p.kind == CellAction::mutation) {
sent = client_->send_cellular_mutation(p.id, p.tick, p.choice.life, p.choice.event,
p.choice.offer_tick, p.choice.operator_id,
p.choice.become);
} else if (p.state == CellActionState::queued) {
if (p.tick > server_tick_ + cellular_lead_.lead())
return; // Do not replace a movement/feeding intention already sent this tick.
sent = client_->send_cellular_action(
p.id, p.tick, 0, 0, {}, p.kind == CellAction::engulf, p.kind == CellAction::bud,
false, p.become, p.kind == CellAction::emerge, cellular_controls_.exclude);
if (sent) {
sent_tick_ = server_tick_; // The discrete intention owns this tick's target.
cellular_sent_tick_ = std::max(cellular_sent_tick_, p.tick);
}
} else {
sent = client_->query_action(p.id); // A query can never bud a second time.
}
if (sent) {
if (p.state == CellActionState::queued)
cellular_play_.sent();
action_check_at_ = now + std::chrono::seconds{2};
}
}
void cellular_results() {
for (const auto& receipt : client_->take_primitive_life_receipts())
@@ -537,13 +691,17 @@ class RemoteSession {
std::to_string(static_cast<unsigned>(receipt.status)) +
")";
for (const auto& outcome : client_->take_primitive_life_outcomes()) {
if (outcome.request_id != cellular_play_.birth_request())
continue;
cellular_play_.birth(outcome);
switch (outcome.result) {
case network::PrimitiveLifeResult::born:
cellular_action_status_ =
"Cell founded (life " + std::to_string(outcome.life_identity) + ")";
break;
case network::PrimitiveLifeResult::insufficient_funding:
cellular_action_status_ = "Birth refused: nursery funding is insufficient";
cellular_action_status_ = "Birth refused: the region nursery lacks resources. "
"A new account cannot restore them.";
break;
case network::PrimitiveLifeResult::no_placement:
cellular_action_status_ = "Birth refused: no open spawn site";
@@ -555,19 +713,27 @@ class RemoteSession {
cellular_action_status_ = "Birth request cancelled";
break;
case network::PrimitiveLifeResult::pending:
cellular_action_status_ = "Cell birth is being committed";
cellular_action_status_ =
"Birth is pending on the server; no new cell confirmed yet";
break;
case network::PrimitiveLifeResult::unknown:
cellular_action_status_ = "Birth outcome is unknown; retrying exact request";
cellular_birth_request_sent_ = false;
break;
}
}
for (const auto& receipt : client_->take_action_receipts())
for (const auto& receipt : client_->take_action_receipts()) {
if (receipt.status == network::AdmitStatus::admitted)
cellular_lead_.admitted(receipt.tick, receipt.server_tick);
else if (receipt.status == network::AdmitStatus::outside_window)
cellular_lead_.too_late(); // Arrived after its tick: schedule further ahead.
cellular_play_.receipt(receipt);
if (receipt.status != network::AdmitStatus::admitted)
cellular_action_status_ = cellular_admission_message(receipt.status);
for (const auto& outcome : client_->take_action_outcomes())
}
for (const auto& outcome : client_->take_action_outcomes()) {
cellular_play_.outcome(outcome);
cellular_action_status_ = cellular_outcome_message(outcome.result, outcome.tick);
}
}
void receipts() {
for (const auto& r : client_->take_intention_receipts()) {
@@ -716,7 +882,8 @@ class RemoteSession {
stale_view_ = was_established || stale_view_;
predictor_.reset(); // The marker ended with its session.
client_.reset();
cellular_birth_request_sent_ = false;
cellular_play_.disconnected();
cellular_feed_target_.reset();
established_ = false;
// A crossing or a redirect is followed at once: no grant for a handoff, no pause.
if (reason == SessionCloseReason::handed_off && offer && learn_route(offer->destination)) {
@@ -776,8 +943,14 @@ class RemoteSession {
network::quic::ClientConfig transport_;
std::vector<network::WireGrant> grants_;
std::vector<bool> used_;
std::array<std::uint8_t, 16> account_{};
bool managed_grants_{}, refresh_waiting_{};
std::uint64_t refreshed_until_{}; // Expiry from the last accepted SessionRefresh.
Clock::time_point refresh_sent_at_{};
std::map<std::uint64_t, network::quic::ClientConfig> routes_; // Region -> how to dial it.
std::uint64_t target_region_{}, region_{}, handoffs_{}, newest_serial_{};
client::InputLead cellular_lead_; // Cellular action ticks (2..7 ahead of the view).
std::uint64_t cellular_sent_tick_{}; // Newest tick a movement or discrete action named.
std::optional<network::WireGrant> ticket_; // A handoff ticket for the next connection.
bool handing_off_{};
std::unique_ptr<client::RegionSessionClient> client_;
@@ -809,15 +982,23 @@ class RemoteSession {
bool established_{}, welcomed_{}, exhausted_{};
bool following_{true}; // The camera follows the server's (default) view.
bool cellular_trial_{};
std::uint64_t next_cellular_action_id_{}, cellular_birth_request_id_{};
CellularPlay cellular_play_;
CellularControls cellular_controls_;
Clock::time_point action_check_at_{}, birth_check_at_{};
std::optional<std::pair<std::uint32_t, std::uint32_t>> cellular_feed_target_;
std::string cellular_action_status_;
bool cellular_birth_request_sent_{};
};
#else
inline constexpr bool remote_available = false;
class RemoteSession {
public:
void manage_grants() {}
[[nodiscard]] bool needs_grant(std::uint64_t) const {
return false;
}
[[nodiscard]] bool supply_grant(const client::ConnectMaterial&) {
return false;
}
static std::optional<RemoteSession> open(const client::ConnectMaterial&, bool = false) {
return std::nullopt;
}
@@ -839,8 +1020,23 @@ class RemoteSession {
[[nodiscard]] const std::string& cellular_action_status() const noexcept {
return action_status_;
}
[[nodiscard]] const CellularPlay& cellular_play() const noexcept {
return cellular_play_;
}
[[nodiscard]] bool request_cellular(CellAction, MutationChoice = {}, bool = false) {
return false;
}
[[nodiscard]] bool restart_cellular() {
return false;
}
void keep_cellular_unknown() {}
void set_cellular_controls(CellularControls) {}
void set_cellular_feed_target(std::optional<std::pair<std::uint32_t, std::uint32_t>>) noexcept {
}
[[nodiscard]] std::optional<std::pair<std::uint32_t, std::uint32_t>>
cellular_feed_target() const noexcept {
return {};
}
[[nodiscard]] RemoteStatus status() const {
RemoteStatus status;
status.phase = "unavailable in this build";
@@ -857,6 +1053,7 @@ class RemoteSession {
client::Launcher&) {}
private:
CellularPlay cellular_play_;
std::string action_status_;
client::EnvironmentLayer environment_;
client::OrganismLayer organisms_;
+179
View File
@@ -0,0 +1,179 @@
// ADR-0131 grant broker: verifies Keycloak access tokens and issues short-lived session
// grants (POST /grant), revokes an account's grants (POST /logout), GET /healthz.
//
// evo-grant-broker --listen ADDRESS:PORT --world N --frame N --default-region N
// --route REGION=HOST:PORT=TLS_NAME [--route ...] --issuer-key FILE
// --jwks JSON --oidc-issuer URL --audience NAME --client NAME
// --pg-passfile F --pg-service F [--grant-lifetime 60..3600]
//
// The issuer key file is the raw 32-byte P-256 scalar (the dev issuer.key format). No
// token, grant or key is ever printed.
#include "evo/persistence/postgres.hpp"
#include "evo/server/broker/grant_broker.hpp"
#include <array>
#include <charconv>
#include <chrono>
#include <csignal>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iterator>
#include <optional>
#include <string>
#include <string_view>
#include <thread>
#include <vector>
namespace {
using namespace evo;
using namespace std::chrono_literals;
volatile std::sig_atomic_t stop_requested = 0;
void on_stop(int) {
stop_requested = 1;
}
struct Options {
std::string listen, issuer_key, jwks, oidc_issuer, audience, client;
server::broker::BrokerConfig broker;
persistence::PgOptions pg;
};
std::optional<std::uint64_t> number(std::string_view text) {
std::uint64_t value{};
const auto [end, error] = std::from_chars(text.data(), text.data() + text.size(), value);
if (error != std::errc{} || end != text.data() + text.size())
return std::nullopt;
return value;
}
std::optional<server::broker::BrokerRoute> route(std::string_view text) {
const auto first = text.find('=');
const auto second = first == std::string_view::npos ? first : text.find('=', first + 1);
if (second == std::string_view::npos)
return std::nullopt;
const auto region = number(text.substr(0, first));
const auto endpoint = text.substr(first + 1, second - first - 1);
const auto name = text.substr(second + 1);
if (!region || *region == 0 || endpoint.empty() || endpoint.size() > 64 || name.empty() ||
name.size() > 64)
return std::nullopt;
return server::broker::BrokerRoute{*region, std::string(endpoint), std::string(name)};
}
std::optional<Options> parse(int argc, char** argv) {
Options o;
std::string pg_service, pg_passfile;
for (int i = 1; i + 1 < argc; i += 2) {
const std::string_view flag = argv[i];
const std::string_view value = argv[i + 1];
const auto n = number(value);
if (flag == "--listen")
o.listen = value;
else if (flag == "--world" && n && *n > 0)
o.broker.world = *n;
else if (flag == "--frame" && n && *n > 0)
o.broker.frame = *n;
else if (flag == "--default-region" && n && *n > 0)
o.broker.default_region = *n;
else if (flag == "--route") {
const auto parsed = route(value);
if (!parsed)
return std::nullopt;
o.broker.routes.push_back(*parsed);
} else if (flag == "--issuer-key")
o.issuer_key = value;
else if (flag == "--jwks")
o.jwks = value;
else if (flag == "--oidc-issuer")
o.oidc_issuer = value;
else if (flag == "--audience")
o.audience = value;
else if (flag == "--client")
o.client = value;
else if (flag == "--pg-service")
pg_service = value;
else if (flag == "--pg-passfile")
pg_passfile = value;
else if (flag == "--grant-lifetime" && n && *n >= 60 && *n <= 3600)
o.broker.grant_lifetime_seconds = *n;
else
return std::nullopt;
}
if (argc % 2 != 1 || o.listen.empty() || o.broker.world == 0 || o.broker.frame == 0 ||
o.broker.default_region == 0 || o.broker.routes.empty() || o.issuer_key.empty() ||
o.jwks.empty() || o.oidc_issuer.empty() || o.audience.empty() || o.client.empty() ||
pg_service.empty() || pg_passfile.empty())
return std::nullopt;
auto service = persistence::read_pg_service(pg_service, "evolution");
if (!service)
return std::nullopt;
o.pg = *service;
o.pg.password_file = pg_passfile;
return o;
}
std::uint64_t wall_seconds() {
return static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
.count());
}
} // namespace
int main(int argc, char** argv) {
const auto options = parse(argc, argv);
if (!options) {
std::fputs("usage: evo-grant-broker (see apps/evo-grant-broker/main.cpp)\n", stderr);
return 2;
}
std::signal(SIGTERM, on_stop);
std::signal(SIGINT, on_stop);
std::signal(SIGPIPE, SIG_IGN);
std::ifstream key_file{options->issuer_key, std::ios::binary};
const std::vector<std::uint8_t> scalar{std::istreambuf_iterator<char>{key_file},
std::istreambuf_iterator<char>{}};
auto key = network::GrantSigningKey::import(network::DeploymentEnvironment::dev, 1, scalar);
if (!key) {
std::puts("error issuer-key");
return 2;
}
auto verifier = server::broker::TokenVerifier::from_jwks(
options->jwks, {options->oidc_issuer, options->audience, options->client, 30});
if (!verifier) {
std::puts("error jwks");
return 2;
}
auto listening = server::OpsServer::listen(options->listen);
if (!listening) {
std::puts("error listen");
return 2;
}
const auto pg = options->pg;
server::broker::GrantBroker broker{options->broker, std::move(*verifier), std::move(*key),
[pg]() -> std::unique_ptr<persistence::Postgres> {
auto db = persistence::Postgres::connect(pg, 3s);
return db ? std::move(*db) : nullptr;
},
[](std::uint64_t& id) {
std::array<std::uint8_t, sizeof id> bytes{};
if (!network::random_bytes(bytes))
return false;
std::memcpy(&id, bytes.data(), sizeof id);
return true;
}};
std::printf("grant broker listening %u world %llu region %llu\n",
static_cast<unsigned>((*listening)->port()),
static_cast<unsigned long long>(options->broker.world),
static_cast<unsigned long long>(options->broker.default_region));
std::fflush(stdout);
while (stop_requested == 0) {
(*listening)->serve_api([&](const server::ApiRequest& request) {
return broker.handle(request, wall_seconds());
});
std::this_thread::sleep_for(5ms);
}
std::puts("grant broker stopped");
return 0;
}
+351 -27
View File
@@ -1,5 +1,6 @@
#pragma once
#include "evo/biology/budding.hpp"
#include "evo/client/organism_view.hpp"
#include "evo/network/session_grant.hpp"
#include "evo/server/cellular_region_host.hpp"
@@ -18,12 +19,17 @@
#include <fstream>
#include <iterator>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
namespace evo::server_app {
// Rules 12: moving bubbles listed per perception, nearest first (the tuning file's trial
// food.visible_moving_bubbles). Pools are always listed.
inline constexpr std::size_t cellular_visible_moving_bubbles = 256;
// Profile-4 network boundary. Biology and persistence remain owned by the cellular host;
// this bridge handles admission, v7-v9 action receipts, public cell replication and
// owner-filtered v8/v9 perception.
@@ -36,9 +42,16 @@ class CellularBridge {
if (!options.complete())
return fail("error cellular-session-config");
CellularBridge bridge;
const auto window = server::SessionWindow::open(options.session_window, wall_seconds());
if (!window)
return fail("error cellular-session-window");
// A fixed --session-window must be open now; a database window (ADR-0087 amendment)
// may open, close and reopen while the region runs.
if (!options.window_from_database) {
const auto window = server::SessionWindow::open(options.session_window, wall_seconds());
if (!window)
return fail("error cellular-session-window");
bridge.window_ = *window;
}
bridge.window_from_database_ = options.window_from_database;
bridge.key_ = key;
const auto colon = options.listen.rfind(':');
std::uint16_t port{};
if (colon == std::string::npos ||
@@ -79,7 +92,6 @@ class CellularBridge {
std::copy(issuer.begin(), issuer.end(), public_key.begin());
config.issuer_keys.push_back({1, public_key});
bridge.window_ = *window;
bridge.slot_ = std::make_unique<server::PgSlot>(pg, std::chrono::seconds{2});
const auto lease = [&host] { return host.authority(); };
bridge.control_ =
@@ -104,9 +116,9 @@ class CellularBridge {
config.select_cellular_mutation = [&host](const network::AccountId& account,
std::uint64_t generation,
const network::CellularMutationAction& m) {
const auto reply =
host.select_mutation(account.bytes, generation, m.action_id,
{m.life_identity, m.event_index, m.offer_tick, m.operator_id});
const auto reply = host.select_mutation(
account.bytes, generation, m.action_id,
{m.life_identity, m.event_index, m.offer_tick, m.operator_id, m.become});
server::CellularMutationAnswer answer{
server::admit_status(reply.status), reply.tick, {}};
if (reply.outcome)
@@ -120,15 +132,25 @@ class CellularBridge {
: "error cellular-session-config");
bridge.sessions_ = std::move(*sessions);
bridge.sessions_->set_default_interest({0, 0, 0, 7});
// A database window admits nobody until it has been read.
if (bridge.window_from_database_)
bridge.sessions_->set_admission(false);
std::printf("cellular listening %u\n", static_cast<unsigned>(bridge.sessions_->port()));
return std::optional<CellularBridge>{std::move(bridge)};
}
// Applies the session window: while it is closed every Hello is refused, and closing
// closes the open sessions.
[[nodiscard]] bool accepting(std::uint64_t now_seconds) {
const bool open = window_ && window_->accepting(now_seconds);
if (!open && !shutdown_) {
sessions_->shutdown(std::chrono::steady_clock::now());
shutdown_ = true;
if (window_from_database_)
read_window(now_seconds);
const bool open = window_from_database_ ? feed_.accepting(now_seconds)
: window_ && window_->accepting(now_seconds);
if (open != sessions_->admitting()) {
sessions_->set_admission(open);
if (!open)
sessions_->shutdown(std::chrono::steady_clock::now());
std::printf("cellular sessions %s\n", open ? "admitted" : "closed");
}
return open;
}
@@ -155,7 +177,12 @@ class CellularBridge {
static_cast<unsigned long long>(event.session), event.account.c_str(),
static_cast<unsigned>(event.reason));
}
void replicate(const server::CellularLives& state) {
// `state` is what players see (the session batch's working state between commits);
// mutation offers and life endings come only from `committed`, so a player can act on
// them durably. Without `committed`, both are the same state.
void replicate(const server::CellularLives& state,
const server::CellularLives* committed = nullptr) {
const auto& authority = committed ? *committed : state;
const auto tick = state.tick();
if (replicated_tick_ == tick)
return;
@@ -195,7 +222,12 @@ class CellularBridge {
return result;
};
sessions_->replicate(tick, source);
sessions_->clear_cellular_perceptions(tick);
// A tuning adoption changes what a bud costs, so cached costs hold for one rules set.
if (auto rules = server::encode_cellular_revamp_rules(state.revamp_rules());
rules != bud_rules_) {
bud_rules_ = std::move(rules);
bud_costs_.clear();
}
for (const auto& life : state.lives()) {
if (life.presence == server::CellularPresence::suspended)
continue;
@@ -209,6 +241,11 @@ class CellularBridge {
diagnostics.reserve_energy_pj = life.reserve.energy.value;
for (std::size_t i = 0; i < diagnostics.reserve_matter_fg.size(); ++i)
diagnostics.reserve_matter_fg[i] = life.reserve.matter[i].value;
if (const auto cost = bud_cost_for(state, life)) {
diagnostics.bud_cost_energy_pj = cost->energy.value;
for (std::size_t i = 0; i < diagnostics.bud_cost_matter_fg.size(); ++i)
diagnostics.bud_cost_matter_fg[i] = cost->matter[i].value;
}
const auto feedback =
std::ranges::lower_bound(state.last_tick_feedback(), life.identity.life, {},
&server::CellularLifeTickFeedback::life_id);
@@ -247,12 +284,163 @@ class CellularBridge {
}
// ADR-0129 (v10): what an engulf or bud intention did this tick.
diagnostics.engulf = engulf_result(feedback->engulf);
diagnostics.bud = feedback->bud ? bud_outcome(*feedback->bud)
: network::CellularBudOutcome::not_requested;
const auto bud = feedback->bud;
diagnostics.bud =
bud ? bud_outcome(*bud) : network::CellularBudOutcome::not_requested;
// Rules 13 (v14): what held growth back and the tick's flows by channel.
diagnostics.growth_limit = feedback->growth_limit;
const auto channels = [](const accounting::Inventory& value) {
return std::array<std::uint64_t, 5>{
value.energy.value, value.matter[0].value, value.matter[1].value,
value.matter[2].value, value.matter[3].value};
};
diagnostics.collected = channels(feedback->collected);
diagnostics.into_growth = channels(feedback->into_growth);
diagnostics.burned = channels(feedback->burned);
diagnostics.burned[0] = 0; // Energy is spent, never burned.
}
// Rules 12 (v13): the authoritative motion state and the region's currents, from
// which the client regenerates the identical flow field.
const auto* field = state.flow_field();
if (field) {
diagnostics.velocity_x_q10 = life.motion.velocity_x_q10;
diagnostics.velocity_y_q10 = life.motion.velocity_y_q10;
diagnostics.heading = life.motion.heading;
const auto& c = state.liquid_rules().currents;
view.currents = network::CellularCurrentsView{c.seed,
c.width_um,
c.height_um,
c.pitch_um,
c.min_count,
c.max_count,
c.min_route_width_um,
c.max_route_width_um,
c.min_speed_um_per_s,
c.max_speed_um_per_s};
}
// Rules 13 (v14): the body block. Older sessions never see it.
diagnostics.members = life.revamp.members;
diagnostics.growth_per_thousand = static_cast<std::uint16_t>(
std::min<std::uint32_t>(life.growth.realized_per_thousand, 1000));
if (const auto genome = state.archive().find(life.identity.genome)) {
const auto& traits = genome->cellular_traits();
const auto t = traits.value_or(biology::CellularTraits{});
const std::array<std::uint16_t, 20> fields{
t.density, t.upkeep_efficiency, t.growth_speed, t.collection[0],
t.collection[1], t.collection[2], t.collection[3], t.collection[4],
t.burn[0], t.burn[1], t.burn[2], t.burn[3],
t.engulf_capacity, t.kill_absorption, t.litter, t.recipe[0],
t.recipe[1], t.recipe[2], t.recipe[3], t.adhesion};
if (traits)
diagnostics.traits = fields;
if (state.rules_version() >= server::cellular_lives_revamp_rules) {
const auto& rules = state.revamp_rules();
diagnostics.emerge_members = static_cast<std::uint16_t>(
std::min<std::uint32_t>(rules.emerge_members, 0xFFFF));
diagnostics.can_emerge = server::cellular_can_emerge(life, rules);
diagnostics.split_ready =
life.revamp.members == 1 &&
life.growth.realized_per_thousand >= rules.split_min_growth;
if (feedback != state.last_tick_feedback().end() &&
feedback->life_id == life.identity.life && feedback->tick == tick)
diagnostics.exclude = feedback->exclude;
const auto burn = biology::cellular_burn(
rules.burn_pj_per_kfg,
traits ? t.burn : std::array<std::uint16_t, 4>{100, 100, 100, 100},
diagnostics.exclude);
diagnostics.payable_energy_pj =
biology::cellular_payable_energy(life.reserve, burn, false);
} else {
diagnostics.payable_energy_pj = life.reserve.energy.value;
}
}
for (std::size_t c = 0; c < life.body.matter.size(); ++c)
diagnostics.total_mass_fg +=
life.body.matter[c].value + life.reserve.matter[c].value;
view.diagnostics = diagnostics;
view.patches.reserve(perceived->size());
// ADR-0136 (rules 8): pools and bubbles go out as v11 deposits, the nearest 512 to
// the cell, by ascending id; `drained` marks a stock that fell since last tick.
std::vector<std::pair<std::uint64_t, network::CellularPerceivedDeposit>> near;
const auto centre_x = static_cast<std::int64_t>(life.position.x_um);
const auto centre_y = static_cast<std::int64_t>(life.position.y_um);
for (const auto& patch : *perceived) {
if (patch.kind == biology::CellularDepositKind::patch)
continue;
network::CellularPerceivedDeposit deposit;
deposit.id = patch.id;
deposit.x_um = patch.address.x_um;
deposit.y_um = patch.address.y_um;
deposit.radius_um =
static_cast<std::uint16_t>(std::min<std::uint32_t>(patch.radius_um, 65'535));
deposit.shape = patch.kind == biology::CellularDepositKind::pool
? network::CellularDepositShape::pool
: network::CellularDepositShape::bubble;
deposit.amount_codes[0] =
network::deposit_amount_code(patch.available.energy.value);
for (std::size_t c = 0; c < patch.available.matter.size(); ++c)
deposit.amount_codes.at(c + 1) =
network::deposit_amount_code(patch.available.matter[c].value);
const auto before = deposit_stock_.find(patch.id);
deposit.drained = before != deposit_stock_.end() &&
(patch.available.energy.value < before->second.energy.value ||
std::ranges::any_of(std::array{0, 1, 2, 3}, [&](int c) {
const auto i = static_cast<std::size_t>(c);
return patch.available.matter.at(i).value <
before->second.matter.at(i).value;
}));
seen_stock_[patch.id] = patch.available;
// Rules 12 (v13): a bubble's world velocity, current plus induced drift, so the
// client can carry it between perceptions.
if (field && patch.kind == biology::CellularDepositKind::mote) {
const auto flow = field->sample(patch.address.x_um, patch.address.y_um);
std::int64_t drift_x{}, drift_y{};
if (const auto index = state.habitat().find(patch.address)) {
drift_x = state.habitat().patches()[*index].drift_x_q10;
drift_y = state.habitat().patches()[*index].drift_y_q10;
}
const auto um_s = [](std::int64_t q10) {
return static_cast<std::int16_t>(std::clamp<std::int64_t>(
q10 / biology::cellular_velocity_q10_per_um_s, -32'767, 32'767));
};
deposit.velocity_x_um_s = um_s(flow.x_q10 + drift_x);
deposit.velocity_y_um_s = um_s(flow.y_q10 + drift_y);
}
const auto dx = std::int64_t{patch.address.x_um} - centre_x;
const auto dy = std::int64_t{patch.address.y_um} - centre_y;
near.emplace_back(static_cast<std::uint64_t>(dx * dx + dy * dy), deposit);
}
// Rules 12: every pool, but only the nearest moving bubbles (the tuning file's
// trial 256); the client carries the rest with the current.
if (field) {
const auto bubbles = std::ranges::partition(near, [](const auto& entry) {
return entry.second.shape == network::CellularDepositShape::pool;
});
const auto keep = std::min<std::size_t>(cellular_visible_moving_bubbles,
static_cast<std::size_t>(bubbles.size()));
std::ranges::nth_element(
bubbles, bubbles.begin() + static_cast<std::ptrdiff_t>(keep),
[](const auto& a, const auto& b) {
return std::pair{a.first, a.second.id} < std::pair{b.first, b.second.id};
});
near.erase(bubbles.begin() + static_cast<std::ptrdiff_t>(keep), near.end());
}
if (near.size() > network::max_cellular_perceived_deposits) {
std::ranges::nth_element(
near,
near.begin() +
static_cast<std::ptrdiff_t>(network::max_cellular_perceived_deposits),
[](const auto& a, const auto& b) {
return std::pair{a.first, a.second.id} < std::pair{b.first, b.second.id};
});
near.resize(network::max_cellular_perceived_deposits);
}
for (const auto& [distance, deposit] : near)
view.deposits.push_back(deposit);
std::ranges::sort(view.deposits, {}, &network::CellularPerceivedDeposit::id);
for (const auto& patch : *perceived) {
if (patch.kind != biology::CellularDepositKind::patch)
continue;
network::CellularPerceivedPatch visible;
visible.x_um = patch.address.x_um;
visible.y_um = patch.address.y_um;
@@ -261,14 +449,68 @@ class CellularBridge {
visible.matter_fg[i] = patch.available.matter[i].value;
view.patches.push_back(visible);
}
// ADR-0176 (v12): light this cell captured, and the photosynthetic cells it can
// see within its perception radius (nearest 256), by ascending organism.
if (view.diagnostics && feedback != state.last_tick_feedback().end() &&
feedback->life_id == life.identity.life)
view.diagnostics->light_pj = feedback->light.value;
if (life.account != server::LifeAccount{}) {
std::vector<std::pair<std::uint64_t, network::CellularPerceivedProducer>> seen;
for (const auto& other : state.lives()) {
if (other.presence == server::CellularPresence::suspended)
continue;
const auto genome = state.archive().find(other.identity.genome);
if (!genome || !genome->carries(biology::Capability::photosynthesis))
continue;
const auto dx = static_cast<std::int64_t>(other.position.x_um) - centre_x;
const auto dy = static_cast<std::int64_t>(other.position.y_um) - centre_y;
const auto distance = static_cast<std::uint64_t>(dx * dx + dy * dy);
constexpr auto radius =
std::uint64_t{biology::cellular_trial_perception_radius_um};
if (distance > radius * radius)
continue;
const auto efficiency =
genome->parameter(biology::Capability::photosynthesis).value_or(0);
if (efficiency == 0 || efficiency > 1000)
continue;
seen.emplace_back(distance, network::CellularPerceivedProducer{
other.identity.organism,
static_cast<std::uint16_t>(efficiency)});
}
if (seen.size() > network::max_cellular_perceived_producers) {
std::ranges::nth_element(
seen,
seen.begin() +
static_cast<std::ptrdiff_t>(network::max_cellular_perceived_producers),
[](const auto& a, const auto& b) {
return std::pair{a.first, a.second.organism} <
std::pair{b.first, b.second.organism};
});
seen.resize(network::max_cellular_perceived_producers);
}
for (const auto& [distance, producer] : seen)
view.producers.push_back(producer);
std::ranges::sort(view.producers, {},
&network::CellularPerceivedProducer::organism);
}
(void)sessions_->send_cellular_perception(network::AccountId{life.account}, view);
send_offer(state, life, tick);
const auto owned = std::ranges::find(
authority.lives(), life.identity.life,
[](const server::CellularOwnedLife& value) { return value.identity.life; });
if (owned != authority.lives().end())
send_offer(authority, *owned, authority.tick());
}
// After every owner's view: clear only the sessions that got none this tick.
sessions_->clear_cellular_perceptions(tick);
std::erase_if(offers_, [&](const SentOffer& sent) {
return std::ranges::find(state.lives(), sent.account,
&server::CellularOwnedLife::account) == state.lives().end();
return std::ranges::find(authority.lives(), sent.account,
&server::CellularOwnedLife::account) ==
authority.lives().end();
});
announce_endings(state);
announce_endings(authority);
// What each deposit held when last seen, for next tick's `drained` flags.
deposit_stock_ = std::move(seen_stock_);
seen_stock_.clear();
replicated_tick_ = tick;
}
// ADR-0129: an owned life seen at the last replication and now a corpse is announced to
@@ -279,6 +521,10 @@ class CellularBridge {
return l.identity.life;
}) != state.lives().end())
continue;
// Rules 13: control moved to another life (succession, or a merge into an organism).
if (std::ranges::find(state.lives(), account, &server::CellularOwnedLife::account) !=
state.lives().end())
continue;
const auto corpse =
std::ranges::find(state.corpses(), life_id, &server::CellularOwnedCorpse::life_id);
if (corpse == state.corpses().end())
@@ -287,6 +533,8 @@ class CellularBridge {
? network::CellularDeathReason::starved
: corpse->cause == biology::CellularDeathCause::engulfed
? network::CellularDeathReason::engulfed
: corpse->cause == biology::CellularDeathCause::emerged
? network::CellularDeathReason::emerged
: network::CellularDeathReason::unrecorded;
static_cast<void>(sessions_->send_life_ended(network::AccountId{account},
{corpse->died_tick, life_id, cause}));
@@ -335,17 +583,23 @@ class CellularBridge {
std::uint64_t tick) {
const network::AccountId account{life.account};
const auto session = sessions_->holder(account);
const auto& progress = life.mutation;
// Rules 13 offers are catalog offers (v14 only); earlier rules use the operator offer.
const bool named = state.rules_version() >= server::cellular_lives_revamp_rules;
const bool pending = named ? life.revamp.offer.count != 0 : life.mutation.offer.has_value();
const SentOffer current{life.account, session.value_or(0), life.identity.life,
progress.offer ? progress.event_index : 0,
progress.offer ? progress.offer_tick : 0};
!pending ? 0
: named ? life.revamp.offer.event_index
: life.mutation.event_index,
!pending ? 0
: named ? life.revamp.offer.offer_tick
: life.mutation.offer_tick};
auto sent = std::ranges::find(offers_, life.account, &SentOffer::account);
if (sent != offers_.end() && *sent == current)
return;
if (!session || (!progress.offer && sent == offers_.end()))
if (!session || (!pending && sent == offers_.end()))
return; // Nothing to show, or no one to show it to.
if (!sessions_->send_mutation_offer(account, server::offer_view(state, life, tick)))
return; // Not a v10 owner (or the stream refused): retried on a later tick.
if (!sessions_->send_mutation_offer(account, server::offer_view(state, life, tick), named))
return; // Not a v10 (v14) owner (or the stream refused): retried on a later tick.
if (sent != offers_.end())
*sent = current;
else
@@ -356,6 +610,19 @@ class CellularBridge {
}
private:
// The parent/plan charge is pure at this region's temperature and fixed rules.
// Internal-cell costs depend on the current body and are recomputed.
std::optional<accounting::Inventory> bud_cost_for(const server::CellularLives& state,
const server::CellularOwnedLife& life) {
if (life.revamp.members > 1)
return state.budding_cost(life.identity.life);
const auto key = std::pair{life.identity.genome, server::cellular_offspring_genome(life)};
if (const auto known = bud_costs_.find(key); known != bud_costs_.end())
return known->second;
if (bud_costs_.size() >= 4096)
bud_costs_.clear(); // Bounded: recomputing is only slower.
return bud_costs_[key] = state.budding_cost(life.identity.life);
}
static std::uint64_t wall_seconds() {
return static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
@@ -369,12 +636,65 @@ class CellularBridge {
std::puts(message);
return std::nullopt;
}
// The region's newest window record, every 5 s. A failed read keeps the current window,
// which still closes at its own deadline.
void read_window(std::uint64_t now_seconds) {
constexpr std::chrono::seconds interval{5};
const auto now = std::chrono::steady_clock::now();
if (now < next_window_read_)
return;
next_window_read_ = now + interval;
auto* db = slot_->get();
if (db == nullptr)
return;
const std::array<std::string, 2> parameters{std::to_string(key_.world),
std::to_string(key_.region)};
const auto rows =
db->query("SELECT activation_id, floor(extract(epoch FROM expires_at))::bigint FROM "
"evolution.load_session_window_v1($1::evolution.u64, $2::evolution.u64)",
parameters, std::chrono::milliseconds{1000});
if (!rows) {
slot_->broken();
return;
}
std::optional<server::SessionWindowFeed::Record> record;
if (!rows->empty() && rows->front().size() == 2 && rows->front()[0]) {
record = server::SessionWindowFeed::Record{*rows->front()[0], std::nullopt};
if (const auto& expiry = rows->front()[1]) {
std::uint64_t value{};
const auto [end, ec] =
std::from_chars(expiry->data(), expiry->data() + expiry->size(), value);
if (ec == std::errc{} && end == expiry->data() + expiry->size())
record->expires_at = value;
}
}
switch (feed_.observe(record, now_seconds)) {
case server::SessionWindowFeed::Change::opened:
std::printf("cellular window opened activation=%s expires=%llu\n",
feed_.window()->activation_id().c_str(),
static_cast<unsigned long long>(feed_.window()->deadline_seconds()));
break;
case server::SessionWindowFeed::Change::closed:
std::puts("cellular window closed");
break;
case server::SessionWindowFeed::Change::refused:
std::printf("cellular window refused activation=%s\n",
record ? record->activation_id.c_str() : "");
break;
case server::SessionWindowFeed::Change::none:
break;
}
}
std::unique_ptr<server::PgSlot> slot_;
std::unique_ptr<server::PostgresControlLedger> control_;
std::unique_ptr<server::PostgresActionLedger> actions_;
std::unique_ptr<server::RegionSessions> sessions_;
std::optional<server::SessionWindow> window_;
std::optional<server::SessionWindow> window_; // A fixed --session-window.
bool window_from_database_{};
persistence::RegionKey key_{};
server::SessionWindowFeed feed_;
std::chrono::steady_clock::time_point next_window_read_{};
std::optional<std::uint64_t> replicated_tick_;
struct SentOffer {
server::LifeAccount account{};
@@ -382,7 +702,11 @@ class CellularBridge {
friend bool operator==(const SentOffer&, const SentOffer&) = default;
};
std::vector<SentOffer> offers_; // Last offer view sent to each owner.
std::map<std::pair<std::uint64_t, std::uint64_t>, std::optional<accounting::Inventory>>
bud_costs_;
std::vector<std::uint8_t> bud_rules_; // The rules bud_costs_ were computed under.
// ADR-0136: deposit stocks seen at the last replicated tick, and this tick's.
std::map<std::uint32_t, accounting::Inventory> deposit_stock_, seen_stock_;
std::vector<std::pair<server::LifeAccount, std::uint64_t>> owned_; // At last replication.
bool shutdown_{};
};
} // namespace evo::server_app
+10 -3
View File
@@ -53,6 +53,10 @@
namespace evo::server_app {
struct M10Options {
std::string listen, certificate, key, issuer, environment, session_window;
// ADR-0087 amendment: `--session-window-source db` reads the window from
// evolution.load_session_window_v1 every few seconds instead of --session-window
// (cellular profile only). Exactly one of the two is given.
bool window_from_database{};
// M10.5c: dev only, 60..14400 s; 0 keeps the default (300 s, ADR-0091).
std::uint64_t max_grant_lifetime{};
// M10.9 (ADR-0097, dev only): `--m10-load-governor off` keeps measuring and exposing the
@@ -68,15 +72,16 @@ struct M10Options {
std::vector<std::string> life_routes;
[[nodiscard]] bool session_any() const noexcept {
return !listen.empty() || !certificate.empty() || !key.empty() || !issuer.empty() ||
!environment.empty() || !session_window.empty() || max_grant_lifetime != 0 ||
!area.empty() || !handoff_key.empty() || !neighbours.empty() || !load_governor;
!environment.empty() || !session_window.empty() || window_from_database ||
max_grant_lifetime != 0 || !area.empty() || !handoff_key.empty() ||
!neighbours.empty() || !load_governor;
}
[[nodiscard]] bool any() const noexcept {
return session_any() || !life_routes.empty();
}
[[nodiscard]] bool complete() const noexcept {
return !listen.empty() && !certificate.empty() && !key.empty() && !issuer.empty() &&
!environment.empty() && !session_window.empty();
!environment.empty() && (session_window.empty() == window_from_database);
}
};
// Actions are handed to the host as soon as they are scheduled (at most 8 ticks ahead).
@@ -117,6 +122,8 @@ template <typename Host> class M10Bridge {
M10Bridge bridge;
if (!o.any())
return bridge;
if (o.window_from_database)
return fail("error m10-window-source"); // The cellular profile only.
const auto window = server::SessionWindow::open(o.session_window, wall_seconds());
if (!window)
return fail(window.error() == server::SessionWindow::Error::expired
+408 -96
View File
@@ -53,8 +53,11 @@
// --primitive-* flags enable the v5 new-life listener; biology ticks and genesis
// provisioning remain disabled.
#include "evo/biology/founder.hpp"
#include "evo/persistence/sha256.hpp"
#include "evo/processes/development_opening.hpp"
#include "evo/server/cellular_session_batch.hpp"
#include "evo/server/lifecycle/cellular_admin_view.hpp"
#include "evo/server/lifecycle/cellular_schedule.hpp"
#include "evo/server/lifecycle/primitive_lives.hpp"
#include "evo/server/lifecycle/wildlife_controller.hpp"
#include "evo/server/ops_http.hpp"
@@ -86,6 +89,7 @@
#include <string_view>
#include <thread>
#include <unistd.h>
#include <utility>
#include <vector>
namespace {
@@ -111,6 +115,7 @@ struct Options {
std::uint64_t objects_reserve_mib{1024};
server_app::SessionOptions session;
server_app::M10Options m10;
bool cellular_populations{};
struct PrimitiveSessionOptions {
std::string listen, certificate, key, issuer, environment;
[[nodiscard]] bool any() const noexcept {
@@ -259,6 +264,8 @@ std::optional<Options> parse(int argc, char** argv) {
o.m10.environment = value;
else if (flag == "--session-window")
o.m10.session_window = value;
else if (flag == "--session-window-source" && value == "db")
o.m10.window_from_database = true;
else if (flag == "--m10-max-grant-lifetime" && n && *n >= 60 && *n <= 14400)
o.m10.max_grant_lifetime = *n;
else if (flag == "--m10-area")
@@ -271,6 +278,8 @@ std::optional<Options> parse(int argc, char** argv) {
o.m10.life_routes.emplace_back(value);
else if (flag == "--m10-load-governor" && (value == "on" || value == "off"))
o.m10.load_governor = value == "on";
else if (flag == "--cellular-populations" && (value == "on" || value == "off"))
o.cellular_populations = value == "on";
else if (flag == "--primitive-listen")
o.primitive_session.listen = value;
else if (flag == "--primitive-cert")
@@ -302,6 +311,8 @@ std::optional<Options> parse(int argc, char** argv) {
o.pg.port.empty() || o.pg.database.empty() || o.pg.user.empty() || o.objects.empty() ||
o.host.build == persistence::Sha256Digest{})
return std::nullopt;
if (o.cellular_populations && o.profile != "cellular")
return std::nullopt;
// Rehearsal controls exist only for the synthetic driver (clones, drills).
if ((o.synthetic_until != 0 || o.accelerate != 1) && !o.synthetic)
return std::nullopt;
@@ -896,7 +907,7 @@ int serve_primitive(Options& o) {
#ifdef EVO_SERVER_M10
int serve_cellular(Options& o) {
auto objects = persistence::FilesystemObjectStore::open(
o.objects, o.host.key, server::max_cellular_lives_bytes, nullptr,
o.objects, o.host.key, server::max_cellular_population_bytes, nullptr,
o.objects_reserve_mib * 1024 * 1024);
if (!objects) {
std::puts("error objects");
@@ -904,7 +915,9 @@ int serve_cellular(Options& o) {
}
const auto pg = o.pg;
auto made = server::CellularRegionHost::create(
{o.host.key, o.host.frame, o.host.lease, o.host.build, o.host.retained_builds},
{o.host.key, o.host.frame, o.host.lease, o.host.build, o.host.retained_builds,
o.cellular_populations ? std::optional{server::CellularTierPolicy{true, 1200, 1800}}
: std::nullopt},
[pg] { return persistence::Postgres::connect(pg, 2s); }, std::move(*objects));
if (!made) {
std::puts("error config");
@@ -916,7 +929,9 @@ int serve_cellular(Options& o) {
return 2;
std::unique_ptr<server::OpsServer> ops;
if (!o.ops_listen.empty()) {
auto listening = server::OpsServer::listen(o.ops_listen);
// Room for /admin/view (ADR-0182); probes and metrics stay small.
auto listening = server::OpsServer::listen(
o.ops_listen, server::OpsServer::max_configurable_response_bytes);
if (!listening) {
std::puts("error ops-listen");
return 2;
@@ -926,8 +941,38 @@ int serve_cellular(Options& o) {
}
bool ready = false;
std::optional<server::HostPhase> phase;
std::optional<std::chrono::steady_clock::time_point> next_tick;
server::CellularTickSchedule schedule;
// The open session batch between commits, the actions it carries, and the monotone pace
// head per epoch (rules-12 regions commit every flush interval, not every tick).
std::optional<server::CellularSessionBatchBuilder> batch_builder;
std::vector<network::CarriedAction> batch_actions;
std::uint64_t pace_epoch = 0, pace_tick = 0, flushes_logged = 0;
std::vector<network::CarriedAction> awaiting_outcomes;
// The batch being committed on the host's worker thread while the next one builds on its
// candidate: its carried actions, birth refusals and operator timing.
std::vector<network::CarriedAction> flight_actions;
std::vector<server::CellularBirthRefusal> flight_refusals;
std::size_t flight_ticks = 0;
long long flight_handoff_ms = 0;
auto flight_start = std::chrono::steady_clock::now();
const auto drop_carried = [&](std::vector<network::CarriedAction>& carried) {
bridge->dropped(carried, true);
std::erase_if(awaiting_outcomes, [&](const auto& action) {
return std::ranges::find(carried, action) != carried.end();
});
carried.clear();
};
// A tick that cannot be built is retried every 50 ms; name each distinct cause once.
std::optional<std::pair<std::string_view, server::CellularSessionBatchError>> stalled;
const auto report_stall = [&](std::string_view where, server::CellularSessionBatchError error,
std::uint64_t tick, int lives_error = -1) {
if (stalled && stalled->first == where && stalled->second == error)
return;
stalled.emplace(where, error);
std::printf("cellular tick stalled tick=%llu at=%.*s error=%u lives=%d\n",
static_cast<unsigned long long>(tick), static_cast<int>(where.size()),
where.data(), static_cast<unsigned>(error), lives_error);
};
const auto set_ready = [&](bool now) {
if (ready != now) {
ready = now;
@@ -983,13 +1028,60 @@ int serve_cellular(Options& o) {
host.drain();
return finish(0);
}
// A finished background commit lands first, so this step sees its head.
if (auto landed = host.poll_publish(); landed) {
const auto commit_ms = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::steady_clock::now() - flight_start)
.count();
// Operator evidence: the loop is blocked only for the hand-off, not the commit.
if (flight_handoff_ms > 50 || !*landed || ++flushes_logged % 30 == 0)
std::printf("cellular commit ticks=%zu ms=%lld handoff_ms=%lld ok=%d\n",
flight_ticks, static_cast<long long>(commit_ms), flight_handoff_ms,
*landed ? 1 : 0);
if (!*landed) {
// Categories and SQLSTATE only (never server text); -1 when not reported.
const auto& failure = landed->error();
const auto store = failure.store.value_or(persistence::LeaseStoreFailure{});
std::printf("cellular commit failed host=%u publication=%d store=%d "
"sqlstate=%.5s object=%d\n",
static_cast<unsigned>(failure.kind),
failure.publication ? static_cast<int>(*failure.publication) : -1,
failure.store ? static_cast<int>(store.kind) : -1,
failure.store ? store.cause.sqlstate.data() : "-",
failure.object ? static_cast<int>(*failure.object) : -1);
}
if (*landed) {
host.refuse_births(flight_refusals);
flight_actions.clear();
if (batch_builder && !batch_builder->rebase(host.committed()->head)) {
drop_carried(batch_actions);
batch_builder.reset();
}
} else {
// An unresolved outcome keeps its actions for the host to finalize.
if (host.status().phase == server::HostPhase::resolving)
flight_actions.clear();
else
drop_carried(flight_actions);
// The open batch continued from a state that is not durable.
drop_carried(batch_actions);
batch_builder.reset();
}
flight_refusals.clear();
}
const auto& status = host.step();
const auto wall =
static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::seconds>(
std::chrono::system_clock::now().time_since_epoch())
.count());
static_cast<void>(bridge->accepting(wall));
bridge->poll(status, wall);
// Sessions schedule and admit against what has been simulated: the open batch's
// working tick runs up to a flush interval ahead of the committed head.
auto session_status = status;
if (batch_builder)
session_status.simulated_tick =
std::max(session_status.simulated_tick, batch_builder->candidate().tick());
bridge->poll(session_status, wall);
deliver_finalized();
set_ready(status.ready);
if (!phase || *phase != status.phase) {
@@ -1010,8 +1102,39 @@ int serve_cellular(Options& o) {
: server::OpsResponse{
503, std::string("not ready: ") +
server::phase_name(current.phase) + "\n"};
if (path == "/metrics")
return {200, server::render_metrics(current, {})};
if (path == "/metrics") {
auto paced = current;
paced.tick_debt = schedule.status().debt;
paced.max_tick_debt = schedule.status().max_debt;
server::OpsCounters counters;
counters.checkpoint_age_ms = schedule.status().head_age_us / 1000;
return {200, server::render_metrics(paced, counters)};
}
// ADR-0182: the admin portal's read-only region view. The port admits only
// Prometheus and the admin API (NetworkPolicy).
if (path == "/admin/view") {
const auto* state = host.state();
if (!current.ready || state == nullptr)
return {503, "not ready\n"};
const auto online = [&](const server::LifeAccount& account) {
network::AccountId id;
id.bytes = account;
return bridge->sessions().holder(id).has_value();
};
// The digest tuning revisions are adopted by (ADR-0182 section 13).
std::string rules_sha256;
if (state->rules_version() >= server::cellular_lives_revamp_rules)
if (const auto digest = persistence::sha256(
server::encode_cellular_revamp_rules(state->revamp_rules())))
for (const auto byte : *digest) {
constexpr std::string_view digits = "0123456789abcdef";
rules_sha256.push_back(digits[byte >> 4U]);
rules_sha256.push_back(digits[byte & 0x0FU]);
}
return {200,
server::render_cellular_admin_view(*state, online, {}, rules_sha256),
"application/json"};
}
return {404, "not found\n"};
};
ops->serve(handler);
@@ -1021,15 +1144,11 @@ int serve_cellular(Options& o) {
const auto* state = host.state();
bool player_present = false;
// ADR-0128: a lingering life keeps the region ticking until its linger completes.
bool lingering_present = false;
if (status.ready && state) {
for (const auto& life : state->lives()) {
network::AccountId account;
account.bytes = life.account;
player_present = player_present || bridge->sessions().holder(account);
lingering_present =
lingering_present || life.presence == server::CellularPresence::lingering;
}
}
// A queued birth publishes only while its account holds a session here: the
@@ -1045,101 +1164,293 @@ int serve_cellular(Options& o) {
held_births.push_back(birth);
}
const bool birth_waiting = !held_births.empty();
if (status.ready && state && (player_present || birth_waiting || lingering_present)) {
const auto now = std::chrono::steady_clock::now();
if (!next_tick)
next_tick = now + std::chrono::milliseconds{50};
if (now >= *next_tick && state->tick() != UINT64_MAX) {
const auto tick = state->tick() + 1;
std::vector<server::CellularLifeIntent> baseline;
baseline.reserve(state->lives().size());
// ADR-0128: an owned life whose account holds no session here is frozen
// (rules 5); the trace records the boundary, and its carried actions are
// refused below.
const bool presence_rules =
state->rules_version() >= server::cellular_lives_presence_rules;
std::vector<server::LifeAccount> offline;
for (const auto& life : state->lives()) {
server::CellularLifeIntent intent{life.identity.life, {}};
network::AccountId account;
account.bytes = life.account;
if (presence_rules && life.account != server::LifeAccount{} &&
!bridge->sessions().holder(account)) {
intent.intent.frozen = true;
offline.push_back(life.account);
}
baseline.push_back(intent);
const bool want_population = o.cellular_populations && state &&
server::population_interval_safe(*state) && !player_present &&
!birth_waiting && host.queued_mutations().empty() &&
std::ranges::any_of(state->lives(), [](const auto& life) {
return life.account == server::LifeAccount{};
});
if (status.ready && state && want_population != host.population_mode()) {
[[maybe_unused]] const auto changed = host.set_population_mode(want_population);
state = host.state();
}
// A queued admin command needs a tick too: an empty region must still take a spawn.
const bool needed =
state &&
(player_present || birth_waiting || server::cellular_unattended_tick_needed(*state) ||
status.ecological_pending_ticks != 0 || !host.unbound_admin_commands().empty());
const auto monotonic_us = [] {
return static_cast<std::uint64_t>(
std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::steady_clock::now().time_since_epoch())
.count());
};
// Pacing follows the simulated tick (the open batch's working state), never backwards
// within an epoch: a discarded batch must not look like a head regression.
const auto simulated_tick = batch_builder ? batch_builder->candidate().tick()
: state ? state->tick()
: status.committed_tick;
if (status.epoch != pace_epoch) {
pace_epoch = status.epoch;
pace_tick = simulated_tick;
}
pace_tick = std::max(pace_tick, simulated_tick);
const auto paced = schedule.observe(monotonic_us(), status.epoch, pace_tick, needed,
status.ready && state, status.ecological_pending_ticks);
if (!paced) {
std::puts("error cellular-schedule");
return finish(4);
}
const auto flush_ticks = std::clamp<std::uint64_t>(
static_cast<std::uint64_t>(o.host.flush_interval.count()) / 50, 1, 60);
// Births wait for a batch that starts on the durable head.
const bool admissions_waiting = !held_births.empty();
// Write-behind commit: the open batch goes to the host's worker thread and the next
// batch continues from its candidate under a provisional head, rebased when the commit
// lands. One commit is in flight; meanwhile the open batch simply keeps growing.
const auto flush = [&] {
if (!batch_builder || batch_builder->batch().ticks.empty()) {
if (!host.commit_in_flight())
batch_builder.reset();
return;
}
if (host.commit_in_flight())
return;
const auto handoff_start = std::chrono::steady_clock::now();
const auto& candidate = batch_builder->candidate();
std::optional<server::CellularSessionBatchBuilder> next;
if (!admissions_waiting && candidate.tick() != UINT64_MAX) {
persistence::RegionHead provisional{candidate.frame(),
host.committed()->head.sequence + 1,
{},
{},
candidate.tick()};
provisional.commit.fill(0xFF);
provisional.digest.fill(0xFF);
if (auto created =
server::CellularSessionBatchBuilder::create(candidate, provisional);
created) {
next.emplace(std::move(*created));
next->set_tuning_resolver(host.tuning_resolver());
}
std::ranges::sort(baseline, {}, &server::CellularLifeIntent::life_id);
// ADR-0125: wildlife follow the deterministic controller; its intentions
// ride the trace like a player's, and the owner validates them.
if (const auto wild = server::wildlife_intents(*state, tick); wild) {
for (const auto& intent : *wild) {
const auto found = std::ranges::lower_bound(
baseline, intent.life_id, {}, &server::CellularLifeIntent::life_id);
if (found != baseline.end() && found->life_id == intent.life_id)
*found = intent;
}
}
flight_ticks = batch_builder->batch().ticks.size();
const auto refusals = batch_builder->refused_births();
flight_refusals.assign(refusals.begin(), refusals.end());
const auto actions = batch_builder->actions();
const auto mutation_actions = batch_builder->mutation_actions();
auto begun =
host.begin_publish(batch_builder->batch(), {actions.begin(), actions.end()},
{mutation_actions.begin(), mutation_actions.end()},
batch_builder->take_candidate());
batch_builder.reset();
flight_actions = std::move(batch_actions);
batch_actions.clear();
flight_start = std::chrono::steady_clock::now();
flight_handoff_ms =
std::chrono::duration_cast<std::chrono::milliseconds>(flight_start - handoff_start)
.count();
if (!begun) {
std::printf("cellular commit refused handoff_ms=%lld error=%u\n", flight_handoff_ms,
static_cast<unsigned>(begun.error().kind));
drop_carried(flight_actions);
flight_refusals.clear();
return;
}
if (next)
batch_builder = std::move(next);
};
// A batch cannot outlive the authority or the raw mode it was built under; when demand
// ends, what it holds is committed.
if (batch_builder && (!status.ready || !state || host.population_mode())) {
bridge->dropped(batch_actions, true);
std::erase_if(awaiting_outcomes, [&](const auto& action) {
return std::ranges::find(batch_actions, action) != batch_actions.end();
});
batch_builder.reset();
batch_actions.clear();
} else if (batch_builder && !needed) {
flush();
}
if (status.ready && state && (needed || host.population_mode())) {
if (host.population_mode()) {
if (paced->retry_ready && (paced->due || status.ecological_pending_ticks != 0)) {
const auto published = host.advance_unattended(paced->due ? paced->debt : 0);
if (!published)
schedule.defer(monotonic_us());
}
auto actions = bridge->carry(tick);
if (!offline.empty()) {
std::vector<network::CarriedAction> departed;
std::erase_if(actions, [&](const network::CarriedAction& action) {
if (std::ranges::find(offline, action.account.bytes) == offline.end())
return false;
departed.push_back(action);
return true;
});
bridge->dropped(departed, true);
}
auto builder =
server::CellularSessionBatchBuilder::create(*state, host.committed()->head);
if (!builder) {
bridge->dropped(actions, true);
} else {
auto appended = builder->append(tick, baseline, actions, held_births,
host.queued_mutations());
if (!appended && !actions.empty()) {
// ADR-0127: one account's unusable action (its life died, or it
// names an unperceived patch) refuses only that action, never the
// tick for every other player.
std::vector<network::CarriedAction> usable, refused;
for (const auto& action : actions)
(server::prepare_cellular_session_tick(*state, tick, baseline,
std::span{&action, 1})
? usable
: refused)
.push_back(action);
bridge->dropped(refused, true);
actions = std::move(usable);
appended = builder->append(tick, baseline, actions, held_births,
host.queued_mutations());
} else {
// Rules 12 regions hold thousands of deposits, so their committed payload is
// large: commit every flush interval (ADR-0089: 1 s), not every tick. Players
// see the batch's working state at once; outcomes become final at its commit.
// Births commit promptly, in their own fresh batch.
if (batch_builder && admissions_waiting)
flush();
const auto* current = batch_builder ? &batch_builder->candidate() : state;
// A failed commit can leave the host without state until it recovers. While a
// commit is in flight the open batch is the only place to simulate, and it is
// bounded below the batch limit.
const bool can_build = batch_builder ? batch_builder->batch().ticks.size() + 4 <
server::max_cellular_batch_ticks
: !host.commit_in_flight();
if (current && host.committed() && paced->due && needed && can_build &&
current->tick() != UINT64_MAX) {
const auto tick = current->tick() + 1;
std::vector<server::CellularLifeIntent> baseline;
baseline.reserve(current->lives().size());
// ADR-0128: an owned life whose account holds no session here is frozen
// (rules 5); the trace records the boundary, and its carried actions are
// refused below.
const bool presence_rules =
current->rules_version() >= server::cellular_lives_presence_rules;
std::vector<server::LifeAccount> offline;
for (const auto& life : current->lives()) {
server::CellularLifeIntent intent{life.identity.life, {}};
network::AccountId account;
account.bytes = life.account;
if (presence_rules && life.account != server::LifeAccount{} &&
!bridge->sessions().holder(account)) {
intent.intent.frozen = true;
offline.push_back(life.account);
}
baseline.push_back(intent);
}
if (!appended) {
std::ranges::sort(baseline, {}, &server::CellularLifeIntent::life_id);
// ADR-0125: wildlife follow the deterministic controller; its intentions
// ride the trace like a player's, and the owner validates them.
if (const auto wild = server::wildlife_intents(*current, tick); wild) {
for (const auto& intent : *wild) {
const auto found = std::ranges::lower_bound(
baseline, intent.life_id, {}, &server::CellularLifeIntent::life_id);
if (found != baseline.end() && found->life_id == intent.life_id)
*found = intent;
}
}
auto actions = bridge->carry(tick);
if (!offline.empty()) {
std::vector<network::CarriedAction> departed;
std::erase_if(actions, [&](const network::CarriedAction& action) {
if (std::ranges::find(offline, action.account.bytes) == offline.end())
return false;
departed.push_back(action);
return true;
});
bridge->dropped(departed, true);
}
// One action per account a tick; a second would refuse the whole tick.
if (const auto superseded = server::keep_one_action_per_account(actions);
!superseded.empty())
bridge->dropped(superseded, true);
if (!batch_builder) {
auto created = server::CellularSessionBatchBuilder::create(
*state, host.committed()->head);
if (created) {
batch_builder.emplace(std::move(*created));
batch_builder->set_tuning_resolver(host.tuning_resolver());
} else
report_stall("create", created.error(), tick);
}
if (!batch_builder) {
bridge->dropped(actions, true);
} else {
awaiting_outcomes.insert(awaiting_outcomes.end(), actions.begin(),
actions.end());
auto published = host.publish(builder->batch(), builder->actions(),
builder->mutation_actions());
if (!published && host.status().phase != server::HostPhase::resolving) {
bridge->dropped(actions, true);
std::erase_if(awaiting_outcomes, [&](const auto& action) {
return std::ranges::find(actions, action) != actions.end();
// Births only ever enter a fresh batch on the durable head. Queued
// mutation choices (ADR-0121 amendment, schema 59) bind at the next
// tick simulated, unless this batch or the commit in flight has them.
const bool fresh =
batch_builder->batch().ticks.empty() && !host.commit_in_flight();
const std::span<const server::CellularTickIntents::Birth> births =
fresh ? std::span<const server::CellularTickIntents::Birth>{held_births}
: std::span<const server::CellularTickIntents::Birth>{};
auto unbound = host.unbound_mutations();
std::erase_if(unbound, [&](const auto& queued) {
return std::ranges::any_of(
batch_builder->mutation_actions(), [&](const auto& bound) {
return bound.account == queued.account &&
bound.action_id == queued.action_id;
});
});
const std::span<const persistence::CellularMutationReservation> mutations =
unbound;
// ADR-0182: queued admin commands not already in this batch, and at
// most one tuning adoption per batch (its successor names its rules).
auto admin = host.unbound_admin_commands();
std::erase_if(admin, [&](const auto& queued) {
return std::ranges::any_of(
batch_builder->batch().ticks, [&](const auto& previous) {
return std::ranges::find(previous.admin, queued.id,
&server::CellularAdminCommand::id) !=
previous.admin.end();
});
});
bool adopting = std::ranges::any_of(
batch_builder->batch().ticks, [](const auto& previous) {
return std::ranges::any_of(previous.admin, [](const auto& c) {
return c.kind == server::CellularAdminKind::adopt_tuning;
});
});
std::erase_if(admin, [&](const auto& queued) {
if (queued.kind != server::CellularAdminKind::adopt_tuning)
return false;
if (adopting)
return true;
adopting = true;
return false;
});
const auto admin_before = batch_builder->admin_results().size();
auto appended = batch_builder->append_with_birth_refusals(
tick, baseline, actions, births, mutations, admin);
if (!appended && !actions.empty()) {
// ADR-0127: one account's unusable action (its life died, or it
// names an unperceived patch) refuses only that action, never the
// tick for every other player.
std::vector<network::CarriedAction> usable, refused;
for (const auto& action : actions)
(server::prepare_cellular_session_tick(*current, tick, baseline,
std::span{&action, 1})
? usable
: refused)
.push_back(action);
bridge->dropped(refused, true);
actions = std::move(usable);
appended = batch_builder->append_with_birth_refusals(
tick, baseline, actions, births, mutations, admin);
}
if (!appended) {
const auto lives = batch_builder->last_lives_error();
report_stall("append", appended.error(), tick,
lives ? static_cast<int>(*lives) : -1);
if (appended.error() == server::CellularSessionBatchError::mutation)
host.recheck_mutations();
bridge->dropped(actions, true);
flush(); // Commit what is good; the next tick starts afresh.
} else {
stalled.reset();
awaiting_outcomes.insert(awaiting_outcomes.end(), actions.begin(),
actions.end());
batch_actions.insert(batch_actions.end(), actions.begin(),
actions.end());
const auto results = batch_builder->admin_results();
for (std::size_t i = admin_before; i < results.size(); ++i)
std::printf("cellular admin command=%llu tick=%llu %s\n",
static_cast<unsigned long long>(results[i].id),
static_cast<unsigned long long>(tick),
results[i].applied ? "applied" : "refused");
const bool prompt =
!births.empty() || !mutations.empty() || !admin.empty();
if (prompt || batch_builder->batch().ticks.size() >= flush_ticks)
flush();
}
deliver_finalized();
}
// Unappended work keeps its pacing debt; retry with bounded frequency.
const auto* after = batch_builder ? &batch_builder->candidate() : host.state();
if (!after || after->tick() < tick)
schedule.defer(monotonic_us());
}
*next_tick = std::chrono::steady_clock::now() +
std::chrono::microseconds{static_cast<std::chrono::microseconds::rep>(
biology::cellular_motion_tick_microseconds)};
}
} else {
next_tick.reset(); // A disconnected life does not accumulate offline ticks.
}
if (const auto* committed_state = host.state(); committed_state)
bridge->replicate(*committed_state);
bridge->replicate(batch_builder ? batch_builder->candidate() : *committed_state,
committed_state);
std::fflush(stdout);
std::this_thread::sleep_for(2ms);
}
@@ -1163,12 +1474,13 @@ int main(int argc, char** argv) {
"--session-cert F --session-key F --session-grant-key F "
"--session-grant-ledger F --session-environment dev]] [--m10-listen "
"ADDRESS:PORT --m10-cert F --m10-key F --m10-issuer F "
"--m10-environment dev|stage|world0 --session-window ACTIVATION:UTC_EXPIRY "
"--m10-environment dev|stage|world0 (--session-window ACTIVATION:UTC_EXPIRY | "
"--session-window-source db) "
"[--m10-max-grant-lifetime 60..14400] [--m10-area X0,Y0,X1,Y1] "
"[--m10-handoff-key F [--m10-neighbour "
"REGION=X0,Y0,X1,Y1=HOST:PORT=NAME=PUBFILE]...] "
"[--life-route REGION=HOST:PORT=TLS_NAME ...] "
"[--m10-load-governor on|off]]\\n",
"[--m10-load-governor on|off]] [--cellular-populations on|off]\\n",
stderr);
return 2;
}
+412 -7
View File
@@ -10,15 +10,29 @@
// evo-world-clone check-store --world W --region R --pg-* ... --objects DIR
// [--reserve-mib N]
// evo-world-clone provision --world W --region R --opening
// development-v1|primitive-v1|cellular-v1|cellular-v2|cellular-v3|cellular-v4
// development-v1|primitive-v1|cellular-v1 to cellular-v10
// --pg-* ... --objects DIR --build HEX [--commit HEX32] [--retain-build]
// primitive-v1 also requires --frame N --source-id N, every --funding-*-* channel,
// and one or more ordered --site X,Y values.
// cellular-v1 to cellular-v4 also require --width-um N --height-um N
// cellular-v1 to cellular-v6 also require --width-um N --height-um N
// --ambient-temperature-mk N and one or more ordered --patch X,Y,SOURCE,ENERGY,C,N,P,O values
// plus a stable --commit HEX32. cellular-v2 is the same opening on rules 3 (ADR-0124:
// engulfment, detritus); cellular-v3 is it on rules 4 (ADR-0125: budding wildlife);
// cellular-v4 on rules 5 (ADR-0128: offline freeze and resume).
// cellular-v5 on rules 6 (2026-10-15 balance: finer mutations, cheaper construction).
// cellular-v6 on rules 7 (ADR-0137: percentage mutations, skilled budding, twins).
// cellular-v7 on rules 8 (ADR-0136 step A: pools and bubbles fed by contact) takes no
// --patch: one or more --pool X,Y,RADIUS,SOURCE,ENERGY,C,N,P,O (centres, any micrometre)
// and/or --motes COUNT,SOURCE,ENERGY,C,N,P,O (bubbles per channel amount, scattered
// from the --commit bytes, so a genesis is reproducible).
// cellular-v8 (ADR-0176) also requires --light-pj N. cellular-v9 (rules 12, ADR-0177)
// is cellular-v8 followed by the liquid upgrade: it also requires --tuning FILE (the Git
// tuning file, whose region size must match --width-um/--height-um) and accepts
// --current-seed N (default: derived from the --commit bytes). cellular-v10 (rules 13,
// ADR-0179) is cellular-v9 followed by the revamp upgrade: it also requires
// --revamp-tuning FILE (the Git revamp tuning file).
// A nonzero playtest.starting_wildlife_cells (ADR-0180) additionally requires
// --playtest-wildlife-first-id N: an audited unused range below --life-allocator-start.
// primitive-v1 and cellular-v1/v2/v3 accept --life-allocator-start N
// (ADR-0123): the world's life-identity allocator is created once at the operator-audited
// start N; a later run leaves it untouched and refuses one that is below N.
@@ -64,6 +78,8 @@
// Exit: 0 done, 2 usage, 3 source/history/database failure, 4 target/objects refused,
// 5 target unknown, 6 compared histories differ.
#include "evo/biology/cellular_habitat.hpp"
#include "evo/biology/cellular_revamp_tuning.hpp"
#include "evo/persistence/checkpoint_store.hpp"
#include "evo/persistence/region_clone.hpp"
#include "evo/persistence/sha256.hpp"
#include "evo/processes/development_opening.hpp"
@@ -77,6 +93,8 @@
#include <csignal>
#include <cstdio>
#include <filesystem>
#include <fstream>
#include <iterator>
#include <limits>
#include <optional>
#include <span>
@@ -109,12 +127,30 @@ struct Options {
std::vector<server::SpawnSite> primitive_sites;
std::optional<std::uint32_t> cellular_width_um, cellular_height_um, cellular_temperature_mk;
std::vector<biology::CellularPatch> cellular_patches;
std::vector<biology::CellularPatch> cellular_pools; // cellular-v7
std::optional<biology::CellularMoteField> cellular_motes; // cellular-v7 and v8
std::optional<biology::CellularMoteField> cellular_mixed; // Mixed bubbles (v7 and later)
std::optional<std::uint64_t> light_pj; // cellular-v8/v9: pJ per square um per tick
std::optional<std::string> tuning_path; // cellular-v9: the Git tuning file
std::optional<std::uint64_t> current_seed;
std::optional<biology::CellularTuning> tuning; // Parsed from tuning_path.
std::optional<std::string> revamp_tuning_path; // cellular-v10
std::optional<biology::CellularRevampTuning> revamp_tuning; // Parsed from it.
std::optional<std::uint64_t> playtest_wildlife_first_id; // Audited DEV-only reserved range.
std::optional<std::uint64_t> life_allocator_start;
std::optional<persistence::Sha256Digest> build;
bool retain_build{};
bool crash{};
};
// The openings that declare light: cellular-v8, cellular-v9 which adds the liquid upgrade, and
// cellular-v10 which adds the revamp upgrade after it.
bool lit_opening(std::string_view opening) {
return opening == "cellular-v8" || opening == "cellular-v9" || opening == "cellular-v10";
}
bool liquid_opening(std::string_view opening) {
return opening == "cellular-v9" || opening == "cellular-v10";
}
std::optional<std::uint64_t> number(std::string_view text) {
std::uint64_t value{};
const auto [end, error] = std::from_chars(text.data(), text.data() + text.size(), value);
@@ -165,6 +201,55 @@ std::optional<biology::CellularPatch> cellular_patch(std::string_view text) {
result.stock.matter[i].value = fields[4 + i];
return result;
}
// Comma-separated unsigned fields, exactly N of them.
template <std::size_t N>
std::optional<std::array<std::uint64_t, N>> fields_of(std::string_view text) {
std::array<std::uint64_t, N> fields{};
for (std::size_t i = 0; i < N; ++i) {
const auto comma = text.find(',');
const auto field = i + 1 == N ? text : text.substr(0, comma);
if (field.empty() || (i + 1 != N && comma == std::string_view::npos))
return std::nullopt;
const auto [end, error] =
std::from_chars(field.data(), field.data() + field.size(), fields.at(i));
if (error != std::errc{} || end != field.data() + field.size())
return std::nullopt;
if (i + 1 != N)
text.remove_prefix(comma + 1);
else if (comma != std::string_view::npos)
return std::nullopt;
}
return fields;
}
// --pool X,Y,RADIUS,SOURCE,ENERGY,C,N,P,O
std::optional<biology::CellularPatch> cellular_pool(std::string_view text) {
const auto f = fields_of<9>(text);
if (!f || (*f)[0] > std::numeric_limits<std::uint32_t>::max() ||
(*f)[1] > std::numeric_limits<std::uint32_t>::max() ||
(*f)[2] > biology::max_cellular_deposit_radius_um)
return std::nullopt;
biology::CellularPatch pool{};
pool.address = {static_cast<std::uint32_t>((*f)[0]), static_cast<std::uint32_t>((*f)[1])};
pool.radius_um = static_cast<std::uint32_t>((*f)[2]);
pool.source = (*f)[3];
pool.stock.energy.value = (*f)[4];
for (std::size_t i = 0; i < pool.stock.matter.size(); ++i)
pool.stock.matter.at(i).value = (*f)[5 + i];
return pool;
}
// --motes COUNT,SOURCE,ENERGY,C,N,P,O
std::optional<biology::CellularMoteField> cellular_motes(std::string_view text) {
const auto f = fields_of<7>(text);
if (!f || (*f)[0] > biology::max_cellular_patches)
return std::nullopt;
biology::CellularMoteField field{};
field.count = static_cast<std::uint32_t>((*f)[0]);
field.source = (*f)[1];
field.amount.energy.value = (*f)[2];
for (std::size_t i = 0; i < field.amount.matter.size(); ++i)
field.amount.matter.at(i).value = (*f)[3 + i];
return field;
}
template <std::size_t N> std::optional<std::array<std::uint8_t, N>> hex(std::string_view text) {
if (text.size() != N * 2)
return std::nullopt;
@@ -275,8 +360,24 @@ std::optional<Options> parse(int argc, char** argv) {
o.reserve_mib = *n;
else if (o.command == "provision" && flag == "--opening" &&
(value == "development-v1" || value == "primitive-v1" || value == "cellular-v1" ||
value == "cellular-v2" || value == "cellular-v3" || value == "cellular-v4"))
value == "cellular-v2" || value == "cellular-v3" || value == "cellular-v4" ||
value == "cellular-v5" || value == "cellular-v6" || value == "cellular-v7" ||
value == "cellular-v8" || value == "cellular-v9" || value == "cellular-v10"))
o.opening = value;
else if (o.command == "provision" && flag == "--mixed-motes" && cellular_motes(value))
o.cellular_mixed = cellular_motes(value);
else if (o.command == "provision" && flag == "--revamp-tuning" && !value.empty())
o.revamp_tuning_path = std::string{value};
else if (o.command == "provision" && flag == "--playtest-wildlife-first-id") {
o.playtest_wildlife_first_id = number(value);
if (!o.playtest_wildlife_first_id || *o.playtest_wildlife_first_id == 0)
return std::nullopt;
} else if (o.command == "provision" && flag == "--light-pj" && n && *n > 0)
o.light_pj = n;
else if (o.command == "provision" && flag == "--tuning" && !value.empty())
o.tuning_path = std::string{value};
else if (o.command == "provision" && flag == "--current-seed" && n)
o.current_seed = n;
else if (o.command == "provision" && flag == "--frame" && n)
o.primitive_frame = n;
else if (o.command == "provision" && flag == "--source-id" && n)
@@ -310,6 +411,16 @@ std::optional<Options> parse(int argc, char** argv) {
if (!parsed || o.cellular_patches.size() == biology::max_cellular_patches)
return std::nullopt;
o.cellular_patches.push_back(*parsed);
} else if (o.command == "provision" && flag == "--pool") {
const auto parsed = cellular_pool(value);
if (!parsed || o.cellular_pools.size() == biology::max_cellular_patches)
return std::nullopt;
o.cellular_pools.push_back(*parsed);
} else if (o.command == "provision" && flag == "--motes") {
const auto parsed = cellular_motes(value);
if (!parsed || o.cellular_motes)
return std::nullopt;
o.cellular_motes = parsed;
} else if (o.command == "provision" && flag == "--life-allocator-start" && n && *n > 0 &&
*n < std::numeric_limits<std::uint64_t>::max())
o.life_allocator_start = n;
@@ -340,7 +451,8 @@ std::optional<Options> parse(int argc, char** argv) {
std::ranges::any_of(o.primitive_funding, [](const auto& v) { return v.has_value(); }) ||
!o.primitive_sites.empty();
const bool cellular_options = o.cellular_width_um || o.cellular_height_um ||
o.cellular_temperature_mk || !o.cellular_patches.empty();
o.cellular_temperature_mk || !o.cellular_patches.empty() ||
!o.cellular_pools.empty() || o.cellular_motes;
if (o.opening == "primitive-v1") {
if (!o.primitive_frame || *o.primitive_frame == 0 || !o.primitive_source ||
*o.primitive_source == 0 || o.primitive_sites.empty() ||
@@ -349,8 +461,77 @@ std::optional<Options> parse(int argc, char** argv) {
return std::nullopt;
if (cellular_options)
return std::nullopt;
} else if (o.opening == "cellular-v7" || lit_opening(o.opening)) {
// Pools and bubbles only: square patches belong to the earlier openings. Only
// cellular-v8 to v10 (ADR-0176) declare light; v9 and v10 take a tuning file, and
// v10 the revamp tuning file.
if (lit_opening(o.opening) != o.light_pj.has_value() ||
liquid_opening(o.opening) != o.tuning_path.has_value() ||
(o.opening == "cellular-v10") != o.revamp_tuning_path.has_value() ||
(o.current_seed && !liquid_opening(o.opening)))
return std::nullopt;
if (o.revamp_tuning_path) {
std::ifstream file(*o.revamp_tuning_path, std::ios::binary);
const std::string text{std::istreambuf_iterator<char>(file),
std::istreambuf_iterator<char>()};
if (!file.good() && !file.eof()) {
std::printf("revamp tuning file unreadable: %s\n",
o.revamp_tuning_path->c_str());
return std::nullopt;
}
auto parsed = biology::parse_cellular_revamp_tuning(text);
if (!parsed) {
std::printf("revamp tuning file refused at line %zu (%s): %s\n",
parsed.error().line, parsed.error().key.c_str(),
std::string{biology::describe(parsed.error().kind)}.c_str());
return std::nullopt;
}
o.revamp_tuning = *parsed;
const auto count = parsed->playtest_starting_wildlife_cells;
if (count != 0 && (!o.playtest_wildlife_first_id || !o.life_allocator_start ||
*o.playtest_wildlife_first_id == 0 ||
*o.playtest_wildlife_first_id >= *o.life_allocator_start ||
static_cast<std::uint64_t>(count) >
*o.life_allocator_start - *o.playtest_wildlife_first_id))
return std::nullopt;
}
if (o.tuning_path) {
std::ifstream file(*o.tuning_path, std::ios::binary);
const std::string text{std::istreambuf_iterator<char>(file),
std::istreambuf_iterator<char>()};
auto parsed = biology::parse_cellular_tuning(text);
if (!file.good() && !file.eof()) {
std::printf("tuning file unreadable: %s\n", o.tuning_path->c_str());
return std::nullopt;
}
if (!parsed) {
std::printf("tuning file refused at line %zu (%s): %s\n", parsed.error().line,
parsed.error().key.c_str(),
std::string{biology::describe(parsed.error().kind)}.c_str());
return std::nullopt;
}
if (!o.cellular_width_um || !o.cellular_height_um ||
parsed->region_width_um != *o.cellular_width_um ||
parsed->region_height_um != *o.cellular_height_um) {
std::puts("tuning region size differs from --width-um/--height-um");
return std::nullopt;
}
o.tuning = *parsed;
}
if (!o.primitive_frame || *o.primitive_frame == 0 || !o.primitive_source ||
*o.primitive_source == 0 || o.primitive_sites.empty() ||
!std::ranges::all_of(o.primitive_funding,
[](const auto& v) { return v.has_value(); }) ||
!o.cellular_width_um || !o.cellular_height_um || !o.cellular_temperature_mk ||
!o.cellular_patches.empty() ||
(o.cellular_pools.empty() && (!o.cellular_motes || o.cellular_motes->count == 0)) ||
!o.commit)
return std::nullopt;
} else if (o.opening == "cellular-v1" || o.opening == "cellular-v2" ||
o.opening == "cellular-v3" || o.opening == "cellular-v4") {
o.opening == "cellular-v3" || o.opening == "cellular-v4" ||
o.opening == "cellular-v5" || o.opening == "cellular-v6") {
if (!o.cellular_pools.empty() || o.cellular_motes)
return std::nullopt;
const bool has_stock = std::ranges::any_of(o.cellular_patches, [](const auto& patch) {
return patch.stock.energy.value != 0 ||
std::ranges::any_of(patch.stock.matter,
@@ -367,6 +548,8 @@ std::optional<Options> parse(int argc, char** argv) {
return std::nullopt; // The development opening has no lives to allocate.
}
}
if (o.playtest_wildlife_first_id && o.opening != "cellular-v10")
return std::nullopt;
if (!complete(o.source) || (needs_builds && o.retained.empty()) ||
(clone && !complete(o.target)))
return std::nullopt;
@@ -457,10 +640,151 @@ std::vector<std::uint8_t> probe_bytes() {
return out;
}
// cellular-v9 (rules 12): the liquid rules from the tuning file, for the opening's area and
// a current seed (given, or derived from the genesis commit's bytes 8-15).
std::optional<server::CellularLiquidRules> liquid_rules(const Options& o) {
if (!liquid_opening(o.opening) || !o.tuning || !o.cellular_width_um || !o.cellular_height_um)
return std::nullopt;
std::uint64_t seed = o.current_seed.value_or(0);
if (!o.current_seed) {
const auto commit = o.commit.value_or(persistence::Uuid{});
for (std::size_t i = 8; i < 16; ++i)
seed = (seed << 8U) | commit.at(i);
}
return server::cellular_liquid_rules(*o.tuning, {*o.cellular_width_um, *o.cellular_height_um},
seed);
}
// cellular-v10 (rules 13): the revamp rules from the revamp tuning file.
std::optional<server::CellularRevampRules> revamp_rules(const Options& o) {
if (o.opening != "cellular-v10" || !o.revamp_tuning)
return std::nullopt;
return server::cellular_revamp_rules(*o.revamp_tuning);
}
// ADR-0176 cellular-v8: a cellular-v7 genesis taken through one empty tick and the durable
// bundle 9 -> 10 -> 11 -> 12 -> 13 upgrades, declaring the region's light. cellular-v9 adds the
// 13 -> 14 liquid upgrade and cellular-v10 the 14 -> 15 revamp upgrade. Resumable: it continues
// from whichever bundle the head has reached, and does nothing at its target bundle.
int finish_photosynthesis_opening(const Options& o, persistence::Postgres& db,
const persistence::FilesystemObjectStore& store,
std::uint64_t frame, const persistence::Sha256Digest& build,
std::uint64_t light_pj,
const std::optional<server::CellularLiquidRules>& liquid,
const std::optional<server::CellularRevampRules>& revamp) {
const auto& key = o.source.key;
std::uint32_t wildlife_count{};
if (o.revamp_tuning)
wildlife_count =
static_cast<std::uint32_t>(o.revamp_tuning->playtest_starting_wildlife_cells);
const auto target = revamp ? persistence::cellular_v15_versions
: liquid ? persistence::cellular_v14_versions
: persistence::cellular_v13_versions;
// A finished opening needs no lease: a rerun (every Argo sync's provision hook) runs
// while the region server holds it, and must report the region rather than fail.
if (const auto current = persistence::load_region_checkpoint(db, key, timeout); current) {
const auto manifest = persistence::decode_manifest(current->manifest);
if (manifest && manifest->profile == persistence::CheckpointProfile::cellular_lives_v1 &&
manifest->frame == frame && manifest->cellular_versions == target)
return 0;
}
auto lease =
persistence::acquire_region_lease(db, key, build, std::chrono::seconds{60}, timeout);
if (!lease) {
std::puts("photosynthesis opening lease refused");
return 3;
}
const auto finish = [&](int code) {
// A failed release only delays the next owner until the lease expires.
if (!persistence::release_region_lease(db, key, *lease, timeout))
std::puts("photosynthesis opening lease left to expire");
return code;
};
auto head = persistence::load_region_checkpoint(db, key, timeout);
if (!head)
return finish(3);
for (unsigned step = 0; step < 8; ++step) {
const auto manifest = persistence::decode_manifest(head->manifest);
if (!manifest || manifest->profile != persistence::CheckpointProfile::cellular_lives_v1 ||
manifest->frame != frame)
return finish(4);
const auto& versions = manifest->cellular_versions;
if (versions == target)
return finish(0);
const auto id = [&] {
persistence::Uuid made{};
if (::getrandom(made.data(), made.size(), 0) != static_cast<ssize_t>(made.size()))
made = {};
return made;
}();
if (id == persistence::Uuid{})
return finish(4);
if (manifest->sequence == 0) {
// Upgrades follow a committed tick, never the genesis itself.
const std::array<persistence::Sha256Digest, 1> builds{build};
auto opening =
persistence::recover_cellular_checkpoint(db, store, key, *lease, builds, timeout);
if (!opening)
return finish(4);
const server::CellularBatchHeader h{key.world,
key.region,
frame,
head->head.commit,
head->head.digest,
head->head.end_tick,
head->head.end_tick + 1};
const server::CellularBatch tick{h, {{}}};
auto next = server::replay_cellular_batch(*opening->state, tick);
if (!next)
return finish(4);
auto published = persistence::publish_cellular_batch(db, store, *lease, *head, tick,
**next, id, build, timeout);
if (!published)
return finish(4);
head = std::move(published->committed);
continue;
}
std::expected<persistence::CommittedCheckpoint,
persistence::CellularProfileMigrationFailure>
upgraded = std::unexpected(persistence::CellularProfileMigrationFailure{});
if (versions == persistence::cellular_v9_versions)
upgraded = persistence::migrate_cellular_boundary_profile(db, store, *lease, *head, id,
build, timeout);
else if (versions == persistence::cellular_v10_versions)
upgraded = persistence::migrate_cellular_maturation_profile(db, store, *lease, *head,
id, build, timeout);
else if (versions == persistence::cellular_v11_versions)
upgraded = persistence::migrate_cellular_inheritance_profile(db, store, *lease, *head,
id, build, timeout);
else if (versions == persistence::cellular_v12_versions)
upgraded = persistence::migrate_cellular_photosynthesis_profile(
db, store, *lease, *head, id, build,
{light_pj, 1, {std::numeric_limits<std::uint64_t>::max() / 2}}, timeout);
else if (versions == persistence::cellular_v13_versions && liquid)
upgraded = persistence::migrate_cellular_liquid_profile(db, store, *lease, *head, id,
build, *liquid, timeout);
else if (versions == persistence::cellular_v14_versions && liquid && revamp)
upgraded = persistence::migrate_cellular_revamp_profile(
db, store, *lease, *head, id, build, *revamp, timeout, {}, wildlife_count,
wildlife_count == 0 ? 0 : o.playtest_wildlife_first_id.value_or(0));
else
return finish(4);
if (!upgraded) {
std::printf("photosynthesis opening upgrade refused %u\n",
static_cast<unsigned>(upgraded.error().kind));
return finish(4);
}
head = std::move(*upgraded);
}
return finish(4);
}
int provision(const Options& o) {
const bool primitive = o.opening == "primitive-v1";
const bool cellular = o.opening == "cellular-v1" || o.opening == "cellular-v2" ||
o.opening == "cellular-v3" || o.opening == "cellular-v4";
o.opening == "cellular-v3" || o.opening == "cellular-v4" ||
o.opening == "cellular-v5" || o.opening == "cellular-v6" ||
o.opening == "cellular-v7" || lit_opening(o.opening);
const auto primitive_frame = o.primitive_frame.value_or(0);
if ((primitive || cellular) && primitive_frame == 0)
return 2;
@@ -555,6 +879,48 @@ int provision(const Options& o) {
habitat_config.width_um = cellular_width_um;
habitat_config.height_um = cellular_height_um;
habitat_config.patches = o.cellular_patches;
if (o.opening == "cellular-v7" || lit_opening(o.opening)) {
// ADR-0136 step A: pools and bubbles scattered from the genesis commit's bytes.
auto field = o.cellular_motes.value_or(biology::CellularMoteField{0, 1, {}, 0});
if (const auto& mixed = o.cellular_mixed) {
// Mixed bubbles hold every nutrient of the --mixed-motes amounts at once.
if (!o.cellular_motes)
field.source = mixed->source;
field.mixed_count = mixed->count;
field.mixed = mixed->amount;
}
// Liquid openings: a pool rests in still water, never in a current.
auto pools = o.cellular_pools;
if (const auto liquid = liquid_rules(o)) {
const auto& c = liquid->currents;
const auto flow = biology::CellularFlowField::generate(
{c.seed, c.width_um, c.height_um, c.pitch_um, c.min_count, c.max_count,
c.min_route_width_um, c.max_route_width_um, c.min_speed_um_per_s,
c.max_speed_um_per_s});
if (!flow) {
std::puts("cellular currents refused");
return 4;
}
for (auto& pool : pools) {
const auto moved =
biology::cellular_still_centre(*flow, pool.address, pool.radius_um);
if (moved != pool.address)
std::printf("pool %u,%u moved out of a current to %u,%u\n",
pool.address.x_um, pool.address.y_um, moved.x_um, moved.y_um);
pool.address = moved;
}
}
const auto commit = o.commit.value_or(persistence::Uuid{});
for (std::size_t i = 0; i < 8; ++i)
field.seed = (field.seed << 8U) | commit.at(i);
auto scattered = biology::scatter_deposits(habitat_config, pools, field);
if (!scattered) {
std::printf("cellular habitat refused %u\n",
static_cast<unsigned>(scattered.error()));
return 4;
}
habitat_config = std::move(*scattered);
}
auto habitat = biology::CellularHabitat::create(std::move(habitat_config));
if (!habitat) {
std::printf("cellular habitat refused %u\n", static_cast<unsigned>(habitat.error()));
@@ -563,7 +929,11 @@ int provision(const Options& o) {
auto opening = server::CellularLives::create(
*primitive_opening, std::move(*habitat),
{{cellular_width_um, cellular_height_um}, 0, cellular_temperature_mk},
o.opening == "cellular-v4" ? server::CellularLivesProfile::presence
o.opening == "cellular-v7" || lit_opening(o.opening)
? server::CellularLivesProfile::foraging
: o.opening == "cellular-v6" ? server::CellularLivesProfile::reproduction
: o.opening == "cellular-v5" ? server::CellularLivesProfile::balance
: o.opening == "cellular-v4" ? server::CellularLivesProfile::presence
: o.opening == "cellular-v3" ? server::CellularLivesProfile::budding
: o.opening == "cellular-v2" ? server::CellularLivesProfile::engulf
: server::CellularLivesProfile::offers);
@@ -603,6 +973,23 @@ int provision(const Options& o) {
std::puts("provision refused existing profile/frame mismatch");
return 4;
}
if (lit_opening(o.opening)) {
if (manifest->sequence == 0 &&
!persistence::provision_cellular_region(*db, *store, o.source.key,
primitive_frame, *cellular_opening,
commit, manifest->build, timeout)) {
std::puts("provision refused existing cellular region; use its original "
"--commit to resolve genesis");
return 4;
}
if (const auto finished = finish_photosynthesis_opening(
o, *db, *store, primitive_frame, build, o.light_pj.value_or(0),
liquid_rules(o), revamp_rules(o));
finished != 0)
return finished;
auto head = persistence::load_region_checkpoint(*db, o.source.key, timeout);
return head ? report("already-provisioned", head->head) : 3;
}
if (manifest->sequence > 0)
return report("already-provisioned", existing->head);
auto same_genesis = persistence::provision_cellular_region(
@@ -649,6 +1036,15 @@ int provision(const Options& o) {
static_cast<unsigned>(made.error().kind));
return 4;
}
if (lit_opening(o.opening)) {
if (const auto finished = finish_photosynthesis_opening(
o, *db, *store, primitive_frame, build, o.light_pj.value_or(0), liquid_rules(o),
revamp_rules(o));
finished != 0)
return finished;
auto head = persistence::load_region_checkpoint(*db, o.source.key, timeout);
return head ? report("provisioned", head->head) : 3;
}
return report("provisioned", made->head);
}
if (primitive) {
@@ -790,6 +1186,15 @@ int summary(const Options& o) {
static_cast<unsigned long long>(play->unrecorded),
static_cast<unsigned long long>(play->owned_deaths),
static_cast<unsigned long long>(play->wildlife_deaths));
std::printf("revamp merged=%llu emerged=%llu organisms=%llu largest=%llu offers_pending=%llu "
"offers_earned=%llu spent_fg=%llu\n",
static_cast<unsigned long long>(play->merged),
static_cast<unsigned long long>(play->emerged),
static_cast<unsigned long long>(play->organisms),
static_cast<unsigned long long>(play->largest_organism),
static_cast<unsigned long long>(play->offers_pending),
static_cast<unsigned long long>(play->offers_earned),
static_cast<unsigned long long>(play->spent_matter_fg));
std::printf("lifespan_ticks min=%llu median=%llu max=%llu\n",
static_cast<unsigned long long>(play->lifespan_min),
static_cast<unsigned long long>(play->lifespan_median),
+21
View File
@@ -69,6 +69,16 @@ if(EVO_BUILD_CLIENT)
add_executable(evo-client apps/evo-client/main.cpp apps/evo-client/panels.cpp)
target_link_libraries(evo-client PRIVATE evo_client_platform evo_client_ui evo_imgui)
target_compile_definitions(evo-client PRIVATE EVO_BUILD_IDENTITY="${EVO_BUILD_IDENTITY}")
find_package(Threads REQUIRED)
add_library(evo_client_auth STATIC src/client/auth/protocol.cpp src/client/auth/client.cpp)
target_link_libraries(evo_client_auth PUBLIC evo_client_ui PRIVATE evo_json Threads::Threads)
if(WIN32)
target_sources(evo_client_auth PRIVATE src/client/auth/windows.cpp)
target_compile_definitions(evo_client_auth PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
target_link_libraries(evo_client_auth PRIVATE winhttp bcrypt advapi32 shell32 ws2_32)
endif()
evo_owned_target(evo_client_auth)
target_link_libraries(evo-client PRIVATE evo_client_auth)
if(EVO_BUILD_QUIC)
# M10.5c remote dev session mode over M10 QUIC sessions (ADR-0093); replaces the M9.7
# TCP session (ADR-0083), whose dev route is gone (ADR-0087).
@@ -122,6 +132,7 @@ if(EVO_BUILD_CLIENT)
evo_owned_target(evo-client-organism-tests)
add_test(NAME client-organisms COMMAND evo-client-organism-tests)
add_executable(evo-client-ui-model-tests tests/client_ui_model.cpp)
target_include_directories(evo-client-ui-model-tests PRIVATE "${PROJECT_SOURCE_DIR}/apps/evo-client")
target_link_libraries(evo-client-ui-model-tests PRIVATE evo_client_ui)
evo_owned_target(evo-client-ui-model-tests)
add_test(NAME client-ui-model COMMAND evo-client-ui-model-tests)
@@ -132,14 +143,24 @@ if(EVO_BUILD_CLIENT)
add_executable(evo-client-panel-tests tests/client_panels.cpp apps/evo-client/panels.cpp)
target_include_directories(evo-client-panel-tests PRIVATE "${PROJECT_SOURCE_DIR}/apps/evo-client")
target_link_libraries(evo-client-panel-tests PRIVATE evo_client_platform evo_client_ui SDL3::SDL3 evo_imgui)
target_link_libraries(evo-client-panel-tests PRIVATE evo_client_auth)
evo_owned_target(evo-client-panel-tests)
evo_client_runtime(evo-client-panel-tests)
# ADR-0131 sign-in: callback, token and grant replies, worker against a scripted platform.
add_executable(evo-client-auth-tests tests/client_auth.cpp)
target_link_libraries(evo-client-auth-tests PRIVATE evo_client_auth)
evo_owned_target(evo-client-auth-tests)
add_test(NAME client-auth COMMAND evo-client-auth-tests)
set_tests_properties(client-auth PROPERTIES TIMEOUT 60 LABELS "client")
add_test(NAME client-panels COMMAND evo-client-panel-tests)
add_test(NAME client-lifecycle COMMAND evo-client-lifecycle-tests)
add_test(NAME client-smoke COMMAND evo-client --renderer software --frames 3)
add_test(NAME client-init-failure COMMAND evo-client --frames 1)
set_tests_properties(client-lifecycle client-panels client-smoke PROPERTIES
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
ENVIRONMENT "SDL_VIDEO_DRIVER=evo-invalid" WILL_FAIL TRUE TIMEOUT 20 LABELS "client")
endif()
+23
View File
@@ -1,5 +1,28 @@
# Build and dev delivery
## Current delivery flow (maintainer confirmed 2026-10-19)
Pushing to Git runs Actions, which builds and publishes to Harbor; ArgoCD picks
up the deployment and delivers it to Kubernetes. Workload manifests are under
`deploy/`. Use this configured flow for development delivery. The manual-sync
and image-pinning instructions below describe earlier setup and must not be
treated as a request to replace the current automation.
DEV workloads use `evolution-dev`, run on worker nodes rather than the control
plane, and retain the existing PostgreSQL server, network structure and URLs.
The full DEV and standalone region/store overlays enforce both standard
control-plane role exclusions through `worker-only-dev`; rendered policy checks
every required alternative and refuses a direct `nodeName` bypass. See
[placement evidence](../docs/engineering/M12_DEV_WORKER_PLACEMENT.md).
Qualification data must remain isolated from existing worlds. Immediately before
each push refresh `REGION_SESSION_WINDOW` in
`kubernetes/region/dev-session-route/listener.yaml` with a unique activation and
an absolute UTC expiry four hours ahead. Record actual pipeline/deployment
results separately: a push alone does not prove build success or reachability.
World0 deployment, reset and pruning remain outside routine development.
## Historical setup and verification notes
The maintainer has configured Gitea, Harbor and Argo. Gitea run
[1399](https://git.aeternalisgames.com/dingo/AEvolution/actions/runs/1399)
successfully built, tested and published commit `8ab48d3`. This repository adds
+3 -1
View File
@@ -1,7 +1,8 @@
# M8.4 dev workload project (replaces deploy/argocd/project.yaml.example). Apply by hand
# (kubectl apply -f deploy/argocd/dev/project.yaml): Argo CD does not manage its own
# projects here. One namespace, no cluster kinds; ServiceAccounts only for the
# foundation proof Job (the platform owns the environment's service accounts).
# foundation proof Job (the platform owns the environment's service accounts). ConfigMaps
# carry only Git-managed, non-secret configuration such as the rules-12 tuning file.
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
@@ -16,6 +17,7 @@ spec:
namespace: evolution-dev
clusterResourceWhitelist: []
namespaceResourceWhitelist:
- {group: "", kind: ConfigMap}
- {group: "", kind: ServiceAccount}
- {group: "", kind: Service}
- {group: apps, kind: Deployment}
+32 -13
View File
@@ -16,6 +16,10 @@ RUN dpkg-query -W
# Keep expensive compiler/package layers independent from source changes.
FROM ci-toolchain AS ci-source
# Compile parallelism for the native CI stages; each clang analysis/ASan job can take
# 1-2 GiB, so raising it needs matching runner memory.
ARG CI_BUILD_JOBS=4
ENV CI_BUILD_JOBS=${CI_BUILD_JOBS}
COPY CMakeLists.txt CMakePresets.json .clang-format .clang-tidy ./
COPY cmake/ cmake/
COPY include/ include/
@@ -31,7 +35,7 @@ RUN bash tools/ci/linux-check.sh checks
FROM ci-source AS ci-tsan
RUN cmake --preset tsan -DCMAKE_CXX_COMPILER=clang++-19 \
&& cmake --build --preset tsan --parallel 2
&& cmake --build --preset tsan --parallel "${CI_BUILD_JOBS}"
CMD ["ctest", "--preset", "tsan", "--no-tests=error", "--timeout", "120"]
FROM ci-source AS ci-client
@@ -39,20 +43,22 @@ FROM ci-source AS ci-client
RUN apt-get update && apt-get install -y --no-install-recommends \
libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxss-dev libxtst-dev xvfb xauth \
&& rm -rf /var/lib/apt/lists/*
# Lifecycle tests deliberately quit/reopen SDL: retain the virtual X server with
# -noreset through those cycles, matching a persistent desktop display server.
RUN cmake -P tools/prepare-sdl3.cmake \
&& cmake -P tools/prepare-imgui.cmake \
&& cmake --preset client-probe -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_C_COMPILER=clang-19 \
-DEVO_BUILD_CLIENT=ON -DEVO_BUILD_UI_PROBE=ON -DEVO_ENABLE_TIDY=ON -DSDL_X11=ON -DSDL_WAYLAND=OFF \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests --parallel 2 \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests evo-client-auth-tests --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset client-probe --no-tests=error \
&& xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-probe --renderer software \
&& for cycle in 1 2 3; do xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-ui-probe --renderer software --cycles 1; done \
&& xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-lifecycle-tests \
&& xvfb-run -a -s "-screen 0 1280x1024x24 -noreset" env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-lifecycle-tests \
&& cmake --preset client-probe -DEVO_BUILD_CLIENT=ON -DEVO_SANITIZER=address -DEVO_ENABLE_TIDY=OFF \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests --parallel 2 \
&& cmake --build build/client-probe --target evo-client-state-tests evo-ui-probe evo-client evo-client-lifecycle-tests evo-client-environment-tests evo-client-organism-tests evo-client-ui-model-tests evo-client-panel-tests evo-client-bindings-tests evo-client-auth-tests --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset client-probe --no-tests=error \
&& for cycle in 1 2 3; do xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-ui-probe --renderer software --cycles 1; done \
&& xvfb-run -a env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-lifecycle-tests
&& xvfb-run -a -s "-screen 0 1280x1024x24 -noreset" env SDL_VIDEO_DRIVER=x11 ./build/client-probe/evo-client-lifecycle-tests
FROM ci-source AS ci-network
# Explicit pinned Mbed TLS preparation (ADR-0082); codec, admission, dev grants and
@@ -60,25 +66,25 @@ FROM ci-source AS ci-network
RUN cmake -P tools/prepare-mbedtls.cmake \
&& cmake --preset network -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_C_COMPILER=clang-19 \
-DEVO_ENABLE_TIDY=ON \
&& cmake --build --preset network --parallel 2 \
&& cmake --build --preset network --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset network --no-tests=error \
&& cmake --preset network -DEVO_SANITIZER=address -DEVO_ENABLE_TIDY=OFF \
&& cmake --build --preset network --parallel 2 \
&& cmake --build --preset network --parallel "${CI_BUILD_JOBS}" \
&& ctest --preset network --no-tests=error
FROM ci-source AS ci-ecs
# Explicit experiment preparation; normal configure/runtime remains dependency-free.
RUN cmake -P tools/prepare-entt.cmake \
&& cmake --preset release -B build/ecs -DCMAKE_CXX_COMPILER=g++-14 -DEVO_BUILD_ECS_EXPERIMENT=ON \
&& cmake --build build/ecs --target evo-ecs-experiment --parallel 2 \
&& cmake --build build/ecs --target evo-ecs-experiment --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/ecs -R ecs-experiment --output-on-failure --no-tests=error \
&& ./build/ecs/evo-ecs-experiment --measure \
&& stat -c 'experiment_executable_bytes=%s' build/ecs/evo-ecs-experiment
RUN cmake --preset asan -B build/ecs-asan -DCMAKE_CXX_COMPILER=clang++-19 -DEVO_BUILD_ECS_EXPERIMENT=ON \
&& cmake --build build/ecs-asan --target evo-ecs-experiment --parallel 2 \
&& cmake --build build/ecs-asan --target evo-ecs-experiment --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/ecs-asan -R ecs-experiment --output-on-failure --no-tests=error
RUN cmake --preset analysis -B build/ecs-analysis -DCMAKE_CXX_COMPILER=clang++-19 -DEVO_BUILD_ECS_EXPERIMENT=ON \
&& cmake --build build/ecs-analysis --target evo-ecs-experiment --parallel 2 \
&& cmake --build build/ecs-analysis --target evo-ecs-experiment --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/ecs-analysis -R ecs-experiment --output-on-failure --no-tests=error
# M8.2 offline deployment-policy check (ADR-0069): Ubuntu's python3-yaml only, no
@@ -139,10 +145,14 @@ RUN cmake --preset release -B build/postgres -DCMAKE_CXX_COMPILER=g++-14 \
-DCMAKE_C_COMPILER=gcc-14 -DEVO_BUILD_NETWORK=ON \
-DEVO_BUILD_QUIC=ON -DEVO_BUILD_POSTGRES=ON \
-DPostgreSQL_ROOT=/source/.cache/postgres/install \
&& cmake --build build/postgres --target evo-server evo-session-probe evo-world-clone --parallel "${PG_BUILD_JOBS}"
&& cmake --build build/postgres --target evo-server evo-session-probe evo-world-clone evo-grant-broker \
evo-admin-api --parallel "${PG_BUILD_JOBS}"
FROM postgres-build AS postgres-test-build
ARG PG_BUILD_JOBS=6
# PostgreSQL-only test changes skip the native checks job (tools/ci/ci-paths.sh), so the
# repository format check also runs here.
RUN cmake -DFORMATTER=/usr/bin/clang-format-19 -DSOURCE_ROOT=/source -P tools/check-format.cmake
RUN cmake --build build/postgres --target evo-postgres-tests --parallel "${PG_BUILD_JOBS}"
RUN cmake --preset analysis -B build/postgres-analysis -DCMAKE_CXX_COMPILER=clang++-19 \
-DCMAKE_C_COMPILER=clang-19 -DEVO_BUILD_NETWORK=ON \
@@ -154,7 +164,11 @@ RUN cmake --preset asan -B build/postgres-asan -DCMAKE_CXX_COMPILER=clang++-19 \
&& cmake --build build/postgres-asan --target evo-postgres-tests --parallel "${PG_BUILD_JOBS}"
FROM postgres-test-build AS ci-postgres
RUN useradd --uid 10001 --no-create-home evo
# Test-only ephemeral TLS credentials and a standard-library loopback port picker.
RUN apt-get update && apt-get install -y --no-install-recommends openssl python3 \
&& rm -rf /var/lib/apt/lists/* \
&& openssl version && python3 --version \
&& useradd --uid 10001 --no-create-home evo
USER 10001:10001
# Full qualification once on the release build. ASan/UBSan reruns everything that
# executes its instrumented binaries; the uninstrumented clang-tidy build reruns only
@@ -187,6 +201,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends libstdc++
COPY --from=postgres-build /source/build/postgres/evo-server /usr/local/bin/evo-server
# M8.3 operations tool: check-store qualification, clone and history audit.
COPY --from=postgres-build /source/build/postgres/evo-world-clone /usr/local/bin/evo-world-clone
# ADR-0131 grant broker (Keycloak tokens to session grants); its own Deployment.
COPY --from=postgres-build /source/build/postgres/evo-grant-broker /usr/local/bin/evo-grant-broker
# ADR-0182 read-only admin API and the portal's static files; its own Deployment.
COPY --from=postgres-build /source/build/postgres/evo-admin-api /usr/local/bin/evo-admin-api
COPY apps/evo-admin-api/portal/ /usr/local/share/evo-admin-portal/
COPY --from=postgres-build /source/.cache/postgres/install/lib/libpq.so* /opt/postgres/lib/
COPY --from=postgres-build /source/build/postgres/msquic/bin/Release/libmsquic.so* /opt/msquic/lib/
COPY --from=postgres-build /source/.cache/postgres/postgresql-18.6/COPYRIGHT /usr/share/doc/evo-postgres/COPYRIGHT
@@ -200,7 +219,7 @@ ENTRYPOINT ["/usr/local/bin/evo-server"]
FROM ci-source AS build
RUN cmake --preset release -B build/container \
-DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/opt/evo/bin \
&& cmake --build build/container --parallel 2 \
&& cmake --build build/container --parallel "${CI_BUILD_JOBS}" \
&& ctest --test-dir build/container --output-on-failure --no-tests=error --timeout 120
RUN dpkg-query -W > /opt/evo/build-packages.txt
@@ -0,0 +1,116 @@
# ADR-0182 admin API and portal. One replica; it holds no state but a short view
# cache. The realm's public signing key is pinned below (ADMIN_JWKS, the same key as the grant
# broker's); a Keycloak key rotation needs a Git update in both.
apiVersion: apps/v1
kind: Deployment
metadata:
name: evo-admin-portal
annotations:
argocd.argoproj.io/sync-wave: "2" # After migration (schema v61).
labels:
app.kubernetes.io/name: evo-admin-portal
app.kubernetes.io/component: admin-portal
spec:
replicas: 1
revisionHistoryLimit: 3
progressDeadlineSeconds: 180
selector:
matchLabels:
app.kubernetes.io/name: evo-admin-portal
template:
metadata:
labels:
app.kubernetes.io/name: evo-admin-portal
app.kubernetes.io/component: admin-portal
app.kubernetes.io/part-of: aevolution
spec:
serviceAccountName: aevolution-admin-portal
automountServiceAccountToken: false
terminationGracePeriodSeconds: 10
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
seccompProfile: {type: RuntimeDefault}
containers:
- name: evo-admin-api
image: aevolution-server
command: ["/bin/bash", "-c"]
args:
- |
set -eu
regions=()
for region in $ADMIN_REGIONS; do regions+=(--region "$region"); done
exec /usr/local/bin/evo-admin-api --listen 0.0.0.0:8080 --world "$ADMIN_WORLD" \
--jwks "$ADMIN_JWKS" --oidc-issuer "$ADMIN_OIDC_ISSUER" \
--audience aevolution-admin --client aevolution-admin-portal \
--role aevolution-admin --assets /usr/local/share/evo-admin-portal \
--pg-service /run/postgres/pg_service.conf --pg-passfile /run/postgres/pgpass \
--baseline-tuning /etc/evo/tuning/cellular-revamp.tuning \
--region-tuning /etc/evo/tuning/cellular.tuning \
--deploy-config /run/deploy "${regions[@]}"
env:
- {name: ADMIN_WORLD, value: "100"}
# Space-separated REGION=HOST:PORT: each region's operations address for /admin/view.
- {name: ADMIN_REGIONS, value: "16=evo-region-ops:9100"}
- {name: ADMIN_OIDC_ISSUER, value: "https://auth.aeternalisgames.com/realms/aeternalis"}
# Public RS256 signing key(s) of realm aeternalis, from its JWKS endpoint.
- name: ADMIN_JWKS
value: '{"keys":[{"alg":"RS256","e":"AQAB","kid":"NGQG4QzQuBCIHVEomUPy-OoWOTVQIuyf3RXqeNbP8JI","kty":"RSA","n":"vvOpu1xxdyH_mB8LkJG6cwc6UVmmAj6mwQi1oEwrpJDLerBI2OZr2kpgMAUJ3-hMIkz5tRtSjHieMFteVrpDDQaCViIPCIvJTL3T7ujTGFNReSE6ho7h0DB_kybFeEWVpLqm6SSXWFYls5TKo6_t8Hw4G3njiRW9pX_NxyaBHqLkrCi63EyIGHOkdgUczg2d4pM4JTt-q25bcFSlYz8bhD3WEORQmbp-bU7aPPluCqCEAZRrbzf8Iy7svNemP5daDdlWQ3LaNy-ixC2HRjiPZdqK5BgAE800BigI-l1dkyJ4X172TLIPVPLW1WKlvdm3kHOpBXwACYiy8boSNDW7gQ","use":"sig"}]}'
ports:
- {name: http, containerPort: 8080, protocol: TCP}
readinessProbe:
httpGet: {path: /healthz, port: http}
periodSeconds: 5
timeoutSeconds: 1
livenessProbe:
httpGet: {path: /healthz, port: http}
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
resources:
requests: {cpu: 10m, memory: 16Mi}
limits: {memory: 128Mi}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: {drop: [ALL]}
volumeMounts:
- {name: connection, mountPath: /run/postgres, readOnly: true}
# The revamp tuning file the regions opened with: the portal's baseline until the
# first tuning revision (ADR-0182 section 13); the region tuning file, shown read only.
- {name: tuning, mountPath: /etc/evo/tuning, readOnly: true}
# ADR-0182 section 15: the Gitea and Argo CD settings and tokens that let the portal
# open a region, one file per key; without the Secret that feature stays off.
- {name: deploy, mountPath: /run/deploy, readOnly: true}
volumes:
- name: deploy
secret:
secretName: aevolution-admin
optional: true
defaultMode: 0440
items:
- {key: GITEA_BASE_URL, path: GITEA_BASE_URL}
- {key: GITEA_REPOSITORY, path: GITEA_REPOSITORY}
- {key: GITEA_TOKEN, path: GITEA_TOKEN}
- {key: ARGOCD_SERVER, path: ARGOCD_SERVER}
- {key: ARGOCD_APPLICATION, path: ARGOCD_APPLICATION}
- {key: ARGOCD_TOKEN, path: ARGOCD_TOKEN}
- {key: ARGOCD_TLS_VERIFY, path: ARGOCD_TLS_VERIFY}
- name: tuning
configMap:
name: cellular-tuning
defaultMode: 0444
items:
- {key: cellular-revamp.tuning, path: cellular-revamp.tuning}
- {key: cellular.tuning, path: cellular.tuning}
- name: connection
secret:
secretName: aevolution-admin-pg
defaultMode: 0440
items:
- {key: pg_service.conf, path: pg_service.conf}
- {key: pgpass, path: pgpass}
- {key: ca.crt, path: ca.crt}
@@ -0,0 +1,15 @@
# ADR-0182 read-only admin API and portal for evolution-dev ONLY: verifies Keycloak access
# tokens (realm aeternalis, realm role aevolution-admin, audience aevolution-admin) and reads
# world 100 through the schema v61 views and region 16's /admin/view.
# Public route, 443 only: https://srs.aeternalisgames.com -> ingress-nginx (TLS; Ingress
# created out of band, since the aevolution-dev Argo project admits none) -> ClusterIP
# Service evo-admin-portal:8080, in-cluster only.
# Out-of-band Secret in evolution-dev: aevolution-admin-pg (pg_service.conf, pgpass, ca.crt
# for a login in the runtime group, as aevolution-grant-broker-pg).
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- serviceaccount.yaml
- deployment.yaml
- service.yaml
- networkpolicy.yaml
@@ -0,0 +1,74 @@
# Admin portal traffic on top of the namespace default-deny. Admins reach it only at
# https://srs.aeternalisgames.com on 443, where ingress-nginx terminates TLS; port 8080 is
# admitted from the ingress-nginx pods and nothing else. Egress: PostgreSQL on pg-forge-01,
# the region's operations port (9100) for /admin/view, and for opening a region (ADR-0182
# section 15, approved 2026-10-28) Gitea through the node's ingress (git.aeternalisgames.com,
# 172.10.1.160:443) and the argocd-server pods (8080, behind the Service's 443).
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: evo-admin-portal
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: evo-admin-portal
policyTypes: [Ingress, Egress]
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app.kubernetes.io/name: rke2-ingress-nginx
ports:
- {protocol: TCP, port: 8080}
egress:
- to:
- ipBlock:
cidr: 172.10.1.127/32
ports:
- {protocol: TCP, port: 5432}
- to:
- podSelector:
matchLabels:
app.kubernetes.io/name: evo-region
ports:
- {protocol: TCP, port: 9100}
- to:
- ipBlock:
cidr: 172.10.1.160/32
ports:
- {protocol: TCP, port: 443}
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: argocd
podSelector:
matchLabels:
app.kubernetes.io/name: argocd-server
ports:
- {protocol: TCP, port: 8080}
---
# The region's operations port also admits the admin portal (alongside Prometheus,
# evo-region-scrape). Only 9100: never the session port.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: evo-region-admin-view
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: evo-region
policyTypes: [Ingress]
ingress:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: evo-admin-portal
ports:
- {protocol: TCP, port: 9100}
@@ -0,0 +1,15 @@
# Cluster-internal; the Ingress for srs.aeternalisgames.com terminates TLS and forwards here.
apiVersion: v1
kind: Service
metadata:
name: evo-admin-portal
annotations:
argocd.argoproj.io/sync-wave: "2"
labels:
app.kubernetes.io/name: evo-admin-portal
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: evo-admin-portal
ports:
- {name: http, port: 8080, targetPort: http, protocol: TCP}
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: aevolution-admin-portal
annotations:
argocd.argoproj.io/sync-wave: "-1"
automountServiceAccountToken: false
# Create this pull-only Secret separately in evolution-dev; never commit credentials.
imagePullSecrets:
- name: harbor-pull
+4 -2
View File
@@ -1,6 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: evolution-dev
components:
- ../worker-only-dev
resources:
- serviceaccount.yaml
- networkpolicy.yaml
@@ -10,5 +12,5 @@ resources:
images:
- name: evo-sim
newName: registry.aeternalisgames.com/aeternalis/aevolution
# Verified Gitea run 1399; source commit 8ab48d3a5639121693f5881b600482e870b49f05.
digest: sha256:0c6c6e1ac28de2ce0648fd0992ca694963e303ef5c9414fe5ac668937136800d
# Verified Harbor publish from source commit 477ea8980bb0b7ecd5de16cedf149060f4f92bac.
digest: sha256:72a779906e06d5080dcfc03de7692bd1f8c7c8ff6b31893925533b13c2c9a103
@@ -0,0 +1,95 @@
# ADR-0131 grant broker. One replica: serials are ordered by the database, but the
# per-account rate limit lives in the process. The realm's public signing key is
# pinned below (BROKER_JWKS); a Keycloak key rotation needs a Git update here.
apiVersion: apps/v1
kind: Deployment
metadata:
name: evo-grant-broker
annotations:
argocd.argoproj.io/sync-wave: "2" # After migration (schema v39).
labels:
app.kubernetes.io/name: evo-grant-broker
app.kubernetes.io/component: grant-broker
spec:
replicas: 1
revisionHistoryLimit: 3
progressDeadlineSeconds: 180
selector:
matchLabels:
app.kubernetes.io/name: evo-grant-broker
template:
metadata:
labels:
app.kubernetes.io/name: evo-grant-broker
app.kubernetes.io/component: grant-broker
app.kubernetes.io/part-of: aevolution
spec:
serviceAccountName: aevolution-grant-broker
automountServiceAccountToken: false
terminationGracePeriodSeconds: 10
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
seccompProfile: {type: RuntimeDefault}
containers:
- name: evo-grant-broker
image: aevolution-server
command: ["/bin/bash", "-c"]
args:
- |
set -eu
routes=()
for route in $BROKER_ROUTES; do routes+=(--route "$route"); done
exec /usr/local/bin/evo-grant-broker --listen 0.0.0.0:8080 --world "$BROKER_WORLD" --frame "$BROKER_FRAME" --default-region "$BROKER_DEFAULT_REGION" "${routes[@]}" --issuer-key /run/grant-issuer/issuer.key --jwks "$BROKER_JWKS" --oidc-issuer "$BROKER_OIDC_ISSUER" --audience aevolution-grants --client aevolution-game --grant-lifetime "$BROKER_GRANT_LIFETIME" --pg-service /run/postgres/pg_service.conf --pg-passfile /run/postgres/pgpass
env:
- {name: BROKER_WORLD, value: "100"}
- {name: BROKER_FRAME, value: "9"}
# New accounts start here; an account with a live life goes to its region.
- {name: BROKER_DEFAULT_REGION, value: "16"}
# Space-separated REGION=HOST:PORT=TLS_NAME, every region a grant may name.
- {name: BROKER_ROUTES, value: "16=void.aeternalisgames.com:7400=void.aeternalisgames.com"}
# Must not exceed the region's REGION_M10_MAX_GRANT_LIFETIME.
- {name: BROKER_GRANT_LIFETIME, value: "600"}
- {name: BROKER_OIDC_ISSUER, value: "https://auth.aeternalisgames.com/realms/aeternalis"}
# Public RS256 signing key(s) of realm aeternalis, from its JWKS endpoint.
- name: BROKER_JWKS
value: '{"keys":[{"alg":"RS256","e":"AQAB","kid":"NGQG4QzQuBCIHVEomUPy-OoWOTVQIuyf3RXqeNbP8JI","kty":"RSA","n":"vvOpu1xxdyH_mB8LkJG6cwc6UVmmAj6mwQi1oEwrpJDLerBI2OZr2kpgMAUJ3-hMIkz5tRtSjHieMFteVrpDDQaCViIPCIvJTL3T7ujTGFNReSE6ho7h0DB_kybFeEWVpLqm6SSXWFYls5TKo6_t8Hw4G3njiRW9pX_NxyaBHqLkrCi63EyIGHOkdgUczg2d4pM4JTt-q25bcFSlYz8bhD3WEORQmbp-bU7aPPluCqCEAZRrbzf8Iy7svNemP5daDdlWQ3LaNy-ixC2HRjiPZdqK5BgAE800BigI-l1dkyJ4X172TLIPVPLW1WKlvdm3kHOpBXwACYiy8boSNDW7gQ","use":"sig"}]}'
ports:
- {name: http, containerPort: 8080, protocol: TCP}
readinessProbe:
httpGet: {path: /healthz, port: http}
periodSeconds: 5
timeoutSeconds: 1
livenessProbe:
httpGet: {path: /healthz, port: http}
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 2
failureThreshold: 3
resources:
requests: {cpu: 10m, memory: 16Mi}
limits: {memory: 64Mi}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities: {drop: [ALL]}
volumeMounts:
- {name: connection, mountPath: /run/postgres, readOnly: true}
- {name: issuer, mountPath: /run/grant-issuer, readOnly: true}
volumes:
- name: connection
secret:
secretName: aevolution-grant-broker-pg
defaultMode: 0440
items:
- {key: pg_service.conf, path: pg_service.conf}
- {key: pgpass, path: pgpass}
- {key: ca.crt, path: ca.crt}
- name: issuer
secret:
secretName: aevolution-grant-issuer
defaultMode: 0440
items:
- {key: issuer.key, path: issuer.key}
@@ -0,0 +1,15 @@
# ADR-0131 grant broker for evolution-dev ONLY: verifies Keycloak access tokens
# (realm aeternalis) and issues 10-minute session grants for world 100 frame 9.
# Public route, 443 only: https://grants.aeternalisgames.com -> ingress-nginx (TLS;
# Ingress created out of band, since the aevolution-dev Argo project admits none) ->
# ClusterIP Service evo-grant-broker:8080, in-cluster only. No LAN access to 80 or 8080.
# Out-of-band Secrets in evolution-dev: aevolution-grant-issuer (issuer.key, the raw
# 32-byte dev issuer scalar) and aevolution-grant-broker-pg (pg_service.conf, pgpass,
# ca.crt for a login in the runtime group).
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- serviceaccount.yaml
- deployment.yaml
- service.yaml
- networkpolicy.yaml
@@ -0,0 +1,33 @@
# Broker traffic on top of the namespace default-deny. Players reach the broker only at
# https://grants.aeternalisgames.com on 443, where ingress-nginx terminates TLS. The pod's
# HTTP port 8080 is admitted from the ingress-nginx pods inside the cluster and from
# nothing on the LAN. No address block is admitted: if the controller runs on the host
# network, this selector does not match it and the route fails closed (502) until the
# exact node addresses are added. Egress goes to PostgreSQL on pg-forge-01 only.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: evo-grant-broker
annotations:
argocd.argoproj.io/sync-wave: "-1"
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: evo-grant-broker
policyTypes: [Ingress, Egress]
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
app.kubernetes.io/name: rke2-ingress-nginx
ports:
- {protocol: TCP, port: 8080}
egress:
- to:
- ipBlock:
cidr: 172.10.1.127/32
ports:
- {protocol: TCP, port: 5432}
@@ -0,0 +1,16 @@
# Cluster-internal; the Ingress for grants.aeternalisgames.com terminates TLS and
# forwards here.
apiVersion: v1
kind: Service
metadata:
name: evo-grant-broker
annotations:
argocd.argoproj.io/sync-wave: "2"
labels:
app.kubernetes.io/name: evo-grant-broker
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: evo-grant-broker
ports:
- {name: http, port: 8080, targetPort: http, protocol: TCP}
@@ -0,0 +1,10 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: aevolution-grant-broker
annotations:
argocd.argoproj.io/sync-wave: "-1"
automountServiceAccountToken: false
# Create this pull-only Secret separately in evolution-dev; never commit credentials.
imagePullSecrets:
- name: harbor-pull
@@ -63,7 +63,7 @@ spec:
if [ -n "$REGION_SESSION" ]; then
m10=(--m10-listen "$REGION_SESSION_LISTEN" --m10-cert /run/session/server.pem
--m10-key /run/session/server.key --m10-issuer /run/session/issuer.pub
--m10-environment "$REGION_SESSION" --session-window "$REGION_SESSION_WINDOW")
--m10-environment "$REGION_SESSION" --session-window-source db)
grant=(--m10-max-grant-lifetime "$REGION_M10_MAX_GRANT_LIFETIME")
fi
# Lineage keeps its 20 s drain. Both profiles take the overlay grant ceiling;
@@ -100,8 +100,6 @@ spec:
# Session listener address; the policy check allows only this loopback value
# outside region/dev-session-route.
- {name: REGION_SESSION_LISTEN, value: "127.0.0.1:7400"}
# Absolute UTC expiry; route overlays must provide activation-id:unix-seconds.
- {name: REGION_SESSION_WINDOW, value: ""}
# DEV-only grant ceiling; overlays must keep this within the server contract.
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "300"}
ports:
@@ -1,5 +1,5 @@
# With the route, the opt-in M10 QUIC listener binds the pod interface. The absolute
# expiry is committed so a delayed Argo sync fails closed (ADR-0087).
# With the route, the opt-in M10 QUIC listener binds the pod interface. Its session window
# is not in Git: the region reads it from SQL, set in the admin portal (ADR-0087 amendment).
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -12,7 +12,6 @@ spec:
env:
- {name: REGION_SESSION, value: "dev"}
- {name: REGION_SESSION_LISTEN, value: "0.0.0.0:7400"}
- {name: REGION_SESSION_WINDOW, value: "dev-20261014T203525-72285:1792020925"}
- {name: REGION_M10_MAX_GRANT_LIFETIME, value: "14400"}
ports:
# QUIC (ADR-0090): UDP only; nothing listens on TCP 7400.
@@ -1,4 +1,4 @@
# Region host for evolution-dev: world 100, region 4, frame 9 (cellular-v4 opening, M11.9).
# Region host for evolution-dev: world 100, region 16, frame 9 (cellular-v10 opening, rules 13).
# The server image digest appears twice on purpose: as the image and as the build
# identity the region records in every commit. The policy check requires they match.
apiVersion: kustomize.config.k8s.io/v1beta1
@@ -8,9 +8,23 @@ resources:
- ../base
components:
- ../dev-session-route
- ../../grant-broker-dev
- ../../admin-portal-dev
- ../../worker-only-dev
images:
- name: aevolution-server
newName: registry.aeternalisgames.com/aeternalis/aevolution-server
digest: sha256:4a8b0a9dc9f6be491e9eacb464aa7ef7c0d449de3018c4172c01448ce39a5108
# Gitea run 576 (9de55e3): one action per account a tick.
digest: sha256:9ba0d78a0db2cd4016711b1c4a621f3945b4b4895d3c4a420389f281bbb781a5
patches:
- path: region-values.yaml
# The Git tuning files for the provision Job's liquid (rules 12) and revamp (rules 13)
# upgrades. A fixed name: a change updates the ConfigMap in place (the Job is a sync hook and
# reads it afresh every sync), so no superseded copies are left for Argo to report.
configMapGenerator:
- name: cellular-tuning
files:
- tuning/cellular.tuning
- tuning/cellular-revamp.tuning
options:
disableNameSuffixHash: true
+59 -31
View File
@@ -1,7 +1,11 @@
# Region identity and build (the server image digest without "sha256:").
# M11.9 playtests: region 4 holds a cellular-v4 genesis (rules 5: engulfment, detritus, budding
# wildlife, offline freeze; ADR-0124/0125/0128). Regions 1 (lineage), 2 and 3 (the M11.3 probe,
# ADR-0123) stay in the stores untouched; they are simply not served while dev runs region 4.
# Revamp playtests (rules 13, ADR-0179): region 16 holds a cellular-v10 opening, a 60 x 60 mm
# cellular-v7 genesis taken durably to rules 11 with light (trial 40 pJ per square um per
# tick), to rules 12 with the currents, handling and moving food of the Git tuning file
# (tuning/cellular.tuning), and to rules 13 with the revamp rules of
# tuning/cellular-revamp.tuning. Regions 1-15 stay in the stores untouched; they are simply
# not served while dev runs region 16. A region keeps the tuning it opened with, so a new
# region opens when the tuning changes (until live retuning exists).
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -13,13 +17,13 @@ spec:
- name: evo-server
env:
- {name: REGION_WORLD, value: "100"}
- {name: REGION_ID, value: "4"}
- {name: REGION_BUILD, value: 4a8b0a9dc9f6be491e9eacb464aa7ef7c0d449de3018c4172c01448ce39a5108}
- {name: REGION_ID, value: "16"}
- {name: REGION_BUILD, value: 9ba0d78a0db2cd4016711b1c4a621f3945b4b4895d3c4a420389f281bbb781a5}
- {name: REGION_PROFILE, value: cellular}
# The whole world's catalog: dev world 100 has only this region.
- {name: REGION_LIFE_ROUTES, value: "4=void.aeternalisgames.com:7400=void.aeternalisgames.com"}
- {name: REGION_LIFE_ROUTES, value: "16=void.aeternalisgames.com:7400=void.aeternalisgames.com"}
# Keep the currently promoted build plus prior committed builds recoverable.
- {name: REGION_RETAINED, value: "6c96629eb3c26513d55207b109fe2a9873a58f43510bd067b7d5422572e3fb42 7952185d5ef96504b5793b76fe72e42cbe9c9ac19149bf912adb2c3a735f8dbf f378a43d6146eeed864110b90848df0bec9672fa4c9941a2d04de249068a4a09 ecac8f9f2489c547ce58f12ed01baaa3939c8adbf8aed05c313abbf422cdc855 4af7209941643e0c6a100e2b4e2fef8a959b87fdbfac2173b7867cfc1808bd66 edb39f956df1f481d7ba724cac4ceb3a4fe494efc02f994d31d6c96dfae04a78 0ded41070dd3e0c0daa43e13dadc58c449865eec00530cfceff3c1579c66e916 754446fe4e5f33e9c0d5a1a74a02444a01de1700673442c90827c708aba62cee c597c0bac8b4a796e1e8b70344f9866cb047cc90cfb15af774d38860594ea27a e83c333a87056c678b5e835947647ef42370b43dbfc31997744f28d993f9c4aa db2b0e6a6071502381a768d70fd9bab8c08c64e4717fc23da45dbe8adc5fa3d6 cdc10712ff8bf956f8f5900709500046493523b51dc670d5b2d01eaf604bcd38 028571f257b485acafbe79b704a80f273d899485c4bb264d9c8137bf51e33217 566c29329433934f1436faf94652a7b925df8b4587ab04470322172f47c31c02 1dd640eba3e9dbdd10106698215a0a06df89c5cdf801c53c4c26fb923116552a faeb26fc5db5c4aae9ae9eb4388e807ab4d59499d7639fcab3d878843a740037 5e13e0096eb4010253c270ab98f0e9bbc11571c221eb779d428333e8cd63c955 e891f9427d5ec81b32595d70be9d00bb66c6d8223b4747d12be8c388c2fc0c8e 58aab8aaa538c0c6e5ad7281fd27e50374b489942aa317296dbf9c2ec5ca3434"}
- {name: REGION_RETAINED, value: "f1183f4476bac87c09504a574112df4663931f67e88cc38dc08f867ce98ff726 815153514ca4a53967932bb46456ff4cb4e1784f9db247bc3b613b7e8365c59f 21507d4369cebef83ee05152daea5ac2f581ea86a9dc85276ef54e3f9f6388c5 5a77cf9e96e7a0e40ea07e9394a3fa458184ce54f8f774a8fb59cbec1db75c54 e17c62bc8dbad089da57e8b30adc391ff8b947cc7182b3160f5e2709103ded78 6c96629eb3c26513d55207b109fe2a9873a58f43510bd067b7d5422572e3fb42 7952185d5ef96504b5793b76fe72e42cbe9c9ac19149bf912adb2c3a735f8dbf f378a43d6146eeed864110b90848df0bec9672fa4c9941a2d04de249068a4a09 ecac8f9f2489c547ce58f12ed01baaa3939c8adbf8aed05c313abbf422cdc855 4af7209941643e0c6a100e2b4e2fef8a959b87fdbfac2173b7867cfc1808bd66 edb39f956df1f481d7ba724cac4ceb3a4fe494efc02f994d31d6c96dfae04a78 0ded41070dd3e0c0daa43e13dadc58c449865eec00530cfceff3c1579c66e916 754446fe4e5f33e9c0d5a1a74a02444a01de1700673442c90827c708aba62cee c597c0bac8b4a796e1e8b70344f9866cb047cc90cfb15af774d38860594ea27a e83c333a87056c678b5e835947647ef42370b43dbfc31997744f28d993f9c4aa db2b0e6a6071502381a768d70fd9bab8c08c64e4717fc23da45dbe8adc5fa3d6 cdc10712ff8bf956f8f5900709500046493523b51dc670d5b2d01eaf604bcd38 028571f257b485acafbe79b704a80f273d899485c4bb264d9c8137bf51e33217 566c29329433934f1436faf94652a7b925df8b4587ab04470322172f47c31c02 1dd640eba3e9dbdd10106698215a0a06df89c5cdf801c53c4c26fb923116552a faeb26fc5db5c4aae9ae9eb4388e807ab4d59499d7639fcab3d878843a740037 5e13e0096eb4010253c270ab98f0e9bbc11571c221eb779d428333e8cd63c955 e891f9427d5ec81b32595d70be9d00bb66c6d8223b4747d12be8c388c2fc0c8e 58aab8aaa538c0c6e5ad7281fd27e50374b489942aa317296dbf9c2ec5ca3434 4a8b0a9dc9f6be491e9eacb464aa7ef7c0d449de3018c4172c01448ce39a5108 3e5b8cef06838821113c8bba064e9415e8c627bca552fb978f830d40027b80f2 67e6bb3d138e7d489850ac99b5915ef8659178a68140b963e282b24020a288e2 f178f7f44251fdc9ae9ccaaecc5ea6f10aa534caa25d506abc3fbde21c69db17 6532f97e9b7d1492f1a17d1228ce7e563016c2187735f44e58ff1e9f786019aa 7c5462391a9bff4f7c25f2761098e7189b7ae204af0a7be61a652e4482f63e6a 9ba005f9216a2211491afd0e335ac5c6f20af1166fbb7518bcc8cec2e536f5ce 7eb84318234e23c223d4279ac01e925ba0b08d6d6950f7ba328f0ce909af8307 0fcdbf1518b677829322dc18e1feebd354a6e39700bd9cdb60ab47dc0465c3a6 801a9ae4fe1049dd27cfd9c356f21f29c6e07238448c201c08d288b5cc8e7e9a f0869be511179866f9a71a63a6a5f65e577e851fd7851184734bb5c56940b1a6 178cd8ffcdfe9fe14f39084d78341a8705ca72e78947bada31ab0356508fc232 0fd4807f67ab317561f115f12c0d8540e04596fdea389d7c2104e97dda5a0351 effea9180d802e50abed76a5da665374f3591eda8aeb99c0fff085ed6df618ae 7a35cc170b935508b9b88379f4fb581acb852ebe769ac269f1596861aca2ffa7 2d1307493202464773734b0a2d33f4a737b0a897cb179de05bdf433cbdb1aec1 a5b70d945b63618a2897a848320e9af6b73a1a4f3bf8fb052d8286a93f6f8ada 222fa3dea0cb25335234678fa0d628222fc92c9ff38a1869330d973b8c4b4e53 f235d14aa06924010ac9e1a4cfad6148ed24447eafb33ef2df968a285f467457 1dd1ea052376c2c5daf2b0a910b1a5972474c836672f9cb61b32ecae58dabfd1 c7347c2d7aa2ea0e5d00665da81cd7d710b109e4e306dd7e09562463d33a5d8f d4b62521c57323025ed611b6873cffa5da49b84acda38081758e8a23b7b8d981 82e248426f5cb31cfe8ddc3aea84982d2fcfd34d12fbf78204de2ccffdbf2a2a 03ce069df16244e47d4c7b7ceac699949c099168f9c531f1ece08d2111d286e5 db67827962bd96ec8c19f4dbb039d29e897592db9d8e9da9ddf00bc0770a0b5f de1b4b32ef7d38785efc562a3288ed066b0be9398e4a64551d12adf423aac31f ec473b40c5958e1cd38765dcf3f52027f39ef29e5b776ba9ad03a6a25af31819 9f76430c33a33d246384dc198b4df3d7e4abf28277a2f435cce25696d01a4863 12e62108f7b920bea0b91f50b21fcabd2463af6f1e94242140bbde786e42eee5 a8edb67c9b69edb5c2c750a068c6d89553691fccc47a4241c67c12f3f9e2a0b2 2f2d5c2bd6baa68163d81cbdd75496e200e8446cf806f443834cd03bdb6eb828 87d607f5bc1cb6b8673767ad44d62d773fac4116b1f952cdb80fac61625b1d02 a7ab3f34b18c06ce17f374d662f57a19d2754f079d899fe29d4262c5b26f7855 441c25a5d728f37d257c4b7bde6d15736aa66d16b07ea088d2d1838eb01a5c55 1d0585ef57e70ab0ab8ea67a780f2a4680101a854bfab46dbb2a5092e7f2251b"}
---
apiVersion: batch/v1
kind: Job
@@ -32,30 +36,54 @@ spec:
- name: provision
env:
- {name: REGION_WORLD, value: "100"}
- {name: REGION_ID, value: "4"}
- {name: REGION_BUILD, value: 4a8b0a9dc9f6be491e9eacb464aa7ef7c0d449de3018c4172c01448ce39a5108}
# M11.9 dev trial opening (tunable, not a world rule): 10 x 10 mm arena at 20 C;
# nursery funds 8 primitive founders (8 x primitive_endowment()); 8 spawn sites;
# 4 rich and 3 lean 1,000 um patches (about 3 min and 45 s of full-rate feeding: intake is
# 1,148,000 pJ/s, maintenance 152,000 pJ/s) and 1 empty one (X,Y,SOURCE,ENERGY,C,N,P,O).
# Genesis is written once: keep --commit stable so every sync resolves it. The world 100
- {name: REGION_ID, value: "16"}
- {name: REGION_BUILD, value: 9ba0d78a0db2cd4016711b1c4a621f3945b4b4895d3c4a420389f281bbb781a5}
# Region 16 (rules 13): cellular-v10, 60 x 60 mm at 20 C, taken through one empty tick,
# the durable upgrades to rules 11 with light, the liquid upgrade from the mounted
# tuning file (whose region size must match) and the revamp upgrade from the mounted
# revamp tuning file. 9 pools (500 um radius; a pool feeds at a quarter rate; any in a
# current moves to the nearest still water), 1,200 single-nutrient bubbles (240 per
# channel: 2.1e8 pJ energy, 1.26e7 fg C, 2.82e6 N, 1.47e6 P, 6e6 other each) and 2,400
# mixed bubbles holding every nutrient in the founder recipe's proportions (4.2e7 pJ,
# 2.52e6 fg C, 7.56e5 N, 2.52e5 P, 1.512e6 other), scattered from the genesis commit:
# three times region 14's food in every pool and bubble. The format-2 genesis holds
# at most 4,096 deposits. The current seed comes from the commit. The nursery funds
# 256 primitive founders' worth (100 go to the seeded wildlife, the rest to player
# births, each new life included); rules-12 founders start at random spots (the 9
# sites, 3 mm from pools, are the fallback).
# Genesis is written once: keep --commit stable so every sync resolves it.
# ADR-0180: region 14 used IDs 900000003584-900000003615 for its 32 seeded wildlife;
# region 15 used 900000003616-900000003715; region 16 reserves
# 900000003716-900000003815 for its 100. Their
# resources come from the nursery, leaving its remainder for players. The
# life allocator starts far above the unserved lineage region 1 identities (ADR-0123).
- {name: REGION_OPENING, value: cellular-v4}
- {name: REGION_OPENING, value: cellular-v10}
- name: REGION_OPENING_ARGS
value: >-
--frame 9 --source-id 1 --commit 214cb816d8792fd866a0529dbb39a08c
--life-allocator-start 1000000000000
--width-um 10000 --height-um 10000 --ambient-temperature-mk 293150
--funding-energy-pj 66073600 --funding-carbon-fg 48128000
--funding-nitrogen-fg 10752000 --funding-phosphorus-fg 5504000
--funding-other-fg 22656000
--site 2500,2500 --site 2500,5000 --site 2500,7500 --site 5000,2500
--site 5000,7500 --site 7500,2500 --site 7500,5000 --site 7500,7500
--patch 1000,4000,2,50000000,3000000,700000,350000,1400000
--patch 3000,3000,2,200000000,12000000,2700000,1400000,5700000
--patch 3000,7000,2,50000000,3000000,700000,350000,1400000
--patch 5000,5000,2,200000000,12000000,2700000,1400000,5700000
--patch 6000,1000,2,0,0,0,0,0
--patch 7000,3000,2,50000000,3000000,700000,350000,1400000
--patch 7000,7000,2,200000000,12000000,2700000,1400000,5700000
--patch 9000,9000,2,200000000,12000000,2700000,1400000,5700000
--frame 9 --source-id 1 --commit c3a29d5e1f2b3a4c6d8e0f1a2b3c4d5f --light-pj 40
--tuning /etc/evo/tuning/cellular.tuning
--revamp-tuning /etc/evo/tuning/cellular-revamp.tuning
--life-allocator-start 1000000000000 --playtest-wildlife-first-id 900000003716
--width-um 60000 --height-um 60000 --ambient-temperature-mk 293150
--funding-energy-pj 2114355200 --funding-carbon-fg 1540096000
--funding-nitrogen-fg 344064000 --funding-phosphorus-fg 176128000
--funding-other-fg 724992000
--site 12000,12000 --site 12000,27000 --site 12000,42000 --site 27000,12000 --site 27000,27000 --site 27000,42000 --site 42000,12000 --site 42000,27000 --site 42000,42000
--pool 15000,15000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 15000,30000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 15000,45000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 30000,15000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 30000,30000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 30000,45000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 45000,15000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 45000,30000,500,2,8400000000,501000000,114000000,58800000,240000000
--pool 45000,45000,500,2,8400000000,501000000,114000000,58800000,240000000
--motes 1200,2,210000000,12600000,2820000,1470000,6000000
--mixed-motes 2400,2,42000000,2520000,756000,252000,1512000
volumeMounts:
- {name: tuning, mountPath: /etc/evo/tuning, readOnly: true}
volumes:
- name: tuning
configMap:
name: cellular-tuning
defaultMode: 0444
@@ -0,0 +1,88 @@
# Reproduction safety trial (ADR-0181): NOT mounted by the active DEV overlay.
# For a fresh opening with a build supporting safety revision 1, pass this file
# as --revamp-tuning. Promote the server image before adopting it as mounted tuning.
# Cellular revamp trial values (rules 13, ADR-0179; Cellular_Revamp_Build_Plan.md).
# Same format as cellular.tuning: `key = value`, integers only, `_` may separate digits,
# core keys required exactly once; playtest.* and mutation overrides are optional.
# Use for new-region provisioning with the new image; existing regions retain recorded rules.
tuning.version = 1
# DEV opening fixture only (ADR-0180). Zero disables seeding; never replenished on restart.
# Requires an audited --playtest-wildlife-first-id range below --life-allocator-start.
playtest.starting_wildlife_cells = 100
# Body (body and maintenance plan).
body.essential_upkeep_per_mille = 250 # share of upkeep no upkeep-efficiency trait reduces
body.reserve_load_per_mille = 1_000 # reserve matter carried as load (slower, costlier thrust)
body.growth_per_tick_centi_mille = 625 # 6.25 per mille per tick; 25% faster for playtesting
# Energy (feeding and energy plan): what 1,000 fg of reserve matter stands in for when the
# reserve's energy runs out. Bubbles carry ~17 pJ of energy per fg of matter, so 2 pJ per fg
# makes burning matter the expensive way to stay alive (a founder burns a carbon bubble in
# about 80 s of upkeep).
energy.burn_carbon_pj_per_kfg = 2_000
energy.burn_nitrogen_pj_per_kfg = 2_000
energy.burn_phosphorus_pj_per_kfg = 2_000
energy.burn_other_pj_per_kfg = 2_000
# Feeding: collection lost per membrane point above the founder's 100 (5 points: -1%).
feeding.membrane_collection_per_mille_per_point = 2
# Every collection limit, per cent of the body's own (optional; 100 when absent).
feeding.collection_percent = 130
# Matter from one source split evenly between the nutrients it holds (optional; 0 when
# absent): a carbon-only bubble gives the whole matter limit to carbon, carbon and
# phosphorus half each, all four a quarter each.
feeding.split_evenly = 1
# Predation (predation and defense plan).
predation.engulf_ratio_milli = 1_500 # a predator needs 1.5x the prey's engulf mass
predation.engulf_reserve_percent = 100 # share of reserve matter in engulf mass
predation.kill_bubble_per_mille = 500 # a kill's remainder left as bubbles; the rest is spent
# The spent pool drips back as bubbles at random spots.
spent.drip_interval_ticks = 20 # once a second
spent.drip_bubble_pj = 20_000_000 # largest energy bubble per drip
spent.drip_bubble_fg = 1_000_000 # largest matter bubble per drip and channel
# Mutation offers (mutation plan section 3). Chances in parts per million.
mutation.options = 3
mutation.floor_ppm = 10 # 0.001%: anomalies always happen
mutation.cap_ppm = 700_000 # 70%
mutation.score_min = -1_000
mutation.score_max = 1_000
mutation.max_multiplier_per_mille = 10_000 # weight x10 at the top score
mutation.min_multiplier_per_mille = 0 # weight x0 at the bottom (the floor still applies)
mutation.offer_interval_ticks = 500 # an offer every 25 s of active play
mutation.min_points = 25 # trait bounds in reference points (founder 100)
mutation.max_points = 1_000
mutation.recipe_min_share = 20 # per thousand of the body per channel
mutation.max_offspring = 10 # per bud, so litter at most 900
mutation.carbon_for_light_fg = 20_000_000 # carbon burned before photosynthesis is offered
mutation.buds_for_adhesion = 5 # on-demand buds before Adhesion is offered
# Reproduction (reproduction plan).
reproduction.split_share_per_mille = 800 # safety revision 1: controlled cell's share
reproduction.split_min_growth_per_mille = 500 # a cell splits once half grown
reproduction.safety_version = 1 # opt-in; historical snapshots retain revision 0
reproduction.split_launch_um_per_s = 800 # outward launch, ordinary drag/braking afterward
body.growth_reserve_seconds = 60 # growth preserves fuel for the resulting body
reproduction.bud_fee_e_pj = 250_000 # extra fee above the offspring's tissue and provision
reproduction.bud_fee_c_fg = 100_000
reproduction.bud_fee_n_fg = 30_000
reproduction.bud_fee_p_fg = 10_000
reproduction.bud_fee_o_fg = 60_000
reproduction.bud_fee_scale_percent = 50 # 0 disables the fee; 100 charges the listed amounts
reproduction.organism_cap = 256 # births refused at this many lives (an organism counts once)
# Multicellular organisms (reproduction plan section 6).
organism.load_per_mille = 500 # share of the extra members' mass loading one cell's thrust
organism.emerge_members = 8 # Emerge needs at least this many cells,
organism.emerge_mass_fg = 100_000_000 # this much body and reserve mass,
organism.emerge_reserve_pj = 0 # and this much reserve energy
# Per-mutation overrides are optional: `mutation.<key>.<field> = value`, with fields enabled,
# base_weight, increase_points, decrease_points, primary_step, paired_step, spread_step,
# increase_ticks, decrease_ticks, cost_e_pj, cost_c_fg, cost_n_fg, cost_p_fg, cost_o_fg and
# cost_scale_percent. Unset fields keep the catalog's defaults (costs 0). For example:
# mutation.strong_propulsion.cost_e_pj = 1_000_000
# mutation.strong_propulsion.cost_scale_percent = 50
@@ -0,0 +1,88 @@
# Cellular revamp trial values (rules 13, ADR-0179; Cellular_Revamp_Build_Plan.md).
# Same format as cellular.tuning: `key = value`, integers only, `_` may separate digits,
# core keys required exactly once; playtest.* and mutation overrides are optional.
# Mounted for new-region provisioning; an existing region retains its recorded rules.
tuning.version = 1
# DEV opening fixture only (ADR-0180). Zero disables seeding; never replenished on restart.
# Requires an audited --playtest-wildlife-first-id range below --life-allocator-start.
playtest.starting_wildlife_cells = 100
# Body (body and maintenance plan).
body.essential_upkeep_per_mille = 250 # share of upkeep no upkeep-efficiency trait reduces
body.reserve_load_per_mille = 1_000 # reserve matter carried as load (slower, costlier thrust)
body.growth_per_tick_centi_mille = 625 # 6.25 per mille per tick; 25% faster for playtesting
# Energy (feeding and energy plan): what 1,000 fg of reserve matter stands in for when the
# reserve's energy runs out. Bubbles carry ~17 pJ of energy per fg of matter, so 2 pJ per fg
# makes burning matter the expensive way to stay alive (a founder burns a carbon bubble in
# about 80 s of upkeep).
energy.burn_carbon_pj_per_kfg = 2_000
energy.burn_nitrogen_pj_per_kfg = 2_000
energy.burn_phosphorus_pj_per_kfg = 2_000
energy.burn_other_pj_per_kfg = 2_000
# Feeding: collection lost per membrane point above the founder's 100 (5 points: -1%).
feeding.membrane_collection_per_mille_per_point = 2
# Every collection limit, per cent of the body's own (optional; 100 when absent).
feeding.collection_percent = 130
# Matter from one source split evenly between the nutrients it holds (optional; 0 when
# absent): a carbon-only bubble gives the whole matter limit to carbon, carbon and
# phosphorus half each, all four a quarter each.
feeding.split_evenly = 1
# Predation (predation and defense plan).
predation.engulf_ratio_milli = 1_500 # a predator needs 1.5x the prey's engulf mass
predation.engulf_reserve_percent = 100 # share of reserve matter in engulf mass
predation.kill_bubble_per_mille = 500 # a kill's remainder left as bubbles; the rest is spent
# The spent pool drips back as bubbles at random spots.
spent.drip_interval_ticks = 20 # once a second
spent.drip_bubble_pj = 20_000_000 # largest energy bubble per drip
spent.drip_bubble_fg = 1_000_000 # largest matter bubble per drip and channel
# Energy cycle (ADR-0182 section 14; optional, 0 when absent): the share of the region's heat
# (energy its cells used) returned to the spent pool every tick before the drip, and whether a
# drip at the deposit limit (8,192) joins an existing bubble instead of waiting.
spent.heat_recycle_per_mille = 1_000 # all of it: energy cycles back like matter
spent.drip_absorb = 1
# Mutation offers (mutation plan section 3). Chances in parts per million.
mutation.options = 3
mutation.floor_ppm = 10 # 0.001%: anomalies always happen
mutation.cap_ppm = 700_000 # 70%
mutation.score_min = -1_000
mutation.score_max = 1_000
mutation.max_multiplier_per_mille = 10_000 # weight x10 at the top score
mutation.min_multiplier_per_mille = 0 # weight x0 at the bottom (the floor still applies)
mutation.offer_interval_ticks = 500 # an offer every 25 s of active play
mutation.min_points = 25 # trait bounds in reference points (founder 100)
mutation.max_points = 1_000
mutation.recipe_min_share = 20 # per thousand of the body per channel
mutation.max_offspring = 10 # per bud, so litter at most 900
mutation.carbon_for_light_fg = 20_000_000 # carbon burned before photosynthesis is offered
mutation.buds_for_adhesion = 5 # on-demand buds before Adhesion is offered
# Reproduction (reproduction plan).
reproduction.split_share_per_mille = 500 # the offspring's share of a mutation split
reproduction.split_min_growth_per_mille = 500 # a cell splits once half grown
reproduction.bud_fee_e_pj = 250_000 # extra fee above the offspring's tissue and provision
reproduction.bud_fee_c_fg = 100_000
reproduction.bud_fee_n_fg = 30_000
reproduction.bud_fee_p_fg = 10_000
reproduction.bud_fee_o_fg = 60_000
reproduction.bud_fee_scale_percent = 50 # 0 disables the fee; 100 charges the listed amounts
reproduction.organism_cap = 256 # births refused at this many lives (an organism counts once)
reproduction.wildlife_cap = 200 # wildlife buds refused at this many lives: the rest are for players
# Multicellular organisms (reproduction plan section 6).
organism.load_per_mille = 500 # share of the extra members' mass loading one cell's thrust
organism.emerge_members = 8 # Emerge needs at least this many cells,
organism.emerge_mass_fg = 100_000_000 # this much body and reserve mass,
organism.emerge_reserve_pj = 0 # and this much reserve energy
# Per-mutation overrides are optional: `mutation.<key>.<field> = value`, with fields enabled,
# base_weight, increase_points, decrease_points, primary_step, paired_step, spread_step,
# increase_ticks, decrease_ticks, cost_e_pj, cost_c_fg, cost_n_fg, cost_p_fg, cost_o_fg and
# cost_scale_percent. Unset fields keep the catalog's defaults (costs 0). For example:
# mutation.strong_propulsion.cost_e_pj = 1_000_000
# mutation.strong_propulsion.cost_scale_percent = 50
@@ -0,0 +1,61 @@
# Cellular trial tuning (Cellular_Region_Movement_Plan.md, tuning file).
# Every value here is a trial value for playtesting, not a locked rule. Edit, commit,
# push and run a full Argo sync; the region refuses an invalid file at startup.
# Format: `key = value`, integers only, `_` may separate digits. Every key is required.
# Region shape (width, height, currents) applies when a region opens; the rest applies
# when the region restarts and is recorded from that tick.
tuning.version = 1
# Region shape and capacity.
region.width_um = 60_000
region.height_um = 60_000
region.organism_cap = 2_000 # births are refused at the cap
region.deposit_limit = 8_192 # food bubbles and pools
region.perception_radius_um = 5_000
# Founder handling. Top speed = thrust / drag rate: about 190 um/s here.
founder.thrust_um_per_s2 = 400
founder.reverse_thrust_um_per_s2 = 400 # braking and reversing
founder.drag_ppm_per_tick = 95_163 # k = 2 /s: 0.5 s time constant
founder.lateral_drag_ppm_per_tick = 95_163
founder.turn_heading_per_s = 65_536 # 65,536 = one full turn per second
founder.thrust_cost_per_mille = 250 # thrust energy: a quarter of the full-speed metabolic cost
# Currents: 0.3x-1.5x founder speed, so the strongest cannot be swum against.
currents.min_count = 2
currents.max_count = 4
currents.min_width_um = 3_000
currents.max_width_um = 6_000
currents.min_speed_um_per_s = 60
currents.max_speed_um_per_s = 300
currents.grid_pitch_um = 250
# Moving food.
food.merged_bubble_cap_multiple = 8 # merged bubbles stop growing at 8x a scattered bubble
food.visible_moving_bubbles = 256 # per update, nearest first
food.induced_drift_radius_um = 200 # passing cells push bubbles within this distance
food.induced_drift_max_um_per_s = 100
food.induced_drift_decay_ppm_per_tick = 95_163
# Thermal map and biology, in millikelvin (273_150 = 0 C).
thermal.ambient_min_mk = 278_150 # 5 C
thermal.ambient_max_mk = 313_150 # 40 C
founder.preferred_mk = 293_150 # 20 C
founder.comfort_band_mk = 5_000 # +/- 5 C without extra cost
founder.body_tau_ms = 20_000 # body temperature lag
founder.lethal_cold_mk = 273_150 # body at or below 0 C dies
founder.lethal_heat_mk = 318_150 # body at or above 45 C dies
thermal.off_preference_per_mille_per_k = 80 # 0.08 per degree beyond the comfort band
thermal.transition_per_mille_per_k = 40 # 0.04 per degree of body-ambient difference
thermal.multiplier_cap_per_mille = 8_000 # survival cost at most 8x
# Lifecycle.
lifecycle.logout_delay_ms = 10_000 # vulnerable delay before the protected anchor
# Mutation offers.
mutation.step_points = 5 # +/- reference points per tuning selection
mutation.paired_points = 2 # paired change on the competing axis
mutation.recovery_floor_per_mille = 100 # weight floor for recovering a below-base trait
mutation.offer_interval_ms = 25_000 # of productive active play
mutation.offer_options = 3
@@ -38,6 +38,8 @@ spec:
- {name: PGSERVICEFILE, value: /run/postgres/pg_service.conf}
- {name: EVO_PGPASS_SOURCE, value: /run/postgres/pgpass}
- {name: EVO_PG_RUNTIME_ROLE, value: set-by-overlay}
# ADR-0182: the admin API's group role; empty grants no admin functions.
- {name: EVO_PG_ADMIN_ROLE, value: ""}
resources:
requests: {cpu: 100m, memory: 64Mi}
limits: {memory: 128Mi}
@@ -3,16 +3,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: evolution-dev
components:
- ../../worker-only-dev
resources:
- ../base
images:
- name: aevolution-postgres-tools
newName: registry.aeternalisgames.com/aeternalis/aevolution-postgres-tools
# Gitea run 376, source 215a9ea (schema v38); server image from run 380 (7c16a13).
digest: sha256:fe3558e9aa30f08110bcf72aff1a6158df915006f8c1e03b644103bc6f46dfa2
# Gitea CI run 576 for 9de55e3 (schema v69: one action per account a tick; bundle 15).
digest: sha256:c200bd438376abf49292c63691bca8cd8adc097a9e1f94cf926250f50be1fba8
- name: aevolution-server
newName: registry.aeternalisgames.com/aeternalis/aevolution-server
digest: sha256:4a8b0a9dc9f6be491e9eacb464aa7ef7c0d449de3018c4172c01448ce39a5108
digest: sha256:9ba0d78a0db2cd4016711b1c4a621f3945b4b4895d3c4a420389f281bbb781a5
patches:
- target:
kind: Job
@@ -21,3 +23,7 @@ patches:
- op: replace
path: /spec/template/spec/containers/0/env/3/value
value: aevolution_runtime
# Operator-created NOLOGIN group of the admin portal's login (ADR-0182).
- op: replace
path: /spec/template/spec/containers/0/env/4/value
value: aevolution_admin
@@ -0,0 +1,38 @@
# Maintainer requirement: DEV workloads must never schedule on the control plane.
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
patches:
- target:
kind: Deployment
patch: |-
apiVersion: apps/v1
kind: Deployment
metadata:
name: worker-only
spec:
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- {key: node-role.kubernetes.io/control-plane, operator: DoesNotExist}
- {key: node-role.kubernetes.io/master, operator: DoesNotExist}
- target:
kind: Job
patch: |-
apiVersion: batch/v1
kind: Job
metadata:
name: worker-only
spec:
template:
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- {key: node-role.kubernetes.io/control-plane, operator: DoesNotExist}
- {key: node-role.kubernetes.io/master, operator: DoesNotExist}
+20 -5
View File
@@ -2,9 +2,12 @@
## Purpose and first product
The persistent protagonist is a planet's evolutionary history. Each player life
starts as a primitive cell, develops an ecological strategy, can seed autonomous
descendants, and ends permanently. The first product is a compelling persistent
The persistent protagonist is a planet's evolutionary history. A fresh player
life starts as a primitive cell. At reproduction the player can remain the parent
or continue as its newborn offspring through a permanent one-way control transfer;
the relinquished parent continues as autonomous wildlife. Each organism's death
remains permanent. Structural mutations are expressed in offspring rather than
rebuilding the parent's existing body. The first product is a compelling persistent
cellular MMO ecosystem. Multicellularity and a modifiable three-dimensional voxel
planet follow only after that loop works.
@@ -16,8 +19,9 @@ requirements. See [the architecture](architecture/SYSTEM_OVERVIEW.md),
| Pillar | Contract |
|---|---|
| Absolute permadeath | Dead organisms never resume. A new life is a primitive cell with no account-age biological advantage. Historical knowledge may persist. |
| Persistent ancestry | Descendants are independent wildlife, survive the player's logout/death, and fail through ecological pressure. Extinct genomes remain in history. |
| Absolute permadeath | Dead organisms never resume. A fresh life after death starts as a primitive cell with no account-age advantage. Voluntary one-way succession into living newborn offspring at birth is distinct from a fresh life; no return to the NPC parent or fallback after the child's death. |
| Persistent ancestry | At birth the player stays as the parent or continues as the child; the other organism is independent wildlife. A relinquished parent retains its established behavior and reproductive plan. Independent relatives survive player logout/death and face ordinary ecology. Extinct genomes remain in history. |
| Structural inheritance | Body-plan changes of a single cell are expressed in offspring; retain the parent's existing anatomy separately from its heritable offspring plan. A multicellular organism, one body of many cells, expresses an accepted change as a whole, funded from its reserve (maintainer, 2026-10-23; ADR-0179). Capability and construction costs remain real. |
| Player-origin biology | A world can start with geology and chemistry but no life. Every lineage must ultimately reference a player-influenced founder. Do not silently seed prebuilt wildlife. |
| Ecological progression | No classes, mandatory intelligence endgame, linear mutation tree, or cell-to-human ladder. Mixed and unfamiliar strategies are valid. |
| Biological costs | Traits change physical/developmental parameters. Energy, matter, nutrients and environmental constraints determine consequences. |
@@ -31,6 +35,17 @@ requirements. See [the architecture](architecture/SYSTEM_OVERVIEW.md),
## Recommendations versus experiments
The maintainer's 2026-10-26 test request permits opt-in randomized wildlife roots
only in disposable DEV openings ([ADR-0180](adr/0180-dev-starting-wildlife.md)).
This fixture exception does not change the player-origin requirement for product worlds.
The maintainer clarified structural inheritance, birth-time control choice and
NPC-parent continuity on 2026-10-19 in
[ADR-0163](adr/0163-structural-inheritance-and-offspring-succession.md). These are
accepted target-game requirements, not implemented M11 behavior. Historical
exact-copy budding, in-life mutations and primitive restart rules remain explicit
versioned implementation baselines until their replacement is qualified.
RECOMMENDATION: one repository, one modular backend initially, independent region
worker processes, PostgreSQL metadata/durability and S3-compatible payload
storage behind adapters. Split deployments when scaling or failure isolation
+46
View File
@@ -640,8 +640,54 @@ players do not progress. A recorded product review accepts the cellular loop or
keeps iteration open; no invented retention percentage substitutes for that review.
M12 supplies sustained world ecology rather than short-session evidence alone.
2026-10-16: [M11.9 solo feedback](playtests/2026-10-16_M11_9_SOLO_FEEDBACK.md)
records the eight answers and a living-cell reconnect blocker. Full sample,
retests and product acceptance remain open; proposed food/pacing/UI changes and
the later multicellular idea are not ratified game rules.
## M12 - Persistent ecology
2026-10-19: [ADR-0172](adr/0172-cellular-environment-ownership.md) accepts one
owner per patch of space for cells and their local environment, individual
reserves and an open planet boundary. The portable joint owner adds finite infall
entitlements and radiative export with exact closure; producers, durable admission
and integration remain open.
2026-10-19 gameplay clarification:
[ADR-0163](adr/0163-structural-inheritance-and-offspring-succession.md) accepts
offspring-only structural expression, permanent birth-time parent/child control
choice and retained NPC-parent behavior/reproductive plans. Implement expression
timing, separate heritable state, atomic succession and birth UI in coordinated
versioned segments. The current exact-copy/controller evidence below remains
historical implementation evidence, not qualification of this accepted gameplay.
2026-10-19: [bounded unscripted generations](engineering/M12_UNSCRIPTED_GENERATIONS.md)
qualify four wildlife generations in the declared finite rich four-founder
matrix, including hold-outs, with exact raw/cohort biology, conservation,
predation/twins and restores. This supplies ecological evidence for M12; joint
environmental budgets, target-host costs, actual-days and product gates remain open.
2026-10-17: [12.2c rules-8 reference](engineering/M12_CELLULAR_REFERENCE.md)
validates 65,536 individual ticks and 70,656 encoded replay boundaries on MSVC/GCC,
with mutation, birth/death and offline-state coverage. This is the active control;
actual cellular/cohort and target-host qualification remain open before 12.3.
2026-10-17: the maintainer closes M11.9 for now and authorizes M12 continuation.
[Closure/UI review](engineering/M11_9_CLOSURE_AND_UI_REVIEW.md) preserves the
incomplete empirical sample and confirms the current microscope presentation.
Use implemented rules 8 as the cellular reference; population-model and
target-host qualification remain separate M12.2 requirements.
2026-10-16: 12.2b's [exact-reserve/age experiment](engineering/M12_RESERVE_STRATA_EXPERIMENT.md)
matches all 83 synthetic trajectories without replacing the rejected M4 baseline.
It does not qualify an M11 cellular population model or automatic tier policy.
2026-10-15: 12.1 engineering evidence policy and explicit deferrals are documented
in [ADR-0133](adr/0133-ecological-identity-and-time-evidence.md). M11's product
review and 12.2's model qualification remain open; automatic tiers stay disabled.
See the [12.1-12.5 delivery plan](engineering/M12_DELIVERY_PLAN.md) for dependencies
and the resolution required before 12.3-12.5 implementation.
**Goal:** player-derived lineages and ecological consequences survive player absence
for days, with defensible aggregation, ancestry and extinction records.
+852
View File
@@ -1,5 +1,857 @@
# Project status and next steps
## One action per account a tick - 2026-10-29
Region 16 playtest: a bud was shown, then undone, and several were "refused". The client
scheduled a bud at the server tick plus its lead, while movement had run ahead of that after the
lead shrank, so both named one tick. A tick takes one action per account, so the region refused
the whole tick and dropped every player's actions on it (`tick stalled ... error=4`). The region
now keeps each account's discrete action (else its newest) and refuses only the others; the client
schedules a discrete action after every tick it already sent and holds movement off that tick.
Failed commits now log their category and SQLSTATE.
## Ending a stranded life - 2026-10-29
The portal's account page can end a published life whose reservation was never ended, which
refused every new birth ("Existing cell is already bound to this account"). The admin API first
checks the region's live view for any cell holding the account; schema 69 records who ended it
and why. A region with no ticking cells now still applies queued admin commands, such as a
spawn. See [ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 18.
## Larger region ticks for testing - 2026-10-28
A region tick may hold up to 4,096 lives (was 256), for testing limits only, and
`reproduction.organism_cap` accepts up to 4,096; the DEV file keeps 256. Schema 68 raises the
database's per-tick trace counts and lets one spawn command place 256 wildlife. The region page
shows the lineage archive's fill, which stops a region at 65,536 births. See
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 17.
## Testing a full region - 2026-10-28
The Bud button follows a tuning adoption at once (the region's bud-cost cache was keyed by
genome only). `reproduction.wildlife_cap` keeps lives above it for players' buds. Two admin
commands (schema 67): take reserve from a cell, and remove all wildlife; the region map marks
cells (shift+click, shift+drag) for bulk removal. See
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 16.
## Opening regions from the portal - 2026-10-28
The Regions page can open a fresh region in place of the one DEV serves: the admin API
commits the region switch to `main` as aevolution-bot (through Secret `aevolution-admin`) and
runs a full Argo sync, and the page follows the sync until the new region is live. See
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 15.
## Guided tuning editor - 2026-10-28
The Tuning page is a guided editor: pick a section, edit a setting's value (units and plain
readings shown), review the changes and apply. Only the changed values are sent and applied to
the newest revision on the server, which keeps the file's comments and refuses a stale base;
the whole-file text editor remains as Text mode.
## Energy cycle - 2026-10-28
Energy now cycles like matter: the heat cells produce (upkeep, motion, growth, feeding and
predation losses) returns to the spent pool every tick and drips back as bubbles, and a drip at
the deposit limit joins an existing bubble. Both are optional rules-13 tuning keys
(`spent.heat_recycle_per_mille`, `spent.drip_absorb`), adoptable live; the DEV revamp file
turns them on. See [ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 14.
## Admin region page - 2026-10-28
The admin portal's region page is reorganized around the map: a KPI strip (tick pace,
population, deposit capacity, region energy and matter, spent pool, next drip), a map with
layer toggles, zoom and a scale, and tabs for inspecting cells and deposits, the region's
resources (where every channel sits, the spent pool and its drip), actions, the running
tuning and session access. The region view adds complete counts and totals and the drip
rules; the portal has light and dark themes. See
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 13.
## Live tuning - 2026-10-27
The admin portal's Tuning page edits the world's rules-13 tuning (the Git revamp file
format) and adopts it in every region at a recorded tick, without a new image or region:
upkeep, burn, feeding, predation, the spent-pool drip, mutation offers and costs,
reproduction and organisms. Revisions are append-only with author and reason (schema 66);
the reproduction safety revision stays fixed. See
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 13.
## Resource schedules - 2026-10-27
The admin portal can schedule recurring bubbles (the game source), spent-pool releases and
wildlife spawns per region, every 1 s to 24 h, and stop or restart them. Each run is an
ordinary recorded admin command (schema 65). See
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 12.
## Account administration: bans, logout, time played - 2026-10-27
The admin portal can ban (and unban) an account, which also logs it out and stops new
grants; log an account out; and shows time played, sessions, last seen and living
offspring (wildlife descended from its lives). Schema 64; see
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 11.
## Admin commands: spawn wildlife, resources, remove and grant - 2026-10-27
The admin portal can now spawn wildlife, add bubbles, add to or release the spent pool,
remove a cell and grant a cell's reserve, live. Commands are queued in SQL (schema 63) and
the region applies each once, recording it in its history (trace 5) so replay and recovery
reproduce it. Imports are counted in the region's boundary ledger. No new region is needed.
See [ADR-0182](adr/0182-admin-portal-and-world-tuning.md) section 10 and
[validation](engineering/VALIDATION.md).
## Session windows from the admin portal - 2026-10-27
The dev session window now lives in SQL (schema 62) instead of Git: the admin portal opens,
extends (up to four hours from now) and closes it, and the region applies the change within
about five seconds without a push, sync or restart. A closed window refuses every new
session and the region keeps running. The admin API moves to its own database role. See the
[ADR-0087 amendment](adr/0087-dev-session-route.md) and [validation](engineering/VALIDATION.md).
## Read-only admin portal - 2026-10-27
[ADR-0182](adr/0182-admin-portal-and-world-tuning.md) records the admin portal direction
(world tuning in SQL adopted per tick, admin commands, data-defined mutations) and delivers
its read-only first step: `evo-admin-api` and the portal at `https://srs.aeternalisgames.com`
behind the Keycloak realm role `aevolution-admin`. It lists accounts (session, status,
lives, deaths, resets, mutation choices), one account's lives, the world's regions, and a
live 2D view of a region's cells, wildlife, pools and bubbles from the region's new
`/admin/view` ops route. Schema 61 adds only read functions. Nothing in the simulation,
wire protocol or checkpoints changed. Not yet deployed: it needs a new server image, the
Keycloak client, an Ingress and a database Secret. See [validation](engineering/VALIDATION.md).
## Reproduction safety trial and resizable cards - 2026-10-27
[ADR-0181](adr/0181-cellular-reproduction-safety.md) declares opt-in safety
revision 1 for future rules-13 openings: 80% of mutation body/resources follow
control, the ordinary bud fee returns to the selected cell, mutation offspring
separate with an outward launch, and automatic growth protects 60 seconds of fuel.
Recorded revision 0 keeps historical simulation semantics and bytes. This is
prepared trial tuning, not live retuning, image promotion or a deployed new region.
Field notes, Vitals and Nearby resize by native edge/corner dragging, retain their
expanded sizes across collapse and clamp to the viewport. The heading reset gesture
resets size and placement. See [validation](engineering/VALIDATION.md).
## Stable and movable cellular panels - 2026-10-26
The client HUD now uses stable card dimensions and scrolling content, keeping
headings and action buttons fixed as live messages change. Field notes, Vitals
and Nearby have a dedicated drag handle, session anchoring, viewport clamping
and double-click position reset. See [controls](engineering/CLIENT_VISUAL_REFRESH.md)
and [executed validation](engineering/VALIDATION.md). No biological or wire rule changed.
## DEV startup wildlife and Bud controls - 2026-10-26
[ADR-0180](adr/0180-dev-starting-wildlife.md) implements opt-in, nursery-funded
random-genome roots at a fresh rules-13 opening, with deterministic durable
recovery and no replenishment on restart. The DEV trial prepares region 14 with
32 cells, 25% faster funded growth and the existing per-channel budding fee knobs.
Bud disables on resource shortfall and explains all five channels on hover; the
server projection includes the inherited plan and fee. See [tuning and promotion
limits](engineering/CELLULAR_PLAYTEST_TUNING.md) and [validation](engineering/VALIDATION.md).
Source/configuration preparation is distinct from image promotion and deployment.
## Photosynthesis producers (ADR-0136 step C) - 2026-10-19
[ADR-0175](adr/0175-photosynthesis-producers.md) adds genome schema 5's photosynthesis
capability with trial costs (organelle membrane mass and slower movement), founder 4
and cellular rules 11. A region declares light in owner format 9; each tick a still,
active producer captures cross-section x irradiance x efficiency (a quarter while
moving), booked as boundary inflow inside the same atomic tick. A founder earns the
capability as its offspring plan; its children express it and capture light. Every
earlier genome, offer, owner and environment byte keeps its meaning. Numbers are trial
values to balance after playtesting.
[ADR-0176](adr/0176-durable-photosynthesis-region.md)/schema 57 makes producers
playable: raw bundle 13 with a durable light-declaring upgrade, the resumable
`cellular-v8` opening, and session v12, whose owner view carries captured light and
the producers it can see, and whose offers may name photosynthesis. The client draws
green chloroplasts by efficiency, shows sunlight in the HUD and offers photosynthesis
cards. DEV promotes CI run 471's images (`2efb01d`: server `f1183f44...`, postgres-tools
`d3b8e520...`, schema 57) and switches to region 9 (`cellular-v8`, light 40) together;
the previous build stays retained and region 8 stays stored but unserved. A first switch
without the image promotion failed the Argo provision hook and was reverted.
## Cellular environment ownership (M12.5a-b) - 2026-10-19
The maintainer accepted one owner per patch of space for cells and their local
environment, individual reserves (colony/multicellular sharing later) and an open
planet boundary. [ADR-0172](adr/0172-cellular-environment-ownership.md) records
that contract and adds the portable `CellularEnvironment` owner (envelope
`AEVOCEN1`): tagged water/dissolved compartments, refused atmosphere, finite infall
entitlements (ADR-0136 step B) and radiative heat export, applied with each joint
tick or not at all. Closed and source-off regions keep their biology byte for byte.
Raw and cohort representations agree under infall. Old formats and goldens keep
their meaning; no default/live version changes.
[ADR-0173](adr/0173-cellular-environment-batch.md) adds joint batch `AEVOEBT1`:
the unchanged population batch plus each tick's recorded import and radiated heat.
Recorded unattended intervals equal the same live joint ticks; replay re-derives
every flow and refuses forged flows, boundaries and cuts.
[ADR-0174](adr/0174-durable-cellular-environment-profile.md)/schema 56 makes the
joint owner durable as checkpoint profile 6: an explicit one-way, no-tick entry from
a population head, fenced joint publication with owned intervals and per-commit SQL
totals of imported and radiated stock, and recovery that replays the head's link
exactly. A forged but structurally valid trace is refused on recovery.
See [Validation](engineering/VALIDATION.md). Producers (ADR-0136 step C),
executable/network joint fault drills, worker/census/migration integration (12.5d)
and target-host qualification (12.5e) remain open.
## Portable retained-plan exact populations - 2026-10-19
[ADR-0171](adr/0171-retained-plan-exact-populations.md) adds envelope/batch 3 for
owner 8/rules 10. An explicit no-tick inheritance candidate preserves the exact
membership, policy and sequence. Raw/cohort execution agrees through earned
structural plans, paid children, later selections, suspension, conversion and
recorded unattended intervals. Projection 2 keeps cohort plan references separate
from expressed stock. Old envelopes/traces and all goldens retain their meaning.
Both full Release suites pass **92/92**. Final focused tests, analysis, formatting
and ASan/UBSan pass; fresh-process MSVC/GCC output bytes agree.
[Validation](engineering/VALIDATION.md) records exact evidence. Durable population
admission, migration, linked resource ownership, control/NPC/UI and operational/
actual-days/product gates remain open. No default/live version changes.
## Explicit DEV worker placement - 2026-10-19
[ADR-0170](adr/0170-dev-worker-placement.md) implements the maintainer's worker
placement requirement in the full DEV application and standalone region/store
overlays. Required affinity excludes both current and legacy control-plane role
labels. Existing store selectors, volumes, PostgreSQL endpoints and URLs remain.
Rendered checks reject an unrestricted affinity alternative or `nodeName` bypass.
All 17 overlays render with zero policy failures; all 50 adversarial policy cases
pass. [Evidence](engineering/M12_DEV_WORKER_PLACEMENT.md) distinguishes offline
policy from actual running placement. Delivery uses Git Actions, Harbor, ArgoCD
and Kubernetes. Target-host drills and the remaining M12 gates remain open.
## Retained-plan census and verified history - 2026-10-19
[ADR-0169](adr/0169-retained-plan-census-observations.md) adds raw owner-8 census
projection 2. Expressed organisms/body/reserve retain their existing meaning;
separate living plan references preserve inherited diversity before any offspring
is born. Dead-plan records remain history. Exact/descendant/scoped queries and
committed history/registered snapshots retain the explicit projection boundary.
No extra inventory, redundant SQL journal or terminal extinction rule is added.
MSVC/GCC Release pass **90/90**. Clang-tidy, formatting, focused ASan/UBSan and
actual database history/capture checks pass; [validation](engineering/VALIDATION.md)
records scope. Old projection-1 plan measures remain unobserved. Population and
migration integration, in-life trait timing, birth-time control, NPC behavior,
client UI and remaining target-host/ecology/product gates still prevent M12 closure.
## Durable retained offspring plans - 2026-10-19
[ADR-0168](adr/0168-durable-retained-plan-admission.md)/schema 55 adds explicit
raw bundle-11 -> 12 fenced upgrades, trace-4 publication, earned plan selections
and repeated funded births. Recovery rederives the full upgrade from retained
source objects and replays subsequent choices/births exactly. Ambiguous retries,
stale writers, rollback, pending choices and missing/corrupt/false evidence are
covered. No default or DEV opening opts into this version automatically.
[Validation](engineering/VALIDATION.md) records executed checks. Population and
migration support, census plan semantics, control succession, retained NPC
behavior, client choice UI and the remaining M12 operational/ecology/product
gates remain open. Delivery follows Git Actions -> Harbor -> ArgoCD -> Kubernetes
using the checked-in `deploy/` manifests.
## Portable retained-plan checkpoint upgrade - 2026-10-19
[ADR-0167](adr/0167-retained-plan-checkpoint-upgrade.md) defines raw-only bundle
12 and an explicit no-tick upgrade from bundle 11. It restores the complete
source, preserves expressed mutations, funded descendants, inventories, presence
and archive history, and initializes each offspring plan from its expressed
genome. The checkpoint restores and continues through raw trace 4. No genesis,
skipped prerequisites, repeats or population conversion are admitted.
Full MSVC/GCC Release suites pass **89/89**. Analysis, formatting and focused
ASan/UBSan pass; separate-process upgrade proof bytes agree across compilers.
[Validation](engineering/VALIDATION.md) records exact evidence and limitations.
This is portable reader/upgrade support. SQL and fenced durable publication,
population/census/migration admission, control succession, retained NPC behavior
and choice UI remain open; M12 is still in progress.
## Portable inherited-plan replay - 2026-10-19
[ADR-0166](adr/0166-retained-plan-replay-traces.md) adds raw trace 4 exclusively
for owner format 8/rules 10. Recorded selections, same-tick funded offspring,
declines and later plan changes reproduce direct execution exactly. Action
matching uses the inherited offer even when it differs from the parent's body.
Failed batches expose no candidate or partial mutation outcome list.
Both full MSVC/GCC Release suites pass **87/87**. Fresh-process replay produces
identical final bytes on both compilers; analysis, formatting and focused
ASan/UBSan checks pass. [Validation](engineering/VALIDATION.md) records scope.
Trace 3 remains the default. Durable plan/bundle admission, population/census/
migration integration, control succession, retained NPC behavior and choice UI
remain open; this portable prerequisite does not complete M12.
## Portable retained offspring plans - 2026-10-19
[ADR-0165](adr/0165-retained-cellular-offspring-plans.md) implements an opt-in
stored-plan owner, format 8/rules 10. Earned selections edit the inherited plan;
the parent's expressed body and biological charges stay unchanged. Repeated
funded births use that plan, later selections preserve earlier siblings, and
reloads/death history retain the distinction. Older saves retain their meaning.
MSVC/GCC full Release suites pass **85/85**; exact separate-process inherited
continuations agree across compilers. [Validation](engineering/VALIDATION.md)
records analysis/sanitizer evidence and scope. Current durable bundles, census,
population, migration and old batch replay refuse the new owner. Durable plan
integration, the in-life expression catalog, birth-time control succession,
retained NPC behavior and choice UI remain open. M12 remains in progress.
## Distinct-genome offspring funding - 2026-10-19
[ADR-0164](adr/0164-distinct-genome-offspring-funding.md) implements the first
biology operation for generational structural inheritance. An unchanged parent
can fund a child with a distinct inherited anatomy and starting demand, with
exact energy/element closure and no free tissue. Siblings retain the selected
plan while archive records keep the parent's expressed genome separate.
Both full MSVC/GCC Release suites pass **83/83**. Focused ASan/UBSan, clang-tidy
and formatting pass; [validation](engineering/VALIDATION.md) records exact scope.
Stored offspring plans, mutation timing, birth control handoff, retained NPC
behavior and choice UI remain next work. Current live/default biology is unchanged.
## Gameplay alignment: structural inheritance and succession - 2026-10-19
The maintainer accepts [ADR-0163](adr/0163-structural-inheritance-and-offspring-succession.md):
structural mutations are expressed in offspring. At birth the player stays as the
parent or permanently continues as the child. The relinquished parent becomes an
NPC retaining its existing body, established behavior and selected offspring plan.
It can continue reproducing that form. There is no return to the parent or fallback
after child death; a fresh life after death remains primitive.
This updates target gameplay, not the current runtime. Separate expressed/heritable
state, per-operator timing, bounded retained NPC behavior, durable birth/control
handoff and readable outcome/choice UI are implementation work. Earlier four-generation
qualification exercises the old exact-copy rules and does not qualify these features.
## Bounded unscripted wildlife generations - 2026-10-19
[ADR-0162](adr/0162-bounded-unscripted-wildlife-generations.md) measures actual
funded player-origin wildlife under the unchanged controller. All players freeze
after the first bud. Four declared rich four-founder cases, including two
hold-outs, reach four wildlife generations with 97–102 births and 31–33 living
wildlife after 80,000 ticks. Complete raw/cohort biology and reports, conservation,
whole-genome conversions and periodic restores agree. Actual predation and twins
are observed; rules-8 and scarce controls retain their different outcomes.
Native Release passes **82/82**; the short ASan/UBSan contract, analysis and format
checks pass. [Results and reproduction](engineering/M12_UNSCRIPTED_GENERATIONS.md)
retain the weaker exploratory one-founder outcomes and exact scope. This is
4,000 simulated seconds per case, not actual days or sustainable producer ecology.
M12 remains in progress; environmental coupling, target-host/multi-host evidence,
global reconciliation and returning-player/product gates remain open.
## Durable migration of maturing wildlife - 2026-10-19
[ADR-0161](adr/0161-durable-maturing-wildlife-transfer.md)/schema 54 admits exact
bundle-11/trace-2 migration alongside retained bundle 10/trace 1. Source freeze,
read-only staging, atomic paired publication, complete recovery and registered
pending-handoff census verification reuse existing journals and fences. Mixed
bundles and cross-rule traces fail. Settled juveniles continue funded growth.
Native Release passes **81/81**, both complete private rule matrices pass in
**35 s**, and ASan/UBSan passes in **86 s**. Analysis and formatting pass; evidence
and qualification limits are in [validation](engineering/VALIDATION.md). The full
private persistence/process/TLS/backup/DR/history/SQL qualification passes in
**613 s**, with frozen executable hashes unchanged. No live
upgrade, automatic movement or biological rule change. Linked resources,
autonomous sustainability, multi-host drills, actual days and product gates remain
open; M12 is still in progress.
The same commit refreshes the DEV session window to a new four-hour absolute
deadline; rendered deployment policy passes for all 17 overlays.
## Portable transfer of maturing wildlife - 2026-10-19
[ADR-0160](adr/0160-portable-maturing-wildlife-transfer.md) qualifies exact
portable rules-9 transfer and distinct trace 2 for raw/cohort owners. Real
juveniles grow before and after transfer while life fields remain exact at the
no-tick boundary. Mixed rules and cross-rule replay fail. Trace 1 retains rules 8;
durable adapters and SQL continue to refuse trace 2/bundle 11.
Native Release passes **81/81**, GCC transfer/restart **2/2**, ASan/UBSan **2/2**,
private Release/ASan matrices (**22/63 s**), analysis and formatting. Seven old
trace/result/continuation artifacts retain exact bytes. The DEV session window
is refreshed in the same commit and future pushes must refresh it; offline
rendered policy and all 46 policy self-tests pass. See
[validation](engineering/VALIDATION.md). Durable rules-9 migration and remaining
ecology/soak/product gates remain open.
## Census of funded maturing owners - 2026-10-19
[ADR-0159](adr/0159-maturing-cellular-census.md) admits rules-9/owner-7 retained
body/reserve to census projection 1, verified committed history and registered
snapshots. Real funded growth, raw/cohort conversion, no-tick version/profile
cuts and concurrent snapshot capture are qualified. Mixed rules-8/rules-9 cuts,
missing evidence/builds and stale grants refuse complete queries.
Native Release passes **81/81**, focused GCC Release **3/3**, and the complete
affected private database matrix passes in **22 s**. ASan/UBSan portable census
and the private matrix (**64 s**), analysis and formatting pass; detailed evidence
and limits are in [validation](engineering/VALIDATION.md). No SQL schema or
biological rule change. Rules-9 migration, viable-store reconciliation, ecology,
actual-days and product gates remain open; M12 is still in progress.
## Durable funded cellular maturation - 2026-10-19
[ADR-0158](adr/0158-durable-cellular-maturation.md)/schema 53 admits explicit
bundle-10 -> 11 maturation upgrades in either raw or population profile, using
the existing immutable version journal and current head/lease fence. Recovery
rederives full state, and upgraded hosts retain exact growth through publication,
replacement, interval settlement and representation changes. No automatic upgrade
or default/DEV provisioning change.
Native Release passes **81/81**. Private Release and ASan/UBSan upgrade/fault
matrices, including prepared-handoff refusal with no partial journal evidence,
and final analysis/formatting pass. Detailed evidence and limits are recorded in
[validation](engineering/VALIDATION.md). The full private persistence/process,
backup/DR, migration-history and permission qualification reports **exit 0, 563 s**.
Rules-9 migration/census, autonomous
generations, shared environmental budgets, target-host cost, actual days and
product gates remain open; this is not completion of M12.
## Portable M12 funded maturation prerequisite - 2026-10-18
[ADR-0157](adr/0157-funded-cellular-maturation.md) adds opt-in rules-9 funded
growth to the exact raw/cohort kernel. A genuine finite-food bud reaches adulthood
and produces its own bud; construction preserves every stock, damage and genome.
The documented trial rate, blocked-expansion refusal, saved-choice funding,
newborn/offline exclusion, conversion and exact replay/process continuation pass.
Rules 8, DEV defaults and durable bundle admission retain their existing meaning.
Native and GCC Release pass **81/81** each. Affected ASan/UBSan, including the final
offline/process guards, clang-tidy and formatting pass; detailed evidence and
fixture limits are in [validation](engineering/VALIDATION.md). Small juveniles'
pool nutrient rounding and sibling placement still constrain ecology. Durable
rules-9 admission/migration/census, automated generations, joint environmental
budgets, target-host costs, actual days and product gates remain open. This is a
portable prerequisite, not completion of M12.
## M12.7c registered census pending handoff evidence - 2026-10-18
Schema 52 captures active biological migration pointers with history domain,
registry and heads. Both predecessor manifests are bound to retained builds;
source capsules and staged destination ghosts receive complete paired replay
outside the metadata transaction. Capsules/ghosts add no stock. Prepare/stage/
abort/commit interleavings preserve the selected view; unavailable or false evidence
fails the entire result. This accepts no terminal extinction or live authority.
Native Release **79/79**, final raw/population allowlist cases, ASan/UBSan TLS/storage
faults, Clang analysis and formatting pass. Final private persistence/process/
backup/DR/migration/permission qualification passed in **558 s**; results and limits
are recorded in [validation](engineering/VALIDATION.md). Other viable
stores, cross-domain clone provenance, accepted global reconciliation/freshness
and ecology/soak/product gates remain open.
## M12.7b database history domains and restore provenance - 2026-10-18
Schema 51 binds registered census evidence to a database history-domain UUID,
captured with the registry and heads. Supported restores create a fresh domain
before verification/readmission, retaining the parent, restore claim and exact
restored cuts. Biological identities/bytes stay unchanged. Legacy backups have
unknown original context and acquire adoption only when migrated.
Default Release CTest **79/79**, focused domain/legacy-restore qualification,
ASan/UBSan TLS/storage faults, Clang analysis and formatting pass. Full private
persistence/process/backup/DR and migration/permissions qualification passed in
**558 s** after correcting an incomplete frozen-helper directory. Results and
limits are recorded in [validation](engineering/VALIDATION.md).
Cross-domain clone provenance, other viable stores, durable accepted extinction,
client access and ecology/soak/product gates remain open; this is not complete M12.
## M12.7a registered-world census coverage - 2026-10-18
Schema 50 now uses the durable authority registry as the required regional set
for consistent census snapshots. Every registered region must have matching
resources and recoverable evidence, including inactive/expired owners. Missing
heads, unsupported profiles, unknown worlds and more than 64 regions fail the
query. Catalog selection and head capture use the same database snapshot, with
complete immutable replay afterward; no duplicate catalog/enrollment write.
Native Release passes **79/79**; registered coverage/enrollment and raw/cohort
migration races, ASan/UBSan TLS/storage faults, Clang analysis and formatting pass.
Complete private persistence/process/backup/DR, schema upgrade, permissions and
checksum qualification passes in **551 s** after correcting a stale schema-history
test expectation. [Evidence and limits](engineering/VALIDATION.md) retain external
branch identity, other viable stores, durable accepted reconciliation records,
client access and the ecology/soak/product gates. This segment accepts no terminal
extinction, deployment or World0 promotion.
## M12.6d consistent scoped census snapshots - 2026-10-18
Scoped census reads now select all declared regional heads from one short
read-only database snapshot, then fully replay the exact immutable cuts after
the metadata transaction ends. A concurrent atomic migration cannot split the
selected source/destination heads. Missing or failed evidence returns no partial
census; unsafe capture cleanup closes its connection.
Private raw/cohort migration races and TLS BEGIN/COMMIT request/reply-loss tests
pass in Release and ASan/UBSan, alongside existing history and migration/storage
faults. Native default Release passes **79/79**; Clang analysis and formatting
pass. [Evidence and limits](engineering/VALIDATION.md) retain durable world/branch
coverage, outside transfer/viability reconciliation, client access, target-host
query costs and later ecology/soak/product gates. A caller-declared consistent
cut cannot accept terminal extinction. No deployment or World0 action.
## M12.6c scoped multi-region census queries - 2026-10-18
The portable census now queries 1..64 explicitly declared regions at an exact
simulation boundary. Missing/stale coverage, conflicting immutable genome records
and duplicate resident organisms fail before totals are exposed. Real settled
migrations count stock once, retain suspended living stock and support mixed
raw/cohort classifications; departed history remains separate record occurrences.
Native Release passes **79/79**; focused GCC and ASan/UBSan contracts, private
PostgreSQL committed raw/cohort history integration, Clang analysis and formatting
pass. [Evidence and limits](engineering/VALIDATION.md) retain durable world/branch
coverage, reconciled migration cuts, client access and target-host query costs.
A caller-declared region set is not a complete world watermark and cannot accept
terminal extinction. Linked ecology, maturation and later integration/soak gates
remain open; no deployment or World0 action.
## M12.6b replayed census history from committed cuts - 2026-10-18
Regional census history now reads exact retained biological commits as canonical
durable events. Pages are bounded to eight commits and pinned to a fixed regional
cut. Shared full recovery verifies raw/cohort payloads, traces, transitions and
paired migration evidence before exposing census rows. Idle connections prevent
a writer's own pending changes from appearing durable; failed evidence never
becomes a partial page or zero population. No duplicate census write is added.
Native Release passes **79/79**; private GCC history qualification, ASan/UBSan
history/TLS/storage checks and Clang analysis/format checks pass.
Complete private persistence/process/backup/DR and SQL qualification passes in
**546 s**, including the new history matrix and existing fault tests.
[Evidence and limits](engineering/VALIDATION.md) retain world/branch reconciliation,
cross-region/public client access and deployment-host query costs. This regional
watermark cannot authorize terminal extinction. Linked ecology, maturation and
later integration/soak gates remain open; no deployment or World0 action.
## M12.6a bounded regional census and history queries - 2026-10-18
The portable census now distinguishes resident individuals/cohorts and
active/lingering/suspended controlled lives, retaining exact body/reserve stock
and zero-carrier ancestry. Exact-genome and descendant queries use current carried
genomes. Retained departed history never counts as resident stock; migrations and
return trips retain that distinction without changing biology.
Native Release passes **79/79**; GCC census/lineage/migration contracts, relevant
ASan/UBSan checks, Clang analysis and formatting pass.
[Evidence and limits](engineering/VALIDATION.md) retain durable atomic history
publication, commit/branch binding, complete world reconciliation and client
presentation as subsequent M12.6/12.7 work. This local projection grants no
terminal-extinction or ghost ownership authority. Linked ecology, maturation and
later integration/soak gates remain open; no deployment or World0 change.
## M12.4l local migration storage failures - 2026-10-18
The private matrix now refuses preparation, staging or paired publication after
capsule/result directory-sync failures. Real read-permission denial after commit
pauses current-payload recovery for retry or quarantines unavailable counterpart
replay evidence. Both paths preserve the exact database heads and receipt; full
recovery restores exact biology, with newer authority after quarantine.
GCC private population/migration checks pass in 17 s, ASan/UBSan storage/TLS
checks in 64 s, and Clang analysis/format checks pass.
Complete private persistence/process/backup/DR and migration/permission
qualification, including the combined fault matrix, passes in 546 s.
[Evidence and limits](engineering/VALIDATION.md) distinguish local sync/read
failures from physical media, storage-host and orchestrator drills. Linked ecology,
maturation and later M12 integration/soak gates remain open. This segment changes
tests/documentation only.
## M12.4k independent migration TLS path faults - 2026-10-18
Test-only relays now exercise real loopback TCP/end-to-end TLS request/receipt
loss for raw and cohort migration. Independent observation proves unchanged or
atomically committed heads. Owning hosts retain lost prepare/stage/abort work,
fence after actual partitioned lease expiry, recover under replacement authority
and refuse healed stale owners. Their healthy peer keeps its epoch/freeze.
Wrong-hostname TLS connections fail; production adapter settings are unchanged.
Native Release passes 78/78; GCC, ASan/UBSan, TSan, Clang analysis, format and
shell checks pass. Complete private persistence, process-fault, backup/DR and
migration/permission qualification, including the TLS matrix, passes in 540 s.
[Evidence and limits](engineering/VALIDATION.md) distinguish
these local transport faults from multi-host/kernel-network, database/object-store
and orchestrator drills. Linked ecology and later M12 integration/soak gates
remain open. No SQL, production code, biological rule/format, deployment or live
region changed. Full/sanitizer CI paths include the new disposable TLS matrix.
## M12.4j atomic paired biological publication - 2026-10-18
ADR-0149/schema 49 commits both exact migration results and one immutable common
receipt under both current fences. Second-insert failure rolls back both heads
and pointer settlement. Commit and abort have one exclusive outcome; exact
retries preserve both original manifests under fresh endpoint authority. Full
recovery replays the pair from retained local capsules before a host adopts a
changed head or becomes ready. The source owns stock until commit; afterwards
only the destination owns the migrants.
Native Release passes 78/78; focused private PostgreSQL, ASan/UBSan, Clang
analysis, format and shell syntax checks pass. Complete private persistence,
process-fault, backup/DR and migration/permission qualification passes in 507 s.
[Evidence and limits](engineering/VALIDATION.md)
retain independent network-partition drills, linked ecology, maturation and later
M12 integration/soak gates. All of M12 remains in progress. No automatic route,
biological rule/format, deployment or live region changed.
## M12.4i durable read-only destination staging - 2026-10-18
ADR-0148/schema 48 stages the destination under current authority at its exact
captured head. A verified source capsule and complete destination ghost are
retained for replay, while the source owns all outgoing stock and neither head
moves. Both migration roles pause publication/admission and host readiness
across replacement. Explicit source abort releases both pointers atomically;
stage/abort races and exact retries cannot activate or reopen an aborted ghost.
Native Release passes 78/78; the private PostgreSQL staging suite, ASan/UBSan,
Clang analysis, format and shell syntax checks pass. The complete private
persistence/process/backup/DR/migration/permission suite passes in 501 s.
[Evidence and limits](engineering/VALIDATION.md)
retain atomic paired publication, its common immutable receipt, commit/abort
races and recovery/activation as the next M12.4 segment. All of M12 remains in
progress. No deployment, automatic movement or live region changed.
## M12.4h durable source freeze and explicit abort - 2026-10-18
ADR-0147/schema 47 retains exact biological migration preparation, replay capsules
and a durable source freeze across worker replacement. Source publication and
new interval/player reservations are refused while pending; source stock and both
heads remain unchanged. Explicit current-source abort appends its outcome and
clears the pause, with exact retries. The host pauses readiness/advancement,
retains ambiguous requests and verifies complete biology before resuming.
Native Release passes 78/78; focused private PostgreSQL, ASan/UBSan, Clang
analysis, format and shell syntax checks pass. The complete private persistence,
process-fault, backup/DR and migration/permission suite passes in 502 s.
[Evidence and limits](engineering/VALIDATION.md)
retain destination staging, atomic paired commit, commit/abort races, activation
and linked-boundary contracts as subsequent M12.4 work. All of M12 remains in
progress; no deployment or live region changed.
## M12.4g durable accounting upgrade - 2026-10-18
ADR-0146/schema 46 extends the immutable version-upgrade journal to same-profile
bundle-9 to 10 upgrades. Full source/result replay protects biology and cohort
policy/membership/sequence; pending intervals and current lease/head fences remain
enforced. Batch 2 is admitted only under bundle 10, and representation changes
preserve either tuple. No worker upgrades automatically.
Native Release passes 78/78; Clang analysis/format and ASan/UBSan upgrade checks
pass. The complete private PostgreSQL/process/backup/DR/upgrade/permission/history
suite passes in 503 s. [Evidence and limits](engineering/VALIDATION.md) retain the
next M12.4 work: durable paired biological escrow, source freeze, destination
activation and linked-boundary contracts. All of M12 remains in progress; no
deployment or live region changed.
## M12.4f explicit portable accounting upgrade - 2026-10-17
ADR-0145 declares checkpoint bundle 10 for owner 7/population envelope 2, with an
explicit same-profile no-tick upgrade from retained bundle 9. Complete biology,
opening stock and cohort policy/membership/sequence are preserved. New genesis,
double upgrade and old/new payload confusion are refused; continuation and
representation changes preserve the tuple. Native Release passes 78/78;
Clang analysis/format, ASan/UBSan and private PostgreSQL admission-refusal checks
pass. [Evidence](engineering/VALIDATION.md) keeps this portable contract separate
from the dedicated durable upgrade transaction/recovery still required. Schema
45 still refuses the new bundle; no live selection or deployment changed.
## M12 CI execution repair - 2026-10-17
The captured sanitizer timeout and read-only fixture failures now have scoped
test-runner fixes: full instrumented matrices keep their cases with bounded
budgets, and restart fixtures use the TSan container's existing `/tmp` tmpfs.
Read-only root, non-root user, network isolation and seccomp policy remain intact.
Real-X11 lifecycle checks keep a persistent Xvfb server and report the typed open
error; the original intermittent reopen failure was not reproduced locally.
GCC warning fixes preserve consume-once authentication and panel-test behavior.
[Evidence and limitations](engineering/M12_CI_EXECUTION_REPAIR.md) distinguish
local qualification from the remote CI/container rerun still required. M12's
remaining integration/biology gates are unchanged; no deployment occurred.
## M12.4e continued population replay after transfer - 2026-10-17
Portable population batch 2 binds envelope 2/owner 7 and preserves boundary flows
and nonresident history through biological intervals and manual conversions.
Batch 1 retains its old meaning/bytes; cross-version replay is refused. A fresh
process also reproduces a 64-tick destination interval after cohort transfer.
Native Release passes 78/78; Clang analysis/format, ASan/UBSan and GCC checks pass.
The private PostgreSQL suite proves both prepared C++ and SQL reject batch 2 under
retained bundle 9, without moving the head. [Scope](engineering/M12_EXACT_BIOLOGICAL_TRANSFER.md)
keeps durable version admission, paired escrow/activation and later M12 ecology
gates open. No SQL, live flag, biological rule or deployment changed.
## M12.4d paired biological transfer replay - 2026-10-17
Canonical bounded migration trace 1 binds both predecessor cuts, both resulting
commit IDs, the workflow request, representation and exact members/material.
Replay uses the separately trusted request and both source states. A fresh
process reproduces the complete source/destination snapshots for individual and
cohort owners. Native Release passes 78/78; Clang analysis/format, GCC 14 and
ASan/UBSan migration checks pass. [Contract and limits](../schemas/cellular-migration-trace-v1.md)
retain the I/O digest/fencing obligations: this trace grants no ownership and
does not close durable escrow, database retry/abort or destination activation.
## M12.4c portable biological transfer - 2026-10-17
ADR-0144 adds opt-in owner format 7 and population envelope 2 with exact paired
wildlife transfer candidates, explicit regional boundary flows, retained
nonresident history and complete ancestry/revision merging. Cohort tags move with
their cells; opening budgets, identity, age and biological state remain exact.
Imported higher-namespace residents coexist with locally born lower-namespace
buds. Old durable manifest tuples explicitly refuse the new portable envelopes.
Native Release passes 77/77; Clang analysis/format, ASan/UBSan and the focused
private PostgreSQL population suite pass. [Scope and evidence](engineering/M12_EXACT_BIOLOGICAL_TRANSFER.md)
retain the limits: paired durable escrow/activation, linked geometry/environment
and multi-generation ecology remain open. Testing exposed rules 8's existing
subadult-bud maturation gap; no growth or reproduction rule was changed to hide
it. M12.4 and all of M12 remain in progress; no deployment or live entry changed.
## M12.4b owned population intervals - 2026-10-17
ADR-0143/schema 45 records one bounded interval before computation and settles it
atomically with its exact checkpoint. Replacement owners retain the same pending
work; zero newly due ticks can finish a recovered interval. Unknown admission
pauses readiness and retries its immutable source/end. A separate durable pending
tick metric complements local debt and checkpoint age.
New entry/work requires fully suspended controlled cells: the existing 200-tick
vulnerable linger and permanent-ending path stays on profile 4. Old traces retain
their meaning, and either profile's recovery reconciles owned corpses. No new
biological version, immunity, dependency or deployment was introduced. See
[scope and evidence](engineering/M12_OWNED_POPULATION_INTERVALS.md). Biological
migration escrow and linked-boundary/resource contracts remain the next M12.4
work; this does not close all of M12 or enable production automatically.
## M12.3b durable exact populations - 2026-10-17
ADR-0142 and schema 44 add dedicated population profile 5, trace 1, immutable
publication/transition evidence and exact source/target recovery. The owning
cellular host recovers either representation, materializes before player
operations and serializes mutation reservations against profile entry. The
optional `--cellular-populations on` path batches unattended work; entry is off
by default. No biological version, golden, deployment or live region changed.
[Scope and evidence](engineering/M12_DURABLE_POPULATIONS.md) distinguish portable
contracts, real PostgreSQL ambiguity/process-loss tests and host recreation from
remaining executable/network fault drills and target-host qualification. Durable
interval admission/backlog is the next M12.4 segment. The dependent ecological,
multi-day and returning-player gates remain open; M11.9 stays closed for now.
## M12.4a current-worker unattended scheduling - 2026-10-17
The cellular worker now keeps ticking for funded wildlife after players suspend,
and active offline cells can start their freeze/linger transition. Running
publication latency no longer discards tick debt; confirmed heads consume it,
with bounded retries, fixed 50 ms steps and debt/checkpoint-age metrics. Legacy
profiles without offline freeze retain their prior session-driven behavior.
Release tests pass 75/75; clang-format/tidy 19, ASan/UBSan and the full private
PostgreSQL/process/backup/DR/upgrade suite pass. ADR-0141 records scope.
**M12 is not complete.** The [remaining-gate audit](engineering/M12_REMAINING_GATES.md)
specifies the population publication profile/adapter, biological escrow,
environment coupling, global history/extinction reconciliation and actual
multi-day/product evidence still required. M11.9 stays closed for now; this is
not another approval hold. Current code does not enable the live cohort selector,
deploy changes or authorize M13/World0 promotion.
## M12.3a exact conversion recovery - 2026-10-17
Population envelope 1 retains biology, cohort membership, policy and conversion
sequence together. Detached candidates preserve their predecessor; opt-in
automatic hysteresis is deterministic and disabled by default. Separate-process
continuation matches uninterrupted execution, with malformed input, oscillation
and sequence exhaustion checks. Release tests pass 74/74, plus clang-format/tidy
19 and ASan/UBSan. [ADR-0140](adr/0140-exact-population-checkpoint-and-policy.md)
records the remaining production profile/trace/publication adapter; local file
recovery does not close that gate. No deployment or live format change.
## M12.2d exact cellular cohorts - 2026-10-17
Under the maintainer's delegated M12.2 authority, ADR-0139 selects exact local
cohorts retaining every member. Regional approximation stays disabled. The
[qualification](engineering/M12_EXACT_CELLULAR_COHORTS.md) matches complete
canonical biology over 196,608 paired ticks per compiler, including thousands
of conversion oscillations. Local active fallback samples reach the existing
256-life ceiling with admission backpressure. Release CTest passes 72/72;
clang-format/tidy 19 and ASan/UBSan checks pass. No compression or production
capacity is claimed. Target-host costs and fuller interaction coverage remain
open. Exact-owner durable transitions may proceed without live enablement.
## M12.2c current cellular reference - 2026-10-17
The [rules-8 headless reference](engineering/M12_CELLULAR_REFERENCE.md) passes
eight full cases with matching MSVC/GCC state/coverage outputs. It exercises
funded mutations, wildlife births, starvation and offline suspension with exact
encoded replay at 1/16/64-tick partitions. Native Release CTest passes 71/71,
with clang-format/tidy and Linux ASan/UBSan checks. This supplies the current
active control; actual cellular/cohort fidelity and target-host budgets remain
the M12.2 work ahead. M11.9's scoped closure authorizes that continuation.
## M11.9 closed for now; M12 continuation - 2026-10-17
The maintainer explicitly closes M11.9 for now and authorizes proceeding with M12.
The solo observations and incomplete product sample remain follow-ups, not a
continuing gate block. Reviewed the current microscope HUD at three sizes,
mutation cards and central death/restart presentation through production-panel
renders; see [closure and UI review](engineering/M11_9_CLOSURE_AND_UI_REVIEW.md).
The current reference is rules 8 with finite pools/bubbles and contact feeding.
M12.2 still requires cellular/cohort fidelity and target-host fallback evidence;
no automatic tier selection follows from the M11.9 closure.
## M11.9 solo feedback - 2026-10-16
[The maintainer's eight answers](playtests/2026-10-16_M11_9_SOLO_FEEDBACK.md)
are recorded. Returning to a living cell is blocked by an existing-life message
with no cell visible; diagnose that resume/routing/view path first. The solo loop
felt repetitive, mutation effects and predation need more testing, and fun remains
uncertain. Food distribution, pacing and presentation suggestions remain proposals.
M11.9 product acceptance is open; this is feedback, not completion of the sample.
## M12.2b experiment - 2026-10-16
A separate exact-reserve/age candidate matches 83 synthetic histories, including
40 held-out cases, at every tick on MSVC and GCC. The old failed aggregation
fixture and evidence remain unchanged. Compact active controls show that cost
benefits depend on compiler and workload; no production capacity is inferred.
See [the experiment report](engineering/M12_RESERVE_STRATA_EXPERIMENT.md).
Release tests pass 70/70, with clang-format/tidy 19 and Linux ASan/UBSan checks.
M12.2 still needs M11 cellular multi-genome qualification and target-host fallback
budgets; M12.3-12.5 and the unrecorded M11 product review remain open.
## M12 start - 2026-10-15
M12.1 defines ecological identity, viability evidence and time boundaries in
[ADR-0133](adr/0133-ecological-identity-and-time-evidence.md), including explicit
deferral of species algorithms, autonomous mutation, evolving behavior and
whole-world wall-time catch-up. Existing M11 biology and runtime formats remain
unchanged. The [M12 delivery plan](engineering/M12_DELIVERY_PLAN.md) records the
open M11 product review and M12.2 population qualification prerequisites.
Automatic tier selection remains disabled; 12.3-12.5 cannot proceed on M4's
failed aggregation model.
12.2a reproduces all 15 historical scenarios, including eight false extinctions
and zero qualified widths; Release CTest passed 69/69. See
[population qualification](engineering/M12_POPULATION_QUALIFICATION.md).
M12.2 remains open; no production aggregation or unattended scheduling was added.
## Client update - 2026-10-14 (v10)
The desktop cellular client now negotiates v10, exposes mutations with funded
costs, engulf/bud feedback, reserves, death and restart, and retains unresolved
requests through reconnect. Automatic feeding, adjustable/precision steering,
food approach assistance and a responsive teal interface address playtest
usability. See [CLIENT](engineering/CLIENT.md) and the validation entry for
checks and remaining live-play/hardware qualification. No deployment or world
state change is part of this client update.
## Current gate - 2026-10-11 (M11.3 exploratory probe)
The maintainer reports that the Git checks passed, `evo-region` is running, and
+10
View File
@@ -70,3 +70,13 @@ add labels outside these APIs; review must keep debug overlays out of player UI.
## Consequences
M9.7 builds `OrganismPresentation` from server views. Any new visual parameter
must derive from biology and update this ADR, tests and ORGANISM_RENDERING.md.
## Presentation amendment, 2026-10-22
The native microscope now layers translucent cyan membranes and cytoplasm, amber
metabolic organelles and a violet centre. Existing phenotype mappings for extent,
wall thickness, flagella, conversion and producer chloroplasts remain in force.
Identical biology receives the same palette; the controlled cell differs only by
its existing focus ring. Dead outlines remain broken and stale opacity is applied
to organelles as well as the membrane. No new biological parameter is introduced.
See [the visual refresh](../engineering/CLIENT_VISUAL_REFRESH.md).
+25
View File
@@ -131,3 +131,28 @@ at 13 px.
- **Applying it.** The scale goes to ImGui's `FontScaleMain` and to `ScaleAllSizes`,
taken from the unscaled style. Panel sizes are given in logical units at that scale.
Movable panels return to their default place and size once, at each new scale.
## Amendment (2026-10-26): stable, anchored cellular HUD cards
At the maintainer's request, Field notes, Vitals and Nearby use a distinct drag
handle beside minimize. Client-session normalized positions remain anchored on
release, including through viewport/UI-scale changes, and clamp inside the new
viewport. Double-clicking the handle resets its position. This supersedes the
scale-reset behavior above for these three cards; no layout is saved to disk.
Their expanded outer sizes and the action dock size depend only on viewport and
UI scale. Scrollable bodies reserve scrollbar gutters and wrap live text; the
headings and action buttons stay outside those bodies. Thus temporary text and
scrollbar thresholds cannot resize/reposition the outer panels. This reuses the
pinned toolkit and existing pointer-capture boundary; biological authority,
protocols, dependencies and headless APIs are unchanged.
## Amendment (2026-10-26): cellular card edge resizing
The maintainer requested draggable panel edges. Field notes, Vitals and Nearby
now use native toolkit edge/corner resizing within bounded minimum/viewport sizes.
Client-owned expanded dimensions are stored in unscaled UI units for the session;
collapse retains them, viewport changes clamp them and the heading's double-click
resets both placement and size. Live text cannot change the chosen dimensions.
The adapter owns the toolkit's border hit margin from the first pointer event,
including presses just outside a panel. No simulation, wire or dependency changes.
+31
View File
@@ -197,3 +197,34 @@ the pod-side checks (ready, listener bound) could not show this. Decision:
Service UDP 7400 -> NetworkPolicy UDP 7400 -> evo-region M10 listener`, with the dev CA
and issuer key read from the authorized cluster Secret without printing or persisting
them. Until that is recorded in VALIDATION.md the route is not declared working.
## Amendment 2026-10-27: Session windows in SQL, opened from the admin portal
Maintainer decision (ADR-0182 discussion). Committing the window to Git meant a push and a
full Argo sync for every opening or extension, and an expired window made the region exit
and crash-loop until the next sync. The window moves to the database:
- **Record.** Schema 62 adds the append-only `evolution.session_windows` (world, region,
activation id, absolute UTC expiry or none, author, reason, time written). A row with an
expiry opens or replaces the window until then; a row without one closes it. The table
refuses updates, deletes and truncation, and a window may end at most **four hours** after
it is written (the maximum is unchanged).
- **Writing.** Only the admin group role, through `admin_set_session_window_v1`, from the
admin portal (Open or Extend for 30 min to 4 h, Close). The author is the signed-in
admin's email and Keycloak subject. The runtime group may only read the newest row
(`load_session_window_v1`).
- **Reading.** The cellular region runs with `--session-window-source db` and reads the newest
row every 5 s on its session-ledger connection. A newer activation replaces the window
without disturbing open sessions; a closing, expired, over-long or missing row closes it.
Each admitted window keeps its own absolute deadline, a window once closed never reopens
(only a newer activation opens sessions again), and an unreadable database leaves the
current window to close at its deadline.
- **Closed means closed.** While no window is open, every Hello is refused with `shutdown`
before signature work, and closing closes the open sessions. Previously the cellular
bridge closed the sessions once at expiry but still admitted new ones. The region keeps
running while closed instead of exiting.
- **Git.** `REGION_SESSION_WINDOW` and the pre-push refresh are removed; the policy check
requires `--session-window-source db` and refuses a committed window. A fixed
`--session-window` remains for the lineage/primitive bridge and process tests.
The elapsed-time guard of the 2026-10-08 clock amendment is still pending.
@@ -1,6 +1,18 @@
# ADR-0098: M11 first cellular loop decisions
## Status
2026-10-19: [ADR-0163](0163-structural-inheritance-and-offspring-succession.md)
amends the target gameplay with offspring-only structural expression, birth-time
one-way control succession and NPC-parent continuity. The decisions below retain
their historical M11 implementation meaning until a new version is qualified.
2026-10-21: [ADR-0177](0177-cellular-regions-world-linkage.md) amends decision 4
for new cellular rules: logout takes effect after a delay during which the cell
stays vulnerable; afterwards it is anchored in place, cannot be engulfed, is not
moved by currents, and its metabolism and thermal response are frozen. This
replaces the vulnerable linger. A fresh life is also offered a choice of region.
Accepted for M11 (2026-10-09). M11.1 records these decisions; nothing is implemented
yet. The maintainer chose each one from presented options on 2026-10-09. They are game
rules for the first playable loop, and changing one needs a new decision.
@@ -78,3 +78,22 @@ test exact retry, stale identity/context, credit carry, no opening-reserve
credit, checkpoint restore and `NDEBUG`. The durable mutation selection and its
genome/archive/resource publication remain a later segment. No ranked score,
class tree, NPC mutation or automatic reroll is introduced.
## Amendment (2026-10-15): declining an offer
Playtesting showed an offer whose candidates the cell cannot afford stays open
indefinitely: an unaffordable choice is refused without consuming the offer, and only
one offer is issued at a time, so banked credit could never become a new offer.
- A v10 mutation choice (type 25) naming **operator 0** declines the exact
outstanding offer. It is admitted, reserved and published like any choice (schema
v40 accepts operator 0 in the reserved input and the trace selection). Its reserved
successor identity stays unused, which the allocator permits (gaps, never reuse).
- At its tick the owner consumes the offer and changes nothing else: no genome
revision, no inventory change. The published result is **3, declined**, reported to
the client as `committed`.
- As before, a declined offer earns no replacement. A later offer needs feeding
credit, but credit already banked while the offer was open can produce the next
offer immediately.
- Older traces never contain operator 0 (the decoders refused it), so their replay is
unchanged and no rules version is needed.
@@ -131,3 +131,28 @@ the later 11.4d client action and review UI are complete.
extends v10 before any v10 server reaches DEV; v1-v9 are unchanged.
- Remaining after this: the client choice and review UI (maintainer) and the
11.4d playtest notes.
## Amendment: durable mutation queue (schema 59, 2026-10-22)
The exact-tick rule above assumed that reserving a choice and committing a batch were
serialized on one connection, one tick at a time. Rules-12 regions commit a batch of
ticks on a background thread while the next batch is simulated (ADR-0178 follow-up), so
a choice reserved for "head + 1" could land in ticks already simulated or being
committed. The batch was then refused (losing its ticks), or, when the commit's check ran
before the reservation committed, the reservation was left for a tick that had passed
and stalled the region on DEV (tick 9752).
- A reservation's tick is now the earliest tick the choice may bind at. The region
binds a queued choice at the first tick it simulates after admitting it; the
mutation record carries the tick it bound at, and the rest of its input must equal
the reservation's. Stored rows are unchanged, so a reservation whose tick already
passed binds at the next commit that carries it.
- The "omits a reserved mutation" refusals are removed: an unbound reservation waits in
the queue. The host keeps every unbound reservation queued (and reloads them on
recovery), and the open batch binds those the commit in flight does not carry.
- A choice can outlive its life while it waits. Its selection then names a life that is
gone; the owner records `life_died` and changes nothing, and trace matching and
recovery accept such a selection when no life with its ID remains.
- Recovery takes each bound choice's tick from its trace selection, not from the stored
input.
- Births still enter only a fresh batch on the durable head.
@@ -52,6 +52,27 @@ after each death.
- While a life is active, a new request is still a permanent `existing_life`
refusal for that request id.
#### Birth refusal scheduling clarification (2026-10-15)
An expected nursery funding, placement, or existing-life refusal must not reject
the entire region tick. The scheduler's `append_with_birth_refusals` separates
these requests from accepted births, advances the ordinary tick, and returns
transient refusal reports. Strict `append` retains its all-or-nothing contract.
Malformed input or unexpected biological errors still reject the append.
After confirmed publication, the host removes refused requests from its spawn
queue and records the existing lease-fenced `reject_primitive_life` result. An
uncertain database answer stays unknown; a bounded transient cache withholds the
request from spawning while an exact request/query reconciles it, including after
account control takeover. After cache eviction or process recovery, the durable
reservation is checked again before any retry. No refusal is reported as final
until the store confirms it. A lost, unacknowledged report may be re-evaluated;
a durable refusal remains final for that request ID.
No nursery refill, alternate spawn rule, protocol/schema revision, simulation
version or replay format is introduced. Refused births are absent from the
committed trace; accepted births still use the existing publication transaction.
### Old sessions
- A carried action whose account has no living life, or that names a patch the life
@@ -45,3 +45,15 @@ inferring it from a vanished view. v1-v9 are unchanged.
touching cell too large even with the thinnest membrane, 7 a touching cell small
enough but defended by its membrane. Value 3 (no eligible prey) is no longer sent.
Who is engulfed is unchanged.
## Amendment (2026-10-15, bud cost)
A playtester could not tell why a bud failed or what it needed. The v10 cellular
perception now carries the bud cost after the diagnostics block: the energy
(construction plus the bud's 30 s provision) and matter per channel that one bud
takes from the reserve once the cell is fully grown and undamaged. It is computed by
the same `fund_bud` the owner uses, against an ample reserve (`biology::bud_cost`),
so a reserve covering the shown cost on every channel is exactly a reserve that can
bud. The server caches it per genome. It does not depend on tick effects; all zero
means the genome cannot bud. The client shows the cost and names the channels it is
short on. The v10 perception grows by 40 bytes, so v10 clients must be rebuilt.
@@ -0,0 +1,129 @@
# ADR-0131: Keycloak login and the grant broker
## Status
Accepted (2026-10-15). DEV first; stage and World0 need their own realm, issuer key
and review.
## Context
Region servers accept 160-byte session grants signed with an ECDSA P-256 issuer
key (ADR-0091). Grants are single-use per account: each carries a serial that must
exceed the newest one the world accepted, and a session can be extended with a
newer grant (`SessionRefresh`). Until now grants were minted offline by
`evo-session-probe grants` with the issuer key on the operator's host, for
hand-made accounts. Players need to register, log in and log out, and grants must
never be minted on a client.
## Decision
### Identity
- Keycloak realm `aeternalis` at `auth.aeternalisgames.com` is the identity
provider: registration, email verification, password reset and MFA live there.
Users sign in with their email.
- The game client is the public client `aevolution-game`: authorization code with
PKCE S256 in the system browser, redirect `http://127.0.0.1:47600/callback`
(RFC 8252 loopback). Device authorization is enabled for test tools.
- An audience mapper adds `aevolution-grants` to access tokens. Access tokens live
5 minutes; refresh tokens rotate and are single-use.
### The grant broker (`evo-grant-broker`)
- A small HTTP service behind `grants.aeternalisgames.com` (TLS at the ingress).
It holds the issuer private key (Secret `aevolution-grant-issuer`) and a database
login; it never calls Keycloak. It verifies access tokens itself against the
realm's public keys, pinned from the realm's JWKS in Git (a Keycloak key rotation
is a Git change and a sync).
- `POST /grant` with `Authorization: Bearer <access token>`: the token must be an
RS256 access token (`typ` Bearer) from the realm issuer, for audience
`aevolution-grants`, authorized party `aevolution-game`, unexpired (30 s
leeway), with a subject and a verified email. The broker maps (issuer, subject)
to a stable game account, created on first use, so registering is the first
login. It takes the next grant serial for that account (above any serial the
world has accepted), routes to the region holding the account's active life or
else the configured default region, and returns a 10-minute grant with the
region's endpoint.
- `POST /logout` with the same bearer: the account's accepted serial is raised past
every serial issued so far and its current control is expired. Outstanding grants
are then stale, and a live session closes at its next control renewal (at most
5 s). Refused tokens get 401 with a JSON reason (`invalid_token`, `token_expired`,
`email_not_verified`, `token_not_for_this_service`); a second grant for the same
account within 2 s, 429; an unreachable database or unrouted region, 503.
- `GET /healthz` for probes.
- Responses carry no secret but the grant itself; nothing logs tokens or grants.
### Database (schema v39)
- `account_identities(issuer, subject, account_id, last_serial, created_at)`.
- `issue_account_grant(world, issuer, subject)` and
`revoke_account_grants(world, issuer, subject)`, SECURITY DEFINER and granted to
the runtime group role. The broker logs in with its own login in that group (DEV);
a dedicated broker role is a later least-privilege step.
### Client contract
1. Sign in (authorization code + PKCE), keep the refresh token in the OS credential
store, never on disk in clear.
2. `POST https://grants.aeternalisgames.com/grant` with the access token. The JSON
answer is `{"grant":"<base64>","account":"<uuid>","region":N,"endpoint":"host:port",
"server_name":"name","expires_at":unix_seconds}`.
3. Connect with the grant. About one minute before `expires_at`, refresh the access
token if needed, fetch a new grant and send `SessionRefresh`.
4. On logout: `POST /logout`, then revoke the refresh token at Keycloak's revocation
endpoint.
### Client implementation (Windows engineering client)
- `evo_client_auth`: the protocol parsers (`protocol.cpp`), one worker thread
(`AuthClient`, `client.cpp`) and the Windows platform (`windows.cpp`). On other
systems sign-in is unavailable, and the manual grant-bundle path remains.
- Sign-in opens the system browser with PKCE S256 and a random state. A loopback
listener on `127.0.0.1:47600` accepts exactly one `/callback` with that state and an
`iss` of the realm, if present. The password never reaches the client.
- The refresh token is stored only in Windows Credential Manager
(`AeternalisEvolution/DEV/refresh-token/v1`, plus `/<profile>` for `--profile NAME`,
so several clients on one machine can hold different accounts). Authorization asks
for `prompt=login`: Keycloak ignores `select_account`, and reusing the browser's
single sign-on session would always pick the same account. Rotation removes the stored token
before it is sent, so a lost reply ends the login instead of replaying a consumed
token. Access tokens and grants stay in memory and are zeroed when dropped.
- A grant reply is accepted only if its JSON agrees with the grant record: marker,
version, dev environment, account, region, expiry (at most 15 minutes ahead) and a
nonzero serial. The region still verifies the signature.
- The region CA file is still required from the launcher. Endpoint and TLS name come
from the broker's route.
- The session asks for a new grant about 60 s before its expiry, extended by each
accepted `SessionRefresh`, and after a lost connection. It never asks for a session
that was superseded or cancelled. Requests are at least 5 s apart.
- Sign-out closes the session, then calls `/logout` (broker revocation) and Keycloak
revocation, and clears the stored token. If revocation cannot be confirmed, the
client says so: issued grants may live until they expire.
### Deployment (DEV)
- `deploy/kubernetes/grant-broker-dev`, a component of `region/dev` so it runs the
same pinned server image (`/usr/local/bin/evo-grant-broker`). One replica,
non-root, read-only root filesystem, port 8080, probes on `/healthz`.
- Out of band in `evolution-dev`: Secret `aevolution-grant-issuer` (key `issuer.key`,
the raw 32-byte dev issuer scalar), Secret `aevolution-grant-broker-pg`
(`pg_service.conf` with service `[evolution]`, `pgpass`, `ca.crt`) and the Ingress
for `grants.aeternalisgames.com` (the Argo project admits no Ingress).
- Public access is HTTPS on 443 only, terminated by ingress-nginx. Port 8080 is the
in-cluster backend: a ClusterIP Service, and a NetworkPolicy that admits only the
ingress-nginx pods and nothing on the LAN. Egress goes to PostgreSQL only.
- The grant lifetime (600 s) must stay within the region's
`REGION_M10_MAX_GRANT_LIFETIME`.
## Alternatives
- **Verify Keycloak tokens in every region:** rejected; it changes the Hello wire
format, puts identity mapping in every region and spreads key rotation.
- **Long-lived grants without refresh:** rejected; a stolen grant would stay usable.
- **Our own password store:** rejected; Keycloak already provides it properly.
## Consequences
Players log in with an email account; the issuer key leaves the operator's host for
a Secret; hand-minted grants remain for tests. A new login supersedes the old
session (unchanged). Revocation is immediate within one renewal.
+56
View File
@@ -0,0 +1,56 @@
# ADR-0132: Cellular balance, rules 6
## Status
Accepted (2026-10-15). Tunable trial values for DEV playtesting, not final balance.
## Context
The first sign-in playtest (DEV region 100/5) showed mutation offers the arena could
never pay for. "Increase Membrane" asked a founder for about 200 million fg of carbon,
4.4 times all the food carbon in the 10 × 10 mm arena, and raised upkeep 48-fold. Under
ADR-0118 a mutation's matter cost is the physical difference between the current and
successor bodies, so it cannot be discounted without creating matter. Only construction
energy is overhead, paid into heat.
Two things set that cost: the mutation step, one hundredth of each capability's
declared range (ADR-0099), and the construction energy rate of the genome's development
version.
## Decision
The maintainer asked for costs cut by about two thirds. Rules 6 do that without
breaking conservation:
- **Genome schema 3:** schema 2's capability table and units, with mutation steps a
third as large (1/300 of the range). Successor bodies differ a third as much, so the
matter a mutation needs, and its upkeep change, fall with them.
- **Development version 3:** version 2 with construction energy 13 pJ per 1000 fg built
instead of 40. This lowers the energy of every construction (mutations, buds, founder
bodies). Matter, metabolism and rates are unchanged.
- **Founder 2:** schema 3 and development 3. Its body, upkeep and reserve equal founder
1's; only the construction energy paid from the nursery is lower.
- **Rules 6** are rules 5 with founder 2. They add no state, so they keep owner format
6. The `cellular-v5` opening creates them, with version bundle v7
`{6, 6, 1, 1, 1, 3, 2, 2, 1}` (development 3, founder 2). Schema v41 normalizes v7 like
v6 and binds its births.
- A lineage keeps its schema and development version (ADR-0099): existing regions and
genomes never change, and replay of committed history is unaffected. Only rules-6
regions found the new versions; their descendants inherit them.
The DEV world moves to a new rules-6 region with more food (see the M11.9 plan).
## Alternatives
- **Discount the matter cost:** rejected. The successor body really holds that matter,
so a discount would create it.
- **Scale constants in place:** rejected. It would reinterpret existing genomes and
change the replay of committed history.
- **Only cut construction energy:** rejected by the maintainer. Matter costs would stay
unaffordable.
## Consequences
Mutations change traits more gradually, so a player needs more mutations for the same
change, each about a third of the cost. Buds and founders cost less energy. Old regions
keep their balance until retired.
@@ -0,0 +1,92 @@
# ADR-0133: Ecological identity, viability evidence and time boundaries
## Status
2026-10-19: [ADR-0163](0163-structural-inheritance-and-offspring-succession.md)
accepts structural offspring expression, one-way birth succession and retained
NPC-parent behavior as target gameplay. Its implementation is pending; the fixed
controller and autonomous-mutation deferrals below describe the existing baseline.
Accepted for M12.1's engineering evidence contract and explicit design deferrals
(2026-10-15). No runtime, biological rule, classification algorithm or persistent
format changes. This does not accept M11's product review or qualify a tier model.
## Context
M12 needs a vocabulary that cannot mistake an empty region for a dead lineage.
ADR-0034's archive can answer only for the organisms it records. ADR-0036's cohort
counts and residuals do not establish viability. ADR-0041 rejects all tested
aggregation widths; conservation and deterministic replay do not repair their
false extinctions. M11 now has funded wildlife, permanent death and frozen offline
players, but the M11.9 repeated-life product acceptance is not recorded.
The founding vision requires player-origin ancestry, permanent history, optional
intelligence and no biological progression while a player is offline. New species,
autonomous mutation or outage mortality must not be inferred from measurement code.
## Decision
Use [ECOLOGICAL_IDENTITY_AND_TIME](../biology/ECOLOGICAL_IDENTITY_AND_TIME.md)
and the [v1 evidence contract](../../schemas/ecology/identity-and-time-v1.md).
- A genome identity denotes an immutable versioned record. A lineage query names
an anchor genome and includes that genome and its descendants; a founder-rooted
lineage includes all its branches. Organism ancestry and genome ancestry remain
distinct. Neither a cohort sample nor a species label invents an individual parent.
- Species are optional, derived and versioned classifications. No species threshold
or algorithm is selected. No plant/animal classes, intelligence requirement,
capability gates or progression mechanics follow from classification.
- Evidence has explicit world/branch, lineage scope, simulated boundary, ownership
coverage and uncertainty. Incomplete evidence yields unknown; local absence is
scoped. Terminal extinction requires reconciled absence of all living members
and viable reserves, with transfers settled or counted, at a complete watermark.
M12.7 must implement and validate that reconciliation before any terminal claim.
- Suspended living players prevent terminal extinction. Dormant cells and funded
eggs/spores would also count if an accepted biological implementation establishes
their viability; they are examples, not newly implemented life stages. Unknown
viability blocks extinction. Generic nutrients and unbacked fractional density
do not establish a recoverable organism.
- Continue M11's exact-copy budding heredity and fixed bounded wildlife controller.
Autonomous mutation, recombination and heritable/evolving behavior are explicitly
deferred pending biological rules, funded transitions and seeded ensemble evidence.
This is a deferral, not a permanent prohibition on autonomous evolution.
- Time means committed simulation ticks at the versioned quantum. Recovery replays
committed inputs; it does not infer biology from elapsed wall time. Whole-world
outage catch-up remains explicitly deferred; retain the existing pause behavior.
A future catch-up policy requires a separate scoped ADR and clone comparison.
M12.4 must service admitted ecological intervals without silently skipping work,
report backlog/freshness, and keep controlled offline biology frozen throughout.
## Alternatives considered
Declaring extinction on zero active count ignores suspension and migration.
Treating fractional density as an individual invents unfunded viability; rounding
it away conceals uncertainty. Selecting a species distance, NPC mutation probability
or wall-time mortality now would turn unresolved experiments into game rules.
Calling the M4 fixture a cellular population model conflicts with ADR-0041.
## Benefits
Evidence can be reviewed before distributed reconciliation exists. Identity survives
reclassification, tier changes and extinction. Existing M11 behavior and retained
history keep their meaning.
## Costs
No classification or autonomous divergence is delivered. Global extinction and
unattended ecology remain later implementation work; uncertainty may persist until
all required owners and stores can be reconciled.
## Risks
A documentation schema cannot enforce cross-worker completeness. A future adapter
must prove coverage rather than fill in zeroes. M11 playtest acceptance, a qualified
M11-compatible population model and target-host fallback budgets remain prerequisites
for automatic tier selection, even if every worked history is consistent.
## Consequences
Review the worked histories against the founding vision, M11 heredity/freeze and
existing archive/cohort contracts. Keep runtime versions and goldens unchanged.
Track unresolved prerequisites in the [M12 delivery plan](../engineering/M12_DELIVERY_PLAN.md).
Stop M12.3-12.5 implementation expansion while M12.2 qualification is unmet.
@@ -0,0 +1,79 @@
# ADR-0134: Exact reserve-strata population experiment
## Status
Accepted for the isolated M12.2b research instrument (2026-10-16). No runtime
tier policy, biological rule, public API, persistent version or golden changes.
## Context
ADR-0041 and M12.2a reproduce false extinctions when an age class pays upkeep
from its mean reserve. Narrower age bins do not reliably repair this. Before
approximating M11 cellular ecology, test whether retaining exact age/reserve
variation removes that mechanism in the original synthetic model.
## Decision
Add an experiment using exact per-member age/energy/matter, run-length encoded
only across contiguous identities with identical state. Retain monotonic identity
ranges and oldest-first, then identity-first birth priority. Partial reproduction
splits a range; equal newborns can share a range. Dead members leave the working
representation; no averaging, resampling, age reset or death-rounding occurs.
Keep the existing failed fixture, benchmark and goldens unchanged.
Predeclare the acceptance instrument before measurement:
- Every tick must exactly match identified living portraits, population, reserve,
cumulative births/deaths, environment, detritus and conserved totals against the
retained individual reference. No terminal-only tolerance. Any mismatch fails.
- Revisit supplies 240/300/360 for 10,000 ticks from the original 100 founders.
- Seeds 0-7 are development and 8-15 held out. For each seed, test supplies
180/240/300/360/480 for 1,500 ticks. Generate blocks of five identical founders
with seeded heterogeneous ages/reserves, so both compression and variation occur.
These are declared synthetic regimes, not M11 calibration or diversity evidence.
- Check contested partial births with same-age unequal reserves, empty/dead input,
fragmented identities, conservation and interval partitioning without enlarging
the model's one-tick integration quantum.
- Report local time, peak active rows, state payload and vector capacity alongside
error. Timing runs exclude verification and setup; no portable timing assertion.
Report the historical reference's retained-dead-row bias explicitly. Include an
identified compact-individual cost control that retires dead rows while keeping
birth priority, and check its identified outcomes against the same reference.
The candidate representation is **not** Cohort v1: that contract retains only
age-class totals and cannot recover the exact reserve distribution. No converter
is provided that silently upgrades v1. This experiment retains identified state;
it must not be described as statistically sampled ancestry or a production model.
## Alternatives considered
Changing the old fixture would invalidate the rejection evidence. Exact individual
rows provide a useful control but cannot demonstrate any grouping benefit. Reserve
bins that still mix viable and starving members need an error/viability model;
test the exact sufficient-state control first. Directly wiring the old aggregate
into the cellular owner remains prohibited by ADR-0041.
## Benefits
Tests a specific repair with an independent implementation of interval accounting
and identified outcomes. Shared scalar Rule predicates keep the synthetic biology
constant while the representation changes.
## Costs
Heterogeneous states may require one row per living member. Identity order can
prevent merging otherwise identical states. Per-tick splitting and sorting cost
time and temporary memory; report rather than assume a speedup.
## Risks
This single-genome, nonspatial fixture lacks M11 controller, contact, predation,
mutation, budding placement and suspension. Exact synthetic fidelity does not
qualify current cellular workloads or establish a target-host fallback budget.
## Consequences
Add release-safe CTest coverage and run formatting, analysis and ASan/UBSan for
the experiment. Publish results with limitations. M12.2 remains open until M11
paired ensembles, supported-state admission and target-host cost/error evidence
are accepted; M12.3-12.5 remain dependent on that qualification.
@@ -0,0 +1,204 @@
# ADR-0135: Behaviour-driven evolution and budding colonies
## Status
2026-10-19: [ADR-0163](0163-structural-inheritance-and-offspring-succession.md)
separately accepts structural offspring expression, one-way birth succession and
NPC-parent continuity. Colony geometry/coalescence and the other proposals below
remain unimplemented. This draft's rules/schema numbers are provisional: actual
rules 7–9 now identify other accepted changes and must not be reused for this draft.
Proposed (2026-10-16) by the maintainer after the first sign-in playtests. Design for
three rules versions, each to be built and playtested on its own: rules 7 (weighted
offers), rules 8 (colonizing buds) and rules 9 (steered colonies and coalescence).
Every number marked **tunable** is a trial value. Nothing here is implemented yet.
## Context
Mutation offers are seeded, uniform draws from the 28-operator catalog (ADR-0120): what
a cell does has no effect on what it is offered. A decline consumes the whole offer
(ADR-0120 amendment). Every bud becomes independent wildlife (ADR-0125). The roadmap's
multicellular transition (M14.2, "funded multicellular development") has no earned
path into it.
The maintainer's intent: a cell's **behaviour decides how it evolves**, and therefore
what kind of multicellular organism it can become. Budding is the bridge. A bud may
stay attached to its parent and grow a colony that the player steers. Given time, a
colony may coalesce into a multicellular organism.
## Decision
### Rules 7: behaviour-weighted offers
**Behaviour record.** Each owned life keeps cumulative counters, updated once per
committed tick by the authoritative owner and stored in its state, so replay and
recovery reproduce them exactly:
- distance moved (µm) and ticks spent moving;
- ticks spent still (no movement requested);
- energy acquired from food (the credit ADR-0120 already counts);
- buds attempted and produced;
- engulfs attempted and succeeded.
Offline (frozen) ticks add nothing (ADR-0128). Wildlife keeps no record.
**Trait families.** Every catalog operator belongs to one family; families have
related families:
| Family | Operators (capability, effect) | Fed by | Related |
|---|---|---|---|
| Locomotion | movement up/down/acquire/shed | moving | Feeding |
| Feeding | ingestion, energy conversion | eating | Locomotion, Growth |
| Growth | target size | eating, budding | Feeding, Reproduction |
| Defense | membrane | being engulfed, staying still | Growth |
| Reproduction | reproduction | budding | Growth |
| Environment | thermal tolerance | (none yet) | (none) |
**Weights.** When an offer is drawn, each eligible operator gets an integer weight in
per-mille:
- **Base:** 1000.
- **Behaviour:** × (1000 + 2000 × the share of this life's activity that feeds the
family) / 1000 (**tunable**). A cell that only moves draws locomotion three times as
often as an unrelated family.
- **History:** × the operator's bias, starting at 1000.
- An accepted mutation multiplies its own operator's bias by 1.25 and its family's
other operators' by 1.10.
- A declined candidate multiplies its own bias by 0.80, its family's other
operators' by 0.92, and related families' operators' by 0.97 (all **tunable**).
Declining cold tolerance therefore makes every temperature trait rarer, and
feeding traits slightly rarer if it were a feeding trait.
- **Floor and cap:** each final weight is clamped to 100–4000 per-mille. **Nothing is
ever ruled out**: the floor keeps every strategy reachable, as the locked "no linear
mutation tree" requirement demands.
The draw is weighted sampling without replacement from the existing seeded stream
(seed, stream, event index: ADR-0120), in checked integer arithmetic, so it is exact
and replayable. Biases are life state. Candidates are still **shown in operator order,
unranked**; only their chance of appearing changes.
**Per-candidate decline.** A v10 mutation choice may decline **one** candidate of the
exact outstanding offer. The candidate leaves the offer and is not replaced, and its
decline bias applies. The offer stays open with the rest. Declining the last candidate
consumes the offer. "Decline all" (operator 0, schema v40) applies the decline bias to
every candidate shown. A decline never earns a replacement: the next offer still needs
feeding credit (ADR-0120). The wire form is a new choice kind; the details belong to
the implementation ADR amendment.
### Rules 8: colonizing buds
**New capabilities** (genome schema 4, development version 4):
- **Colonization**, per-mille: the chance a bud stays attached. Founders start at 0, so
rules-8 founders bud like today until they evolve it.
- **Budding efficiency**, per-mille: lowers the construction energy and the bud's
provision. Matter is never discounted (ADR-0118): a cheaper bud is a smaller or
thriftier one.
- **Budding rate:** the minimum interval between buds.
- **Movement efficiency:** cheaper movement per µm. Fed by moving.
- **Mutation rate:** less feeding credit per offer. Fed by eating.
These join the families above, and reproduction-family operators are the ones budding
behaviour pulls toward.
**The bud roll.** A funded bud draws, from the seeded stream keyed by (region, parent
life, bud sequence), whether it is **attached** (draw below colonization) or
**detached**. The result is recorded in the trace like any outcome, so replay does not
redraw it.
- **Attached:** the bud joins its parent's colony. It belongs to the parent's account,
has its own body and reserve, and stays in contact with a member of the colony. The
colony has a bounded size (16 members, **tunable**); a bud that would exceed it is
detached instead.
- **Detached:** unowned wildlife, as today, with a **home anchor** at its birth
position. The wildlife controller keeps it within 2 mm of its anchor (**tunable**).
When its parent's account logs out, every detached bud of that parent re-anchors at
the parent's last position, so a player's detached colony stays where they left it.
**Logout.** Attached members are the player's organism. They freeze, linger and
suspend with the parent, exactly as the parent does (ADR-0128), and resume with it.
Detached buds are wildlife and keep living (ADR-0125).
### Rules 9: steered colonies and coalescence
**One body, separate reserves.** The player steers the colony as one body: movement
intentions move every attached member together, keeping their attachments. Each member
keeps its own reserve and feeds from any patch it touches. Members pay their own
upkeep, and the colony's movement cost is shared in proportion to mass. A member that
starves dies, becomes a corpse and detaches. Engulfing and budding are colony actions,
performed by the member best placed for them.
**Permadeath.** The life is the colony's founding cell. When it dies, the life ends
(ADR-0127). Surviving attached members detach as wildlife with their own reserves.
Nothing is resurrected.
**Coalescence.** Once a colony has held at least 4 members (**tunable**) for at least 5
minutes of active play (**tunable**), offers may include **Coalesce**. Choosing it is a
funded transition (ADR-0118):
- the members' bodies and reserves combine, channel by channel, into one multicellular
organism, with construction energy for the junctions;
- nothing is created or lost;
- the colony's history (its size, and which families its members evolved) becomes the
organism's starting body plan.
This is the entry to M14.2. What that organism can then develop into, and how it
enters the 3D habitat (M14.3), is M14's decision, not this ADR's.
## Locked requirements
- **No linear mutation tree:** satisfied, because the weight floor keeps every operator
reachable and offers remain unranked.
- **Absolute permadeath:** a dead founder ends the life; colony members never carry it
on.
- **No account-age advantage:** behaviour records and biases are life state. A new life
starts uniform.
- **Offline fairness:** attached members freeze with their owner; detached wildlife is
independent.
- **Biological costs and conservation:** every new effect is funded; cheaper budding
lowers energy or bud size, never matter.
- **Shared presentation:** colonies and wildlife render by the same rules as everything
else.
## Versions
- **Rules 7:** owner format 7 (behaviour record, biases, per-candidate decline state),
a version bundle and schema migration, a new choice kind on the wire, and a new DEV
region.
- **Rules 8:** genome schema 4 and development version 4 (new capabilities), owner
format 8 (colony membership, home anchors), a trace outcome for the bud roll, a
version bundle, a migration and a region.
- **Rules 9:** colony motion, shared costs and the Coalesce transition, with the same
version steps.
Each version keeps earlier regions and their history unchanged, as rules 6 did
(ADR-0132).
## Alternatives
- **Uniform offers (status quo):** rejected by the maintainer; behaviour would not
matter.
- **Deterministic paths (moving always offers speed):** rejected; it is a linear tree.
- **Rerolling declined candidates:** rejected, as in ADR-0120; it gives unearned draws.
Declining shapes later odds instead.
- **An automatic budding discount per bud:** replaced by the budding-efficiency
capability, so cheaper budding is evolved rather than granted.
- **Colonies sharing one reserve from the start:** rejected; the merged reserve is what
Coalescence earns.
## Consequences
Players read their evolution from their play: a mover drifts toward speed, a feeder
toward intake and size, a budder toward colonies. The client needs the behaviour record
and the per-family odds to explain offers ("offered because you move a lot"). The
playtests need telemetry on family shares, decline rates and colony sizes to tune the
numbers. A colony gives the multicellular transition a cause, and a recognisable
origin for each multicellular body plan.
## Open questions
- Which behaviours should feed Defense and Environment once threats and temperature
gradients exist?
- How many discards per offer, if declining should cost anything?
- How colony members attach geometrically (chain, cluster, sheet), and whether that
shape constrains the multicellular body plan.
@@ -0,0 +1,198 @@
# ADR-0136: Open energy, scattered nutrients and photosynthesis
## Status
Proposed (2026-10-16) by the maintainer after the region 6 playtest. Design for new
cellular rules versions, delivered in three steps (below), each built and playtested on
its own. Every number marked **tunable** is a trial value.
**Step A is implemented (2026-10-17)** as rules 8 on habitat format 2: bundle v9,
schema v43, session v11, the `cellular-v7` opening, served as DEV region 8. Where step A
differs from the plan below:
- **Boundary account:** not added yet. Step A creates nothing, so totals still equal the
opening; the account arrives with infall (step B).
- **Perception:** amounts travel as 16-bit log codes, 26 bytes per deposit. The view
carries the 512 nearest deposits.
- **Bubble size:** a bubble's contact radius is a fixed 30 µm; clients size its drawing
by its amount.
- **Bubble colour:** each bubble holds one channel, cycling through the channels the
opening stocks.
- **Placement:** three in ten bubbles fall in loose clumps. Positions come from the
genesis commit.
- **Pools:** the opening lists them explicitly with `--pool`.
- **Empty deposits:** removed from the habitat.
- **Intake targets:** ignored by the step, and the v11 client sends none.
Steps B (infall) and C (photosynthesis) are not implemented.
## Context
Food is a handful of 1 mm square patches (ADR-0120 habitat). Playtests show the loop
this creates: swim to the nearest square, sit on it until it is empty, repeat (M11.9
feedback, question 7). The space between patches holds nothing, so moving is only
travel, never foraging.
The world is also closed: every picojoule and femtogram comes from the opening stock,
and ADR-0024 rules out "a mint/burn API or perpetual light fixture". ADR-0025 already
noted that a finite source "models a prepaid budget, not a star". No planet works that
way. Sunlight arrives continuously, and impacts deliver fresh matter. A closed budget
also leaves no room for a cell that stays still and makes its own energy.
The maintainer's decisions:
- **Inflow:** sunlight every tick, plus rare infall events that deliver nutrients.
Matter otherwise recycles through death.
- **Eating:** by contact. A touched bubble drains over a few ticks while it pulses,
then vanishes.
- **Photosynthesis:** a mutation path, made likelier by staying still (ADR-0135).
- **Patches:** become a few rich pools, drawn as puddles, with bubbles everywhere in
between.
## Decision
### 1. An open region with an audited boundary
A cellular region gains a **boundary account**: cumulative counters of everything that
entered from outside, per channel (energy, C, N, P, other). They live in the owner state,
the checkpoint and the trace, like every other balance. Inflow is never minted silently.
It is credited from the boundary, and the conservation check becomes, per channel:
current total (lives + corpses + motes + pools + nursery + heat)
== opening total + boundary inflow
ADR-0024's ledger is unchanged: the boundary is one more reservoir with an unbounded
(u64-saturating, refused before overflow) opening. Its credits are deterministic
functions of the region configuration, the tick and the region seed, so replay and
recovery reproduce them without storing extra data. An inflow that would overflow a
u64 total is refused and recorded as skipped, never wrapped.
There are exactly two inflows:
- **Sunlight:** energy only, and only as much as photosynthetic cells capture in a
tick. Light that nobody captures is not modelled and never enters the books.
- **Infall:** an event that drops a clump of nutrient bubbles (section 3).
### 2. Pools and bubbles replace square patches
**Pools.** A few large, rich stocks at arbitrary µm positions, each with a radius.
Contact means a cell's footprint overlaps the pool's disc. A pool yields at most
**a quarter** (tunable) of a cell's intake rate per tick. Pools are still worth
finding, but sitting on one is slower than foraging. The client draws a pool as a
puddle: a noise-perturbed outline, seeded by the pool's position, with granules
coloured by remaining nutrient.
**Bubbles (motes).** Small, single-channel nutrient stocks scattered over the whole
region: energy, carbon, nitrogen, phosphorus or other. Each has an id, a µm position,
a channel and an amount. Its radius on screen grows with its amount. A seeded opening
generator spreads them with loose clumps, so no part of the region is empty.
**Opening density:** about one bubble per 0.25 mm² (tunable). A bubble holds about
**4 ticks** (tunable) of a founder's intake on its channel.
**Contact feeding.** Every committed tick, each living cell drains the bubbles and
pools its footprint overlaps, at up to its intake rate per channel. No action or
target is needed. Contention is resolved in a fixed order (cell id, then bubble id),
so the result is deterministic. A bubble being drained pulses; at zero it is removed.
The ADR-0120 intake target becomes unnecessary and is retired in this rules version.
Corpses no longer feed a patch: a corpse's detritus (ADR-0124) **breaks into bubbles**
at its position, one per non-zero channel, which closes the matter cycle.
**Limits:** at most 4,096 bubbles and 32 pools per region (tunable). A credit that
would exceed the bubble limit stays in the boundary and is recorded as skipped.
### 3. Infall
On a seeded schedule, averaging one event every **2 minutes** of simulated time
(tunable), an infall drops a clump of **12–24 bubbles** (tunable) with mixed channels
within a 1 mm disc at a seeded point. Its matter and energy are credited from the
boundary. Infall happens only while the region ticks, so an empty region accumulates
nothing (ADR-0128 offline rule).
### 4. Photosynthesis
A new genome capability, **photosynthesis** (genome schema 4), in a new **producer**
trait family related to stillness and growth (ADR-0135 families). Founders start at
zero. Mutation offers can raise it, and under ADR-0135 still ticks raise its odds.
- **Capture per tick:** irradiance × the cell's cross-section × photosynthesis
efficiency. Irradiance is a region setting, **0.5 pJ per µm² per tick** (tunable).
Capture is full on a tick with no movement and **a quarter** (tunable) while moving.
- **Cost:** photosynthetic organelles add body matter (paid like any mutation,
ADR-0118), raise maintenance and slow movement. A producer cell is a slow cell.
- **Matter is still needed:** light gives energy, never matter. A producer still
collects carbon, nitrogen and phosphorus by contact to grow and bud.
- **Wildlife:** a photosynthetic wildlife cell stays still while its reserve can pay
maintenance from light, and forages otherwise.
### 5. Perception and wire (session v11)
The owner's perception lists the pools and bubbles within the perception radius,
nearest first: up to 32 pools and 512 bubbles (tunable). A bubble entry is 12 bytes:
id (u32), x and y relative to the cell (i16 each, in 2 µm units), channel (u8),
amount (u8, log-scaled, enough to size and fade it) and a "being drained" flag. The
exact amounts the HUD needs (the cell's own reserve and bud cost) keep their v10
fields. v10 clients stay on regions of older rules versions.
### 6. Client
- **Bubbles:** circles coloured by channel (energy gold, carbon umber, nitrogen blue,
phosphorus rose, other grey), sized by amount. They pulse while drained and pop when
gone.
- **Pools:** puddles with granules that fade by channel as they drain.
- **Feed target:** the feed-target UI and its key go. Steering assistance (ADR-0129)
points toward the densest nearby bubbles.
- **Producer cells:** draw green organelles in proportion to their photosynthesis.
## Delivery
1. **Step A — bubbles, pools, contact feeding.** The boundary account (its inflow is
still zero), the motes and pools habitat, contact feeding, detritus to bubbles,
v11 perception, client rendering and the wildlife controller. A new opening profile
is provisioned as a new DEV region.
2. **Step B — infall.** Seeded infall events credited from the boundary.
3. **Step C — photosynthesis.** Genome schema 4, the producer family, sunlight
capture, producer wildlife behaviour and the client's producer look.
Existing regions keep their rules versions and are never migrated in place
(ADR-0119).
## Consequences
- Foraging becomes active: the best food is collected on the move. Pools reward
finding them, not camping on them.
- Energy is no longer a hard cap on a region's life. Matter still is, apart from
infall, so predation, scavenging and recycling stay central.
- Conservation stays exact and auditable: totals equal the opening plus recorded
inflow, and every replay re-derives the same inflow.
- The wire grows (up to about 6 KB per perception at 512 bubbles). That is acceptable
for DEV. Delta encoding is a later optimization.
- A stationary producer lineage becomes possible, which is the plant-like branch
ADR-0135's colonies and coalescence can build on.
## Alternatives considered
- **Keep a closed world and add more patches.** Rejected by the maintainer. It keeps
the camping loop and gives no basis for photosynthesis.
- **Steady nutrient rain.** Rejected in favour of rare infall, so matter stays scarce.
- **Every cell photosynthesizes a little.** Rejected. It removes the cost of idling and
the plant/animal split.
- **Instant absorption on contact.** Rejected in favour of a few-tick drain, so that
contact is visible (pulsing) and passing cells share food.
## Amends
- **ADR-0024:** a cellular region's boundary is an audited inflow reservoir. It is
not a mint and not a perpetual light fixture: sunlight credits only captured energy.
- **ADR-0025:** a region's energy source is no longer only a prepaid budget.
- **ADR-0120:** in the new rules version, square patches and the intake target become
pools, bubbles and contact feeding.
- **ADR-0124:** detritus becomes bubbles.
## Presentation amendment, 2026-10-22
The maintainer requested nutrient silhouettes, a thin enclosing pool membrane and
a more colorful liquid scene. The native client now uses nutrient-specific glyphs
inside the unchanged contact discs, with a zero-stock channel absent. These are
presentation symbols, not new chemical species, resource identities or membrane
physics. The existing single-channel deposit and contact-feeding contracts remain
unchanged. See [the scoped visual refresh](../engineering/CLIENT_VISUAL_REFRESH.md).
@@ -0,0 +1,96 @@
# ADR-0137: Percentage mutations, skilled budding and hunting wildlife (rules 7)
## Status
Accepted (2026-10-16) by the maintainer after the region 6 playtest. Implemented as
cellular rules 7: owner format 6, version bundle v8 and schema v42. The opening is
`cellular-v6`, served as DEV region 7. ADR-0135's proposed rules move up to the next
free numbers.
## Context
The region 6 playtest surfaced three problems.
**Mutation steps.** A step is a fixed slice of a trait's whole range: 1/300 under
ADR-0132's genome schema 3. For movement (range 0–2,000,000 µm/s) that is +6,667 µm/s,
33 times a founder's 200 µm/s. A single speed mutation turned a cell, and every bud it
made, into something that seemed to teleport between food patches. Steps never felt
like a percentage.
**Reproduction.** The trait was the share of the body invested in a bud. Raising it
made buds *bigger and dearer*. The maintainer wants the opposite: a reproductive lineage
should bud more cheaply and make more offspring.
**Wildlife.** Wildlife never engulfed anything, so a field full of buds posed no danger.
## Decision
### Genome schema 4: percentage steps
- **Steps:** a mutation step is a tenth of the trait's current value, at least 1, up or
down. Speed 200 → 220 or 180 µm/s. A lineage compounds.
- **Range:** steps that would leave the schema's range are refused, as before.
- **Gaining a trait:** an acquired capability starts at the founder's value for
movement (200 µm/s), ingestion and reproduction. Ten percent of a zero minimum would
never grow. Other capabilities still start at their minimum.
- **Units:** the table and units are schema 2's.
- **Existing lineages:** schema 1–3 lineages keep their own steps (ADR-0099).
### Development version 4: reproduction is skill
- **Bud size:** always half the parent's body. Development 3's rules and rates are
unchanged.
- **Cost:** reproduction takes `value / 2000` off the bud's construction energy, at most
half at value 1000. Founders (500) save a quarter. Matter is never discounted
(ADR-0118); the bud's body still has to come from the parent.
### Twins
On a bud action a seeded roll, unique to the parent and tick, allows twins with
probability `reproduction / 2` per thousand: 25% for a founder, at most 50%.
- **Affordability:** twins happen only when the parent could pay for one whole bud.
- **Split:** the bud investment is then divided between two buds, each about a quarter
of the parent's body. Twins are more offspring for the same cost, never extra matter.
- **Results:** the parent's reported result is the first bud's. A twin with no room is
simply not made.
### Wildlife engulfs
The rules-7 wildlife controller asks to engulf when it touches a cell the region step
would let it take: mass at least 1.5 times the prey's per micrometre of the prey's
membrane (ADR-0124). That includes players' cells. Otherwise it buds, feeds or wanders
as before. Its intents are recorded in the trace as always, so replay never runs the
controller.
### Rules 7 and region 7
- **Rules:** rules 7 are rules 6 plus founder 3 (schema 4, development 4), twins and
hunting wildlife.
- **State:** none new, so they keep owner format 6.
- **Bundle:** v8 = {rules 7, envelope 6, habitat 1, coordinate 1, genome 1,
development 4, founder 3, archive 2, mutation state 1}.
- **Schema v42:** admits the v8 bundle (manifest normalization and the birth-trace
binding).
- **Region 7:** the `cellular-v6` DEV opening, 30 × 30 mm, three times region 6 per
side. Food keeps region 6's density: 144 patches in a 12 × 12 grid. 64 founders are
funded at 9 spawn sites.
### Client
- **Callout:** the mutation callout is a small "Mutation [E]" pill, because offers come
often.
- **Descriptions:** candidate texts name the ±10% steps and the new meaning of
reproduction.
## Consequences
- Speed mutations change a cell visibly but sanely. Buds no longer outrun the eye.
- Reproduction becomes a reason to specialize in budding.
- Wildlife can kill, so a crowd of buds is both an army and a hazard. Your own cell can
be eaten by a larger descendant.
- **Region 6:** its cells stay in region 6, which is no longer served. Accounts with a
living region-6 cell are released with `tools/ops/retire-region-lives.sql` before
playing region 7.
- **Not decided here:** the client cannot yet tell which rules a region runs, so its
candidate texts describe rules 7.
@@ -0,0 +1,80 @@
# ADR-0138: Current cellular population reference instrument
## Status
Accepted for isolated M12.2c qualification tooling (2026-10-17). No runtime
aggregation, biological rule, public API, persisted version or golden changes.
M11.9 is closed for now by the maintainer with authorization to continue M12.
## Context
M12.2b repairs a synthetic averaging failure but cannot qualify spatial cellular
ecology. The current implemented baseline is rules 8: schema/development 4,
funded skilled/twin budding, hunting wildlife and finite contact-fed deposits.
ADR-0135 colonies and ADR-0136 infall/photosynthesis remain proposals. A later
population model must be compared against these actual supported cellular rules.
## Decision
Add a headless executable using the existing CellularLives owner as the exact
active reference. It generates player fixture intentions and records accepted
wildlife intentions once. Compare canonical batch encode/decode/replay in parallel
at 1/16/64-tick partitions, all at the existing 50 ms quantum. Partition 1 compares
full canonical state every tick; the other partitions compare at every batch
boundary. Restore checkpoints at completed boundaries and keep all identities,
inventory, archive, mutation eligibility and presence state unchanged.
Declare the instrument before measuring:
- Seeds 0/1 are development and 2/3 held out. Each uses rich and scarce finite
deposits, four equally funded player-origin founders and the rules-8 owner.
- The CTest suite uses 512 ticks per case. The full research run uses 8192;
report observed births, mutations, deaths and suspension rather than assuming
every regime exercises all paths. Report zero-coverage limits explicitly.
- Player fixtures first feed in place, then steer/ask to bud at declared intervals;
earned mutation selections use only the real offer and funded transitions.
Offline intervals freeze controlled lives, while wildlife continues through
the shared intention interface. This is an experiment driver, not a new AI rule.
- Zero tolerance for canonical state, conserved channel totals, demographic or
genome-identity divergence at compared boundaries. No false extinction inferred
from empty local observations. Distinct genome IDs and distinct capability
profiles are reported separately; neither is a species count.
- Record active population, snapshot bytes and local stepping/replay costs, with
verification, codec/restore and biology costs distinguished. These are
workstation observations, not accepted target-host fallback budgets.
No adapter feeds current cellular state into the synthetic strata record. Its
missing spatial/reproductive/deposit state makes such an admission unsupported.
This instrument is the exact control for later paired active/cohort qualification;
passing replay does not establish ecological approximation fidelity or scaling.
## Alternatives considered
Extending the old synthetic fixture with cellular labels would leave its biology
unrepresentative. Treating checkpoint replay as proof of aggregation would confuse
state closure with fidelity. Enabling a runtime selector before either a supported
model or target-host budgets exists remains prohibited by ADR-0041.
## Benefits
The reference follows the current ratified cellular behavior, exercises archive
and offline closure, and is independent of renderer, network, database and clocks
inside the owner. It provides reproducible inputs and observations for future work.
## Costs
Canonical checks, cloning and replay deliberately add measurement overhead.
Short CTests do not establish long unattended ecology or all demographic paths.
## Risks
The driver and owner are deterministic but the reference is not an independently
derived biological model. No approximate cohort, migration, global extinction or
production cost envelope is supplied. Changes to trial rules require a separately
identified reference baseline and preserved earlier evidence.
## Consequences
Run NDEBUG tests, clang-format/tidy and Linux ASan/UBSan. Publish measured coverage
and limits. Keep M12.2 cellular/cohort and target-host qualification open until
actual paired models meet accepted bounds; no automatic tier transition is enabled.
@@ -0,0 +1,63 @@
# ADR-0139: Exact retained-member cellular local cohorts
## Status
Accepted for the bounded M12 cellular population implementation, 2026-10-17.
The maintainer delegates M12.2 decisions to the implementing agent, subject to
later revision. This decision does not enable a production selector, increase
capacity, qualify approximate aggregation or authorize deployment.
## Decision
Replace the rejected M4 averaged model with an exact local model for rules 8.
A cohort groups wildlife of one genome in one region, retaining every member's
identity, position, birth tick, growth, damage, reserves, reproduction state and
ancestry. There are no bins, fractional members, random materialization samples,
mean reserves or statistical parentage. The residual is identically zero.
`CellularPopulation` exclusively owns one `CellularLives` store. Sorted membership
tags partition that store into active individuals and cohort members; they are
not a second inventory. The read-only biological view conveys no spending rights.
All actions execute through the population owner. Controlled cells, including
offline/suspended cells, never collapse. Collapse/materialize operates on the
entire eligible wildlife genome group, never a caller-picked healthy subset.
New offspring initially have individual representation. Dead membership is
removed after the successful atomic biological step.
The same bounded wildlife controller and complete shared interaction kernel run
at the existing 50 ms quantum, in the existing life-ID order. Cohort membership
cannot affect intake contention, movement, hunting, budding, mutation, death,
inventory or ancestry. The host submits only controlled intentions; it cannot
supply a different controller for cohorts. No autonomous mutation is introduced.
Biological rules, existing codec versions and old goldens are unchanged.
Keep regional approximation disabled. Do not silently substitute the old M4
model under overload. Retain the existing hard limit of 256 living cells per
region; new admissions backpressure rather than deleting incumbents. This is a
structural ceiling, not a measured service capacity. The operational target is
completion within the 50 ms tick, with measured tail latency and headroom on the
actual deployment host required before enabling a production selector. An
overrun must leave admitted ticks pending, not skip ecology.
Qualification is declared before results: reference seeds 0/1, held-out 2/3,
rich/scarce finite food, conversion oscillation every 1/16/64 ticks, paired full
canonical biology equality every tick. Zero demographic, biomass, diversity,
ancestry or inventory discrepancy is allowed, including false local extinctions.
Report conversion coverage and full owner costs, including active fallbacks at
16/64/128/256 lives. Bin sensitivity is inapplicable: no state is binned. Do not
infer unobserved predation, twins or long-term stability from passing cases.
## Consequences and limits
This resolves the unsafe averaging conflict for an exact local implementation
and permits work on its durable representation. It deliberately trades memory
and computation for fidelity. Cohorts currently provide ownership organization,
not population compression or a demonstrated speedup. The M12.2 target-host cost
gate and scalable approximate model remain open; do not mark the whole gate
passed solely on this decision. Production enabling and higher capacity require
new measured evidence. Future approximation requires a separate version/ADR and
paired evidence; it must not reinterpret these exact members.
The module lives in portable `evo::lifecycle`, independent of renderer, network,
database and clocks. The foundation proof and legacy ecology experiments retain
their existing boundaries. No arbitrary third-party dependency is added.
@@ -0,0 +1,47 @@
# ADR-0140: Exact population checkpoint and automatic local policy
## Status
Accepted for the portable M12.3 implementation, 2026-10-17. Production publication
and enabling remain separate gates. No live region changes or deployment.
## Decision
Persist exact biology and exclusive cohort membership together in population
envelope 1, never in a sidecar that can get ahead of its biological checkpoint.
Retain the existing nested rules-8 owner bytes without reinterpretation. Store
policy configuration and a monotonic conversion sequence. Recovery restores
the exact committed membership sample; it does not repeat a random allocation.
Exact members have no fractional demographic residual or sampling stream.
Provide detached conversion candidates: the predecessor remains untouched until
the caller publishes the entire candidate under the current durable ownership
fence. Pre-publication loss recovers the predecessor; confirmed publication must
recover the complete successor. In-memory success is not a durable receipt.
Sequence exhaustion refuses conversion before mutation. Unknown versions,
malformed bounds, noncanonical member IDs, wrong identity/tick, ineligible
members and corrupt checksums are refused.
An opt-in automatic policy runs only after a successful biological tick. Whole
wildlife genome groups materialize if any member is within 1200 micrometres of
an active/lingering controlled observer. They collapse if all members are beyond
1800 micrometres of every such observer, including when none exist. The band
retains current membership. Distances use lower-left positions in the existing
local coordinate frame. Suspended controlled lives are not observers and never
become cohort members. Unsupported wildlife presence keeps the group individual.
Radii are configurable, bounded, persisted trial policy rather than locked
biological constants. No state, phenotype, resource or ancestry changes at a
conversion. Defaults keep automation disabled.
## Boundary
The portable owner, codec and separate-process continuation checks implement
state closure. They do not supply a new PostgreSQL publication profile, durable
conversion trace, database fencing, lost-reply reconciliation or host integration.
Do not place this envelope under existing profile 4: that profile contains raw
CellularLives bytes. The new payload needs a dedicated profile/schema migration
and recovery/publication adapter before production use. Existing M7/M11 stores
and live sessions remain on their existing accepted formats.
This explicit boundary permits engineering work on the exact representation
without mistaking a local file test for production crash-consistent durability.
@@ -0,0 +1,55 @@
# ADR-0141: Cellular unattended tick demand and confirmed-head pacing
## Status
Accepted for the existing cellular worker, 2026-10-17. No biological rule,
checkpoint format, schema, deployment or World0 change. This is M12.4a, not
completion of population publication, durable interval admission or migration.
## Context
The worker only steps while it finds a player, a held birth or lingering cell.
Consequently wildlife stops when the last player leaves and linger completes.
An active offline cell restored without a session also never starts its freeze
transition. Resetting the deadline to completion time plus 50 ms further discards
running scheduling debt when work or publication is slow.
## Decision
For profiles supporting offline freeze (rules 5+), demand includes every unowned
descendant and each active/lingering controlled life. Suspended controlled stock
alone supplies no demand. A returning session or held birth still wakes the
worker. Historical profiles lacking freeze retain their previous session-driven
behavior; do not newly advance disconnected biology under those profiles.
Keep the existing shared wildlife controller, frozen controlled baseline, batch
builder and fenced PostgreSQL publication path. No new biological intent or
background balance is invented. There is at most one tick attempt per worker
loop, at the existing 50 ms quantum; batching or a larger timestep is not implied.
Use a portable pacing object that reads caller-supplied monotonic microseconds,
current authority epoch and confirmed head. It counts due ticks from a fixed
running origin. Only a confirmed head advance consumes debt. Refused work retries
at most once per quantum while preserving debt. Do not cap away accumulated debt,
delete lives to catch up or advance from an unconfirmed candidate. Reject clock
regression, same-epoch head regression and an unfenced ready origin. Tick/count
arithmetic must remain bounded at u64 limits.
Authority unavailability, epoch replacement, process restart and no tick demand
pause unadmitted wall time under ADR-0133. Existing uncertain publications still
resolve through the host's exact pending record before it becomes ready. This
pacer is not a durable interval queue or cross-worker fence. The existing host
continues to own that authority; no outage catch-up policy is introduced.
Expose debt and maximum debt through existing fixed-cardinality region metrics.
Checkpoint age measures time since the last confirmed head change/recovery;
readiness still independently states whether output may originate.
## Remaining M12.4 work
Population envelope publication and durable interval admission/recovery require
their own profile and store work. Biological migration needs exact genome/history
closure, source escrow and idempotent destination installation under both region
fences; the existing non-biological probe transfer is not that implementation.
No live biological migration, partition qualification or days-long ecology proof
follows from these scheduler checks.
@@ -0,0 +1,86 @@
# ADR-0142: Durable exact population profile and publication
## Status
Accepted for M12's opt-in engineering implementation, 2026-10-17. Extends
ADR-0139/0140 with a dedicated durable profile. Production enabling and target-host
qualification remain separate; no deployment or World0 operation is authorized.
## Context
The exact cohort envelope carries membership and policy beyond raw cellular
bytes. Reusing profile 4 would make retained manifests ambiguous. Portable
restoration alone cannot prove atomic publication, current authority or recovery
after a lost database reply.
## Decision
Checkpoint profile 5 contains population envelope 1 and nested cellular bundle 9,
with history profile 5 identifying exact retained membership. Profile 4 retains
its raw cellular bytes and meaning. No biological version or golden is replaced.
Use explicit fenced, no-tick profile transitions: rules-8 profile 4 to population
5 wraps the same biology with empty membership, sequence zero and a persisted
policy; population 5 to profile 4 materializes the retained individuals by
unwrapping the identical biology. Both require the exact current predecessor,
current region fence, retained build and immutable transition evidence. Recovery
checks the complete source/target pair, not just their aggregate inventory.
Conversion sequence starts at zero for each entry generation; the region commit
sequence remains monotonic and the transition records identify every generation.
Initially profile 5 admits unattended ecological batches only: controlled cells
receive frozen intentions; player births, mutation selections and session action
receipts remain profile-4 operations. A host must finish the reverse transition
before processing those operations. This restriction avoids bypassing their
existing account-control/reservation transactions. It does not freeze wildlife
or erase controlled/suspended stock. An explicit profile selector is opt-in.
The cellular worker accepts `--cellular-populations on|off` (default off). It may
enter only for unattended rules-8 wildlife, with no waiting player birth or
mutation. Session demand or a player operation completes the reverse transition
first. SQL serializes profile entry and mutation reservation under the same
region lease: entry refuses outstanding choices, and new choices require profile
4 in the current host. Historical reservation contracts remain unchanged outside
profile 5. An existing profile-5 head remains recoverable with entry disabled.
The worker collects at least 20 due ticks (one second) and services at most 64
per unattended publication, consuming local debt only on confirmation. This is
bounded publication batching; durable interval admission/restart backlog is the
next M12.4 segment, not supplied by a wall-clock inference on recovery.
Population batch format 1 records the unchanged canonical cellular intentions
and an exact membership/sequence boundary for each tick. Biological replay reads
the recorded intentions, never reruns the wildlife controller. It verifies each
recorded boundary against the persisted deterministic policy. Manual conversion
records operate on an entire wildlife genome group at the same biological tick.
No random materialization sample exists in this exact model. Restoration installs
the recorded checkpoint; validation cannot resample a different member set.
Store immutable payload and trace objects with SHA-256/read-back verification,
then commit the manifest and publication evidence in one database transaction
under the existing serialized lease/head guard. Unknown replies retain the exact
prepared request; read-only resolution never grants a stale writer permission to
continue. Dedicated evidence triggers prohibit generic publication bypasses.
Retain all old formats, histories and source checkpoints. Do not prune objects.
## Validation and limits
Require malformed/profile-confusion rejection, whole-state source/target equality,
conversion oscillation, trace/payload mismatch refusal, frozen controlled biology,
duplicate/conflicting retries, expired writers and missing/corrupt objects. Exercise
real PostgreSQL and process death before publication and after commit/receipt.
Portable codec success alone does not close the durable gate.
This profile supplies a place for bounded unattended intervals and later escrow;
it does not itself implement biological migration or environmental coupling.
Existing player actions, NPC heredity and fixed 50 ms biology retain their rules.
## Alternatives, costs and consequences
Relabeling the raw profile breaks retained recovery; persisting only aggregate
stock loses exact members. Reconstructing policy on restart can choose a different
representation. Keep explicit profiles and recorded boundaries instead.
This retains every member and full trace, so it adds durable bytes and replay
work and makes no compression claim. SQL parsers, grants and source/target
verification must evolve together. Target-host cost and executable/network fault
qualification remain risks before production enablement. All old objects and
histories remain retained; no garbage collection or compatibility reset follows.
@@ -0,0 +1,71 @@
# ADR-0143: Owned bounded population intervals
## Status
Accepted for M12.4's opt-in engineering path, 2026-10-17. Extends ADR-0133,
0141 and 0142 without changing biology, controller decisions or World0 policy.
M12.4b's interval segment is implemented and validated. Biological migration and
the rest of M12.4 remain separate work; this does not close the entire gate.
## Context
Local confirmed-head pacing preserves debt while an owner runs, but loses its
unpublished interval on process loss. Inferring a replacement interval from elapsed
wall time would violate the accepted outage pause and could change controlled
biology. Profile 5 already supplies exact frozen-player/wildlife replay and bounded
publication. It needs a durable operational admission boundary.
## Decision
Admit one interval per region under its current lease and exact profile-5 head.
Bind the source commit/digest, begin/end ticks, controller version, admitting
holder and epoch. Intervals contain 1..64 unchanged 50 ms biological steps. Keep
admission records immutable. Identical retries return the same interval; different
end boundaries for one source conflict. New admissions require the exact current
head and no unsettled predecessor interval.
Write its immutable settlement with the checkpoint in the same transaction.
Normal profile-5 biological publication must consume precisely its admission;
manual conversion or profile exit waits while any interval is unsettled. Old
committed records remain recoverable and exactly retryable without fabricated
retroactive admission records. Generic publishers cannot bypass these guards.
A replacement fenced owner loads pending admission before selecting fresh work.
It advances from the verified source using the recorded controller version and
frozen controlled intentions, then publishes the exact trace/payload. Unknown
admission replies retain the same request until reconciliation; unknown checkpoint
replies retain their existing prepared bytes. Read-only resolution grants no
authority. A returning player waits for this bounded admitted interval, then the
host materializes before admitting player operations.
New profile entry and interval preparation require every controlled cell to be
fully suspended. Frozen intentions alone are insufficient: during the existing
200-tick linger period a cell is still vulnerable to predation, and its permanent
ending must stay on the existing profile-4 path. That path finishes linger and
records any death before entry; no new immunity or biological timer is introduced.
Earlier profile-5 traces remain verifiable with their original semantics and can
be materialized. Recovery reconciles retained owned corpses for either profile,
so an older post-commit/pre-ending crash cannot leave its account bound forever.
Collect one second of due time for routine unattended admissions, service at most
64 ticks per batch, and preserve debt until the confirmed head consumes it. A
short terminal-u64 remainder is admitted without waiting for 20 ticks. Report
pending admitted ticks separately from local due debt and checkpoint freshness.
Capacity pressure pauses admission; it cannot drop an admitted interval or cull
organisms. Unadmitted wall time remains paused across outage (ADR-0133).
## Alternatives
Keeping only a local deadline loses admitted work on restart. Reconstructing it
from database timestamps adds an unaccepted catch-up policy. A transaction per
tick violates the founding durability requirement. An unbounded queue conceals
resource commitments and makes returning-player latency unbounded.
## Consequences and limits
This adds a bounded operational journal and transaction guards, not a new time
integrator or ecological rule. Require duplicate/conflicting admissions, lost
replies, stale writers, process loss before/after admission and publication,
restart with zero new due time, and exact uninterrupted continuation comparisons.
Migration escrow, delayed boundary coupling, environmental ownership and multi-day
evidence remain separate M12 work. Production enablement stays off by default.
@@ -0,0 +1,101 @@
# ADR-0144: Exact wildlife ownership transfer and boundary accounting
## Status
Accepted for a scoped M12.4 engineering primitive, 2026-10-17. Portable candidates
are implemented and locally qualified; durable escrow remains open. This accepts exact ownership/accounting support,
not automatic migration, a linked world atlas or production enablement. Existing
rules-8 arenas and every retained format remain unchanged by default.
## Context and conflict
The current owner deliberately validates a closed regional budget, requires every
archived organism to be a local life/corpse, and admits bud identities only below
its own region's counter. Removing a migrant would violate those contracts;
importing one would also violate the destination's namespace and funding closure.
Recording departure as death, renumbering the organism, rebasing the opening stock
or copying a probe inventory would lose biological identity or conservation.
Resolve this boundary before expanding transfer code. Add a separately versioned
owner representation with explicit boundary flows and nonresident history. The
unchanged general biological kernel continues to operate on resident cells only.
## Decision and scope
Introduce cellular owner format 7 for rules 8, and population envelope 2 containing
it. Upgrading from format 6 is explicit and no-tick: original opening stock,
nursery, habitat, heat, bodies, reserves, identities, archives, positions and timers
are preserved; inbound/outbound flows are zero and nonresident history is empty.
Retain format 6/envelope 1 readers and old biological traces. Do not replace goldens.
The new conservation equation is channel-wise `opening + inbound = current +
outbound`, with checked arithmetic. `current` still counts only actual owned
compartments, including heat. Boundary flows are immutable cumulative accounting
evidence, never spendable resource accounts or an extra copy of biomass. Refuse
overflow/capacity exhaustion; no clamping, debt forgiveness or automatic reset.
A portable transfer prepares two detached candidates from exact compatible cuts:
same world, frame, fixed tick, rules, dimensions and ambient convention; distinct
regions. Move a whole eligible zero-account wildlife genome group. Controlled
cells remain excluded and fully suspended during unattended transfer work. Bodies,
reserves, growth/damage, ancestry, parent-life IDs and coordinates are identical.
No biological tick, movement, mutation, sampling, feeding or healing occurs.
Destination bounds, conflicts and capacity must all validate before either result
is usable. A rejection leaves both inputs unchanged.
Source history retains every departed organism as nonresident, alive at its known
cut; departure is not death. Destination imports the selected organisms' exact
birth/revision facts and complete genome-parent closure. Returning an already
recorded dead organism is refused. Imported bud IDs retain their original region
namespace; only locally created buds consume the destination's own counter.
Nonresident archive facts confer no residency, stock or activity. Never use an
archive's known-alive count as an owned regional census or terminal world evidence.
The durable follow-on must freeze preparation under current authority, stage
read-only destination evidence, and commit both exact source/destination heads in
one fenced transaction. A failed second publication rolls back the first. Retries
retain the same prepared pair. Before commit, the frozen source owns the stock;
the destination ghost owns none. After commit, only the destination owns it. Abort
is durable and only before commit; timeout alone never releases another copy.
Retain source cuts, capsules, receipts and both histories.
The caller's stable workflow request UUID belongs to that durable I/O journal;
it is not a biological identity or a kernel PRNG decision. Source/destination head
comparison prevents a second application under a different request UUID.
Portable paired trace 1 binds the stable request, both predecessor manifests,
both result commit IDs, representation, common cut, exact group and material.
Replay receives an independently trusted request and both complete source cuts;
it recomputes the paired candidates and verifies recorded membership and flows.
The trace is bounded/canonical and has no ownership authority by itself. The I/O
adapter must validate predecessor manifest/payload digests and journal bindings;
the trace's embedded request cannot supply that trust. Independent-process replay
qualifies the raw and population representations without implying durable escrow.
See [the trace schema](../../schemas/cellular-migration-trace-v1.md).
Continuing a migrated population uses separately identified population batch 2
with the same bounded intention/member layout, bound to envelope 2/owner 7.
Batch 1 continues to mean envelope 1/owner 6. Cross-version replay is refused;
the portable addition does not admit batch 2 under durable bundle 9. Boundary
accounting persists through normal biology and no-tick representation conversion.
This primitive changes ownership at an explicitly compatible cut and preserves
coordinates. It does not choose a physical route or let current clamped movement
cross an arena edge. Automatic linked-habitat movement, boundary contacts and
environmental-resource mappings need their own versioned contract and fidelity
tests; they cannot be inferred from passing escrow tests. No worker flag enables
those capabilities as part of this primitive.
## Alternatives, risks and qualification
Changing the old envelope silently breaks retained recovery. Marking departures
dead violates terminal death. Resetting opening inventories conceals transfers.
Generic mutable setters or unbacked destination births allow duplication. Retain
explicit paired candidates and boundary evidence instead.
Require complete per-member equality, per-channel source/destination balance,
archive retention/parent closure, foreign-identity admission, return trips without
resurrection, overlap/capacity/overflow rejection, encoded restore and continued
biology after import. Durable qualification additionally needs stale owners,
duplicate/conflicting delivery, partition/abort/restart and kills at each boundary.
This is an engineering transfer mechanism, not proof of coupled regional ecology,
world extinction, actual multi-day stability or useful compression.
@@ -0,0 +1,66 @@
# ADR-0145: Explicit checkpoint upgrade for boundary accounting
## Status
Accepted for M12.4f's portable checkpoint contract, 2026-10-17. Database admission,
durable upgrade evidence and paired transfer publication remain follow-on work.
This record authorizes no automatic upgrade, deployment or live region change.
## Context
ADR-0144 introduced owner 7/population envelope 2 and population batch 2. Retained
checkpoint bundle 9 names owner 6, so labeling the new bytes with bundle 9 would
break recovery. Representation changes and ownership-format upgrades have
different meanings and must retain separate evidence. An ordinary successor
cannot change its predecessor's physical or accounting contract.
## Decision
Define portable cellular bundle 10 as `(8,7,2,1,1,4,3,2,1)`. Biology remains rules 8;
only the owner accounting envelope changes. Profile 4 contains owner 7 with
revision history 4. Profile 5 contains population envelope 2 with history 5 and
population batch 2. Bundle 9 keeps envelope 1/batch 1 forever. The 360-byte
manifest layout and existing payload bounds are unchanged.
The sole initial upgrade is an explicit no-tick bundle 9 to 10 candidate,
preserving profile, history, region/world/frame, quantum and biological cut. It
requires a structurally valid positive-sequence source at a positive tick, a
distinct result commit, nonzero source digest, and a supplied nonzero lease in
the same frame. The result advances the commit sequence without wrap, retains
the exact predecessor link, pins a build and payload digest, and has no tick
trace or decisions. No downgrade, repeated upgrade or bundle-10 genesis exists.
Restore the complete source payload and use ADR-0144's exact owner upgrade.
Preserve original opening stock, nursery, habitat, heat, all bodies/reserves,
identity, archives, damage, growth, position and timers. Boundary flows start at
zero and nonresident history is empty. Population membership, policy and
conversion sequence are retained without running the tier policy. Profile 4/5
transitions may subsequently wrap/unwrap either bundle, preserving its exact
tuple; ordinary successors also inherit it unchanged.
Portable `supported()` means this build can read a declared tuple; it is not SQL
admission or publication authority. I/O must independently establish manifest
and payload SHA-256 bindings, retain immutable source/target evidence, enforce
the current lease and exact head, and resolve ambiguous outcomes before serving.
SQL schema 45 still rejects bundle 10. Its population C++ prepared validator also
remains restricted to bundle 9/batch 1. No worker selects the new tuple.
The next durable segment must admit bundle 10 through a dedicated fenced upgrade
transaction, refuse upgrades with unsettled intervals, replay the complete
upgrade during recovery, and preserve generic-publication bypass guards. Only
then may paired biological escrow use the tuple. A manifest checksum or a
portable upgrade candidate alone never transfers authority or stock.
## Alternatives, costs and qualification
Changing bundle 9 in place makes retained bytes ambiguous. A new population
profile alone omits raw owners and confuses representation with accounting.
Fresh provisioning loses opening-stock ancestry. Use the explicit tuple and
retained-source upgrade instead. This adds a compatibility branch and does not
reduce storage or solve geometry, ecology, maturation or global census.
Require both representations, real wildlife and nonempty cohort history, exact
candidate equality, canonical restore, continued batch-2 biology, profile
transitions, old/new confusion refusal, malformed bindings, sequence exhaustion,
and no genesis or double upgrade. Actual database admission, retry/fence faults
and process recovery are separate evidence requirements before durable use.
@@ -0,0 +1,56 @@
# ADR-0146: Durable boundary-accounting upgrade admission
## Status
Accepted for scoped M12.4g implementation, 2026-10-17; locally qualified
2026-10-18, including the full private persistence suite. See
[validation](../engineering/VALIDATION.md). No deployment, automatic upgrade or
World0 change. Paired biological escrow remains open.
## Decision
Admit ADR-0145's bundle 10 through SQL schema 46. Extend the existing immutable
`cellular_profile_migrations` journal: it already retains both sequences, commits,
manifest/payload digests and exact version tuples. A new table or independent
publication service would duplicate that authority. Old upgrade meanings remain.
Only an explicit bundle-9 to 10, same-profile (4 or 5), same-tick upgrade may
change the tuple. The existing fenced version-migration publisher verifies the
exact current head, lease/frame and retained build, inserts the complete upgrade
evidence and result, and advances the head in one transaction. An unsettled
population interval blocks a new upgrade. Exact retries return their original
receipt under current authority; changed bytes conflict. Unknown outcomes retain
the exact prepared request. An explicit adapter verifies source SHA-256, derives
the complete upgrade, uploads and reads back its object before publication.
Recovery under a fresh current lease verifies the immutable journal, both complete
manifests and objects, rederives the exact upgrade, and requires byte equality.
No fallback genesis, older head, opening-stock reset or version reinterpretation
is allowed. Version upgrades and profile changes retain distinct journals. A
no-tick recovery selects the recorded operation, never assumes its kind solely
from the target bundle.
For bundle 10, population profile 5 requires envelope 2/batch 2. Retained bundle
9 continues to require envelope 1/batch 1. Profile 4's unchanged trace 3 carries
the same rules-8 inputs. Representation transitions preserve the tuple. Interval
admission/settlement, pending player-choice guards and materialization before
player operations retain their existing requirements. Generic publication cannot
change versions or bypass dedicated evidence. No worker automatically upgrades.
This admits the accounting format only. It does not admit paired migration trace
1, publish two heads, freeze a source, activate a destination ghost, choose an atlas
or resolve multigeneration growth/environment/census gates.
## Alternatives and qualification
Reusing representation-transition evidence for a same-profile version change
would erase the distinction needed by recovery. Fresh provisioning would lose
the retained opening history. Keep the existing version-upgrade journal and
extend its exact supported pair instead.
Require both profiles, full-state replay/continuation, retained-format refusal,
pending interval refusal, stale/current leases, duplicate/conflicting requests,
ambiguous outcomes, publisher process loss, missing/corrupt objects, migration
rollback/history checks and least-privilege audits on private PostgreSQL. Portable
success alone is insufficient. Actual paired escrow and production costs remain
separate gates.
@@ -0,0 +1,62 @@
# ADR-0147: Durable biological migration preparation and source freeze
## Status
Accepted and qualified for scoped M12.4h implementation, 2026-10-18. Executed
evidence and limits are in [VALIDATION](../engineering/VALIDATION.md).
Destination staging, atomic paired publication and activation
remain subsequent segments. No deployment or automatic migration is selected.
## Decision
Prepare ADR-0144's exact raw/population pair against two digest-verified bundle-10
committed cuts, with the same representation, world/frame/tick and compatible
biology/geometry. Retain canonical migration trace 1 under its stable request
UUID. The source's current lease and exact head fence preparation. The destination
head is checked optimistically during preparation; it is neither locked nor
activated. This does not establish a simultaneous global cut at freeze commit.
Before preparation, copy and verify the destination predecessor payload into the
source's immutable object namespace. This is a read-only replay capsule, not an
owned population or additional spendable stock. Both manifests stay retained in
the shared commit journal. Recovery can verify the entire recorded pair from the
source namespace even if the destination later advances or is unavailable.
Schema 47 records immutable preparations and explicit source-authorized aborts,
plus one bounded pending pointer per source region. A prepared source retains all
its cells, inventory and history at its existing head. Coarsely freeze the whole
region: refuse new checkpoints, profile/version changes, interval admissions and
player mutation reservations until settlement. Preparation refuses pending
intervals and outstanding player choices; C++ requires fully suspended controlled
cells and an eligible complete wildlife group. No biological tick or transfer
occurs. Destination ghosts own nothing; this segment creates none.
The owning host pauses readiness and advancement during preparation uncertainty
or a recovered freeze. It retries the exact retained request, renews authority,
and restores/validates the capsule before resuming any work. Replacing a worker
or expiring a lease never releases the freeze. Explicit abort under current source
authority appends its immutable outcome and removes the pending pointer in one
transaction, leaving both biological heads unchanged. Exact preparation/abort
retries retain their outcome; retrying an aborted preparation never reopens it.
Timeout is not an abort. A replacement owner can explicitly abort without needing
destination authority, since no ownership has transferred.
Subsequent destination staging must recheck its exact captured head. A moved
destination requires an explicit source abort and a fresh workflow; do not rebase
the old trace silently. Future two-head commit must settle the source pointer
atomically with both exact results and immutable shared evidence. This segment
admits no migration result manifest and no destination activation.
## Alternatives, costs and qualification
An in-memory pause disappears after process death. Lease expiry is not an abort
decision. Copying cells into an active destination before paired commit duplicates
ownership. Keep the source authoritative and durably frozen instead. A whole
region pause is deliberately coarse; it is not a final ecological movement or
latency policy. Source-side capsule retention adds bounded storage and replay work.
Require real player-origin wildlife, both representations, complete replay and
stock equality, pending-work refusal, publication/admission bypass rejection,
duplicate/conflicting preparation, explicit abort, restart/new-epoch recovery,
ambiguous replies, process loss, missing/corrupt capsules and host readiness.
No elapsed-day, atlas, environmental coupling or multigeneration claim follows.
@@ -0,0 +1,56 @@
# ADR-0148: Durable destination staging without activation
## Status
Accepted and locally qualified for scoped M12.4i implementation, 2026-10-18.
Executed evidence and limits are in [VALIDATION](../engineering/VALIDATION.md).
Paired result publication and activation remain subsequent
work. This selects no route, automatic migration or deployment.
## Decision
Extend ADR-0147 preparation with destination-authorized staging at the exact
captured destination head. Lock the two regional lease rows in region order,
check current destination authority and the retained source freeze, and refuse
pending destination work. Retain one immutable staging record and one bounded
destination pending pointer. A region cannot participate in two workflows or
simultaneously be a source and destination. Both biological heads stay unchanged.
Restore both verified predecessor payloads and replay the exact retained trace.
Copy the source predecessor into the destination object namespace, and upload
and read back the derived destination candidate there. Record its SHA-256 and
length. It is read-only evidence: it is never a committed checkpoint, owned
stock, active population, census entry or permission to run biology. Recovery
replays both cuts from the destination namespace and compares the complete
candidate bytes. Equal aggregate material alone is insufficient.
New checkpoints, profile changes, intervals and player reservations are refused
at a staged destination. Its host pauses readiness and advancement, retains exact
requests after unknown replies, renews authority and recovers the pause across
replacement. No lease expiry, drain or timeout releases it. Explicit source
abort atomically appends the existing immutable abort and clears both pending
pointers. It requires no destination authority because no stock has moved.
Stage and abort serialize on the source lease row: either staging wins then
abort removes both pointers, or abort wins and new staging is refused. An exact
retry of a previously staged, aborted request returns that retained outcome and
never reopens either pointer. Destination movement before first staging requires
explicit source abort and a new preparation, without silent rebasing.
Keep all staged objects and predecessor evidence after abort. Backup already
copies immutable namespace objects and shared metadata; this is not cellular
clone/restore qualification. The future paired publisher must recheck both
current fences, heads, staged object bindings and unsettled request, then commit
both results and the common receipt atomically before activation.
## Alternatives, risks and qualification
An in-memory ghost disappears on process loss. Activating the uploaded payload
duplicates source stock. Advancing a destination after staging invalidates the
paired candidate. Freeze the whole destination instead; the coarse pause and
extra immutable storage are explicit costs, not a final movement latency policy.
Require both representations, real player-origin wildlife, full ghost replay,
unchanged heads and stock, conflicting/duplicate requests, pending-work refusal,
stale destination authority, replacement/restart, missing/corrupt/semantically
false ghost evidence, ambiguous replies, process kills, stage/abort races and
host readiness. No coupled ecology, world-cut or multigeneration claim follows.
@@ -0,0 +1,62 @@
# ADR-0149: Atomic paired biological migration publication
## Status
Accepted and locally qualified for scoped M12.4j implementation, 2026-10-18.
Executed evidence and limits are in [VALIDATION](../engineering/VALIDATION.md).
No automatic routing, ecological boundary or deployment is
selected.
## Decision
Publish ADR-0144's two exact candidates in one PostgreSQL transaction after
ADR-0147 preparation and ADR-0148 destination staging. Lock endpoint lease rows
in increasing region order, require both current authorities and unchanged
captured heads, and bind the destination payload to the immutable staged ghost.
The immutable shared receipt names the preparation and both result commits.
Both result manifests preserve their profiles, bundle 10, history, quantum and
completed tick while advancing each commit sequence exactly once. They use no
ordinary biological batch or invented birth/death event.
Restore both verified predecessor capsules, replay the exact trace and upload/
read back both complete results before publication. Clear both pending pointers,
insert the common receipt, insert both commits and update both heads in the same
transaction. Any failure rolls everything back, including a failure at the second
commit. Deferred receipt foreign keys allow evidence guards to recognize this
dedicated publisher without disabling triggers or permitting generic bypasses.
Before this commit the source owns all outgoing stock and the ghost owns none.
After it only the destination owns the transferred organisms/material. Current
regional budgets and explicit cumulative boundary flows retain their meanings.
Keep both predecessor histories/capsules, stage and receipt. No stock account is
created for the receipt, and no terminal extinction inference follows from it.
Explicit source abort and paired publication serialize on the source lease row.
Abort wins only before commit; a committed request can never be aborted. If abort
wins, commit is refused. Exact committed retries compare both complete manifests
and return the original pair under current endpoint authority, including newer
epochs; changed bytes conflict. Unknown replies retain that exact prepared pair.
Lease replacement never changes its bytes or fabricates a second transfer.
Recovery loads the shared receipt under current local authority, verifies both
predecessor/result manifests and their links, replays both candidates from local
retained capsules, compares both result digests and the complete local payload,
and requires the staged destination digest/length. Missing or false evidence
fails closed. A paused host whose pointers disappeared reloads its actual head
and performs this recovery before readiness; it never resumes stale source stock
or activates a ghost based solely on pointer absence.
## Alternatives, risks and qualification
Two ordinary publications can leave half a transfer committed. Treating timeout
as rollback can duplicate stock. Shared append-only evidence plus one fenced
transaction gives one outcome, at the cost of temporarily requiring both owners
and one metadata authority. This is not a general distributed transaction across
independent databases.
Require both representations, complete stock/member equality, exact/conflicting
retries, abort/commit races, stale/replacement authorities, failed second inserts,
ambiguous replies, process loss before/after commit, missing/corrupt/false replay
evidence, host adoption/restart and subsequent biological continuation. Linked
geometry, independent network partitions, actual multi-day ecology and target
host capacity remain separate gates.
@@ -0,0 +1,68 @@
# ADR-0150: Regional cellular census projection
## Status
Accepted for scoped M12.6a engineering implementation, 2026-10-18. This implements
a read-only local projection under ADR-0133, not durable population-history
publication, a complete world evidence envelope or terminal extinction.
## Context and decision
ADR-0144 retains departed organisms as known-alive archive records. Summing
`LineageArchive::living_carriers` across regions therefore duplicates migrants.
The exact population owner also contains both active and cohort members in one
store; counting that store and membership tags as separate organisms duplicates
stock. Suspended players remain living even when no organism is progressing.
Add a bounded, detached `CellularCensus` projection of a valid rules-8 raw owner
(format 6/7) or exact population (envelope 1/2). Record world, region, frame,
completed tick and owner/rules/population versions. This observation has no lease,
commit digest or recovery-branch proof: observing an uncommitted candidate does
not grant it durable authority. A later adapter must bind a verified committed
payload and its exact history context before publishing evidence.
Retain every locally archived genome in ascending ID order, including zero-carrier
ancestors, with its immutable parents and schema/development versions. Add a const
archive genome span for bounded enumeration; successful genome admission invalidates
that view. No removal or mutable archive access is added.
Each row partitions resident living stock into five disjoint categories: individual
wildlife, exact cohort wildlife, active controlled, lingering controlled and
suspended controlled. Each category reports count, body and reserve in existing
pJ/C/N/P/other-fg units. Membership tags only classify the existing owned lives.
Corpses, food, nursery, heat and cumulative boundary flows are not living stock.
Retained nonresident archive records are a separate historical count without owned
inventory or current-viability meaning. Frozen source stock counts until paired
commit; an uncommitted destination ghost supplies no authoritative observation.
Queries explicitly choose exact-genome carriers or the anchor's descendant
closure. Use the retained parent graph, bounded iterative traversal and checked
channel/count addition. Unknown anchor or unsupported versions fail; they do not
become zero. A zero result is a fact about this particular regional observation,
never world absence, species classification or terminal extinction.
## Alternatives, costs and qualification
Archive-only counting is invalid after migration; cohort-count addition violates
exclusive ownership. Scanning integer IDs up to an allocator high-water mark is
unbounded for sparse identities. Enumerate at most 4,096 retained genomes and
256 resident lives, retaining at most 65,536 historical nonresident records.
Build child adjacency once and visit each descendant at most once per query;
do not recurse on ancestry depth or inspect wall time.
Require active/lingering/suspended separation, real funded wildlife, conversion
invariance, full restore reproducibility, mutation-current versus birth genomes,
zero-carrier ancestry retention, death exclusion, sparse identities and migration
ownership before/after/return. Compare resident counts and per-channel body/reserve
against direct individual observations. No biological rule, codec/golden, database,
network, renderer, foundation dependency, automatic selector or deployment changes.
Durable append-only census/history with atomic commit binding, bounded backend
queries, branch/epoch/watermark reconciliation and client presentation remain
subsequent M12.6/12.7 work. Linked ecological resources and the rules-8 maturation
gap remain open independently of this observational primitive.
Follow-on ADR-0151 implements regional commit-bound history reads using the
existing immutable biological journal as canonical events, without a second
census-write window. Full world/branch reconciliation and client presentation
remain separate from both primitives.
@@ -0,0 +1,72 @@
# ADR-0151: Census history from retained biological commits
## Status
Accepted for scoped M12.6b implementation, 2026-10-18. This selects the existing
append-only biological commit journal as the durable source for regional census
history. No new SQL schema, biological format/rule or global extinction policy.
## Context and decision
ADR-0150's census is a detached observation. Publishing an independent mutable
summary after the biological transaction would create a second-write failure
window and a second demographic truth. Every accepted biological publication
already retains its exact manifest and complete payload in the immutable regional
journal, atomically with its head. Paired migration records both endpoints in one
transaction; uncommitted uploads and destination ghosts are not journal entries.
Use those committed cuts as canonical history events. Derive census projections
on read from their verified payloads and existing semantic replay evidence, rather
than storing duplicate census rows. A commit remains the event identity and its
digest binds the complete census source. There is no extra post-commit write,
backfill that invents observations, or new database write per simulation tick.
Add explicit historical raw/population recovery entry points that load an exact
journal sequence and run the same manifest/build, strong object digest, complete
restore, batch/no-tick/paired replay and outcome checks as current-head recovery.
Historical recovery is read-only; it never changes the selected head, resumes an
older owner or grants authority. Existing hosts continue to recover only the head.
Replay validates each selected cut's complete batch/no-tick operation from retained
predecessor checkpoints; it does not re-execute the entire world from genesis.
Evidence loaders retain their current regional-lease requirements; reading a
historical checkpoint is not proof of current ownership or world completeness.
Add bounded forward census pages, at most eight commits, pinned to a caller's
exact regional watermark (frame, sequence, commit ID, manifest digest and tick).
Validate that watermark against the immutable journal before and after reading.
Append-only head advancement cannot move the requested upper cut. Advance by
sequence, not tick: no-tick profile/format/migration commits remain distinct.
Every returned entry retains its exact committed manifest and detached census.
Require an idle connection at entry; reject all caller-owned transactions so a
publishing connection cannot present its own uncommitted writes as durable cuts.
The libpq adapter exposes read-only transaction status for this guard. Diagnostic
historical recovery retains the existing caller-owned transaction semantics.
Missing, unsupported, corrupt, unreplayable or foreign evidence fails the entire
page; never skip a cut or return a zero census for unavailable history.
All point lookups use the existing unique regional sequence index. Payload/state
work is one cut at a time, with at most eight bounded census projections retained.
Timeouts retain existing per-I/O semantics, not a page-wide service latency promise.
This is a backend read primitive, not a new endpoint or permission to expose it
directly to clients.
## Alternatives, costs and qualification
A separate mutable census table can disagree with the immutable biological source.
Adding summary bytes to every publisher would version the same redundant truth
through genesis, ordinary batches, profile/version transitions and paired commits.
Retained exact checkpoints already provide atomic durable history, at the cost of
object reads and semantic replay on query. No performance/capacity claim follows;
a later cache/index must be derivable and preserve these evidence checks.
Require stable pagination after new publication, sequence-zero and no-tick cuts,
raw/cohort restoration, historical migration ownership, exact retries without
extra events, current lease replacement, missing/corrupt/false replay evidence,
wrong cut/region/frame/build, bounded requests and unchanged heads/stock. Use
private PostgreSQL, sanitizer, analysis and complete persistence regression.
This primitive is scoped to the connected database's regional history/frame.
Its watermark is not a complete world watermark or an external recovery-branch
identity. Cross-database/clone/rewind reconciliation, world region-set coverage,
client presentation, actual multi-day ecology and terminal extinction remain
M12.6/12.7 and later gates. No live database, World0 or deployment action.
@@ -0,0 +1,60 @@
# ADR-0152: Scoped multi-region cellular census queries
## Status
Accepted for M12.6c, 2026-10-18. Portable detached queries under ADR-0133;
no world-completeness, branch, authority or terminal-extinction acceptance.
## Context and decision
Regional history pages now bind census observations to exact biological commits.
Adding local totals without checking coverage, identity or resident duplication
could still hide a stale region or count a migration source and ghost twice.
Add `CellularCensusSet` to the portable lifecycle library. The caller declares
1..64 distinct, ascending, nonzero required region IDs and an exact world, frame,
tick, owner format, rule and quantum boundary. Require exactly one matching
observation per region. Raw/population classifications may differ because both
describe the same exact individuals. All other boundary fields must agree.
The 64-region bound limits query work; it selects no production world size.
Keep full immutable genome records and permanent resident organism IDs privately
in detached regional projections. Across regions require byte-equivalent genome
values for every shared genome identity, including origin, capabilities and
parents; a short content hash or matching ancestry alone is insufficient.
Reject duplicate resident organism IDs even when life or genome IDs differ.
Retained nonresident records do not participate in resident duplication checks.
Retain sorted detached regional observations, then answer exact or descendant
queries with checked channel/count sums. Each local archive retains complete
ancestry, so a locally unknown anchor contributes no carriers only after exact
declared coverage and shared-genome consistency have been checked. Unknown in
every archive remains an error. Nonresident sums are historical record occurrences,
not a count of unique organisms or evidence of their current remote viability.
Any invalid evidence refuses construction; it cannot become a partial/zero total.
## Alternatives, benefits, costs and risks
Blind summation conceals missing regions and repeated residents. Using only an
archive's known-alive records counts departed migrants again. Trusting a short
digest would permit conflicting immutable identities. Full records add bounded
memory/copy cost to every detached census; the set retains at most 64 observations
with up to 4,096 genomes and 256 residents each. Identity checks sort bounded
genome references/resident IDs; queries traverse each local ancestry graph once.
This is not a measured deployment latency or capacity guarantee.
The required list is caller-declared, not an authoritative durable world catalog.
Observations themselves confer no commit, branch, epoch or ownership authority.
Callers must keep verified commit references and exact selected cuts; same-tick
arbitrary cuts can still miss a transfer and are not a reconciled watermark.
No new persistence/wire format, cache/index, permissions endpoint or client UI.
## Consequences and qualification
Require direct stock oracles, disjoint/shared/unknown ancestry, exact coverage,
all boundary fields, invalid/over-bound requests, immutable genome conflicts,
duplicate permanent organism identities, detachment and real funded migration
before/after. Test raw/cohort committed migration observations together.
Durable branch identity, required owner coverage and atomic migration-cut
reconciliation remain M12.6/12.7 work. No query here accepts global absence or
terminal extinction; linked resources, maturation and product gates remain open.
@@ -0,0 +1,66 @@
# ADR-0153: Consistent database cuts for scoped cellular census queries
## Status
Accepted for M12.6d, 2026-10-18. Backend read adapter under ADR-0151/0152;
no durable world catalog, external branch identity or extinction acceptance.
## Context and decision
Equal-tick regional observations can straddle an atomic migration. A source-after
and destination-before selection can omit stock without duplicating an organism.
The scoped portable query cannot detect that omission from detached totals alone.
Capture the current committed heads of 1..64 declared regions in one explicitly
owned PostgreSQL `REPEATABLE READ READ ONLY` transaction on an idle connection.
Requests are nonzero, distinct, ascending region IDs in one world, with object
stores and grants for the existing replay readers. Keep exact head/manifest pairs,
then commit the short metadata transaction before reading biological objects.
An atomic migration committed between head reads is either visible at both
endpoints or neither when both are in the declared set.
After capture, use ADR-0151's existing exact-cut history reader for each selected
head. Verify the returned head and manifest still match the captured cut. Complete
semantic replay, object hashes and fenced evidence checks remain mandatory; no
cached census or older-head fallback. Combine observations through ADR-0152's
coverage/boundary/genome/resident checks. Different head ticks fail rather than
advancing biology or silently selecting an older common tick. Return exact cuts
alongside the scoped census only after every step succeeds.
The adapter refuses all caller-owned transactions, including read-only ones.
It rolls back failed metadata capture; failed completion/cleanup closes the
connection. An exception during capture also closes the connection immediately,
releasing server resources when disconnect is observed. Add an explicit noexcept
disconnect method to the libpq owner for this cleanup. No automatic retry.
Per-I/O deadlines retain existing semantics, not a whole-query latency guarantee.
## Alternatives, benefits, costs and risks
Independent head reads can mix the sides of a paired publication. Holding one
transaction through full recovery is unnecessarily long, and existing fenced
evidence functions take lease row locks that a read-only transaction forbids.
Short read-only metadata capture plus immutable replay avoids that coupling.
Ordinary replay still briefly takes existing per-call lease locks; this does not
eliminate all contention or establish a deployment capacity claim.
Capture uses indexed regional head lookups. Work and retained observations remain
bounded by 64 regions; full replay/object cost is inherited from ADR-0151. A long
metadata snapshot can retain old database versions until completion. No new SQL
objects, cache/index, durable writes, biological rule/codec or dependency.
## Consequences and qualification
Require an actual paired migration on an independent connection between the first
and second head reads: both captured cuts must remain before the pair while a
later snapshot sees both after it. Recover the earlier cuts after publication,
compare exact census stock, and repeat for raw/cohort histories. Missing regions,
stale/missing/corrupt replay evidence, mismatched boundaries, invalid/over-bound
requests and caller-owned transactions must return no partial census. Confirm
transaction cleanup/connection closure, unchanged heads and no object writes.
This is one connected database's consistent committed cut for a caller-declared
region set. It neither proves that the list includes every world owner nor
reconciles branches, outside transfers, dormant/reserve viability or global
freshness. Current grants support recovery, not new observation authority. No
terminal-extinction outcome or public client permission follows. Durable
world/branch coverage and complete M12.7 reconciliation remain open.
@@ -0,0 +1,73 @@
# ADR-0154: Registered-world coverage for cellular census snapshots
## Status
Accepted for scoped M12.7a, 2026-10-18. Implements database-registered regional
coverage under ADR-0133/0153, not terminal extinction or external branch identity.
## Context and decision
A consistent snapshot of a caller-declared list can still omit an owner. The
existing durable `region_leases` registry is the source of region identity and
frame for all supported provisioning paths. Duplicating it in a separate census
catalog would create another enrollment truth and a failure window.
Schema 50 adds a least-privilege read function listing registered regions of one
world, ordered by region ID, with frame IDs. Read from the registry itself, without
joining/filtering on heads, profile, active holder, expiry, activity or living count.
A missing checkpoint or unsupported region must prevent evidence completion,
not disappear from the required list. Return at most 65 rows: the 65th detects
overflow of the existing 64-region query bound. This is not a selected world size.
No new table/index, registration write or biological codec/rule.
Add `load_registered_cellular_census_snapshot`. In ADR-0153's owned short read-only
repeatable-read transaction, read this registry before selecting any heads. Require
an exact match to the supplied region resources/grants, including frames. Empty
registry means unknown world coverage, not zero life. Over-limit worlds fail;
never truncate/paginate a subset and label it complete. Read every selected head
in the same database snapshot, close the metadata transaction, then use unchanged
exact-cut replay and scoped census validation. Return registry evidence alongside
the exact cuts and census. Existing caller-declared snapshots keep their semantics.
Concurrent enrollment after the registry read belongs to a later snapshot. The
current result covers the registered set as of its captured database view, not
the latest state at return. Uncommitted enrollment is not included. A registered
row without a recoverable head fails the whole result. No fallback or zero filling.
## Alternatives, benefits, costs and risks
Trusting a supplied list cannot prove coverage. Listing only checkpoint-bearing,
cellular, active or unexpired regions hides unavailable or unsupported owners.
A duplicate mutable catalog can disagree with the authority registry. Read the
existing durable registry through its `(world_id, region_id)` primary-key prefix;
the 65-row limit bounds listing work and detects oversized sets explicitly.
The new security-definer read function exposes only region/frame metadata to the
existing trusted runtime group. Fixed search path, PUBLIC revocation and the full
runtime privilege audit remain mandatory. It grants no table access, provisioning,
new client permission or cross-world biological authority. Old schemas fail the
new query instead of falling back to caller-declared coverage.
## Consequences and qualification
Test exact sets, omitted/extra/duplicate resources, unknown worlds, wrong frames,
expired/released holders, missing heads, unsupported profiles and 64/65 bounds.
Race committed and uncommitted enrollment with snapshot capture; current cuts
must retain their selected catalog and later reads must see new enrollment.
Repeat real raw/cohort atomic migration races under registered coverage. Retain
failure cleanup, TLS faults, object verification and no-partial-result behavior.
Run migration/no-op/checksum/permissions, full private persistence regression,
sanitizers, Clang analysis/format and default-build checks. Never alter prior
migration bytes or biological goldens.
This covers registered regions in one connected database view. A rewind can reuse
the world ID; external branch identity is still missing. Outside/unsupported stores,
viable reserves, durable accepted reconciliation records and global freshness remain
M12.7 work. No terminal-extinction outcome, client endpoint, live database,
deployment or World0 action.
Schema-51 follow-up: [ADR-0155](0155-database-history-domain.md) adds a database
history domain to registered results in the same metadata view and forks supported
restores with parent/exact-cut provenance. Cross-domain clone provenance and the
other reconciliation limits above remain open; registered coverage alone still
does not authorize terminal extinction.
+92
View File
@@ -0,0 +1,92 @@
# ADR-0155: Database history domains for census and restore evidence
## Status
Accepted for scoped M12.7b, 2026-10-18. Extends ADR-0133/0153/0154 and the
supported ADR-0074/0075 restore workflow. This is an evidence namespace, not a
new biological identity, codec, simulation version or terminal-extinction rule.
## Context and decision
World IDs and exact immutable commits can be reused by a database restored from
a backup. Independently initialized databases can also use the same world IDs.
Neither a connection address nor an object path establishes evolutionary history.
Schema 51 adopts one random, nonzero UUID **history domain per database**, using
PostgreSQL's built-in UUID generator. External evidence identifies a world by
`(history_domain, world_id)`. Adoption means this database's retained history as
observed at migration; it does not reconstruct an unknown earlier namespace.
Unchanged migrations preserve the domain. Different worlds remain distinct within
the domain. No per-tick writes, payload changes, extension or new dependency.
Keep owner-controlled `history_domains` events, one `current_history_domain` row,
and `history_domain_cuts` for restore provenance. The trusted runtime receives only
the fixed-search-path security-definer `load_history_domain_v1()` read function;
neither table access nor the ability to fork. The migration privilege audit includes
both the new required read grant and denial of the owner-only function.
Registered cellular snapshots capture the domain **before** registry/head reads in
the same short read-only repeatable-read transaction. Return it with registry,
exact cuts and fully replayed census. Missing/zero/malformed context fails the
whole result; a legacy schema fails rather than inferring a domain. Existing
caller-declared snapshots and low-level diagnostic history queries retain their
local semantics; they do not acquire an external-history guarantee implicitly.
Concurrent context changes belong to a later metadata view. Context identifies
captured evidence, not current authority or a freshness guarantee at return.
## Supported restores and legacy backups
For either isolated or explicitly authorized dev/stage in-place restore, the
existing install transaction first restores the dump, retires all builds and
clears holders. Before committing that still-quarantined install, call the new
owner-only `fork_restored_history_v1(restore_claim_uuid)` when present. It locks
the singleton domain row, refuses any admitted build or held lease, creates a
fresh domain whose parent is the restored domain, retains the request, and copies
all restored heads' world/region/frame/sequence/commit/digest/tick as fork cuts
before switching the current domain. Rollback removes the whole fork. Same-request
retries return the same current domain without duplicating records; a request from
an older fork refuses instead of switching backwards. Lost install receipts keep
the existing restore-claim resolution. Biological heads, ancestry and retained
objects stay byte-identical. Readmission still waits for head/history verification
and, in-place, the full runtime privilege audit.
A backup predating schema 51 has no source domain. Its restore skips the absent
function; later migration adopts a fresh domain with unknown original context.
Do not fabricate a parent or exact external branch ancestry. New-schema backups
retain the event/cut tables because they dump the entire `evolution` schema.
Backup-of-restore forks preserve their known namespace ancestry and exact fork
cuts; they do not rewrite biological clone origins or old payloads.
The operator is trusted and the replacement database must remain isolated during
installation/verification. Owner-only SQL is not a new public online branch API.
Arbitrary direct `pg_restore`, copying a running database, privileged edits, or
readmitting builds outside the supported workflow can copy/forge a domain. No
database UUID can detect such a bypass. This contract does not secure an
untrusted owner or change fencing, backup durability, deployment or World0 gates.
## Alternatives, benefits, costs and risks
Per-world enrollment tables would duplicate the authority registry and complicate
legacy adoption. Host/database names are mutable routing, and manifest digests
can survive a rewind. Embedding new domains in all biological codecs would change
deterministic bytes without changing biology. A database namespace keeps those
contracts intact and makes restore provenance explicit at metadata cost
proportional to the restored regional head count, once per restore.
Random UUID uniqueness is probabilistic, using the existing supported PostgreSQL
runtime. Trusted workflows must rotate consistently; no claim is made for a copied
database outside those workflows. Initial adoption cannot recover missing external
history. Retention/GC must preserve these records; no deletion feature is added.
## Qualification and remaining scope
Test no-op adoption, quarantine refusal, rollback, exact cuts, idempotent and stale
requests, runtime privileges, missing context, concurrent snapshot capture, isolated
restore and in-place rewind. Run full persistence/backup/DR/migration checks,
sanitizers, analysis/format and the default build. No biological golden changes.
Cross-domain clone-origin provenance is still incomplete: ADR-0067 commits the
source biological cut but does not encode its external history domain. A domain
alone cannot supply that missing ancestry. Durable accepted reconciliation must
later bind domain, exact cuts, registered coverage, other viable/in-flight stores
and acceptance freshness; no terminal extinction or complete M12 gate is claimed.
@@ -0,0 +1,68 @@
# ADR-0156: Pending migration evidence in registered census snapshots
## Status
Accepted for scoped M12.7c, 2026-10-18. Extends ADR-0133/0147–0149/0153–0155.
No biological format, rule, activation workflow or terminal-extinction decision.
## Decision
A registered census must expose its pending biological handoffs, rather than
letting a caller mistake a staged ghost for additional owned life or infer that
no transfer exists. Schema 52 reads the union of source/destination pending
pointers for one world, ordered by request UUID, at most 65 requests. The 65th
detects overflow of the 64-request work bound; never truncate a complete result.
This is the existing active-pointer inventory, not an audit of all historical
preparations or a new source of ownership. No duplicate state table/write.
Capture it in the same read-only repeatable-read view as domain, registry and
heads. Keep both retained predecessor manifests, canonical trace and, when staged,
ghost digest/length. Require internally coherent pointers, un-aborted/uncommitted
state and metadata identities; malformed/missing evidence fails the entire query.
Both predecessor builds must belong to the caller's retained build allowlist,
including an optimistic destination predecessor that is no longer its current head.
Every endpoint must be registered. The source predecessor must equal its selected
head; a staged destination must also equal its selected predecessor. A merely
prepared destination is an optimistic observation and may have advanced, as
ADR-0147 permits. Common census-boundary checks still apply independently.
After metadata capture ends, fully replay every captured handoff from its retained
source-side predecessor/capsule objects. For a stage, independently replay the
destination-side capsules and compare the complete derived ghost bytes with the
verified staged object. Reuse the existing migration codec, binding and paired
replay logic. Missing/corrupt/false capsules or ghosts fail with no partial census.
This is historical evidence verification, not a fenced live-owner lookup; a
concurrent abort/commit does not invalidate an already captured immutable view.
Return verified trace/member/material evidence and a staged flag alongside the
registered census. Source stock is already counted at its unchanged committed
head. Capsules and ghosts add **zero** census stock. After atomic commit, the next
view sees settled heads and no pending pointers; abort clears both pointers with
unchanged heads. Neither timeout nor lease expiry settles a workflow.
## Alternatives, costs and risks
Reading current fenced loaders after capture could combine newer pointer state
with older heads and also needs write locks. Reading inside the read-only view
cannot use those locking functions. Capture immutable evidence references without
locks, close the metadata transaction, then replay exactly those references.
Counting a ghost twice breaks conservation; ignoring unavailable evidence hides
uncertainty. The conservative error is an unavailable registered result.
This adds one bounded metadata read and complete pair/ghost replay per pending
request, plus transient bounded evidence buffers. No whole-query latency promise,
new cache, aggregate speedup, dependency or target-host capacity claim. The trusted
owner can bypass table invariants; this does not authenticate an untrusted owner
or invent stock outside the current committed owner model.
## Qualification and remaining scope
Test raw/population prepare/stage/abort/commit, unchanged census stock, corrupt or
unavailable source capsules/ghosts, malformed pointers, bounds, expired authority,
and capture interleavings with settlement/new preparation. Run full persistence,
backup/DR, migration/privilege checks, sanitizers, analysis and default CTest.
Prior migrations and biological goldens remain unchanged.
This reconciles the existing pending migration evidence with registered owner
cuts. Cross-domain clone ancestry, other viable-store coverage, accepted durable
global reconciliation/freshness, coupled ecology and actual days remain open.
@@ -0,0 +1,72 @@
# ADR-0157: Opt-in funded cellular maturation
## Status
Accepted for the portable M12 ecology prerequisite, 2026-10-18. Extends
ADR-0031/0032/0120/0125/0128/0137/0139/0144. Trial parameters remain revisable;
this does not accept gameplay balance, durable admission or product readiness.
## Decision
Rules 9 explicitly opt an existing rules-8, format-7 owner into maturation.
The detached no-tick upgrade preserves every organism, archive, inventory,
presence, boundary flow and cohort tag. Only the biology rules field changes.
Format 7 already stores growth and all affected inventories. Population envelope
2 and recorded input formats need no new fields. Older readers reject rules 9;
rules 8 and its goldens retain their meaning. No default/DEV or SQL bundle changes.
After old-size movement, maintenance, contact feeding, engulfment/death, selected
mutation, budding and presence changes, surviving active cells can construct at
most **5 realized thousandths per 50,000 microsecond tick** (100 per second).
This is an experimental rate, distinct from the development version's per-plan
bound. A newborn takes no growth step in its birth tick; frozen, lingering and
suspended cells do not grow. A resuming suspended cell starts growth on its next
active tick. Wildlife and controlled cells use the same construction rule.
A juvenile reaching adulthood can first request an admitted bud next tick.
Use the existing channelwise affordable construction transition, additionally
capped by that rate. Pay its gross intake from retained reserve; release body
rounding matter back to reserve and send construction energy to world heat.
Recompute the resulting body from unchanged genome and new growth. Preserve
damage exactly: construction is not repair. There is no new resource source,
reserve grant, automatic mutation or sampled replacement organism. Checked
arithmetic and full owner closure precede publication; failure changes no state.
Expanded squares retain their lower corner and expand toward positive axes.
In ascending stable life-ID order, require the whole proposed extent inside the
region and separated from every other present life, including lingering cells
and newborns. Suspended lives occupy no space. Earlier admitted expansions block
later ones. Refuse the proposed expansion without spending, relocation or trying
a smaller spatial step when blocked. This simple directional/contention bias is
explicit trial behavior, not a claim of physical growth geometry.
Mutation offers remain the original deterministic draw with their recorded
context and displayed budget forecast. Selection validates that exact offer;
rules 9 then prices the selected successor at **current growth**, using retained
reserve. It neither redraws the candidate nor restores an obsolete juvenile body.
The old pure funding API retains recorded-growth behavior; an explicit new API
supports current-growth funding. Insufficient funds retain the offer as before.
Successful growth reports the exact before/after growth and intake/release.
Final tick feedback reports the surviving cell's final reserve under rules 9.
Both representations and recorded unattended intervals execute the same kernel.
## Qualification and limits
Require channel and energy starvation, partial affordability, rounding and damage
checks; real funded founder -> juvenile -> adult -> offspring evidence; newborn
and offline exclusion; obstructed expansion with no spending; saved-choice funding
at changed growth; raw/cohort equivalence, conversion and midpoint restore/replay.
Tests must preserve old goldens and run under NDEBUG, ASan/UBSan and analysis.
Rules-9 durable checkpoint admission, migration, registered census, environmental
coupling and client presentation require their own contract/qualification. Current
durable bundle allowlists continue to reject this rule. No actual-days soak,
deployment, World0 operation, extinction or M12 completion is inferred.
ADR-0158/schema 53 subsequently admits explicit durable bundle-10 -> 11 upgrades.
The maturation rule above is unchanged; migration/census and ecological/product
qualification remain separate gates.
ADR-0159 subsequently qualifies rules-9 census through retained history and
registered snapshots. Migration and ecological/product qualification remain open.
@@ -0,0 +1,56 @@
# ADR-0158: Durable admission of funded cellular maturation
## Status
Accepted for the scoped M12 maturation durability gate, 2026-10-19. Extends
ADR-0146/0157. No deployment, automatic upgrade, balance acceptance or World0 change.
## Decision
Admit cellular bundle 11 `{9,7,2,1,1,4,3,2,1}` through schema 53. Reuse the
immutable `cellular_profile_migrations` journal and current lease/head fence.
Only explicit bundle 10 -> 11, same-profile (4 or 5), same-tick upgrades are
allowed. Preserve all stocks, organisms, genomes, growth, presence, boundary
flows, archive, policy, cohort membership and conversion sequence. No new genesis,
skipped prerequisite, downgrade or independently published upgrade record.
The adapter verifies both predecessor bindings, derives and reads back the full
candidate object, then atomically records evidence/result/head. Pending intervals
and biological handoffs prevent a new upgrade. Exact retries retain original
bytes/receipt under current authority; changed bytes conflict. An uncertain
transaction retains the exact prepared request. Recovery verifies both complete
manifests/objects and the journal and rederives the recorded operation, selected
from the exact source/target tuple. No fallback to older biology or fresh genesis.
Both raw trace 3 and population envelope/batch 2 keep their existing layouts.
The bound predecessor's rules select funded maturation. Representation changes
preserve the tuple. Parser-local SQL normalization can reuse the existing shape
checks, after checking real trace binding; stored bytes, strong digests and retry
identity always retain bundle 11. Legacy parser/publisher helpers remain private.
Keep all original version meanings and migration checksums. Existing freeze,
interval, player-choice, permanent-death and dedicated-publication guards remain.
No worker upgrades automatically, and DEV/default provisioning stays rules 8.
An explicitly upgraded host can recover and continue either representation.
Biological migration still accepts bundle 10 only. Rules-9 census queries return
unsupported until separately qualified; a missing projection is never zero life
or evidence of extinction.
## Alternatives and qualification
A fresh opening loses funded ancestry and stock history. Reusing profile-change
evidence obscures a biological-rules change. A separate journal duplicates the
existing atomic authority. Extend its exact pair and replay dispatch instead.
Require both profiles, real juvenile growth after upgrade, exact continuation and
profile conversion, stale/current leases, retries/conflicts, pending-work refusal,
ambiguous outcomes/process loss, missing/corrupt/false source or result objects,
rollback, retained history and runtime privilege audits on private PostgreSQL.
Run portable Release, sanitizers, analysis and the full persistence/backup/DR
matrix. This qualifies the retained biological rule and its storage path, not
autonomous multi-generation ecology, linked environmental budgets, actual days,
deployment-host costs, product readiness or M12 completion.
ADR-0159 subsequently qualifies rules-9 census projection 1 through verified
history and registered snapshots, preserving the maturation rule and storage
contracts above. Mixed rules 8/9 still refuse a complete regional set.
+50
View File
@@ -0,0 +1,50 @@
# ADR-0159: Census of funded maturing cellular owners
## Status
Accepted for the scoped M12 maturation census gate, 2026-10-19. Extends
ADR-0150–0156/0157/0158. No new biological rule, codec, SQL schema or extinction
decision. Migration of rules-9 organisms remains a separate gate.
## Decision
Admit rules 9 with owner format 7, raw or population envelope 2, to census
projection version 1. Preserve rules-8 support and all existing query meanings.
The projection already reads exact retained per-life body/reserve inventories;
funded growth changes those quantities, not identity, ancestry or ownership.
Count each organism once, with cohort tags classifying the same owned store.
Construction heat, food, corpses, nursery and cumulative boundary flows remain
outside living stock. Damage, reserves and body size are observations, not a
growth forecast or a genome-derived replacement for retained physical state.
Record the exact source rule at every observation. A no-tick maturation upgrade
creates a distinct committed cut even when counts/stocks stay equal. Existing
read-only history and registered snapshot adapters use complete supported
recovery before projecting. No second census journal, index, write or independent
publication window is added. The bound manifest/evidence determines how old
biology replays; a newer current head never reinterprets a retained rules-8 cut.
Scoped/registered sets still require equal frame, completed tick, owner format,
rules and quantum across every required region. Mixed rules 8/9 do not provide
compatible evidence and fail the complete query; do not filter the older owner,
merge unlike biological cuts or turn it into zero stock. Raw and exact cohort
representations may coexist when all biological boundaries match. Unknown
versions, missing objects/builds, false replay and unavailable required regions
still fail without partial/older/zero fallback.
## Alternatives, qualification and limits
Re-deriving bodies at target adult size would invent biomass. Treating maturation
as another organism duplicates life. A second stored census can diverge from
atomic biology. Extend the bounded read-only projection instead; its row layout,
work limits, immutable genome checks and resident-identity checks are unchanged.
Require direct per-life inventory/count oracles during real funded juvenile
growth; raw/cohort conversion and restore; detached observations; same-tick
rules/profile transitions in committed history; registered capture races with
upgrade/materialization; mixed-rule refusal; missing retained/current objects,
unretained builds and stale authority. Run Release, ASan/UBSan, analysis and the
affected private database history/snapshot/publication matrix. Old goldens and
migrations stay unchanged. This admits observations of upgraded owners, not
complete viable-store reconciliation, terminal extinction, client permissions,
automatic migration, sustainable ecology, target-host cost or actual-days soak.
@@ -0,0 +1,58 @@
# ADR-0160: Portable transfer of funded maturing wildlife
## Status and scope
Accepted for the scoped M12 portable maturation-transfer prerequisite, 2026-10-19.
Extends ADR-0144/0157/0159. No new biological rule, SQL schema, durable migration
admission, automatic route, live upgrade or production enablement.
## Decision
Allow exact no-tick transfer candidates between owner-7 cuts with equal rules 9,
using the same complete group, eligibility, placement, history, identity, stock
and boundary-flow checks as rules 8. Raw and population envelope 2 use the same
biological operation. Preserve realized growth, body, reserve, damage, mutation
state, coordinates and every other life field exactly. Neither endpoint matures
at the transfer cut. Subsequent destination ticks apply their retained rules and
environment; source nonresident history never owns or grows a second copy.
Reject mixed rules 8/9 before deriving either result, even at otherwise equal
cuts. The existing format-upgrade API remains rules 8 only; moving a rules-9
owner does not repeat an upgrade or create another source of biological rules.
Add portable migration trace 2, magic `AEVMIG02`, version 2. Keep the same bounded
layout, request/endpoint/member/inventory fields, reserved zero, checksum and size
limit as trace 1. Version 2 means equal rules-9/owner-7 inputs; version 1 retains
equal rules-8/owner-7 inputs and its exact bytes. Population inputs use envelope 2.
Record selects the version from the supported predecessor rule. Replay requires
that exact version/rule pair in addition to the trusted request and complete
rederived candidates. Unknown versions, mixed magic/version and cross-rule trace
replay fail. No checksum or embedded request grants authority.
The durable adapter remains bundle 10/trace 1 only, including explicit portable
trace-version refusal. A later gate must admit bundle 11/trace 2 through source
freeze, destination staging, atomic paired publication and complete recovery,
including registered pending-handoff census evidence. Portable support alone
must not silently expand those SQL or activation contracts.
## Alternatives, costs and qualification
Reusing trace 1 would change a retained rule contract. Copying or re-deriving adult
bodies would change actual biomass. Treating transfer as a tick would progress
frozen life. A separate migration algorithm risks representation drift. Retain
one operation, require equal biological rules and distinguish replay evidence.
The additional version adds a small dispatch branch and a second qualification
matrix without increasing allocation bounds or dependencies.
Require real player-origin buds, growth before/after transfer, exact life equality
at the cut, raw/cohort equivalence, source nonresident/census exclusion, combined
channel conservation, repeated return trips, collision/capacity/eligibility
refusal, canonical codec attacks, old bytes, cross-rule refusal and independent
process replay/continuation. Run Release, ASan/UBSan, analysis and affected private
durable regressions. This does not qualify sustainable generations, linked
geometry/environmental budgets, cross-host partitions, actual days or M12 product
readiness.
ADR-0161/schema 54 subsequently admits exact bundle-11/trace-2 pairs through the
existing durable workflow and complete recovery/census verification. It preserves
the trace-version and equal-rule contracts above; no automatic route is added.
@@ -0,0 +1,55 @@
# ADR-0161: Durable migration of funded maturing wildlife
## Status and scope
Accepted for the scoped M12 durable maturation-transfer gate, 2026-10-19.
Extends ADR-0147–0149/0156/0158/0160. No biological rule, route, automatic upgrade,
default provisioning, new state table or live deployment is selected.
## Decision
Schema 54 admits precisely two migration pairs: equal bundle-10 predecessors with
trace 1 (rules 8), or equal bundle-11 predecessors with trace 2 (rules 9). Require
matching representations, world/frame/tick/quantum and compatible geometry, plus
the existing complete portable biological replay. Mixed bundles, cross-rule
traces and unknown versions fail. Existing retained bytes and migration checksums
remain exact; no SQL normalization of traces, manifests or digests is used.
Reuse the existing immutable preparation, staging, abort and paired receipt
journals and pending pointers. Source preparation retains all stock and freezes
its exact head. Destination staging retains verified capsules and a read-only
ghost at its exact captured head. Ghosts and nonresident source history own no
additional stock. Both roles remain paused across lease expiry/replacement;
timeouts do not abort or activate anything. All work/choice/birth guards remain.
The existing paired publisher requires both current fences, retained staging,
both exact heads and supported result manifests preserving each predecessor's
bundle. Publish both results, the common receipt and pointer settlement in one
transaction. Failed second publication rolls back the entire pair. Abort and
commit remain exclusive. Exact retries retain complete original bytes even under
replacement authority. No no-tick transfer runs maturation or re-derives bodies.
Recovery and registered pending-handoff census verification select biology from
the retained bundle/trace pair, replay both complete candidates, bind both result
digests and compare full local bytes. Missing or false evidence fails the entire
operation/query without zero, partial or old-head fallback. Settled hosts reload
and verify their committed head before resuming. Subsequent ordinary raw/cohort
ticks continue funded growth under the retained rules and environment.
## Alternatives, risks and qualification
A new journal duplicates existing atomic authority. Reusing trace 1 changes a
retained biological contract. Publishing endpoints separately or activating a
ghost duplicates ownership. Extend the exact allowlist and retain the existing
workflow instead. This adds another replay/admission matrix and retained-object
cost; it does not remove the shared database's availability requirement.
Require both representations and real player-origin juveniles, complete paired
stock/history equality, continued growth, freeze/staging recovery, retry/conflict,
pending-work/upgrade refusal, unknown replies, process kills, failed second
insert, abort/commit races, stale/replacement owners and registered census
capture races. Retain the rules-8 matrix and add rules-9 coverage, version-mismatch
SQL refusal and old-history replay. Run Release, sanitizers, analysis and the full
private persistence/backup/DR/checksum/privilege qualification. Multi-host network
and storage failure, linked environmental budgets, autonomous sustainability,
actual elapsed days and product acceptance remain separate M12 gates.

Some files were not shown because too many files have changed in this diff Show More