Skip to content

fix(app): reconcile session_status in bootstrap so stale busy clears#32128

Open
zoulukuang wants to merge 1 commit into
anomalyco:devfrom
zoulukuang:pr/session-status-stale-busy
Open

fix(app): reconcile session_status in bootstrap so stale busy clears#32128
zoulukuang wants to merge 1 commit into
anomalyco:devfrom
zoulukuang:pr/session-status-stale-busy

Conversation

@zoulukuang

@zoulukuang zoulukuang commented Jun 13, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #17657

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

session_working(id) is derived only from session_status, but bootstrap updated session_status from session.status() with a plain setStore instead of reconcile.

session.status() returns only non-idle sessions (idle ones are deleted from the in-memory map in status.ts), and SolidJS setStore merges keys rather than replacing them — so a busy/retry entry the backend no longer reports was never removed. The session then stayed "working" forever (e.g. after a dropped session.idle event, or a server restart that lost its in-memory status map).

The config line directly above already uses reconcile; this just makes session_status consistent with it:

input.setStore("session_status", reconcile(x.data ?? {}, { merge: false }))

How did you verify your code works?

Added a bootstrapDirectory test that seeds a stale busy entry, returns {} from session.status(), and asserts the entry is dropped after bootstrap — it survives with the old setStore. Ran bun test for the app package locally.

Screenshots / recordings

N/A — no visual change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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>
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Jun 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop: Session spinners persist indefinitely due to SolidJS store merge behavior in bootstrap

1 participant