GeezerVison is showing github.com — fix(cargo-target-janitor): live claims source + wider scope (#6812) by developing-today[bot] · Pull Request #6820 · developing-today/code
Conversation
developing-today
Bot
commented
Nov 7, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #6812.
Problem
The hourly cargo-target-janitor has been failing every run since the fleet-binary migration retired ~/hatch/tools/repo-queue.py: refusing cleanup: queue helper unavailable (exit 2 at 03:08Z / 04:00Z / 05:03Z on 2026-11-07). It deleted nothing while the laptop disk filled to 100% (#6797), and a refusal left no run record, so the dead janitor was visible only in the systemd journal. Two build-output classes were also outside its scope entirely (~196 GiB).
Change
- Claims sources (
load_claims_source): the repo-queue helper remains first choice when the file exists (broker task ids + states, unchanged #6618/#6790 reads). Otherwise a new GitHub fallback source — fleet queue fallback scan live/contested markers ∪ open issues carrying queue/claimed, keyed by issue number because fallback claims live on issues (infra: repo-queue PostgREST timeout: global failures lane-visible again — recurrence after #6450 closed (2026-11-06 21:15-21:31Z) #6619). It supplies no broker states, so it never makes a target eligible via the terminal-task reason; it only adds protection. If no source can be read, the run fails closed exactly as before. The chosen source is named in the plan output and run record (claims_source).
- Scope: discovery now covers
fleet/queue/* sub-worktrees (~82 GiB, incl. the 80 GiB queue/9883 target) and repo-root cargo targets (~113 GiB). A checkout's root target belongs to the checkout; a non-checkout probe/scratch dir's root target is treated like an ad-hoc target except its owning dir still exists, so it ages out rather than reading as worktree-gone, and a build inside the owning dir protects it. Unregistered checkouts' branches are read from the checkout itself (git rev-parse) when the primary doesn't register them.
- Refusal records: the run log path is created before any source is read, and the refusal path writes
{"event": "refused", "reason": …} to it (plus TimeoutExpired joins the caught refusal classes).
- README: sources, scope, and refusal records documented.
Verification
- Test suite on the laptop: 31/31 pass (21 pre-existing, incl. the cargo-target-janitor: both deletion-safety liveness reads are single-page — queue_claims caps at 1000 rows and open_pr_branches at 500 PRs, so a claimed task or open-PR worktree past the page silently loses its never-delete protection #6618/cargo-target-janitor(queue_claims): offset pagination over the live claimed set can skip a still-claimed task — it loses never-delete protection #6790 pagination + churn tests against the unchanged helper path, plus 10 new: identity extraction, fallback-scan parsing, fallback-claim protection on real branch shapes, queue/ discovery, root targets, source selection, helper round-trip, scratch-target ageing/process/claim protection, refusal run record).
- Real dry-run on the laptop with this code (default mode, nothing deleted):
claims_source: github-fallback, 448.16 GiB across 94 targets (was: refusal), 20 candidates (per-run cap) / 74 protected — including fb-6627-pr6367 protected as live-claimed-issue (lane code-u's live fallback claim for PR id(currency_poc): remember failed transfer IDs in InMemoryLedger (IdAlreadyFailed) #6367) and queue/9883…/pkgs/id/target (80 GiB) counted for the first time. Most of the mass is younger-than-48h, so it reports over_cap truthfully and will reclaim as targets age or tasks terminate. Run records from the dry-runs are in ~/.local/state/cargo-target-janitor/runs/.
- After merge, the installed binary (
~/.local/bin/cargo-target-janitor) will be refreshed from the merged tree so the next hourly timer run uses this code.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…ment + queue/ and root-target scope (#6812)
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the @coderabbitai review command.
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
5ec82f2a-23a2-4a58-a7a2-3f6bf65c968f
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 7, 2026
Reviewers
dezren39
Awaiting requested review from dezren39
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|