Files
ngit-grasp/src/purgatory
DanConwayDev 201ed7c27b refactor(grasp06): remove empty /prs/ repositories through one helper
Four runtime paths each carried their own copy of "no push in flight and no
refs left, so remove the repository": push completion, discarding a
mismatched scoped placeholder, purgatory expiry and PR deletion. The copies
differed only in log wording.

Move the rule into remove_idle_empty_repo, for callers that hold the path
mutex, and remove_prs_repo_if_empty, for callers that do not. Later changes
to the rule then apply everywhere.

Behaviour is unchanged. PR deletion still removes the then-empty submitter
directory itself. The startup scan runs before the server accepts traffic
and keeps its own lock-free loop.

Validation: nix develop -c cargo test --test grasp06_pr_hosting --test
purgatory passed 67 and 66 tests; the purgatory, grasp06 and deletion unit
tests passed; cargo clippy --all-targets -- -D warnings was clean.

Assisted-by: Claude Fable 5.1
2026-09-29 10:03:51 +00:00
..