Fix stale repo reference in worktree-discipline test #30

Closed
opened 2026-07-30 19:57:01 +03:00 by issuer-agent · 2 comments

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.sh on main (commit 9a25402) fails with:

FAIL repo = kotkan/worktree-discipline (want kotkan/claude-plugin-worktree-discipline)

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:

  1. Locate the test case in tests/*.test.sh that references kotkan/worktree-discipline
  2. Find the source code being tested (likely in bin/, possibly a filing-plan or repo-inference helper that maps plugin names to Gitea slugs)
  3. Fix whichever side is stale: update the test fixture's expected value if code is correct, or fix the code if it's still emitting the old name

Secondary 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:

  • Commit 9a25402 (pre-existing failure)
  • tests/run-all.sh output above
**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.sh` on main (commit 9a25402) fails with: ``` FAIL repo = kotkan/worktree-discipline (want kotkan/claude-plugin-worktree-discipline) ``` 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**: 1. Locate the test case in tests/*.test.sh that references `kotkan/worktree-discipline` 2. Find the source code being tested (likely in bin/, possibly a filing-plan or repo-inference helper that maps plugin names to Gitea slugs) 3. Fix whichever side is stale: update the test fixture's expected value if code is correct, or fix the code if it's still emitting the old name **Secondary 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**: - Commit 9a25402 (pre-existing failure) - tests/run-all.sh output above
oleks added the agent-wip label 2026-07-30 23:20:02 +03:00
Owner

Root cause

There is no stale name reference in this repo's source or fixtures. Verified via search_repos: only kotkan/claude-plugin-worktree-discipline exists on Gitea today; kotkan/worktree-discipline is a redirect only (kotkan org repos were renamed to the claude-plugin-<name> convention on 2026-07-22, per ~/projects/claude-plugins/CLAUDE.md). The fixture's expected value in tests/filing.test.sh was already kotkan/claude-plugin-worktree-discipline — correct. bin/filing-plan's resolve_repo()/parse_remote() have no hardcoded repo-name table; they only read git remote get-url origin off 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-discipline checkout 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 whose origin was 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 bare alpine container in .woodpecker/test.yaml has no sibling checkout, so the test just printed skip (no sibling worktree-discipline checkout) and the assertion silently never ran.

Evidence

search_repos(keyword="worktree-discipline") → only kotkan/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:

== a writable target resolves through its own checkout's remote ==
  FAIL repo = kotkan/worktree-discipline (want kotkan/claude-plugin-worktree-discipline)

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 own mktemp -d, with origin set explicitly to git@git.oleks.space:kotkan/claude-plugin-worktree-discipline.git. Same resolve_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.sh on 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.

## Root cause There is **no stale name reference in this repo's source or fixtures**. Verified via `search_repos`: only `kotkan/claude-plugin-worktree-discipline` exists on Gitea today; `kotkan/worktree-discipline` is a redirect only (kotkan org repos were renamed to the `claude-plugin-<name>` convention on 2026-07-22, per `~/projects/claude-plugins/CLAUDE.md`). The fixture's expected value in `tests/filing.test.sh` was already `kotkan/claude-plugin-worktree-discipline` — correct. `bin/filing-plan`'s `resolve_repo()`/`parse_remote()` have no hardcoded repo-name table; they only read `git remote get-url origin` off 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-discipline` checkout 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 whose `origin` was 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 bare `alpine` container in `.woodpecker/test.yaml` has no sibling checkout, so the test just printed `skip (no sibling worktree-discipline checkout)` and the assertion silently never ran. ## Evidence `search_repos(keyword="worktree-discipline")` → only `kotkan/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: ``` == a writable target resolves through its own checkout's remote == FAIL repo = kotkan/worktree-discipline (want kotkan/claude-plugin-worktree-discipline) ``` 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 own `mktemp -d`, with `origin` set explicitly to `git@git.oleks.space:kotkan/claude-plugin-worktree-discipline.git`. Same `resolve_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.sh` on 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.
admin closed this issue 2026-07-30 23:40:50 +03:00
Owner

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 needs git, 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.

Fixed and merged via PR #32, commit 83a74363c35ed177435bf9061b4ef4965bc2d97f. 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 needs `git`, 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.
oleks removed the agent-wip label 2026-07-30 23:41:07 +03:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kotkan/claude-plugin-inference-arbitrage#30