Skip to content

Carrier-ratchet → 0 roadmap (#564) — workflow-generated, ground-truthed against source

Status: head = v0.7.5rc113 (rbs_lm flipped, CEIL_NUMPY_CARRIER = 15). Target = 0. Generated by the carrier-ratchet-to-zero workflow (run wf_e69d32fa-8fe, 2026-06-11): 15 parallel per-file investigation agents + a synthesizer, ground-truthed against the actual srmech source.

The load-bearing CORRECTION (every per-file spec got this wrong)

The specs assumed dense_matmul_complex / dense_norm / dense_dot_real/_complex are "already numpy-free, just drop the top import." FALSE — those helpers call np.ascontiguousarray / np.sum / np.zeros internally and RAISE numpy-absent (the rc70 runnable ≠ loadable trap). The ONLY genuinely numpy-free 2-D kernels are the mat_* family over Mat (mat_matmul / mat_solve / mat_hermitian_eigendecompose / mat_eigvals / mat_svd / mat_lstsq). Every consumer flip routes through mat_*, NOT dense_*.

Other corrections: - potentials.py was the OMITTED 15th carrier (hydrogen radial + harmonic-oscillator; calls hermitian_eigendecompose). Same numpy-as-ACCURACY shape as ica_jade. Handled in rc119. - Both "stays-gated" specs (ica_jade + potentials) are WRONG vs "want ZERO": mat_hermitian_eigendecompose is unconditionally numpy-free (native Jacobi C + _hermitian_eig_py fallback), so the eigh dependency is a CARRIER swap, not a floor. - so8 has DUAL numpy use — (a) rank assertions (matrix_rank) → exact RREF over ℚ (rc120, mathematically identical, no float-tol drift); (b) float SVD-nullspace / Gram-Schmidt geometry → carrier-swap to mat_svd + mat_norm, NOT exact-RREF (per [[feedback_cascade_svd_nullspace_accuracy_not_route_matrix_rank]]). Keep nullspace on float mat_svd. - No mat_norm/mat_dot exists (dense_norm/dot are carriers) → rc114 foundation. - No exact RREF/rank helper exists (matrix_cascades has char_poly/eigvals_exact, no rank) → rc120. - hdc.loop_left/right/conj use _lazy_numpy (np.asarray/np.ascontiguousarray) → raise numpy-absent → rc121 foundation before octonion→so8→triality.

Discipline (every rc)

  • Bump version at 5 SSOT locations incl. the scaffolding pin BEFORE running the suite ([[feedback_srmech_version_bump_hits_five_locations_run_suite_after]]).
  • Verify "runs numpy-GENUINELY-absent" via the _BLOCK_NUMPY meta-path subprocess (test_signal_processing_numpy_free_reachable_rc71 pattern), NOT monkeypatch sys.modules['numpy']=None (which only proves runtime-math-free, not fresh-import-free — [[feedback_carrier_ratchet_misses_require_numpy_subpackage_gates]]).
  • qm matrix layer → TOML [class] (rc75 Hurwitz precedent): EXTEND class_catalog/, reuse make_class, NO per-module carrier flips for the [class] ops, NO duplicate coupling codepath, NO duplicated loader. (spin/relativistic/sm/single_particle are factory-style operator builders, NOT [class] objects → they flip onto Mat directly, consistent with "group sensibly".)
  • No bare abs() (Class-K sign-branch). No new hashlib.sha256 (route amsc.format.sha256_bytes).
  • Mat.to_numpy/HV.to_numpy stay LOSSY export-convenience only; numpy = test-oracle + opt-in bridge.
  • Each rc: flip → 5-file bump → full suite → PR → 8-job CI → --merge (no squash) → tag at 2-parent merge → TestPyPI → clean numpy-absent verify. git add docs/srmech/ ONLY (never -A).

The 15-rc order (rc114 → rc128)

rc files CEIL difficulty foundation_first
rc114 amsc/laplacian.py+amsc/mat.py: mat_norm / mat_dot_real / mat_dot_complex xᵢ ² via rational.sqrt, pure-Python reduction, no abs) 15→15
rc115 qm/spin.py (Mat Pauli) + qm/bell.py (exact eigvals_exact) 15→13 moderate rc114
rc116 qm/single_particle.py + qm/sm.py (Mat carrier-construction; maybe Mat.identity/Mat.diag) 13→11 moderate rc114
rc117 qm/relativistic.py (Dirac γ exact Mat; γ from spin's σ) 11→10 mechanical rc114, rc115
rc118 qm/gauge.pyTOML [class] su2_gellmann.toml+su3_gellmann.toml (template for later reframes) 10→9 design-heavy rc114
rc119 qm/potentials.py (15th) + ica_jade.pymat_hermitian_eigendecompose; flip rc71 assert to "runs". SPLIT ica_jade→rc119b if einsum-Jacobi too heavy 9→7 design-heavy rc114
rc120 amsc/cascade/matrix_cascades.py: exact RREF-rank over ℚ (mat_rank_exact) 7→7 moderate — (FOUNDATION, gates so8 rank)
rc121 amsc/hdc.py/cascade: numpy-free octonion mult (native ctypes fed stdlib array + int8-table fallback off cd_basis_product) 7→7 design-heavy — (FOUNDATION, gates octonion→so8→triality)
rc122 qm/octonion.py (exact int8 table bytearray + numpy-free mult/conj/norm) 7→6 moderate rc121, rc114
rc123 qm/so8.py (exact-RREF rank assertions + Mat/mat_svd nullspace geometry — DUAL fix) 6→5 design-heavy rc120, rc121/122, rc114
rc124 qm/triality.py (Mat + mat_lstsq companion fit; einsum→mat_matmul/loops) 5→4 design-heavy rc122, rc123, rc114
rc125 qm/pseudo_hermitian.py (non-Hermitian eigvals via mat_eigvals; Gram solve via mat_solve) 4→3 design-heavy rc114
rc126 qm/propagators.pyTOML [class] (reuse rc118 loader; D@S=iI_4 via mat_matmul) 3→2 design-heavy rc115, rc117, rc118, rc114
rc127 spectral/__init__.py (HV/list coeff carrier + struct-pack; np.argsort→pure-Python stable sort; mat_hermitian_eigendecompose) 2→1 moderate rc114
rc128 mcp/_coercion.py CAPSTONE (boundary dual-path; lazy-numpy only behind ndarray back-compat) → flip CEIL_NUMPY_CARRIER 1→0 + numpy-absent fresh-import asserts for whole qm/spectral/mcp surface + audit eager _require_numpy gates 1→0 design-heavy ALL rc115–rc127

Spine (must land first; if one slips, its consumers can't flip)

  • rc114 mat_norm/mat_dot → gates nearly every consumer
  • rc120 exact RREF rank → gates so8
  • rc121 numpy-free octonion mult → gates octonion→so8→triality (strict chain rc121→122→123→124)

Design-heavy (do NOT rush; split if a verify wobbles)

rc118 (first TOML reframe — sets the template), rc119 (einsum Jacobi re-expression), rc121 (native feeding + int8 fallback), rc123 (deepest float coupling, dual rank/nullspace), rc124 (mat_lstsq), rc125 (general non-Hermitian eigvals), rc126 (second TOML reframe — reuse not duplicate), rc128 (capstone).