mirror of
https://github.com/Dicklesworthstone/coding_agent_session_search.git
synced 2026-09-22 11:59:25 +08:00
4072a3b992
Adds an automated regression test that scans shell scripts under scripts/ for two bug classes: 1. Bare `cargo build|test|bench|clippy|run|check|fmt|update|install` outside the rch-wrapped form. Originating beads (vq9l5/yzh2t/zlzpk) correctly wrapped their target scripts; the test prevents future regressions. 2. `set -e` + `((VAR++))` / `((VAR--))` arithmetic-abort idiom — bash evaluates the post-increment expression to 0 when VAR was 0, which set -e treats as failure. Subsumes coding_agent_session_search-iaor8 (the zlzpk polish bead, closed as superseded by this scanner). Also introduces `scripts/lib/run_cargo.sh` — a single-source-of-truth helper that scripts can `source` to get a consistent rch-wrapped cargo invocation (logs cmd/cwd/target/rch_bin to stderr; defaults RCH_BIN and RCH_TARGET_DIR; defends against missing rch with a clear error). Files: - scripts/lib/run_cargo.sh: shared helper. - tests/scripts_rch_compliance.rs: 8 tests — 2 live-fire (no bare cargo, no set-e arithmetic against HEAD), 1 helper-presence check, 5 synthetic fixtures (violating, clean, set-e + ++, no-set-e + ++, safe-form +=, comment-immune). - scripts/tests/tafss_compliance_scanner_e2e.sh: orchestrator script.