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>
This commit is contained in:
johannesandClaude Sonnet 5.5 committed 2026-11-21 13:37:32 +01:00
1 parent 0545702fe0
commit a94632ea3d
131 files changed
+1051 -1746

No files matched your search

+1 -4
View File
@@ -1,5 +1,4 @@
#!/bin/sh
# End-to-end: hx -p against a scripted fake Anthropic API. No network, no real credentials.
set -eu
root=$(cd "$(dirname "$0")/.." && pwd)
tmp=$(mktemp -d)
@@ -16,9 +15,8 @@ grep -q "Done: file says hi from hx." "$tmp/out"
log=$(curl -s "http://127.0.0.1:$port/")
echo "$log" | grep -q '"auth": "Bearer fake-token"'
echo "$log" | grep -q 'oauth-2025-04-20'
echo "$log" | grep -q 'hi from hx' # bash tool result sent back to the model
echo "$log" | grep -q 'hi from hx'
ls "$tmp/home/.hx/sessions/"*/*.jsonl > /dev/null
# a GPT model goes to the Codex endpoint, not to the Claude API (both logged in)
echo '{"claude":{"access":"fake-token","refresh":"r","expires":99999999999999},"codex":{"access":"cx-token","refresh":"r","expires":99999999999999,"account_id":"acc"}}' > "$tmp/home/.hx/auth.json"
HOME="$tmp/home" HX_BASE_URL="http://127.0.0.1:$port" "$root/target/debug/hx" -m gpt-5.6-terra -p "hi" > /dev/null 2> "$tmp/err" || true
curl -s "http://127.0.0.1:$port/" | python3 -c '
@@ -26,7 +24,6 @@ import json, sys
last = json.load(sys.stdin)[-1]
assert last["path"].endswith("/responses") and last["body"]["model"] == "gpt-5.6-terra" and last["auth"] == "Bearer cx-token", last
' || { echo "FAIL: gpt model not routed to codex"; cat "$tmp/err"; exit 1; }
# inside herdr: working, idle and release reach the herdr binary; resume command carries the session
printf '#!/bin/sh\necho "$@" >> "%s/herdr.log"\n' "$tmp" > "$tmp/herdr"; chmod +x "$tmp/herdr"
echo '{"claude":{"access":"fake-token","refresh":"r","expires":99999999999999}}' > "$tmp/home/.hx/auth.json"
HERDR_ENV=1 HERDR_PANE_ID=p7 HERDR_BIN_PATH="$tmp/herdr" HOME="$tmp/home" HX_BASE_URL="http://127.0.0.1:$port" "$root/target/debug/hx" -p "make hello.txt" > /dev/null 2>&1