Repository navigation
Sweep historical stranded conversation artifact receipts - #25758
Merged
Merged
Conversation
This was referenced Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Implement the approved SCA-2283 historical cleanup for receipts stranded before the fix in #25737. It scans the production and development batch receipt namespaces, defaults to count-only dry run, and uses a private apply cursor. The creation window is 2026-10-15 through 2026-11-19 04:30 UTC, exclusive.
Apply rechecks the receipt version, owner-scoped tombstone, and absence of both obligations within one bounded Firestore transaction before deleting an exact object generation. A storage failure retains the receipt and stops the run.
Verification
Focused unit coverage includes the historical signature, generation-matching, transaction conflict and storage failures, and count-only dry runs. Production verification is gated on exact-head full panel review, lead2 custody and MERGE-OK, and Release merge. The first dry run is limited to 10,000 reads. Apply starts with up to 50 erasures and requires the expected fresh count delta before any further chunks. The final dry run and the November 17 01:00–02:00 UTC purge audit are the SCA-2283 readbacks.
Scope panel scope-20261119t053312-13e9 returned no numbered findings to triage. The implementation follows the goal owner's DESIGN: OK on SCA-2283.
Initial full panel
review-20261119t061558-3274accepted all three findings. Head619bd2bf650b882805b95701568578af23d0a653skips malformed owner IDs and adds tests for successful transaction ordering, cursor resume, and run limits. All 29 focused tests passed.A loopback Firestore emulator probe on the corrected head used two synthetic receipts and a stubbed GCS deleter. It counted both receipts in dry run, then exercised the real transaction RPCs and erased one receipt per apply chunk, resuming by document name after the first receipt was deleted. The unit tests cover stale-version conflict and storage errors. The post-merge read-only scan checks the production index and signature; the 50-erasure canary and fresh count check the production apply result before any expansion.