Repository navigation
Conversation
Part of #6041. Reuse the reviewed fixed witness and repeat read-only parity before UID-fenced disposal. Preserve source, backup, the earlier retained copy and key-until-backend-absence ordering.
Validation at signed head e53bd45: complete affected recovery and namespace-inventory race suites, vet, golangci-lint, workflow lint and whitespace checks passed. The prepared change has test-first admission and identity controls; its replay is based on the actual merged verifier. Correctness, simplification and security self-review found no unresolved issue. The deployed read-only comparison verified the fresh diagnostic with zero writes. This draft adds the separate, explicitly confirmed cleanup and repeats that proof before removing its isolated test copy. The earlier retained copy and its existing disposal gate remain protected. Live cleanup has not run. It requires this reviewed workflow on protected main, an unchanged live witness and an unexpired backup throughout its cleanup budget. The user has authorized completion of recovery and cleanup; promotion and dispatch still require current-head CI and independent review. Actual storage release will be observed after delivery. |
✅
|
✅
|
Code coverage overviewLanguages: Go Go / code-coverage/go
Line coverage data for the main branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
@coderabbitai review |
Action not completed
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit details
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. |
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e53bd45bfc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| target = freshRetainedRecovery | ||
| readerUID, claimUID = witness.Reader.UID, witness.Claim.UID | ||
| window = freshRecoveryWindow() | ||
| observeInventory = namespaceinventory.ObserveFreshRetainedEmailRecovery |
There was a problem hiding this comment.
Accept fresh-copy identities in the auxiliary inventory checks
When the fresh recovery namespace contains a reader-owned CiliumEndpoint or a Kyverno PolicyReport, the new disposal mode fails at complete-inventory without releasing its storage. The inventory closure calls retainedAuxiliary, but that helper still requires d.i == retainedRecovery and binding.Namespace == retainedRecovery.namespace (retained_auxiliary.go:22), so it rejects every auxiliary belonging to this newly selected target. Its retainedAuxiliaryOwner helper also constructs parent keys using the original namespace. Update both helpers to validate and construct identities for the selected fixed target while preserving their ownership checks.
Useful? React with 👍 / 👎.

Why
The fresh Email restore has passed verification, but its temporary storage still occupies recovery capacity. It needs a guarded cleanup before other storage work can continue.
What
Add a separately confirmed cleanup that verifies the same restored message again and reports when the temporary storage is released. Preserve the source mailbox, its backup and the earlier retained recovery copy.
Fixes #6041