Skip to content

fix: guard recycle-bin checkpoint reads before I/O (#107) - #110

Merged
AGiorgetti merged 1 commit into
developfrom
fix/107-guard-cleanup-checkpoint
Nov 6, 2026
Merged

AGiorgetti merged 1 commit into
developfrom
fix/107-guard-cleanup-checkpoint

Conversation

@AGiorgetti

@AGiorgetti AGiorgetti commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #107.

  • Move the checkpoint read inside the existing synchronous and asynchronous cleanup guards.
  • Reject disposed engines before collection access, translate MongoDB read failures exactly once, and never delete after a failed read.
  • Preserve cancellation/token identity, genuinely async acquisition and deletion, cursor disposal, query shape and the strict checkpoint cutoff.
  • Document the exception compatibility change and the expanded callback scope for protected virtual guard overrides. No API/schema migration or MongoDB minimum-version change.

Verification

  • Test-first on unchanged production code: 32 failed, 56 passed, 0 skipped across 88 new assertions.
  • After the fix: 598 passed, 0 skipped on each of net8.0, net9.0 and net10.0, covering [P2] Guard recycle-bin checkpoint reads before I/O in sync and async cleanup #107, [P2] Async checkpoint reads execute FindSync before returning their Task #88 and synchronous enumeration guards.
  • Full Release solution build: 0 errors across all configured targets. Existing compiler/analyzer and NuGet vulnerability warnings remain; dependencies were not changed.
  • Independent review found no blockers.
  • CI run 42237139928 passed for d7bd8cb06d3223627b44c5aac86246f39f66335e: Windows and Ubuntu builds succeeded; the full MongoDB-backed suite passed 1,138 tests, 0 failed, 0 skipped on each of net8.0, net9.0 and net10.0. This includes cleanup with the highest checkpoint inside/outside the recycle bin.
  • Local MongoDB startup was unavailable in the restricted cloud shell; the successful CI MongoDB 9.0.4 service jobs provide the real-database verification.

Co-authored by Alessandro Giorgetti and Codex (OpenAI).

Guard the full cleanup operation in sync and async paths, preserving cancellation, cursor disposal and checkpoint retention. Add deterministic regression coverage and document the exception contract change.

Co-authored-by: Alessandro Giorgetti <alessandro.giorgetti@live.com>
Co-authored-by: Codex (OpenAI) <codex@openai.com>
@AGiorgetti
AGiorgetti marked this pull request as ready for review November 6, 2026 15:13
@AGiorgetti
AGiorgetti merged commit b0a2d29 into develop Nov 6, 2026
5 checks passed
@AGiorgetti
AGiorgetti deleted the fix/107-guard-cleanup-checkpoint branch November 6, 2026 15:13
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.

[P2] Guard recycle-bin checkpoint reads before I/O in sync and async cleanup

1 participant