Repository navigation
fix: preserve received Loro updates across restarts - #1826
Merged
Merged
Conversation
Adopt released Loro 1.17.0 and LoroRepo 0.24.0 with a frozen registry graph. Cover pending-only imports through real SQLite restart recovery and record the durability boundary. Model: gpt-6.1-sol
Pump only current-tick tasks while awaiting existing sync and cleanup promises. Preserve explicit snapshot debounce advancement, original rejection values and the existing test/hook budgets. Model: gpt-6.1-sol
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.
Related issue
Follow-up to the desktop traffic and persistence investigation #1815.
Problem / pressure
A remote update B can be received before its causal predecessor A without advancing the applied version or emitting an applied event. The previous Promise Repo save path could lose B across a restart. In the real CLI SQLite regression, the existing dependencies restore
base|Ainstead ofbase|ABafter A arrives.Summary
Adopt the actual published
loro-crdt1.17.0 andloro-repo0.24.0 through the workspace catalog, exact CLI runtime dependency and frozen registry lock. Repo now retains received pending inputs in the existing storage journal. Keep release-age exceptions restricted to the reviewed exact versions. The old core override remains confined to the standalone Loro CLI test tool.Add
import/importBatchSQLite restart regressions, update the owning README and bilingual adoption note, and link the historical investigation to this implemented follow-up. Snapshot tests now drive current-tick cooperative work while awaiting sync and cleanup; their explicit debounce clock and business assertions remain unchanged. Storage schema, Streams cursor policy and recovery limits are unchanged. This addresses a reproduced persistence gap; it does not establish the reported 80 GB traffic's cause or implement a download budget.Visual explanation
Before / after
base|A.base|AB, including after another reopen.Test plan
pnpm install --frozen-lockfilepassed. All 41 core files and 103 files in each Repo peer variant match the official SRI-verified tarballs. CLI, components, shared, e2ee-lab and their Streams/Mirror/Adaptor/WebSocket peers resolve the same Core instance within their runtime domain. No candidate/file override remains.pnpm checkon the dependency adoption passed before the clock-fixture correction: includes CLI 4,518 passed / 4 skipped, components 5,967 passed, shared 1,609 passed, complete type/static/boundary checks and the remaining workspace suites. Isolated session-injected Git state (GIT_EXEC_PATHand helper precedence inPATH) after an old/new dependency control proved it polluted the Git fixture; no Git source or test assertion was weakened. The post-fixture rerun repeated that known environment failure; all 24 Git tests pass with native Git first in the test PATH. The final component suite passed 5,967/5,967. Final-head CI and final-head desktop E2E both passed.pnpm format, document checks (0 errors; 71 existing warnings) and independent source/lock/artifact review passed.Upstream implementation and publication: Loro #1220, Repo #165, Repo 0.24.0 release #166. User-device Nightly acceptance and production traffic measurements were not performed.