Keep persistence alive past a single fault - #24075
Merged
Merged
Conversation
erri120
reviewed
Sep 1, 2026
erri120
reviewed
Sep 1, 2026
Comment on lines
+19
to
+28
| /** | ||
| * Append without spread: `push(...items)` passes every element as an argument and throws past | ||
| * the engine's argument limit (~125k); one subtree's diff can exceed that. | ||
| */ | ||
| function appendOperations(target: DiffOperation[], items: DiffOperation[]): void { | ||
| for (const item of items) { | ||
| target.push(item); | ||
| } | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
We don't really, it can be an anonymous function too. As long as we don't spread the items in a push.
Contributor
Author
There was a problem hiding this comment.
Opted for a recursive accumulator instead - we already use the same shape for state flattening which works quite well.
One fault in the diff pipeline cost the rest of the session, silently: a diff past the engine's argument-spread limit threw out of computeStateDiff, the throw escaped dispatch and froze previousState so every later diff grew from the same stale snapshot, and a send failure left the flush timer handle set so no flush was ever scheduled again. Diff operations are now appended without spread, a diff-computation fault is caught and logged with previousState held so the changes ride the next diff, and a hive's queue is only cleared once its send succeeded. fixes LAZ-1007
erri120
approved these changes
Sep 2, 2026
pull Bot
pushed a commit
to A-Archives-and-Forks/Vortex
that referenced
this pull request
Sep 2, 2026
Keep persistence alive past a single fault
joshedney
pushed a commit
that referenced
this pull request
Sep 2, 2026
Keep persistence alive past a single fault
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.
One fault in the diff pipeline cost the rest of the session, silently: a diff past the engine's argument-spread limit threw out of computeStateDiff, the throw escaped dispatch and froze previousState so every later diff grew from the same stale snapshot, and a send failure left the flush timer handle set so no flush was ever scheduled again.
Diff operations are now appended without spread, a diff-computation fault is caught and logged with previousState held so the changes ride the next diff, and a hive's queue is only cleared once its send succeeded.
fixes LAZ-1007