Repository navigation
Conversation
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
Looks good. I reproduced the issue's scenario against servers run from source: creating and immediately deleting 5 sessions triggered 5 onError calls ("Session not found: ses_…") on the base and none with this change, while the server still logs the 404 reads. The new test fails on the base and passes here. The client data tests (33/33) and the client typecheck pass.
The check is narrow: it only ignores a SessionNotFoundError for the session that was just created, and only in the background refresh. Explicit session.sync callers still get the rejection, and the test confirms no store entry is left behind.
Public API: unchanged.
No blocking concerns.
Issue for this PR
Closes #57026
Type of change
What does this PR do?
A short-lived session can disappear before the read triggered by
session.createdfinishes, causing a spurious desktop error. Ignore only a matchingSessionNotFoundErrorfrom that background refresh. Other errors still reach the error handler, and explicit reads still reject.Successful stale responses remain the separate scope of #56886.
How did you verify your code works?
The regression fails before the fix. The data suite passes all 33 tests, including 500 and mismatched-session controls; an independent review ran 660 passing randomized repetitions. Client typecheck and all 34
bun run checktasks pass.Full client run: 223 passed, 4 skipped, 5 service tests failed on Windows. An unchanged-baseline service run also failed 3 cases, so I am not claiming a full-suite pass.
AI-assisted; reviewed and tested locally.
Screenshots / recordings
No visual layout change; tested the data layer used by the desktop error handler.
Checklist
Added by the opencode bot (AI-generated).
Related: #48012, #51940