Foundation / checks (checks) (push) Successful in 5s
Foundation / checks (client) (push) Successful in 4s
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 4s
Foundation / checks (tsan) (push) Successful in 5s
Foundation / postgres-tools (push) Successful in 5s
Foundation / server-image (push) Successful in 4s
Foundation / image (push) Successful in 5s
61 lines
2.9 KiB
Markdown
61 lines
2.9 KiB
Markdown
# Cellular lives checkpoint envelope v1
|
|
|
|
This schema is specified by [ADR-0108](../docs/adr/0108-cellular-checkpoint-profile.md).
|
|
It is the complete payload for region checkpoint profile 4,
|
|
`cellular-lives-v1`. Profile 3 remains the independent creation-only
|
|
`primitive-lives-v1` format.
|
|
|
|
## State closure
|
|
|
|
The canonical little-endian envelope carries explicit lengths and versions for
|
|
the region identity, 50 ms current tick, finite cellular area, provisioned
|
|
habitat and source opening totals, ordered living-cell records, ordered corpse
|
|
records, region heat and the complete lineage archive. Integers have fixed
|
|
widths; records are sorted by stable identity/address. Decoders reject unknown
|
|
versions, nonzero reserved fields, duplicate or noncanonical records,
|
|
overflow, trailing bytes, malformed checksums and any count or length above the
|
|
caps before allocating from untrusted lengths.
|
|
|
|
The state is complete at one committed tick. It contains no pending or
|
|
client-authored intentions. Durable action requests and outcomes remain in the
|
|
fenced database batch records that publish the matching checkpoint.
|
|
|
|
Each living record retains player-account binding when present, life and
|
|
organism identity, current genome identity, birth tick, growth state, position,
|
|
body matter, reserve energy/matter and every timer required by the selected
|
|
cellular rule version. Extent, phenotype and metabolic budgets are derived from
|
|
the archived genome and growth state. Restore recomputes them; a stored cache
|
|
must exactly match or the payload is refused.
|
|
|
|
Each corpse retains the dead organism identity, death tick, final position and
|
|
transferable body/reserve inventory. Heat is a separate energy-only region
|
|
account. The habitat carries its finite patch stock and provenance plus the
|
|
explicit opening total for each source. For every ledger channel and source,
|
|
opening holdings must reconcile exactly to current habitat, living bodies and
|
|
reserves, corpses and heat according to the declared transfers.
|
|
|
|
Restore requires exact world/region/frame and end-tick agreement with the
|
|
manifest, complete organism/genome/archive closure, unique player bindings,
|
|
in-bounds footprints, valid energy/matter channels, and canonical byte-identical
|
|
re-encoding. Genesis contains no living cells or corpses. Profile-4 clone genesis
|
|
is unsupported until an identity-remapping contract exists.
|
|
|
|
## Bounds
|
|
|
|
| Component | Maximum |
|
|
|---|---:|
|
|
| Total payload | 8 MiB |
|
|
| Living cells | 256 |
|
|
| Provisioned food patches | 4,096 |
|
|
| Retained organisms and corpses | 65,536 |
|
|
|
|
Every nested format/version is pinned by profile 4's manifest version bundle.
|
|
The manifest SHA-256 verifies the immutable object; nested checksums are for
|
|
early corruption detection and canonical decoding, not authentication.
|
|
|
|
## Implementation status
|
|
|
|
This document records the approved closure direction only. No profile-4 codec,
|
|
SQL admission or recovery implementation is claimed until the corresponding
|
|
code and tests land.
|