Qualify M6.5 environmental fixture with boundary and long-run tests

This commit is contained in:
dingo
2026-09-27 13:57:01 -04:00
parent 1b040c1fb5
commit 6fd553c84b
9 changed files with 595 additions and 2 deletions
+5
View File
@@ -456,3 +456,8 @@ M6.5c implemented: complete process envelope and atomic environmental fixture.
Source rates, residuals, last funded interval, lifecycle and exact retry reports now
restore together; retained history is replay-validated against an audit anchor.
Next M6.5d: broader boundary/long-run qualification; M6.5 remains open until it passes.
M6.5d native qualification complete: [report](engineering/ENVIRONMENTAL_QUALIFICATION.md)
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.
+15 -1
View File
@@ -61,7 +61,7 @@ for the bounded proof; the general production ECS remains a later measured choic
| Priority | Work | Completion evidence |
|---|---|---|
| 1 | M6.5d qualify persisted producer/consumer fixture | Broader adversarial bounds, long-run seeds, restored replay and cost evidence |
| 1 | M6.6 return dead biomass to environment | Terminal actors cannot act; bounded, conserved decay with persistent residuals and retry safety |
| 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 |
@@ -708,3 +708,17 @@ Native validation is recorded separately from Linux CI verification.
Next: M6.5d broader qualification (boundary/adversarial cases, long-run seeds and
cost evidence). M6.5 as a whole is not yet marked complete; no deployment changed.
## M6.5d native qualification (2026-09-27)
M6.5a-d are implemented and qualified natively. Added boundary/malformed-state
coverage and a deterministic long-run/cost harness. The extended run compared
1048576 logical ticks against continuous controls, including 329231 feeding
requests; balances and restored bytes matched. See the
[qualification report](engineering/ENVIRONMENTAL_QUALIFICATION.md) for evidence and
limits. Native Release/analysis/ASan suites passed 54/54; Linux CI remains a separate
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.
@@ -77,3 +77,8 @@ the private checkpoint validates accounting before nonthrowing publication. The
complete envelope includes an audit anchor that permits deterministic replay of the
retained process receipts on restore. See schemas/environmental-community.md and
the process contract for bounds. M6.5d remains the broader qualification gate.
M6.5d native qualification completed 2026-09-27; see
[the qualification report](../engineering/ENVIRONMENTAL_QUALIFICATION.md).
No fixture rules changed. Linux CI and deployment performance remain separately
verified gates; this does not claim persistent ecology or live-player readiness.
+5 -1
View File
@@ -1,7 +1,7 @@
# M6.5 environmental process contract v1
Authority: ADR-0055, ADR-0054, environmental units (ADR-0050), and the scoped
producer/feeding rules (ADRs 0025/0026). **Implemented in M6.5c; broader qualification remains M6.5d.** M6.5b is a
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.
Coefficients below are fixture inputs, not game rules.
@@ -214,3 +214,7 @@ compares all reports and final state. The anchor is not spendable. The consumer
always active in rules v1 (no consumer-death operation exists); producer terminal
state is serialized explicitly. Frame/site, account IDs, source identity and primitive
rate config come from the complete envelope, never missing-state defaults.
M6.5d now provides [native qualification and cost evidence](../engineering/ENVIRONMENTAL_QUALIFICATION.md).
The report distinguishes verified synthetic conservation/replay from ecological
stability, gameplay mortality and deployment capacity. No rules changed in M6.5d.
@@ -0,0 +1,88 @@
# M6.5 environmental qualification and cost report
Recorded 2026-09-27. Scope: ADR-0055's synthetic, one-site/two-actor fixture.
M6.5a-d are implemented and qualified natively. Linux CI remains an independent
required delivery check; no unobserved CI success is claimed.
## Reproduce
```powershell
.\tools\windows-check.ps1 -Preset release -Action check
.\build\release\evo-environmental-qualification.exe --long
```
CTest runs 16 seeds with 4096 ticks each; `--long` uses 65536 ticks per seed and
adds three 100000-step timing samples. Linux uses the same executable without
`.exe`. The qualification target is part of ordinary CI tests, with a 120-second
cap. Timing is informational, never a noisy portable pass/fail threshold.
## Evidence
| Check | Result |
|---|---|
| Closed energy/C/N/P/other balance | Independent checked sums after every seeded tick |
| Continuous versus restored process | Reports and canonical bytes match; restore every 997 ticks and at run end |
| Source/progress | Disabled/unfunded source, frozen residuals, overflow with carried numerator, no heat recycling (existing contract tests) |
| Limiting resources | Water, C, N, P and organic-other each independently block growth when absent |
| Conversion endpoints | 0/1000 capture and assimilation, retained water cannot become edible biomass |
| Rollback | Late consumer capacity failure undoes prior capture/growth and partial staged bite |
| Input/config admission | Wrong rules/world/IDs, zero source/duration/area/denominators/recipe/cost, invalid efficiencies and temperature limits |
| Temperature | Producer limits in contract suite; consumer inside/outside inclusive endpoints with whole-tick rejection |
| Codec | 13 targeted malformed outer states, trailing bytes, 512 bit mutations with recomputed checksum; accepted alternatives must round-trip canonically |
| Tick exhaustion | Synthesized valid no-op trace ending at u64 max; retry succeeds, wrap/expired input rejects, bytes unchanged |
| Memory | Accounted owned resource bytes remain constant throughout seeded runs |
The 512 mutations produced 3 valid alternative states. That is not an authentication
failure: the format has a corruption checksum, and cannot distinguish a legitimate
alternative state from someone intentionally rewriting and resealing it. Invalid
states reject; accepted states must satisfy canonical restore/replay validation.
The mutation driver is a bounded fuzz-style smoke test, not a coverage-guided fuzzer.
Final extended run:
```text
seeds=16 ticks_per_seed=65536 paired_steps=2097152
captured=2891204 grown=1479838 bites=329231
fingerprint=93a9f9b296caac36 validation_seconds=1.132057
```
There are 1048576 logical ticks and an uninterrupted comparison branch for each,
so 2097152 actual advances. Seeded inputs use the repository's explicit SplitMix64
stream, including source on/off, temperature gates and affordable matter bites.
Assimilation varies across 0, 500 and 1000. Energy bites are separately tested in
the contract/rollback cases. Fingerprint is a diagnostic XOR of final-state hashes,
not an authentication token or replacement for the per-seed byte comparisons.
No new golden or simulation law was changed to obtain these results.
## Local cost sample
Windows x64, MSVC 19.44 Release, AMD Ryzen 7 9800X3D, 8 cores / 16 logical CPUs.
Not a controlled benchmark host and not the deployment R730xd. The step sample
uses one producer/consumer fixture, source enabled, fixed eligible temperature,
no feeding, and includes normal retry-window/anchor maintenance. The separate
seeded qualification above includes feeding, repeated audits and restore work.
| Metric | Observed |
|---|---|
| 100000 steps, three samples | 0.027525 / 0.026734 / 0.026783 seconds |
| Median step batch | 0.026783 seconds |
| Accounted resources | 390216 bytes |
| sizeof process owner (includes retry array and anchor) | 13400 bytes |
| Two reserved 64KiB scratch allowances | 131072 bytes |
| Combined minimum admitted budget | 534688 bytes |
| Final complete snapshot | 30615 bytes |
| Restore including retained-history replay | 0.197700 / 0.240200 / 0.197300 ms |
Accounted bytes are not RSS: allocator headers, stack beyond documented scratch,
and caller-owned query/output buffers are excluded. Snapshot construction requires
the separate bounded output allowance documented by the schema. Small cache-hot
fixtures do not predict MMO tick capacity, networking cost or ecology-worker scale.
No optimization or performance SLA is justified by this measurement alone.
## Remaining scope
M6.6: terminal events with retained corpse resources and bounded decomposition.
M6.7: scheduling intervals/catch-up. M6.8: the full death/nutrient/regrowth slice and
longer ecological/cost analysis. This gate does not prove ecological stability,
starvation mortality, player logout fairness, crash-safe publication or host-loss
recovery. M2/M3 maintenance and reproduction rules remain unchanged.
+26
View File
@@ -1891,3 +1891,29 @@ Executed native analysis, Release and ASan builds plus the targeted
and git diff --check passed. Full suites were not repeated for this test-only fix.
Linux clang-tidy/libstdc++ confirmation remains with the next Gitea run; native
analysis is not claimed as a reproduction of the Linux diagnostics.
## M6.5d environmental qualification - 2026-09-27
Added the environmental-qualification CTest and optional `--long` driver. It tests
admission/capacity/overflow boundaries, each missing recipe resource, efficiency
endpoints, consumer temperature gates, recomputed-checksum mutations, a u64-max
trace and deterministic paired continuous/restored simulations. No runtime change.
See [ENVIRONMENTAL_QUALIFICATION.md](ENVIRONMENTAL_QUALIFICATION.md) for detailed
coverage, exact commands, long-run output, machine and measured memory/timing.
Executed Windows checks:
- Release configure/build/check: 54/54 CTests passed.
- Analysis configure/build/check: clang-tidy/warnings-as-errors and 54/54 passed.
- ASan configure/build/check: 54/54 passed, including tick exhaustion.
- After adding the final tick-exhaustion case, Release and analysis rebuilt and
environmental-qualification passed again. A constant-expression integer-width
diagnostic in the new test was corrected before that final analysis run.
- Release format and git diff --check passed.
- Final Release `evo-environmental-qualification.exe --long`: 16 x 65536 logical
ticks and paired continuous branches passed; 2097152 advances, 329231 bites,
matching snapshots and conserved totals. Reported fingerprint 93a9f9b296caac36.
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.