Repository navigation
Conversation
Stage 1 (#746) derives ChatRoom/RegistryRoom heads from the log and gates backups on head > backupSeq, while still storing headSeq/seq and backupDirty for older releases. With that release live as the rollback floor, the stored copies are dead weight: a push now writes only its data, 3 -> 2 rows. Rollback must not go past #746: older releases trust only the stored head, which no longer keeps up. Tests pin that #746's readers handle state written here (a head and seq the stored copy never saw; backups with no dirty flag). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Stacked on #746. Merge only after #746 has been live long enough that rolling back past it is off the table.
What
#746 derives ChatRoom/RegistryRoom heads from the log (
MAX(seq)floored byseqFloor/gcFloor, with the stored copy as a lower bound). It gates the nightly backup on head >backupSeq. It still storesheadSeq/seqandbackupDirtyon every push, because older releases read only those.This PR stops storing them. A push then writes only its data: 3 → 2 rows, about $7 → $5 a day at current traffic.
Rollback
The floor is #746. Releases older than that trust only the stored head, which no longer keeps up here, so they would reissue seqs. #746's readers handle state written by this release, and the tests pin that:
Tests
tsc✅vitest run(63) ✅vitest run -c vitest.workerd.config.ts(34) ✅wrangler deploy --dry-run✅🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.