Fix stale repo reference in worktree-discipline test #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why: Tests are failing on main due to a repo name mismatch — the test expects the current plugin repo name but code or fixture still references the old name.
Evidence:
Running
bash tests/run-all.shon main (commit9a25402) fails with:This is a pre-existing failure, confirmed to reproduce in isolation before recent PRs (#27/#28).
Root cause: The worktree-discipline repo was renamed (old:
kotkan/worktree-discipline→ new:kotkan/claude-plugin-worktree-discipline, consistent with this org's plugin naming convention). A test fixture or hardcoded reference in the code wasn't updated to match the new name.Action needed:
kotkan/worktree-disciplineSecondary observation: CI exits 1 on main, which means the test suite is genuinely broken in CI, not just locally. Worth reviewing whether Woodpecker's per-PR checks are running the full suite or ignoring this failure.
Links:
9a25402(pre-existing failure)Root cause
There is no stale name reference in this repo's source or fixtures. Verified via
search_repos: onlykotkan/claude-plugin-worktree-disciplineexists on Gitea today;kotkan/worktree-disciplineis a redirect only (kotkan org repos were renamed to theclaude-plugin-<name>convention on 2026-07-22, per~/projects/claude-plugins/CLAUDE.md). The fixture's expected value intests/filing.test.shwas alreadykotkan/claude-plugin-worktree-discipline— correct.bin/filing-plan'sresolve_repo()/parse_remote()have no hardcoded repo-name table; they only readgit remote get-url originoff whatever checkout path they're given.The failing assertion ("a writable target resolves through its own checkout's remote") read the live git remote of a sibling
../worktree-disciplinecheckout on disk — a directory outside this repo and outside version control. That checkout's remote can drift independently of anything here: a stale local clone whoseoriginwas never repointed after the rename produces exactly the reported mismatch, while a repointed one passes — either way, no change is needed in this repo. This also explains why CI never caught it either way: the barealpinecontainer in.woodpecker/test.yamlhas no sibling checkout, so the test just printedskip (no sibling worktree-discipline checkout)and the assertion silently never ran.Evidence
search_repos(keyword="worktree-discipline")→ onlykotkan/claude-plugin-worktree-discipline(id 227, created 2026-07-22) is a real repo.Local reproduction of the exact failure line, by pointing a synthetic remote at the stale slug:
matching the issue's reported output verbatim, confirming this is exactly the assertion and exactly the drift mechanism.
What changed
PR kotkan/claude-plugin-inference-arbitrage#32 (branch
fix/issue-30-stale-repo-name) replaces the dependency on the external sibling checkout with a throwaway git repo built inside the test's ownmktemp -d, withoriginset explicitly togit@git.oleks.space:kotkan/claude-plugin-worktree-discipline.git. Sameresolve_repo()/parse_remote()code path, deterministic, and it now always runs instead of skipping when no sibling checkout is present (as in CI).bash tests/run-all.shon the branch: exit 0, all suites pass (full log pasted in the PR body).Also swept for other pre-rename bare-name references to kotkan's six renamed plugin repos (
token-budget,sirpa-agents,statusline,claude-profiles,messenger,worktree-discipline) — none found.No merge performed — leaving that for review.
Fixed and merged via PR #32, commit
83a74363c3.Root cause turned out to be subtler than the original report: no stale reference existed in this repo's own source/fixtures — the failing assertion read the live git remote of an external sibling checkout (
../worktree-discipline) outside version control, which is why it never ran in CI and only failed when that local checkout's remote had drifted. Fixed by making the test build its own throwaway git repo with an explicit remote instead. Also caught and fixed a follow-on: the new test needsgit, which the CI Alpine container didn't have installed — added it to.woodpecker/test.yaml(separate commit on the same PR, verified CI green after).Closing.