memlnaut-nisps/scripts
monkey-w1n5t0n 8c44a51220 fix(gates): close the no-heap lint's false negatives and parity's silent FAIL
Phase 2 (S30, L52, L51). These are the gates that are supposed to protect the
core's headline constraints, so the fix is demonstrated rather than asserted.

- S30: lint-cpp.sh's heap audit hardcoded dsp/engines/ml/modes, so nisps/core/
  and nisps/pipeline/ — the P4 control-rate hot path — were NEVER scanned. Its
  comment handling also post-filtered with `grep -v ' *//'`, which misses
  trailing comments. Coverage is now exclusion-based (everything under nisps/
  except wasm/, tests/, build/), comments are STRIPPED before matching using the
  same perl strip audit_float_suffix already used, and the pattern set is
  extended. dynamic_storage.hpp remains deliberately allowlisted — it is a real,
  documented heap user that #errors on RP2350.

  PROOF (run by me, not just reported): planted `new float[4]` in
  nisps/pipeline/input_chain.hpp plus a std::malloc in the trailing-comment form
  the old filter skipped.
      old lint: "[lint-cpp] clean", exit 0     <- the false negative, live
      new lint: FAIL, both lines named, exit 1
  Plants removed; lint clean and exit 0 again; tree verified unmodified.

- L52: parity-check.sh's FAIL branch was unreachable — under `set -e` the script
  died at the diff command before it could print anything. A mismatch therefore
  failed silently. The diff now runs inside the `if` condition, where set -e does
  not apply. Verified by forcing NISPS_PARITY_TOL=0: old script exited silently,
  new one prints FAIL with the exit code.

- L51: parity_check.cpp and parity_wasm.mjs headers documented 4 stages / blob
  v1 against a real 7-stage / v5 implementation. Comment-only rewrite; parity
  behaviour unchanged (re-ran the gate: PASS, 1273 floats within 1e-5).

Note for future work: the lint now permanently scans nisps/core/ and
nisps/pipeline/, so changes there are enforced that were not before.
2026-07-21 13:23:11 +02:00
..
build-and-flash-firmware.sh Add firmware variant selection to build scripts 2026-04-16 00:37:58 +09:00
build-cpp-tests.sh Stream 11: verification infrastructure (golden vectors + parity + lint + CI + Playwright migration) 2026-04-29 19:50:55 +03:00
build-firmware-arch.sh ci: restore verification — reachable submodule pin, codegen + WASM freshness gates 2026-07-21 11:57:32 +02:00
build-firmware.sh Preserve firmware variant capitalization 2026-04-16 00:46:02 +09:00
build-wasm.sh refactor(wasm): delete 12 dead C-API entries and the weights-publish channel 2026-07-21 12:48:50 +02:00
firmware-common.sh refactor(ml)!: P2.1 storage-policy split — MLPCore<Storage>, fixed + dynamic models 2026-07-13 23:47:03 +02:00
flash-firmware.sh Improve UF2 bootloader detection 2026-04-16 00:52:39 +09:00
lint-cpp.sh fix(gates): close the no-heap lint's false negatives and parity's silent FAIL 2026-07-21 13:23:11 +02:00
parity-check.sh fix(gates): close the no-heap lint's false negatives and parity's silent FAIL 2026-07-21 13:23:11 +02:00
run-all-tests.sh ci: restore verification — reachable submodule pin, codegen + WASM freshness gates 2026-07-21 11:57:32 +02:00
setup-firmware-toolchain.sh refactor(firmware): delete vendored daisysp and the input_router layer 2026-07-21 12:49:25 +02:00