Closes Phase 4-A's open loop by making the no-transaction band LEARN its
width. Two coupled mechanisms wired in:
1. Adaptive turnover-target controller — single-thread CUDA kernel
(rl_band_turnover_controller.cu) reads per-step `frac_not_masked` and
adjusts the turnover target via asymmetric Schulman-bounded adapter:
tighten (×0.97/step) above 0.60 threshold, loosen (×1.05/step) below
0.20. Asymmetric LOOSEN rate is faster per
`pearl_dead_signal_resurrection_discipline`. First-observation
bootstrap on slot 809 with dedicated boot-done sentinel slot 810.
2. Backward chain wiring — rl_band_head_backward.cu propagates
`grad_band_per_b [B × 2]` through the asymmetric ±|tanh|·N_max
activation and linear projection into per-batch weight/bias scratch
plus `grad_h_t [B × HIDDEN_DIM]` (OVERWRITE). Trainer reduces via
`reduce_axis0` and folds into the encoder grad combiner alongside
π/V/FRD/outcome heads using the existing `grad_h_accumulate_scaled`
pattern. Band-weight Adam steps share LR with π
(RL_LR_PI_INDEX) — same plateau dynamics as policy.
Plus a GPU reducer rl_band_frac_aggregate.cu (single-block tree-reduce
over batch → writes to slot 812) and a host-side launch sequence in
step_with_lobsim_gpu_body that runs frac_aggregate → controller →
turnover_loss → backward outside graph capture, gated by
RL_BAND_ENABLED_INDEX > 0.5 so Phase 3D bit-equality is preserved when
the master gate is OFF.
ISV slots added (809-812): turnover_ema, controller_boot_done,
turnover_target_adaptive, frac_not_masked_observed. The turnover loss
kernel now reads slot 811 (controller output) instead of the static
slot 803. Bootstrap target 0.05 matches the Phase 4-A static default so
first-step behavior is identical.
Tests: 4 new band_invariants tests cover the controller bootstrap, the
escalate-on-over-trading path, the loosen-on-saturation path, and the
backward chain producing non-zero `grad_h_t` from a turnover/target
mismatch. All 9 band tests + 18 multi_head_policy regression tests pass.
Determinism: `determinism-check.sh --quick` exits 0 for the three
relevant configurations (band off, band on, band + multi-head on). The
Schulman controllers are deterministic by construction (no PRNG);
backward kernels are sole-writer per (batch, slot) so reduce_axis0
delivers bit-equal weight grads across replays.
Spec: docs/superpowers/specs/2026-06-03-no-transaction-band-architecture.md
§3.1 Option (c), §3.3 (backward chain), §3.4 (loss weight controller),
§5 (diag emission), §9.1 Mitigation 3 (resurrection discipline).
Pearls applied:
* pearl_bootstrap_must_respect_clamp_range — bootstrap 0.05 ∈ [0.01, 0.20]
* pearl_dead_signal_resurrection_discipline — asymmetric tighten/loosen rates
* pearl_welford_trade_count_is_step_not_trade — bootstrap-done sentinel slot
* pearl_determinism_achieved — single-thread controller, deterministic reducers
Single-seed local smoke (b=128, 2000+500 steps, FOXHUNT_BAND_ENABLED=1)
runs end-to-end without NaN. The band saturates to `frac_masked = 1.0`
because position state stays at 0 throughout — the sigmoid surrogate
gradient is zero deep inside the band, so the band's upper boundary
cannot be pulled toward 0 even though the controller drives the
adaptive target to its MAX (0.20). Spec §9.1 Mitigation 2
(`RL_BAND_MAX_MASK_FRAC_INDEX` exploration-slot bypass in
rl_band_mask.cu) was declared but not shipped in Phase 4-A; it is the
structural fix for this chicken-and-egg trap. Phase 4-B mechanism
itself is verified correct via the four new tests; the saturation is
an architectural-grafting gap surfaced for Phase 4-A2 follow-up rather
than a Phase 4-B implementation defect.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>