diff --git a/.woodpecker/test.yaml b/.woodpecker/test.yaml index edb3e5c..f81d81a 100644 --- a/.woodpecker/test.yaml +++ b/.woodpecker/test.yaml @@ -14,7 +14,9 @@ steps: - name: suites image: alpine:3 commands: - - apk add --no-cache bash python3 wget >/dev/null + # git is required by tests/filing.test.sh's hermetic worktree-discipline + # remote-resolution fixture (kotkan/claude-plugin-inference-arbitrage#30). + - apk add --no-cache bash python3 wget git >/dev/null # bin/offload-scan (design decision 0.1) deliberately never vendors # token-budget's pricing/token-accounting logic -- it imports the real # cc-tokens module and fails loudly if it's missing. This bare alpine diff --git a/tests/filing.test.sh b/tests/filing.test.sh index 1eaa1e6..27f9396 100755 --- a/tests/filing.test.sh +++ b/tests/filing.test.sh @@ -201,15 +201,28 @@ else fi echo "== a writable target resolves through its own checkout's remote ==" -if [ -d ../worktree-discipline/.git ]; then - $BIN queries --classified "$tmp/cls.json" --judgments "$JUD" \ - --target-path ../worktree-discipline >"$tmp/wd-q.json" - check "repo" "$(q "$tmp/wd-q.json" "d['repo']")" "kotkan/claude-plugin-worktree-discipline" - check "filing" "$(q "$tmp/wd-q.json" "d['filing']")" "available" - check "label scan is the authoritative query" \ - "$(q "$tmp/wd-q.json" "d['queries']['label_scan']['labels']")" "['token-offload']" -else - echo " skip (no sibling worktree-discipline checkout)" -fi +# Was: read the live remote of a sibling ../worktree-discipline checkout on +# disk. That checkout is outside this repo and outside version control, so +# its remote can drift independently of anything here — e.g. a stale clone +# still pointing at the pre-rename slug `kotkan/worktree-discipline` instead +# of `kotkan/claude-plugin-worktree-discipline` (kotkan org repos were +# renamed to the claude-plugin- convention on 2026-07-22). That drift +# produced a false "repo" mismatch (kotkan/claude-plugin-inference-arbitrage#30) +# with nothing to fix in this repo's source or fixtures — both already agreed +# with the current live repo name. It also meant this assertion silently +# never ran in CI, since the bare CI container has no sibling checkout at all +# and the test just printed "skip". A synthetic git repo with a fixed remote +# tests the same resolve_repo()/parse_remote() code path deterministically, +# with no dependency on what else happens to be checked out next door. +wd_git="$tmp/wd-fixture" +mkdir -p "$wd_git" +git -C "$wd_git" init -q +git -C "$wd_git" remote add origin git@git.oleks.space:kotkan/claude-plugin-worktree-discipline.git +$BIN queries --classified "$tmp/cls.json" --judgments "$JUD" \ + --target-path "$wd_git" >"$tmp/wd-q.json" +check "repo" "$(q "$tmp/wd-q.json" "d['repo']")" "kotkan/claude-plugin-worktree-discipline" +check "filing" "$(q "$tmp/wd-q.json" "d['filing']")" "available" +check "label scan is the authoritative query" \ + "$(q "$tmp/wd-q.json" "d['queries']['label_scan']['labels']")" "['token-offload']" exit "$fail"