fix(app): reconcile session_status in bootstrap so stale busy clears#32128
Open
zoulukuang wants to merge 1 commit into
Open
fix(app): reconcile session_status in bootstrap so stale busy clears#32128zoulukuang wants to merge 1 commit into
zoulukuang wants to merge 1 commit into
Conversation
session_working(id) is derived purely from session_status, but bootstrap reconciled it from session.status() with a bare setStore instead of reconcile(). session.status() only returns non-idle sessions (idle ones are deleted from the in-memory map), so a stale busy/retry entry the backend no longer reports was never removed, leaving the session stuck working forever. Reconcile it the same way the adjacent config line does. Fixes anomalyco#32127 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #17657
Type of change
What does this PR do?
session_working(id)is derived only fromsession_status, butbootstrapupdatedsession_statusfromsession.status()with a plainsetStoreinstead ofreconcile.session.status()returns only non-idle sessions (idle ones are deleted from the in-memory map instatus.ts), and SolidJSsetStoremerges keys rather than replacing them — so abusy/retryentry the backend no longer reports was never removed. The session then stayed "working" forever (e.g. after a droppedsession.idleevent, or a server restart that lost its in-memory status map).The
configline directly above already usesreconcile; this just makessession_statusconsistent with it:How did you verify your code works?
Added a
bootstrapDirectorytest that seeds a stalebusyentry, returns{}fromsession.status(), and asserts the entry is dropped after bootstrap — it survives with the oldsetStore. Ranbun testfor the app package locally.Screenshots / recordings
N/A — no visual change.
Checklist