fix(cleanup): revalidate destructive backend plans
tracker-policy-pr / check-pr (pull_request) Failing after 10m34s

This commit is contained in:
2026-07-27 03:01:26 +00:00
parent c1de7ee020
commit 191471f03e
8 changed files with 176 additions and 43 deletions
+5 -1
View File
@@ -52,7 +52,11 @@ def cmd_cleanup(_argv: list[str]) -> int:
info("cleanup: skipped")
return 0
for name, backend, plan in prepared:
# Confirmation authorizes a fresh authoritative snapshot, not blind use of
# identities that may have changed while the operator reviewed the preview.
refreshed = [(name, backend, backend.prepare_cleanup())
for name, backend, _plan in prepared]
for name, backend, plan in refreshed:
if plan.empty:
continue
backend.cleanup(plan)