Repository navigation
Description
Finding
infra/cargo-target-janitor/tests/test_cargo_target_janitor.py (13 tests) is run by no workflow, justfile recipe, or flake check — the same gap class as #5942/#5945/#5946/#5951, for a destructive tool.
The suite pins the janitor's deletion-safety rules: claimed-task targets are protected (:37), open-PR targets are protected (:52), recent/unmapped targets are never candidates (:66), adhoc targets are protected during any fleet build (:100), hardlinked artifacts are counted once (:159), and the default mode logs a plan without deleting (:183). The janitor itself runs hourly in production via infra/cargo-target-janitor/systemd/cargo-target-janitor.timer → cargo-target-janitor.service (ExecStart=... cargo-target-janitor --apply) — the timer runs the deleter, never its tests.
Evidence (verified this run, laptop primary @ d82a48a)
grep -rn "cargo-target-janitor|cargo_target_janitor" .github/workflows/ .github/scripts/ justfile scripts/ infra/(excluding the package's own directory) → zero references.- README:69 documents only a manual run:
python3 ~/git/code/infra/cargo-target-janitor/tests/test_cargo_target_janitor.py. - The suite passes today, run by hand on the laptop:
python3 -m unittest discover -s infra/cargo-target-janitor/tests→ Ran 13 tests, OK (0.015s, offline). - Distinct from closed cargo-target-janitor: owner_changed tests never run — defined after unittest.main(), outside the test class #5710: that issue fixed two
owner_changedtests defined afterunittest.main()so they never ran at all (now :191/:205, insideJanitorTests); this issue is that the now-complete suite is wired into no CI, so a future regression in the protection rules surfaces as wrongly deleted build targets.
Why it matters
The janitor deletes cargo target directories with --apply on an hourly timer. Its protection rules are the only thing standing between a fleet build in progress and the deletion of its target dir (or a claimed task's / open PR's build cache). Those rules currently have zero automated regression signal.
Acceptance criteria
- A CI step (a new small workflow or an existing infra-tests workflow, following
.github/ci-policy.md) runsinfra/cargo-target-janitor/tests/test_cargo_target_janitor.pyand fails when a test fails (no continue-on-error). - The wiring names the test file/discovery directory explicitly so a green run cannot be a silently skipped suite.
- The full suite (13 tests) passes under the new wiring on a Linux runner.
- No behaviour change to
bin/cargo_target_janitor.py.
Activity
developing-today commentedon Nov 5, 2026
CODE-1619
dezren39 commentedon Nov 5, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 5, 2026
🤖 Agent note · handed off
opencode; handing to the opencode claimant, which launches the bound session. This lane did no verification work on the task.236 remaining items
dezren39 commentedon Nov 6, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 6, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 7, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 8, 2026
🤖 Agent note · handed off
developing-today commentedon Nov 8, 2026
🤖 Agent note · handed off