Skip to content

fix: preserve legacy delivery history during upgrades - #1441

Merged
crypt0rr merged 2 commits into
mainfrom
fix/upgrade-restore-safety-1386-1401-1428
Oct 13, 2026
Merged

crypt0rr merged 2 commits into
mainfrom
fix/upgrade-restore-safety-1386-1401-1428

Conversation

@crypt0rr

@crypt0rr crypt0rr commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Schema upgrades leave sent delivery history byte for byte unchanged, and restores distinguish genuinely pending deliveries from rows exhausted under the pre-schema-63 retry budget. Restore policy evaluation carries the source schema version, so valid legacy exhausted rows remain terminal instead of being quarantined or discarded as pending.

The schema-54 fixture applies each migration in its own bounded transaction and checks the WAL after every step. It includes 5,000 sent rows with 4,063-byte payloads (~20.3 MB); the largest measured per-step WAL was 115,392 bytes against a 16 MiB limit. Restore coverage starts from schema 54 and 62 across quarantine, discard, and preserve policies; it checks pending-row policy behavior, byte-identical sent history, and that the same exhausted managed row appears in ListTerminalDeliveries after restore.

Closes #1386
Closes #1401
Closes #1428

Validation on exact PR head df6d2d606820fcad03cf8c2cfc9ce9a39a399622:

  • Hosted Go race/coverage shards store-1, store-2, store-3, and other all passed; the aggregate gate passed at 88.6% across 17 production packages.
  • Go diff coverage was 7/7 executable changed lines (100%) against base 28eb02a1f602fc484fbe221c6bd8fb5e835d9418.
  • Frontend, Go checks, container, ARM64 sandbox, CodeQL (Actions, Go, JavaScript/TypeScript), documentation build, and Cloudflare Pages preview checks passed.
  • The canonical production backup/recovery guide at edgewatch.offsec.nl was reviewed in headless Chromium at 1440×900 and 320×800. The updated legacy-exhausted paragraph is visible at both sizes and the page has no horizontal overflow.
  • Focused migration/restore tests, go vet ./..., make security, schema-doc checks, and the docs build passed. The schema-54 baseline statements, rows, and frozen migration-chain golden were not changed.

Merged-main CI run 38431394474, documentation run 38431394420, and Pages deployment run 38431395674 all completed successfully at merge 2f51e140e8797db2e5d6cfa17fb52aade1cb1c04.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying edgewatch with  Cloudflare Pages  Cloudflare Pages

Latest commit: df6d2d6
Status: ✅  Deploy successful!
Preview URL: https://a977757d.edgewatch-cpd.pages.dev
Branch Preview URL: https://fix-upgrade-restore-safety-1.edgewatch-cpd.pages.dev

View logs

@crypt0rr
crypt0rr marked this pull request as ready for review October 13, 2026 16:32
@crypt0rr
crypt0rr merged commit 2f51e14 into main Oct 13, 2026
15 checks passed
@crypt0rr
crypt0rr deleted the fix/upgrade-restore-safety-1386-1401-1428 branch October 13, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment