Repository navigation
Description
ci(worktree-reaper): test_worktree_reaper.py is run by no workflow — the destructive reap gates are verified nowhere
Summary
infra/worktree-reaper/tests/test_worktree_reaper.py (8 tests) is enumerated by no workflow and no other automation: it runs only when a human follows the README's manual command. That suite is the only automated guard on the reaper's safety gates — the checks that must all hold before the tool deletes a worktree (dry-run, kill switch, the reap matrix, the quiet gate, and the run-log audit trail).
Evidence (verified this run, laptop primary @ 2b476fd)
grep -rn "worktree-reaper" .github/workflows/→ zero references; no workflow mentions the tool or its tests. No justfile/flake step runs the suite either. The only scheduled runner in the repo isinfra/worktree-reaper/systemd/worktree-reaper.{service,timer}, whoseExecStartrunsbin/worktree_reaper.pyitself (the production reaper) — never its tests.infra/worktree-reaper/README.md, "Tests" section: the sole documented runner is a manualpython3 tests/test_worktree_reaper.py, with the note "Run them on the laptop — the occupied gate needs a real/proc" (a Linux CI runner has a real/proc).- The suite passes today, run on the laptop:
python3 -m unittest discover -s infra/worktree-reaper/tests -v→Ran 8 tests in 0.888s — OK(GateTests ×4, RunLogCollisionTests ×1, UnitTests ×3; the gate tests build synthetic bare-origin/clone/worktree repos in tempdirs). - This gap has already bitten once: worktree-reaper: run-log filename collides for same-second runs — gate suite fails 6/6 and a second run overwrites the first run's audit log #5716 — a run-log filename collision that made the gate suite fail 6/6 and silently overwrote a prior run's audit log — was found only because a fleet creator happened to run the suite by hand during an unrelated run. The open worktree-reaper: fail closed when /proc cannot be scanned before removal #5740 (fail closed when
/proccannot be scanned before removal) is in the same gate surface this suite exercises. A regression in the kill switch or reap matrix would currently surface as a wrongly deleted worktree, not a failing check.
Why it matters
The worktree-reaper is a destructive tool running on a timer against the fleet's live worktree farm. Its gates are the entire safety case for unattended deletion, and the tests exist and pass in under a second — but nothing runs them, so gate regressions are discovered in production, after a tree is gone.
Acceptance criteria
- Some workflow runs
infra/worktree-reaper/tests/test_worktree_reaper.pyand fails when a test fails (a dispatch-triggered workflow is consistent with the house pattern since 5a94833). - The full suite (8 tests) passes under the new wiring on the workflow's Python on a Linux runner (real
/procfor the occupied gate). - A green run cannot be a silently skipped suite: the wiring names the test file/discovery directory explicitly.
- No behaviour change to
bin/worktree_reaper.py.
Dedup
Searched open + closed issues this run for "worktree-reaper tests / workflow / CI" and "test_worktree_reaper": #5740 (the /proc fail-closed bug, open — a behaviour fix, not CI wiring), #5716 (the run-log collision, closed — found by a hand run of this suite), and no CI-wiring filing for this suite. Sibling same-class filings cover different suites: #5945 (repo-universe), #5942 (fleet-paperwork), #5937 (github-backup).
Activity
developing-today commentedon Nov 5, 2026
CODE-1615
dezren39 commentedon Nov 5, 2026
🤖 Agent note · filed
60 remaining items
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
opencode, so per runbook §1b this lane does not work it directly and does not park it (a park can clear a claimant session).dezren39 commentedon Nov 5, 2026
Agent note - handed off
ses_e5e52fd0868ffeSC75I3kX1rJ5developing-today commentedon Nov 7, 2026
Picked up by
repo-worker-code-a— working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live whilerepo-worker-code-aposts progress markers; after 30 minutes of silence any other worker may pick this up.)developing-today commentedon Nov 7, 2026
Progress from
repo-worker-code-a: claimed: revalidating worktree-reaper CI wiring gap against fresh statedeveloping-today commentedon Nov 7, 2026
Progress from
repo-worker-code-a: verified: PR #6357 diff matches acceptance, Codex zero findings on head, pm-stack failure pre-existing on main; running suite on laptopdeveloping-today commentedon Nov 7, 2026
🤖 Agent note · done — PR #6357 merged, suite verified, workflow dispatched
infra/worktree-reaper/tests/test_worktree_reaper.pyinto a workflowqueue/9850-5946-worktree-reaper, +68/−0, one new file.github/workflows/worktree-reaper-tests.yml). This lane reviewed and merged it; no competing PR was created.workflow_dispatchtrigger (house pattern), Python 3.12 on ubuntu-latest, explicit test dir + file pattern, fails if the file is missing or discovery finds 0 tests, no change tobin/worktree_reaper.py.python3 -m unittest discover -s infra/worktree-reaper/tests -p test_worktree_reaper.py): Ran 8 tests — OK.787ba58683a0: completed, zero findings (has_any_findings=false, has_unresolved_findings=false).pm-stack tests/ aggregator suites) is a pre-existing failure on main itself (run 42087275562, 2026-11-05T18:45Z) and on every branch in the window — an unrelated aa-explorer HTML assertion; this PR touches only a new workflow file.60c3d0a24b962815cf46c4ec070ef4de3e01f96e; this issue auto-closed viaCloses #5946.developing-today commentedon Nov 7, 2026
Released by
repo-worker-code-a(outcome: done). Done: reviewed and merged existing fix PR #6357 (worktree-reaper tests workflow, +68/-0, one file) — merge commit 60c3d0a; #5946 auto-closed. Verified: diff meets all acceptance criteria, suite 8 tests OK on laptop with workflow's exact command, YAML valid, Codex zero findings on head; pm-stack red check is pre-existing on main (unrelated). Post-merge dispatch run 42337152052 queued at merge SHA (runner backlog).