spec(sp11): amend B1b post-smoke — add slot 360 for popart-component mag

B1b smoke surfaced a real bug: SP11 mag-ratio canary reads slot 63
(REWARD_POPART_EMA_INDEX) which is overloaded:
- Pre-SP11 invariant: PopArt's normalization input (= total reward mag EMA)
- SP11 intent: popart-COMPONENT-specific magnitude

Pre-SP11 these collapsed because reward composition was inline
accumulation with popart dominant. Post-B1b decomposition exposed the
overload: total reward (= Σ w_i × r_i) is much larger than r_popart
specifically, so mag-ratio canary saw popart's "signal" as inflated
and the controller emitted w_pop ≈ 2.0 based on a contaminated ratio.

Symptom: B1b smoke sharpe ≈ 3 vs B1a baseline ≈ 30 — controller
amplified a wrongly-attributed signal while attenuating the actually-
firing components.

Resolution: allocate slot 360 = POPART_COMPONENT_MAG_EMA_INDEX.
Slot 63 stays as PopArt's input (pre-SP11 invariant preserved).
SP11 mag-ratio canary now reads:
- slot 360 (popart-specific) for ratios[0]
- slots 64..68 (existing cf/trail/micro/opp_cost/bonus) for ratios[1..5]

ISV total: 360 → 361 slots. SP5_SLOT_END = 361, ISV_TOTAL_DIM = 361.

The B1b fix-up commit will:
1. Allocate slot 360 in sp11_isv_slots.rs
2. Add per-bar popart_component_per_sample MappedF32Buffer
3. Write r_popart to that buffer at the assignment site (line ~2680)
4. Add tiny EMA kernel writing slot 360 from the buffer
5. Change mag-ratio canary signature to take popart_specific_slot +
   cf_others_base_slot (was single popart_ema_base_slot)
6. Update mag-ratio canary launcher
7. Re-run smoke; verify w_pop now reflects popart-specific magnitude
   (should be SMALL in Kelly-cap-suppressed smoke environments)
This commit is contained in:
jgrusewski
2026-05-04 09:58:33 +02:00
parent 7ddaf9c515
commit 52c0b75215

View File

@@ -562,8 +562,33 @@ After SP10's last slot at 339:
| `[352..358)` | `REWARD_COMPONENT_GRAD_RATIO_BASE` (6 canaries) | 6 |
| `358` | `SABOTEUR_ENGAGEMENT_RATE_INDEX` (canary) | 1 |
| `359` | `PNL_REWARD_MAGNITUDE_EMA_INDEX` (canary) | 1 |
| `360` | `POPART_COMPONENT_MAG_EMA_INDEX` (canary, NEW B1b fix-up) | 1 |
Total: **20 new slots**. Bump `SP5_SLOT_END = 360`, `ISV_TOTAL_DIM = 360`.
Total: **21 new slots**. Bump `SP5_SLOT_END = 361`, `ISV_TOTAL_DIM = 361`.
**Why slot 360 (amendment 2026-05-04 post-B1b smoke):** B1b's structural
refactor revealed that pre-SP11's `reward_components_per_sample[+0]`
(which feeds slot 63 = `REWARD_POPART_EMA_INDEX`) was being overloaded
to mean both "PopArt's normalization input" (= total reward magnitude
EMA) AND "popart-component-specific magnitude". Pre-SP11 these
collapsed to the same value because reward composition was inline
accumulation with popart as the dominant component.
Post-B1b with explicit per-component decomposition, the SP11 mag-ratio
canary reading slot 63 saw the inflated TOTAL-reward magnitude as
"popart's signal", and the controller redistributed weight toward
popart (w_pop ≈ 2.0) based on a contaminated ratio. Symptom: B1b smoke
showed sharpe ≈ 3 vs B1a baseline ≈ 30, traced to the controller
amplifying a wrongly-attributed signal while attenuating the actually-
firing components.
Resolution: allocate slot 360 for popart-component-specific magnitude
EMA. Slot 63 stays as PopArt's input (= total reward magnitude,
pre-SP11 invariant preserved). The SP11 mag-ratio canary reads slot
360 (popart-specific) + slots 64..68 (existing cf/trail/micro/opp_cost/
bonus) to compute the 6-component ratios. No change to PopArt's
existing readers; one new producer kernel + one mag-ratio canary
signature change.
## 5. Producer kernels (4 total)