You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase 32: pre-promotion deep re-audit -- fixes a CRITICAL adaptive-trust panic
A from-scratch 6-agent line-by-line re-audit of the ENTIRE codebase (every .rs
file), each re-deriving the math in Python without trusting the in-tree tests,
before moving HSD toward the production default. It surfaced a genuine CRITICAL
flight-safety bug every prior audit + the passing test suite missed.
CRITICAL (fixed) -- adaptive-trust clamp panic. scvx.rs computed the relaxed trust
thresholds as `(frac*ceil).clamp(FLOOR, algo.rho_*)`. f64::clamp PANICS when
min > max, reachable when a caller sets rho_grow < 0.1 or rho_shrink < 0.02 (both
plausible aggressive-trust tunings) once the rho-ceiling drops below rho_shrink
(the normal flight-scale relaxation regime). Under panic="abort" that aborts the
process, defeating the no-panic flight contract. Tests never hit it (default
0.25/0.7 and recommended 0.05/0.1 sit at/above the floors). Fix:
.max(FLOOR).min(configured) -- identical when FLOOR<=configured, panic-free
otherwise -- plus BadInput validation of rho_shrink/rho_grow/rho_reject/conv_tol_*,
and a regression test (adaptive_trust_subfloor_rho_grow_no_panic) exercising the
formerly-panicking path.
Everything else verified correct to machine precision (re-derived independently):
solve_socp_hsd reproduces the full embedded Newton system to 2e-15; soc_nt_scaling_
exact to 2.3e-14; structured KKT (block-tridiag + free-tf SMW) to 6e-16; both
dynamics Jacobians exact; cone signs correct; preconditioning exact; FFI full ABI
parity, no panic across the boundary.
Doc-truth reconciled: params.rs/scvx.rs "no structured HSD yet" (false since
Phases 28-29), cone.rs geomean + module docs, structured_socp.rs fallback-chain,
HANDOFF test counts (132/144 -> 145) + file count (23 -> 27 .rs). Removed a stray
_audit_hsd_check.py an audit agent left in the tree.
145 tests pass (+1 regression), clippy -D warnings clean, thumb no_std (solver+FFI)
clean, mars_descent byte-identical (4.3699e3).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments