Aetheria/tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens b15cbbe5de Cut 10: the hot path stops looking like, and costing like, a diagnostic
The diagnostics refactor (72c0109c) kept the debug HUD and the simulation on one
fire-control model by routing HitProbability THROUGH Inspect. That was the right
invariant implemented at the wrong level: every AI and turret evaluation, per
weapon per tick, built the full diagnostic struct and ran IsRevealed's sort, the
aim-point cell walk and HullKernel's allocations and per-cell exp -- and only
then checked whether the target was even in range. A Soul pass measured 9.87 us
and 448 B per call on paths that used to bail in nanoseconds. Operator: it made
the hot path look like a diagnostic one.

One model is now shared at the level of its factors. HitProbability runs its
cheap gates first and bails, exactly as it did before the refactor, and computes
PSensor, PSpread and POnHull only for a shot that is actually possible. Inspect
calls the same four factor functions and fills the struct unconditionally,
because a HUD wants to see why a shot is impossible. The HUD panel and its one
test consumer are unchanged.

Two tests make the design enforced rather than conventional:
- HitProbabilityMatchesInspect: exact equality across 21 configurations covering
  every gate the hot path bails on plus Precision and info sweeps. Dies when a
  factor changes in only one caller.
- GatedOutHitProbabilityAllocatesNothing: 1000 out-of-range calls allocate zero
  bytes. Dies when HitProbability is routed back through Inspect.

Both mutations verified RED and distinguished from a compile failure, with
restores checked against a hash taken before mutating.

231 tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 15:18:12 +02:00
..
Aetheria.Shared.Tests Cut 10: the hot path stops looking like, and costing like, a diagnostic 2026-09-22 15:18:12 +02:00
mutation_tests.py Un-clobber the item-provenance mutation harness; own file for this cut 2026-09-18 05:07:23 +02:00
mutation_tests_addressables_cut.py Un-clobber the item-provenance mutation harness; own file for this cut 2026-09-18 05:07:23 +02:00
mutation_tests_condition_ratio_cut8.py Cut 8: pin ConditionRatio -- perfect/dead/durability/heat/power/force-unchanged 2026-09-19 04:41:43 +02:00
mutation_tests_fire_control_cut1.sh Cut 7.2: mutation harnesses for Cuts 1 and 2 2026-09-19 19:43:57 +02:00
mutation_tests_fire_control_cut2.sh Cut 7.2: mutation harnesses for Cuts 1 and 2 2026-09-19 19:43:57 +02:00
mutation_tests_fire_control_cut3.sh Cut 9: re-anchor cut3 and cut6 onto the mixed seed 2026-09-22 03:01:04 +02:00
mutation_tests_fire_control_cut4.py Fire control Cut 4: pin the beam roll, splash, and the OnFire short-circuit fix 2026-09-19 15:17:35 +02:00
mutation_tests_fire_control_cut5.sh Cut 8: a removed entity is a dead entity, and re-anchor the stranded mutations 2026-09-22 00:50:57 +02:00
mutation_tests_fire_control_cut6.sh Cut 9: re-anchor cut3 and cut6 onto the mixed seed 2026-09-22 03:01:04 +02:00
mutation_tests_fire_control_cut6c.sh Cut 8: a removed entity is a dead entity, and re-anchor the stranded mutations 2026-09-22 00:50:57 +02:00
mutation_tests_fire_control_cut6d.sh Cut 8: a removed entity is a dead entity, and re-anchor the stranded mutations 2026-09-22 00:50:57 +02:00
mutation_tests_fire_control_cut8.sh Cut 8: a removed entity is a dead entity, and re-anchor the stranded mutations 2026-09-22 00:50:57 +02:00
mutation_tests_fire_control_cut9.sh Cut 9: the die is not a die 2026-09-22 02:33:22 +02:00
mutation_tests_shield_panel_cut1.py Add the Cut 1 batchmode probe and its mutation harness 2026-09-18 06:08:24 +02:00
mutation_tests_shield_panel_cut2.py Fix ShieldManager's missing-envelope fallback regression 2026-09-18 06:45:07 +02:00
mutation_tests_shield_panel_cut3.py Add the Cut 3 batchmode probe and its mutation harness 2026-09-18 13:51:44 +02:00
mutation_tests_shield_reserve.py Pin the shield reserve ruling: 7 rules, each with a mutation 2026-09-19 02:46:26 +02:00
mutation_tests_stats_power_cut0.py Cut 0: pin the collapsed evaluation path's agreements and disagreements 2026-09-18 16:19:33 +02:00
mutation_tests_stats_power_cut1.py Cut 1: close S5/S6's validation gaps, pin S7's surviving mutants 2026-09-18 18:42:10 +02:00
mutation_tests_stats_power_cut2.py Pin Gate 1, Gate 2 and F8's mutant fix with tests and mutations 2026-09-18 20:42:05 +02:00
mutation_tests_stats_power_cut3.py F8: re-anchor cut3/cut4 mutation harnesses after later cuts moved their code 2026-09-19 06:02:08 +02:00
mutation_tests_stats_power_cut4.py F8: re-anchor cut3/cut4 mutation harnesses after later cuts moved their code 2026-09-19 06:02:08 +02:00
mutation_tests_stats_power_cut5.py Mutation harness for Cut 5's tier rules 2026-09-19 02:58:55 +02:00
mutation_tests_stats_power_cut6.py Resolve request/brownout conflict: evaluate power requests nominally 2026-09-19 06:58:57 +02:00
mutation_tests_stats_power_cut7.py Pin Cut 7's brownout rules: BrownoutTests.cs 2026-09-19 04:11:00 +02:00
mutation_tests_stats_power_cut8.py Cut 7: refuse a stat naming a role its design lacks 2026-09-19 05:01:17 +02:00
mutation_tests_stats_power_nominal_request.py Resolve request/brownout conflict: evaluate power requests nominally 2026-09-19 06:58:57 +02:00