Layer A additive: at fold boundary, all SP4 ISV bound slots, Wiener
state, and Pearl C engagement counters reset to 0 (Pearl A sentinel).
Pearl A's first-observation replacement requires both `prev_x_mean`
(the ISV bound slot) AND `state.x_lag` (Wiener triple offset 2) to be
exactly 0 when a producer first fires in a new fold. Without these
resets, the new fold's first producer launch would EMA against fold-N's
stale state — exactly the cross-fold anchor staleness Mech 8's reverted
slow_ema reset was trying to fix imperfectly.
Per `feedback_no_partial_refactor.md`, every half of the SP4 fold-reset
contract migrates in the same commit:
- 9 SP4 ISV bound family entries added to StateResetRegistry, dispatched
by `reset_named_state` to write 0.0 to every slot in [131..171):
- sp4_target_q_bound (slot 131)
- sp4_atom_pos_bounds (slots 132..136 = 4 branches)
- sp4_weight_bounds (slots 136..144 = 8 param groups)
- sp4_adam_m_bounds (slots 144..152)
- sp4_adam_v_bounds (slots 152..160)
- sp4_wd_rate_bounds (slots 160..168)
- sp4_grad_clip_bound (slot 168)
- sp4_h_s2_bound (slot 169)
- sp4_l1_lambda_trunk (slot 170)
- sp4_wiener_state entry — bulk write_bytes(0) on `wiener_state_buf`
(141 mapped-pinned f32 = 47 producers × {sample_var, diff_var, x_lag}).
New `GpuDqnTrainer::reset_sp4_wiener_state` helper mirrors the existing
`reset_fast_grad_norm_ema` pattern.
- sp4_clamp_engage_counters entry — bulk write_bytes(0) on
`clamp_engage_per_block_buf` (2048 mapped-pinned i32 = 8 groups ×
256 blocks). New `GpuDqnTrainer::reset_sp4_clamp_engage_counters`
helper. Each fold restarts Pearl C engagement-rate tracking from a
clean 0 baseline.
Total 11 registry entries (group-keyed, not per-slot) — follows the
existing convention of `isv_grad_balance_targets` (1 name → 4 slots)
and `isv_q_quantiles` (1 name → 8 slots). Family-level entries keep
the dispatch table bounded while still providing per-family auditability.
Audit doc `docs/dqn-wire-up-audit.md` extended with SP4 Task A12 entry.
cargo check --lib --tests clean. state_reset_registry + soft_reset
smoke tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>