docs(smoke): magnitude_distribution — replace H9-delete references with fix-path

Per standing rule feedback_no_functionality_removal.md: never propose
deleting the magnitude branch as a fallback. Updated the Task 2.2
regression-assertion comments + assertion message to point at the
actual follow-up fixes if the eh+ef≥0.30 gate fails:
  - per-magnitude reward shaping
  - per-bin advantage weighting
  - magnitude curriculum
  - state-vector enrichment

No semantic change to the test (still asserts eh+ef≥0.30); only the
guidance comments were reframed.
This commit is contained in:
jgrusewski
2026-04-22 11:27:18 +02:00
parent 8aef59f735
commit c0fee5a9bf

View File

@@ -58,16 +58,20 @@ fn test_magnitude_distribution() -> Result<()> {
// after the Philox tie-break fix the eval argmax samples tied indices
// uniformly, so eh + ef should approach training-time magnitude spread.
// Threshold 0.30 is the user-specified gate from Task 2.9 (`eval_dist eh + ef ≥ 0.3`).
// Do NOT relax — failure here means the H10 fix alone is insufficient and
// the H9 fallback (delete magnitude branch) may need to promote to primary.
// Do NOT relax — failure here means the magnitude branch isn't yet differentiating
// Quarter / Half / Full enough to warrant the branch's existence. Follow-up fixes
// (per-magnitude reward shaping, per-bin advantage weighting, magnitude curriculum,
// state-vector enrichment) are scoped to make the branch useful. Per
// feedback_no_functionality_removal.md, the branch is never deleted as a fallback.
let [eq, eh, ef] = trainer.last_eval_magnitude_dist();
println!("[EVAL_DIST] Quarter={:.3} Half={:.3} Full={:.3}", eq, eh, ef);
assert!(
eh + ef >= 0.30,
"H10 regression: eval Half + Full share {:.3} < 0.30 (eq={:.3} eh={:.3} ef={:.3}) \
— argmax tie-break did not prevent collapse. Train-mode dist_mag should show \
similar spread; if training dist is also low, the H9 fallback (delete magnitude \
branch) may be needed.",
similar spread; if training dist is also low, the next fix step is \
per-magnitude reward shaping / per-bin advantage weighting / curriculum — \
make the magnitude branch useful, not remove it.",
eh + ef, eq, eh, ef
);
Ok(())