Files
orca/src/main/daemon
NeilandOrca 4a1107a4b2 fix(daemon): clear disabledSessions on normal terminal exit in closeSession (#5816)
handleWriteError adds a sessionId to disabledSessions on any best-effort
history write failure. closeSession (the normal PTY-exit teardown) deleted
the writer but never the disabled flag; the only other deletes are on id
reuse (never happens) and explicit user-kill. A session poisoned by a
transient mid-life write error then exiting normally leaked its id in
disabledSessions forever.

Delete the flag in closeSession after writers.delete. Add isSessionDisabled
and disabledSessionCount test accessors.

Regression test fails before the fix (50 ids leak) and passes after.

Co-authored-by: Orca <help@stably.ai>
2026-06-19 12:34:41 -07:00
..