From 52c0b75215554cb9677ea759c4547c7844a1e18c Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Mon, 4 May 2026 09:58:33 +0200 Subject: [PATCH] =?UTF-8?q?spec(sp11):=20amend=20B1b=20post-smoke=20?= =?UTF-8?q?=E2=80=94=20add=20slot=20360=20for=20popart-component=20mag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- ...-04-sp11-reward-as-controlled-subsystem.md | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/docs/superpowers/specs/2026-05-04-sp11-reward-as-controlled-subsystem.md b/docs/superpowers/specs/2026-05-04-sp11-reward-as-controlled-subsystem.md index 9b9eb2e6b..5bb99082e 100644 --- a/docs/superpowers/specs/2026-05-04-sp11-reward-as-controlled-subsystem.md +++ b/docs/superpowers/specs/2026-05-04-sp11-reward-as-controlled-subsystem.md @@ -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)