Repository navigation
Keep the query baseline from owning cached results (#117) - #124
Merged
Merged
Conversation
lastEmittedState is bookkeeping, not an owned child. Without @ignore, reading it after an overlapping optimistic rollback adopted the backend's cached result under the baseline, so the next query that received the same object threw a structural parent error. Claude-Session: https://claude.ai/code/session_01Us9f7SPLJUYScpdDnA8oM4
This was referenced Oct 8, 2026
ryanbliss
added this pull request to stack #128
October 8, 2026 21:18
ryanbliss
added a commit
that referenced
this pull request
Oct 8, 2026
lastEmittedState is bookkeeping, not an owned child. Without @ignore, reading it after an overlapping optimistic rollback adopted the backend's cached result under the baseline, so the next query that received the same object threw a structural parent error. Claude-Session: https://claude.ai/code/session_01Us9f7SPLJUYScpdDnA8oM4
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.
Fixes #117.
QueryNode.lastEmittedStateholds the server baseline but wasn't@ignore. After overlapping optimistic edits rolled back, reading it adopted the backend's cached result as the baseline's structural child. The next query that received the same cached object threwCurrent parent: QueryNode at key lastEmittedState. Requested parent: QueryNode at key state.The baseline is bookkeeping, so it's now
@ignore. No clone is needed. As a side effect, baseline-only updates during an overlapping edit no longer emitnodeChanged.Tests
QueryNode.spec.tsfollows the issue's sequence. Without the fix it fails with the exact error from the issue.npm run test: all pass except tworetree-createCLI tests. Those fail only in this container, because its globalNODE_PATHexposes ESLint and TypeScript. WithNODE_PATHunset they pass.npm run doctorandnpm run lint:architecture.First of a stack: #118, #122 and #123 follow as PRs based on this branch.