Guarding Permanent Deletion of the Dedicated Media Restic Bucket
I added a guardrail that prevents the retirement workflow from permanently deleting anything other than the dedicated media Restic bucket. The push rewrites the operator runbook, tightens the storage notes, and introduces an offline test so a mis-targeted plan fails before it can destroy shared backup state.
Retirement Runbook Replaces the Deploy Flow
The media cloud backup document now describes how to retire the dedicated repository instead of how to deploy it. The reviewed operator unit plans removal of the bucket, and the operator runs it from the repository dev shell using their existing federated session and the homelab kubeconfig. The previous deploy sequence, including the private plan directory and conftest gate, is gone from this section, so the only path documented here is the destructive one, which raises the bar for review.
What the New Offline Test Actually Proves
I added retire-media-bucket-test.py and wired it into the offline checks with python3 -I scripts/ci/retire-media-bucket-test.py. The test loads the retirement script with runpy, then exercises validate_destination and validate_plan. It confirms the destination validator rejects a changed bucket name, a shared bucket, a different account, and a different region, and that the plan validator accepts only a delete of the expected bucket while rejecting a mismatched bucket or an extra resource type such as a KMS key. These are test additions that run offline; they are not evidence that a real plan was applied. The storage note change is a one-line wording update, and the next check is to run the offline suite and confirm the new case passes alongside the existing ones.
Where This Transfers for Platform Teams
Any platform team operating an irreplaceable backup target can copy this shape: pin the expected destination in code, validate both the configuration and the generated plan against it, and fail closed on any extra resource. During retirement, GitOps suspends the upload schedule and removes the initialization hook first, and upload Jobs are confirmed stopped before the repository is touched. That ordering, plus a plan validator that only accepts the single intended deletion, is what makes a destructive run reviewable rather than hopeful.