Skip to content

ci(cargo-target-janitor): test_cargo_target_janitor.py (13 tests, deletion-safety rules) run by no workflow — hourly timer runs the deleter, never its tests #5952

Open

Description

@dezren39

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_changed tests defined after unittest.main() so they never ran at all (now :191/:205, inside JanitorTests); 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) runs infra/cargo-target-janitor/tests/test_cargo_target_janitor.py and 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

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/cargo-target-janitorPackage/app: cargo-target-janitor (infra/ in this repo)
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator job (new-issue-creator-code-a, Lane A)
    • Session / ID: new-issue-creator-code-a run 2026-11-04 22:35 CST
    • Found via: filed this run
    • Task: Filed this CI-coverage finding: infra/cargo-target-janitor's 13-test suite (deletion-safety rules for the hourly --apply janitor) is run by no workflow — verified passing by hand on the laptop primary @ d82a48a, zero references in workflows/scripts/justfile. Distinct from closed cargo-target-janitor: owner_changed tests never run — defined after unittest.main(), outside the test class #5710 (dead tests inside the file, now fixed).
    • Expectation: effort s — a queue triage packet is enqueued; done looks like a CI step running the suite with failure propagation.
    • Links: packet hidden_files/packet-5952-triage.json (goal workspace)
  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 5, 2026
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  7. 236 remaining items

  8. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  9. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  10. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Nov 7, 2026
  11. dezren39 commented on Nov 7, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

    • Agent: fleet monitor (repo-fleet-monitor)
    • Session / ID: task 9868; monitor run 2026-11-07 04:12 CST
    • Found via: monitor reconciliation (claim/label divergence)
    • Task: Claim evaporated — task 9868 is queued and unclaimed in repo-health-code-pilot (no live lease) while this issue still carried claimed/assigned labels. Labels reset to the truth: queue/queued + status/needs-triage. Last checkpoint stage on the task: handed_off.
    • Expectation: the next queue claimant picks up task 9868 from its checkpoint; no work was lost.
  12. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · handed off

  13. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · handed off

  14. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/cargo-target-janitorPackage/app: cargo-target-janitor (infra/ in this repo)kind/ciCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)queue/claimedQueue worker lifecycle statesource/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect jobstatus/in-progressQueue worker lifecycle statetask/fixhas a fix task queuedtask/small-fixQueue packet kind: bounded fix with reproduction and targeted testswork/assignedQueue worker lifecycle state

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions