Complete M5.8 bounded world restart proof
This commit is contained in:
+2
-2
@@ -271,8 +271,8 @@ M5.6 is complete under [ADR-0047](adr/0047-world-codec.md):
|
||||
and retry state together. M5.7 implements [single-writer local publication](adr/0048-local-publication.md):
|
||||
two alternating manifest slots, immutable snapshot/journal payloads, verified detached
|
||||
recovery, journal replay, checkpoint compaction and injected pre/post-commit interruption.
|
||||
This is not a production multi-host durability or ownership service. M5.8 remains the
|
||||
end-to-end deep-edit/restart and cost-evidence gate.
|
||||
This is not a production multi-host durability or ownership service. M5.8 implements the [bounded world proof](engineering/WORLD_PROOF.md): separate
|
||||
prepare/compact/verify processes, conservation oracles, frozen hashes and measured costs.
|
||||
|
||||
**Decisions still open:** final spherical layout, region dimensions, adaptive LOD,
|
||||
field quantization beyond the initial experiment, hydrology and surface extraction.
|
||||
|
||||
+13
-3
@@ -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 48 ADRs.
|
||||
diagrams, biological contracts, engineering constitution and 49 ADRs.
|
||||
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 | M5.8 bounded world proof | Deep edit -> checkpoint compaction -> restart with same state/inventory and measured operation costs |
|
||||
| 1 | M6.1 environmental units and coupling contract | Define habitat mapping, resource units and volume-to-matter accounting before biological coupling |
|
||||
| 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 |
|
||||
@@ -590,9 +590,19 @@ acknowledgements. M5.7 local publication and recovery are implemented above.
|
||||
ADR-0048 adds a single-writer local-filesystem adapter over the M5.6 codec. It uses
|
||||
immutable checksum-named snapshot/journal blobs and two alternating canonical
|
||||
manifest slots; replacing the inactive manifest is the publication point. Checkpoints
|
||||
compact a committed journal only after a caller supplies the recovered/advanced
|
||||
compact a committed journal only after a caller supplies the exact recovered
|
||||
state. Recovery validates the selected snapshot and complete journal replay into a
|
||||
detached ChunkStore. Tests cover lock exclusion, journal/restart, compaction, failpoints
|
||||
before and after publication, malformed manifests and missing published payloads.
|
||||
FNV remains a corruption detector, and this local adapter makes no host-loss,
|
||||
multi-region or production durability claim. Filesystem orphan cleanup is deferred.
|
||||
|
||||
## M5.8 bounded world restart proof
|
||||
|
||||
Added evo-world-proof and a CTest workflow that launches fresh prepare, compact and
|
||||
verify processes for uniform, sparse and heavily modified deep chunks. Independent
|
||||
cell/debris oracles, exact canonical equality, frozen hashes, retained retries and
|
||||
clean regeneration checks pass. [Measured costs and reproduction](engineering/WORLD_PROOF.md)
|
||||
record five Windows Release runs and explicit accounting/durability limits.
|
||||
No world format or simulation version changed. Next: M6.1 environmental units and
|
||||
coupling contract; Linux golden execution remains a CI confirmation.
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# ADR-0049: Bounded world restart proof and measurements
|
||||
|
||||
## Status
|
||||
Accepted for M5.8 development evidence; no world format or simulation rule change.
|
||||
|
||||
## Context
|
||||
Individual codecs and file tests do not demonstrate a full create/edit/journal/
|
||||
compaction/restart workflow or explain its cost. M5 closes with a reproducible
|
||||
bounded workload before environmental coupling begins.
|
||||
|
||||
## Decision
|
||||
Add the host tool `evo-world-proof <prepare|compact|verify> <workload> <root>`.
|
||||
CTest launches separate processes for each phase. Prepare refuses an existing root,
|
||||
publishes a base plus a journal, compact recovers and publishes its exact state,
|
||||
and verify requires the compacted generation and compares full canonical bytes to
|
||||
a freshly reconstructed uninterrupted fixture. No phase deletes files.
|
||||
|
||||
Three seed-123456 fixtures each own eight 16-cube chunks at chunk Z=-1000:
|
||||
uniform (empty journal), sparse (widely spaced chunks, one full-cell excavation),
|
||||
and heavy (64 commands, 64 cuts each across four chunks, 4096 distinct varying fills).
|
||||
An independent analytical cell oracle checks every fill/material and the exact
|
||||
debris sum; retained retries and clean eviction/regeneration are checked separately.
|
||||
Freeze canonical hashes as shared Windows/Linux regression expectations. A hash
|
||||
observed on one platform does not claim another platform has run it.
|
||||
|
||||
Report JSON phase timings in nanoseconds and store-accounted bytes, snapshot/journal
|
||||
sizes, command/cut counts and hash. Timings include validation where the API performs
|
||||
it. No performance threshold: record several independent runs and their range.
|
||||
Store-accounted bytes exclude host vectors, replay candidates and OS/allocator
|
||||
overhead; do not label them process peak memory. The explicitly chosen resident
|
||||
budget and retained output sizes make these limits visible.
|
||||
|
||||
## Alternatives Considered
|
||||
A single-process close/reopen misses process-local state dependencies. A planet
|
||||
stress test before the bounded proof would obscure correctness and capacity limits.
|
||||
Existing generation reference fixtures remain the independent base-version checks.
|
||||
|
||||
## Benefits
|
||||
Real process restart, conservation evidence and portable regression fixtures with
|
||||
reproducible measurements; the headless kernel gains no tooling or IO dependency.
|
||||
|
||||
## Costs
|
||||
Full reconstruction and repeated restore are deliberately validation-heavy. Retained
|
||||
local files accumulate because this gate supplies no deletion policy.
|
||||
|
||||
## Risks
|
||||
Eight chunks cannot establish planet capacity. Filesystem cache, antivirus and host
|
||||
load affect timings. A graceful process restart is not a physical power-cut test.
|
||||
|
||||
## Consequences
|
||||
Run the same CTest workflow on supported presets/CI, preserve frozen fingerprints,
|
||||
document local results and unexecuted platforms. M6 must define volume/matter and
|
||||
habitat coupling before resources become biologically consumable.
|
||||
@@ -55,3 +55,4 @@ design. No unadopted candidate is a link dependency of the proof.
|
||||
- [ADR-0047: World codecs](0047-world-codec.md) - accepted for M5.6 bounded canonical snapshots and detached edit-journal replay.
|
||||
|
||||
- [ADR-0048: Local publication](0048-local-publication.md) - accepted for M5.7 single-writer snapshot/journal publication and recovery.
|
||||
- [ADR-0049: Bounded world proof](0049-bounded-world-proof.md) - accepted for M5.8 restart regression and cost evidence.
|
||||
|
||||
@@ -149,3 +149,7 @@ versions, revisions, finite debris and retry history in one validated snapshot.
|
||||
Journal replay uses the existing excavation transaction on a detached store. Dirty
|
||||
chunks remain pinned; encoding does not acknowledge durability. M5.7 supplies local
|
||||
file publication and compaction; no production persistence dependency was added.
|
||||
|
||||
M5.8 validates the local stack through separate prepare/compact/verify processes; see
|
||||
[bounded world proof and measurements](../engineering/WORLD_PROOF.md). This adds no
|
||||
production ownership or biological resource conversion contract.
|
||||
|
||||
@@ -1617,3 +1617,35 @@ Native Windows ASan is not UBSan. Full-size throughput, allocation-failure injec
|
||||
and crash-atomic files remain unverified/later gates. Codecs write no files, clear no
|
||||
dirty flags and issue no durable acknowledgements. No Argo/World0 operation occurred.
|
||||
Next: M5.7 local snapshot/journal publication, compaction and recovery.
|
||||
|
||||
## M5.7 review and M5.8 bounded world proof - 2026-09-26
|
||||
|
||||
Reviewed a2a12fdc696c005bd3feb496f6efcdc58c28262c against the three prior findings.
|
||||
Committed-journal compaction compares exact recovered canonical state; poisoned
|
||||
handles refuse recovery; interruption tests use changed payloads and include partial
|
||||
write failures. No new blocking finding identified in that correction's scope.
|
||||
|
||||
M5.8 adds ADR-0049, evo-world-proof and world-process-restart CTest. It launches fresh
|
||||
prepare/compact/verify processes for three workloads, checks all cells and conserved
|
||||
debris independently, compares canonical bytes, enforces frozen hashes and checks
|
||||
clean regeneration. Existing formats and simulation goldens are unchanged.
|
||||
|
||||
Executed on Windows x64 / MSVC 19.44:
|
||||
|
||||
- tools/windows-check.ps1 -Preset release -Action check: 48/48 passed, including the
|
||||
final source with frozen hashes and nonthrowing boundary diagnostics.
|
||||
- tools/windows-check.ps1 -Preset analysis -Action check: clang-tidy 19 and 48/48
|
||||
passed. Initial widening-conversion and exception-boundary diagnostics were fixed.
|
||||
- tools/windows-check.ps1 -Preset asan -Action check: 48/48 passed.
|
||||
- tools/windows-check.ps1 -Preset release -Action format: passed.
|
||||
- Five independent Release process workflows passed; medians/ranges and exact
|
||||
accounting/payload sizes are in WORLD_PROOF.md. Measurements preceded only the
|
||||
equivalent size_t constant and error-reporting correction; no success-path
|
||||
workload, snapshot or algorithm changed.
|
||||
- git diff --check: passed.
|
||||
|
||||
CTest integrates the same frozen expectations into existing Linux CI, but this
|
||||
turn did not execute Linux, UBSan, physical power-cut, target-server or cluster
|
||||
checks. ASan is not UBSan. Process restarts are graceful; M5.7 fault injection
|
||||
remains separate coverage. No production durability or planet capacity claim.
|
||||
No Argo or World0 operation occurred. Next: M6.1 units and environmental coupling.
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
# M5.8 bounded world proof
|
||||
|
||||
Scope: [ADR-0049](../adr/0049-bounded-world-proof.md), Windows x64, MSVC 19.44,
|
||||
Release preset, 2026-09-26. No world format, generator or simulation version changes.
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
A[Prepare process: generate and excavate] --> B[Base snapshot + committed journal]
|
||||
B --> C[Compact process: replay and checkpoint exact state]
|
||||
C --> D[Verify process: restore compact snapshot]
|
||||
D --> E[Canonical equality + cell oracle + clean regeneration]
|
||||
```
|
||||
|
||||
Build with the README presets. CTest `world-process-restart` runs all workloads
|
||||
through three separate OS processes. To inspect one manually, choose a new path
|
||||
whose parent exists (use `.exe` on Windows):
|
||||
|
||||
```sh
|
||||
build/release/evo-world-proof prepare heavy build/my-world-proof
|
||||
build/release/evo-world-proof compact heavy build/my-world-proof
|
||||
build/release/evo-world-proof verify heavy build/my-world-proof
|
||||
```
|
||||
|
||||
Prepare refuses existing directories. Every invocation prints JSON; CTest retains
|
||||
reports and files under `build/<preset>/world-proof/<run-id>`. No phase deletes data.
|
||||
The tool is developer evidence, not a server, migration utility or deployment.
|
||||
|
||||
## Workloads and correctness
|
||||
|
||||
All fixtures use seed 123456, eight 16-cube chunks, a 4 MiB accounted resident budget
|
||||
and chunk Z=-1000 (local cell Z starts at -16000m). This is deep local excavation,
|
||||
not a spherical planet or core simulation. Uniform loads contiguous untouched rock;
|
||||
sparse loads eight widely separated chunks and removes one complete cell; heavy
|
||||
applies 64 commands of 64 cuts across four chunks, changing 4096 distinct cells.
|
||||
Heavy removal at cell ordinal i is `1 + i % 257`, for i=0..1023 in each edited chunk.
|
||||
|
||||
An analytical oracle inspects every material/fill and checks remaining occupied
|
||||
volume plus debris equals the initial volume. Canonical equality includes revisions
|
||||
and retry history. An exact duplicate of the last command must retain its receipt.
|
||||
Verify also evicts/regenerates a clean chunk, compares every cell against the base
|
||||
generator and rejects the old view. Frozen hashes are regression expectations,
|
||||
not independent correctness proofs or cryptographic integrity checks.
|
||||
|
||||
| Workload | Commands / cuts | Debris volume units | Canonical hash | Accounted bytes before / after | Snapshot / journal bytes |
|
||||
|---|---:|---:|---|---:|---:|
|
||||
| Uniform | 0 / 0 | 0 | db06d14d81c62c8c | 274632 / 274632 | 131468 / 68 |
|
||||
| Sparse | 1 / 1 | 65535 | 9cd2752316152d88 | 274632 / 278736 | 131592 / 140 |
|
||||
| Heavy | 64 / 4096 | 526360 | 0dc4f24dc24f58e0 | 274632 / 340168 | 339084 / 198212 |
|
||||
|
||||
Hex JSON omits leading zeros. These goldens are enforced by the same test on Windows
|
||||
and Linux CI; Linux execution for this change is not yet observed locally.
|
||||
|
||||
## Measured costs
|
||||
|
||||
Five separate complete Release workflows on the development Windows host, with
|
||||
filesystem caches uncontrolled. Values below are median [minimum, maximum] ms;
|
||||
they are observations, not thresholds or Dell R730xd capacity estimates.
|
||||
|
||||
| Workload | Generate/load | All edits | Encode | Restore compact snapshot | Compact committed journal |
|
||||
|---|---:|---:|---:|---:|---:|
|
||||
| Uniform | .834 [.829,.864] | 0 | .320 [.317,.330] | 1.295 [1.291,1.313] | 7.080 [6.847,7.685] |
|
||||
| Sparse | .841 [.835,.855] | .040 [.040,.040] | .330 [.322,.331] | 1.344 [1.333,1.362] | 8.338 [8.226,8.706] |
|
||||
| Heavy | .836 [.833,.855] | 10.808 [10.489,11.718] | .605 [.601,.614] | 5.330 [5.269,5.817] | 25.000 [23.561,25.446] |
|
||||
|
||||
Generation includes store creation/loading. Edit time sums excavation calls, excluding
|
||||
request construction. Restore timing excludes the freshly reconstructed oracle fixture
|
||||
and its final comparison; compaction includes committed-state verification, encoding
|
||||
and filesystem publication. JSON also reports journal-build, publication and clean
|
||||
regeneration timings; regeneration includes comparison against the generated base.
|
||||
|
||||
Accounted bytes cover the ChunkStore contract, not process peak memory: fixture
|
||||
vectors, serialization buffers, detached replay candidates, allocator/OS overhead
|
||||
and filesystem caches are excluded. Both source and recovered states coexist in
|
||||
this verification tool. Snapshot sizes include full canonical state and exact retry
|
||||
history. Heavy compaction's 339084 bytes exceed its 131468-byte base plus 198212-byte
|
||||
journal; compaction removes replay work, and does not promise smaller storage.
|
||||
Old generations remain on disk; orphan/retention cleanup is a later policy.
|
||||
|
||||
## Limits and next gate
|
||||
|
||||
Graceful process restarts complement M5.7's injected publication failures; they
|
||||
do not prove physical power-loss or multi-host durability. No planet-scale memory,
|
||||
throughput, hydrology, renderer or biological nutrient conversion claim follows.
|
||||
M6.1 must establish environmental units, habitat mapping and volume-to-matter
|
||||
conversion before coupling this terrain to biology.
|
||||
Reference in New Issue
Block a user