Files
johannesandClaude Sonnet 5.5 a94632ea3d chore: delete code comments, add ratchet lint and ADRs
Classify every comment as tautology, stale, excuse or decision record.
Tautology/stale/excuse comments are deleted (excuses filed as issues
#196-#236), decisions moved to docs/adr/0001-0034.

- scripts/lint-comments.sh + .comment-baseline: per-file comment count
  may only go down; wired into tests/all.sh
- .claude/skills/delete-comment: repeatable audit workflow
- cargo fmt applied to touched crates

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-21 13:37:32 +01:00

20 lines
1004 B
Bash

#!/bin/sh
set -eu
root=$(cd "$(dirname "$0")/.." && pwd)
tmp=$(mktemp -d)
trap 'kill $srv 2>/dev/null; rm -rf "$tmp"' EXIT
port=$((20000 + $$ % 20000))
python3 "$root/tests/fake_m5.py" $port & srv=$!
mkdir -p "$tmp/home/.hx" "$tmp/repo/src"
echo '{"claude":{"access":"fake-token","refresh":"r","expires":99999999999999}}' > "$tmp/home/.hx/auth.json"
printf '[lsp]\ndisable = ["rust-analyzer"]\n' > "$tmp/home/.hx/config.toml"
printf '[package]\nname = "t"\nversion = "0.1.0"\nedition = "2021"\n' > "$tmp/repo/Cargo.toml"
sleep 0.5
export RUSTUP_HOME="${RUSTUP_HOME:-$HOME/.rustup}" CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}"
cd "$tmp/repo"
HOME="$tmp/home" HX_BASE_URL="http://127.0.0.1:$port" "$root/target/debug/hx" -p "add f" > "$tmp/out" 2> "$tmp/err" || { cat "$tmp/err"; exit 1; }
grep -q "FINISHED tests=green" "$tmp/out" || { echo "--- out"; cat "$tmp/out"; echo "--- err"; cat "$tmp/err"; exit 1; }
grep -q "a + 1" src/lib.rs
curl -s "http://127.0.0.1:$port/" | grep -q 'left: 3'
echo "m5 e2e ok"