Files
aevolution/docs/adr/0041-aggregate-budget.md
T
2026-10-08 12:08:53 -04:00

2.7 KiB

[Reviewed]

ADR-0041: Measure aggregate cost before enabling tier selection

Status

Accepted for M4.6 measurement tooling only. No runtime tier selector or biological rule is adopted. Uses the breeding-order correction already committed in 55a728a. Historical M4.5 results are retained; the new run independently checks them.

Context

M4.5 detected large resolution errors, and review detected mismatched parent priority at capacity. Timing those differing models would not justify a policy.

Decision

Share one test-only fixture between comparison and benchmark. Both representations allocate breeding slots oldest-first. A contested-slot control compares individual portraits, not only totals. Preserve the real collapse/advance/materialize integration. Measure 100 founders for 10,000 ticks at widths 10/25/50/100/200 and energy supplies 240/300/360 per tick. Supplies are independent experiments, not gameplay constants. Report population, energy and matter error plus false extinction. Benchmark step loops with a warmup and three fresh measured repetitions, report steady-clock elapsed nanoseconds, final census and peak row payload/vector capacity bytes. Timing excludes setup, conservation checks and conversion; these costs are not production budgets. No portable wall-time assertion. Compare costs only alongside fidelity results.

Provisional research gate: no false extinction and final population, energy and matter errors each <=100 parts per thousand in every tested scarcity scenario. This is a recommendation for experiments, not an accepted production error budget. Failure keeps automatic tier selection disabled; do not pick a width merely because it runs faster. Even passing would require trajectory, mixed-genome and host evidence.

Alternatives Considered

Copying the fixture would allow rules to drift. Timing the validation loop measures assertions/ledger verification instead of model advancement. A runtime automatic selector is premature before any resolution has demonstrated acceptable fidelity.

Benefits

Costs and ecological error refer to the same fixture. Raw results are reproducible.

Costs

The individual fixture retains dead rows and sorts eligible parents each step; report that cost rather than extrapolating to a future compact active ECS.

Risks

One synthetic genome, deterministic founding distribution, no production physics, network, scheduler, conversion overhead or server hardware measurement. Payload and capacity bytes exclude allocator metadata, temporary vectors, stack and RSS.

Consequences

Keep controls and conservation in CTest. Archive native measurements with compiler, build and hardware metadata. Do not change simulation versions: only a test model changes. Repeat Linux/target-host measurements before any capacity promise.