Complete M5.8 bounded world restart proof

This commit is contained in:
dingo
2026-09-26 20:33:43 -04:00
parent a2a12fdc69
commit 5aeb18a4aa
11 changed files with 448 additions and 5 deletions
+32
View File
@@ -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.
+85
View File
@@ -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.