@@ -214,19 +214,56 @@ build-pwa: build-wasm
214214 @ echo " ✅ PWA files in web/"
215215 @ echo " 📝 Ready to deploy!"
216216
217+ # Smoke test: fast sanity check (<30 seconds). Taxonomy: SMK
218+ smoke :
219+ @ echo " Running smoke test..."
220+ @ echo " [1/4] Cargo check (jtv-core)..."
221+ @ cargo check --quiet -p jtv-core 2 >&1
222+ @ echo " [OK] Build compiles"
223+ @ echo " [2/4] Parse conformance file..."
224+ @ cargo run --quiet --bin jtv parse conformance/ valid/ data_expressions.jtv 2 >&1 > / dev/ null
225+ @ echo " [OK] Parser works"
226+ @ echo " [3/4] Run unit tests (quick)..."
227+ @ cargo test --quiet -p jtv-core --lib 2 >&1 > / dev/ null
228+ @ echo " [OK] Unit tests pass"
229+ @ echo " [4/4] Clippy (jtv-core, no warnings)..."
230+ @ cargo clippy --quiet -p jtv-core -- -D warnings 2 >&1 > / dev/ null
231+ @ echo " [OK] No clippy warnings"
232+ @ echo " Smoke test passed."
233+
217234# Run panic-attacker pre-commit scan
218235assail :
219236 @ command -v panic-attack >/ dev/ null 2 >&1 && panic-attack assail . || echo " panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
220237
221- # Self-diagnostic — checks dependencies, permissions, paths
238+ # Self-diagnostic — checks dependencies, permissions, paths, proofs. Taxonomy: REF
222239doctor :
223240 @ echo " Running diagnostics for julia-the-viper..."
224- @ echo " Checking required tools..."
225- @ command -v just >/ dev/ null 2 >&1 && echo " [OK] just" || echo " [FAIL] just not found"
226- @ command -v git >/ dev/ null 2 >&1 && echo " [OK] git" || echo " [FAIL] git not found"
227- @ echo " Checking for hardcoded paths..."
228- @ grep -rn ' $HOME\|$ECLIPSE_DIR' --include=' *.rs' --include=' *.ex' --include=' *.res' --include=' *.gleam' --include=' *.sh' . 2 >/ dev/ null | head -5 || echo " [OK] No hardcoded paths"
229- @ echo " Diagnostics complete."
241+ @ FAIL=0; \
242+ echo " === Required Tools ===" ; \
243+ command -v just >/ dev/ null 2 >&1 && echo " [OK] just" || { echo " [FAIL] just not found" ; FAIL=1 ; }; \
244+ command -v cargo >/ dev/ null 2 >&1 && echo " [OK] cargo ($(cargo --version 2>/dev/null | head -c 20))" || { echo " [FAIL] cargo not found" ; FAIL=1 ; }; \
245+ command -v git >/ dev/ null 2 >&1 && echo " [OK] git" || { echo " [FAIL] git not found" ; FAIL=1 ; }; \
246+ echo " === Project Structure ===" ; \
247+ test -f Cargo.toml && echo " [OK] Cargo.toml" || { echo " [FAIL] Cargo.toml missing" ; FAIL=1 ; }; \
248+ test -f Justfile && echo " [OK] Justfile" || { echo " [FAIL] Justfile missing" ; FAIL=1 ; }; \
249+ test -f LICENSE && echo " [OK] LICENSE" || { echo " [FAIL] LICENSE missing" ; FAIL=1 ; }; \
250+ test -d crates/ jtv-core/ src && echo " [OK] crates/jtv-core/src/" || { echo " [FAIL] core crate missing" ; FAIL=1 ; }; \
251+ test -f crates/ jtv-core/ src/ grammar.pest && echo " [OK] grammar.pest" || { echo " [FAIL] grammar.pest missing" ; FAIL=1 ; }; \
252+ echo " === Formal Proofs ===" ; \
253+ test -d jtv_proofs && echo " [OK] jtv_proofs/ (Lean 4)" || echo " [WARN] jtv_proofs/ missing" ; \
254+ test -f src/ abi/ Types.idr && echo " [OK] src/abi/Types.idr (Idris2)" || echo " [WARN] src/abi/Types.idr missing" ; \
255+ echo " === Conformance Suite ===" ; \
256+ VALID=$(ls conformance/ valid/ *.jtv 2 >/ dev/ null | wc -l); \
257+ INVALID=$(ls conformance/ invalid/ *.jtv 2 >/ dev/ null | wc -l); \
258+ echo " [INFO] $VALID valid programs, $INVALID invalid programs" ; \
259+ echo " === Security Checks ===" ; \
260+ grep -rn ' believe_me\|assert_total\|sorry\|Admitted\|unsafeCoerce' --include=' *.rs' --include=' *.idr' --include=' *.lean' . 2 >/ dev/ null | grep -v target/ | head -5 && { echo " [WARN] Dangerous patterns found" ; } || echo " [OK] No dangerous patterns" ; \
261+ echo " === Hardcoded Paths ===" ; \
262+ grep -rn ' \$HOME\|\$ECLIPSE_DIR\|/home/' --include=' *.rs' --include=' *.ex' --include=' *.sh' . 2 >/ dev/ null | grep -v target/ | head -5 && echo " [WARN] Hardcoded paths found" || echo " [OK] No hardcoded paths" ; \
263+ echo " === Test Count ===" ; \
264+ TESTS=$(grep -r ' #\[test\]' crates/ --include=' *.rs' 2 >/ dev/ null | grep -v target/ | wc -l); \
265+ echo " [INFO] $TESTS tests found" ; \
266+ if [ $FAIL -gt 0 ]; then echo " DIAGNOSTICS: FAILED ($FAIL issues)" ; exit 1 ; else echo " DIAGNOSTICS: PASSED" ; fi
230267
231268# Auto-repair common issues
232269heal :
0 commit comments