name: Box-First Guard (Advisory) on: pull_request: push: jobs: advisory-guards: name: Advisory Box-First Checks runs-on: ubuntu-latest continue-on-error: true # informational for now steps: - name: Checkout uses: actions/checkout@v4 - name: Install ripgrep run: sudo apt-get update && sudo apt-get install -y ripgrep - name: Disallow direct env reads in jit (except config/runtime) run: | set -e echo "Checking for std::env::var direct reads under src/jit (excluding config.rs and rt.rs)" # find occurrences outside config.rs and rt.rs if rg -n "std::env::var\(" src/jit | rg -v 'src/jit/(config|rt)\.rs'; then echo "[GUARD] Found direct env reads outside jit::config/rt (advisory)." exit 1 else echo "[OK] No direct env reads outside jit::config/rt" fi - name: Enforce single B1 ABI switch point (advisory) run: | set -e echo "Checking unexpected B1 mentions" # allow occurrences in known switch points if rg -n "B1" src | rg -v 'abi_param_for_kind|returns.*types::B1|jit-b1-abi'; then echo "[GUARD] Found unexpected B1 usage (advisory)." exit 1 else echo "[OK] No unexpected B1 usage" fi - name: Print reminder for stats.jsonl (advisory) run: | echo "[NOTE] Consider emitting stats.jsonl with {function, abi_mode, reason} at least once per run."