Skip to content

Sweep historical stranded conversation artifact receipts - #25758

Merged
Git-on-my-level merged 4 commits into
mainfrom
lane/stranded-receipt-sweep
Nov 19, 2026
Merged

Git-on-my-level merged 4 commits into
mainfrom
lane/stranded-receipt-sweep

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

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-3274 accepted all three findings. Head 619bd2bf650b882805b95701568578af23d0a653 skips 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.

@Git-on-my-level
Git-on-my-level merged commit 2779f1a into main Nov 19, 2026
75 of 77 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/stranded-receipt-sweep branch November 19, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant