Repository navigation
fix(server): no database copy before the peer-poll migration - #481
Merged
Merged
Conversation
The pre-migration snapshot list named migration 030, on the assumption that 030 would be the destructive ledger re-key. The peer-poll migration took that number instead, so updating copied the whole database before an ordinary migration. The list is now empty. A migration adds its own id in the PR that adds it, and only if it rewrites or drops data destructively. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 13 minutes for your next included review. View limit detailsLimit details: You’ve used all 3 included reviews currently available. Your 41 included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
Comment |
5 of 7 tasks
This branch was successfully deployed
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.
Problem
J5_LEDGER_SNAPSHOT_MIGRATIONSwas[30], written in #429 on the assumption that migration 030 would be the destructive ledger re-key. The peer-poll stack merged first and took that number (030_PeerPollMode.ts). A server updating to today'sj5/mainwould therefore copy its whole database (about 1.8 GB on one real install) tostatev2.pre-j5-030.sqlitebefore an ordinary migration. No release has been cut from this state (latest tag isv0.0.48), so no user has seen it.What changed
31: the re-key migration adds its own id in the PR that adds it. The comment on the constant now says so, and says an id must never be listed ahead of its migration.snapshotBeforeJ5LedgerMigrationreturns atif (lowestGuardedId === undefined) return;, before it asks for the file system, checks that the database exists, or opens it. Nothing is read or copied and startup is unaffected.docs/j5/runbooks/dogfood-runtime.mdand FORK.md case 1 no longer say 030 is guarded. They say no migration is guarded yet and the ledger re-key will be the first. The restore steps stay, with<migration>as the placeholder.Checklist
FORK.md(case text and file-table row) in this PR — none edited; FORK.md case 1's wording is correcteddocs/j5/product/upstream.md— no change to upstream's productAGENTS.md) — server startup only; the one caller ismakeSqlitePersistenceLivedocs/j5/product/and user docs rewritten where this changes them — the runbook is rewritten; no product or user doc mentions itVerified in
apps/server:vp test run src/j5/persistence src/persistence/Layers/Sqlite.test.ts(4 files, 66 tests passed),vp run typecheck(exit 0),vp lint .(exit 0, no findings in the touched files).Claude Opus 5.5 (1M context), Claude Code harness in J5 Code.
🤖 Generated with Claude Code