Implement M6.6 retained corpses and versioned bounded decay
This commit is contained in:
@@ -461,3 +461,11 @@ M6.5d native qualification complete: [report](engineering/ENVIRONMENTAL_QUALIFIC
|
||||
records boundary/malformed-state tests, 16-seed paired restore runs, more than a
|
||||
million logical ticks and cost evidence. M6.5 is implemented and natively qualified;
|
||||
Linux CI is separately pending verification. Next: M6.6 corpse/decay integration.
|
||||
|
||||
M6.6 implemented (2026-09-27): [ADR-0056](adr/0056-environmental-terminal-decay.md)
|
||||
adds explicit terminal facts, retained corpse accounts, shared integer decay caps,
|
||||
N/P mineralization and organic-energy heat release. Rules/envelope v2 restore
|
||||
partial inventory, lifecycle and retry reports together; v1 stays byte-compatible.
|
||||
Tests cover rollback, water headroom, shared caps, restored exact retries, history
|
||||
eviction, malformed v2 envelopes and next-tick nutrient-fed growth. Next: M6.7
|
||||
fixed environment interval scheduling; M6.8 retains the full integration proof.
|
||||
|
||||
+8
-2
@@ -7,7 +7,7 @@ persistent simulation server. The founding vision remains unchanged.
|
||||
## Completed implementation
|
||||
|
||||
- Vision, architectural pillars, risks, open-question register, architecture
|
||||
diagrams, biological contracts, engineering constitution and 55 ADRs (including the accepted M6.5 persistence and process contracts).
|
||||
diagrams, biological contracts, engineering constitution and 56 ADRs (including the accepted M6.6 terminal/decay contract).
|
||||
Proposed/deferred choices remain distinct from accepted proof decisions.
|
||||
- M0–M4 task breakdowns with dependencies, acceptance evidence and risks,
|
||||
plus M5–M14 gates in [ROADMAP.md](ROADMAP.md).
|
||||
@@ -61,7 +61,7 @@ for the bounded proof; the general production ECS remains a later measured choic
|
||||
|
||||
| Priority | Work | Completion evidence |
|
||||
|---|---|---|
|
||||
| 1 | M6.6 return dead biomass to environment | Terminal actors cannot act; bounded, conserved decay with persistent residuals and retry safety |
|
||||
| 1 | M6.7 schedule local environment intervals | Explicit fixed intervals and phase order, bounded catch-up, pause/resume and stale boundary refusal |
|
||||
| Research | Improve aggregate fidelity and measure Linux/target-host costs | M4.6 found no qualifying width; see the aggregate budget report |
|
||||
| 2 | Revisit the ADR-0031/0032 reproduction cost model | Reproduction is affordable only at the genome schema's floor; decide whether that is intended before M4 builds cohorts on it |
|
||||
| Delivery gate | Add/update the dev workload when a deployable increment needs it; Argo is ready | Observe Job/pod completion separately from image publication; no World0 changes |
|
||||
@@ -722,3 +722,9 @@ required delivery check, not an observed pass.
|
||||
Next: M6.6 terminal events, retained corpse biomass and bounded decomposition.
|
||||
No maintenance, reproduction, player progression, simulation version or deployment
|
||||
changed in this qualification segment.
|
||||
|
||||
M6.6 now retains corpse resources and lifecycle in opt-in rules/envelope v2.
|
||||
Partial bounded decay conserves matter and energy, restores with exact retry
|
||||
history, and can supply the surviving producer on a later tick. V1 compatibility
|
||||
is retained. See ADR-0056 and VALIDATION.md for scope and evidence. This does not
|
||||
add mortality causes, decomposer kinetics, durable publication or player sessions.
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# ADR-0056: Retained environmental corpses and bounded decay
|
||||
|
||||
## Status
|
||||
Accepted for the M6.6 synthetic fixture, 2026-09-27. Rules 2 extend ADR-0055;
|
||||
rules 1 and their canonical envelope remain supported without reinterpretation.
|
||||
|
||||
## Context
|
||||
Death must not erase inventory or permit further feeding/growth. Lifecycle,
|
||||
remaining corpse balances and retries must commit together. ADR-0027 establishes
|
||||
retained accounts and bounded decay for M2; M6 requires tagged destinations.
|
||||
|
||||
## Decision
|
||||
Input carries two terminal flags, producer then consumer, each 0/1. These are
|
||||
trusted host facts, not client kill requests or a mortality model. Reject a flag
|
||||
for an already terminal account on a new tick. Retained exact retries still return
|
||||
their original report. Apply facts before capture/growth and feeding. A bite
|
||||
involving either terminal actor rejects the entire tick, including pending deaths.
|
||||
Emptying a producer by feeding still terminates it.
|
||||
|
||||
Keep the original account and capacities, including after it empties. There is no
|
||||
new spendable corpse copy or resurrection. Read-only balances plus terminal flags
|
||||
identify corpse inventory. Ten explicit integer per-tick decay caps, default zero,
|
||||
use field order and are shared across corpses in ascending ID order (producer,
|
||||
consumer). Unused quota expires; unprocessed inventory survives. These are whole
|
||||
bounded transfers, not fractional kinetics. There is no decay backlog or fractional
|
||||
clock. Source/growth rational residuals retain their existing meaning.
|
||||
|
||||
Decay runs last. Source fields 0..9 return to environment fields
|
||||
0,1,2,3,1,2,6,9,8,9 respectively: organic N/P mineralize; organic energy becomes
|
||||
heat; other compartments keep their tags. Carbon remains prepaid organic carbon.
|
||||
Water return is additionally bounded by habitat water headroom; residual water
|
||||
stays in the corpse. Source-channel caps are independent. This gate does not decay
|
||||
environmental waste or imply decomposer kinetics/reactants. Returned nutrients
|
||||
become available to growth on the following tick.
|
||||
|
||||
Reports include consumer transition and ten summed corpse debits in source field
|
||||
order. Publish via the existing atomic resource checkpoint. Envelope v2 records
|
||||
caps, both lifecycle states, terminal inputs and decay reports in its replay audit.
|
||||
Format must match rules. No in-place migration or automatic organism replacement.
|
||||
|
||||
## Alternatives Considered
|
||||
Deleting accounts loses matter. Separate corpse inventories duplicate ownership.
|
||||
Fractional rates add state without a selected kinetic model. Reinterpreting v1
|
||||
silently changes physics. Integer caps follow the existing scoped M2 contract.
|
||||
|
||||
## Benefits
|
||||
Exact conservation, bounded work, recoverable partial decay and unchanged v1 bytes.
|
||||
|
||||
## Costs
|
||||
Two scoped rules/codec versions and larger bounded receipt storage.
|
||||
|
||||
## Risks
|
||||
Synthetic mineralization is not complete chemistry. ID priority is a fixture
|
||||
policy, not a fairness rule. Terminal facts need future host validation. Retaining
|
||||
empty accounts remains bounded to two actors.
|
||||
|
||||
## Consequences
|
||||
Test pending-death rollback, inactive actors, shared caps, water blocking, partial
|
||||
decay/restore, retries, malformed envelopes, history eviction and nutrient-fed
|
||||
regrowth. Durable publication remains M7; M6.7 schedules intervals.
|
||||
@@ -1,5 +1,7 @@
|
||||
# Architecture decision records
|
||||
|
||||
- [ADR-0056: Environmental terminal decay](0056-environmental-terminal-decay.md) - accepted for M6.6 retained corpses, bounded decay and rules/envelope v2.
|
||||
|
||||
Locked requirements outrank these records. Review architecture, ADRs, public
|
||||
contracts, tests, then implementation. Stop expanding implementation on conflict.
|
||||
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# M6.5 environmental process contract v1
|
||||
|
||||
M6.6 adds opt-in rules 2 under [ADR-0056](../adr/0056-environmental-terminal-decay.md).
|
||||
The public config adds decay[10] in fg/pJ per tick; input adds terminal[2] flags
|
||||
in actor order. Progress adds consumer_terminal; reports add consumer_transition
|
||||
and decomposed[10] source-channel totals. Terminal facts precede capture/growth,
|
||||
then feeding, then bounded corpse decay. Original accounts retain remaining
|
||||
inventory. All phases share one rollback and persisted retry boundary. The v1
|
||||
contract below and its bytes remain unchanged. See the envelope schema for v2.
|
||||
|
||||
Authority: ADR-0055, ADR-0054, environmental units (ADR-0050), and the scoped
|
||||
producer/feeding rules (ADRs 0025/0026). **Implemented in M6.5c; natively qualified in M6.5d.** M6.5b is a
|
||||
contract segment. M6.5c implements the runtime and complete buffer codec together.
|
||||
|
||||
@@ -1917,3 +1917,35 @@ Executed Windows checks:
|
||||
Native M6.5 qualification is complete; no new Linux/UBSan/TSan or R730xd/cluster
|
||||
run was available locally. CI must confirm the committed test on its toolchains.
|
||||
No source-rule, schema, golden or deployment change.
|
||||
|
||||
## M6.6 retained corpse resources - 2026-09-27
|
||||
|
||||
Rules/envelope v2 now support trusted terminal facts for either fixture actor,
|
||||
retained corpse inventory and bounded tagged decay. This is an in-memory process
|
||||
checkpoint, not durable region publication or gameplay mortality. Rule v1 and its
|
||||
canonical bytes are preserved; no golden was replaced. Config/input extensions
|
||||
are rejected under v1 rather than silently omitted.
|
||||
|
||||
New tests cover pending death plus feeding rollback, terminal actor rejection,
|
||||
shared per-channel caps in ID order, exact transfer destinations, partial decay,
|
||||
zero caps, water headroom, restored duplicate/conflicting/stale requests, permanent
|
||||
terminal state, consumer-corpse nutrients feeding a surviving producer next tick,
|
||||
every v2 byte truncation, and checksum-repaired invalid lifecycle/history fields.
|
||||
Eight 90-tick cases compare retained balances against independent cumulative-quota
|
||||
formulas, with restore at ticks 17, 65 and 90 and exact conservation every tick.
|
||||
|
||||
Commands: tools/windows-check.ps1 -Preset release/analysis/asan -Action check;
|
||||
-Preset release -Action format; git diff --check. The initial suites found the
|
||||
older negative test's rules=2 was now valid; it now rejects unsupported rules=3.
|
||||
Final results are recorded below after all processes complete.
|
||||
|
||||
Release long qualification again ran 16 x 65536 logical ticks, 2097152 paired
|
||||
advances, and produced unchanged v1 fingerprint 93a9f9b296caac36. Snapshot size
|
||||
remains 30615 bytes in that v1 case. Owner size is now 20152 bytes (formerly13400),
|
||||
including bounded extension receipts; budget admission uses sizeof dynamically.
|
||||
No new Linux/UBSan/TSan or R730xd measurement is claimed. Linux CI remains a
|
||||
separate verification step; local Docker Linux engine/toolchain is unavailable.
|
||||
|
||||
Final native validation: Release 54/54 (3.66s), clang-tidy analysis 54/54 (13.37s),
|
||||
ASan 54/54 (46.72s), format check and git diff --check passed. M6.6 is natively
|
||||
qualified; the next gate is M6.7 interval scheduling. No deployment was changed.
|
||||
|
||||
Reference in New Issue
Block a user