Repository navigation
fix(core,tui): resolve stuck compacting status with terminal compaction events - #34919
Closed
kitlangton wants to merge 1 commit into
Closed
kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
Contributor
Author
|
Closing because this behavior has been absorbed into the current V2 compaction architecture, including terminal |
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.
Problem
Triggering a compaction (e.g.
/compact) leaves the session stuck "running" in the TUI forever — it looks like the compaction never stops.Two root causes:
session.next.compaction.startedsets the session status torunning(data.tsx), butsession.next.compaction.endedonly appends the compaction message. For manual compaction there is no runner step, so nostep.ended/step.failedever arrives to reset the status.SessionCompaction.compactpublishesCompaction.Started, then returnsfalseon summarization failure (provider error / empty summary) without publishing anything, so every client that reacted toStartedwaits forever.Fix
SessionEvent.Compaction.Failed(session.next.compaction.failed). A failed compaction produces no durable message, so it is not added toDurableDefinitions(same live-only classification asCompaction.Delta).Compaction.Failedon the summarization failure path afterStarted; no-op handler in the message updater.idleoncompaction.endedandcompaction.failed. Mid-run auto compaction is immediately followed by step events that setrunningagain.packages/client/src/generated(bun run generate) and the legacy JS SDK (packages/sdk/js/script/build.ts). Note: the legacy SDK regeneration also picked up the previously-unregeneratedsession.syntheticroute/metadata surface that was already onv2.Tests
manual compaction failure publishes a terminal failed event— assertsCompaction.Failedis observed live, no compaction message is projected, and onlyStartedis durably recorded.tracks session status from active sessions and execution eventswith compaction started -> ended -> idle and started -> failed -> idle transitions.v2(expected 63, received 65) from earlier unregenerated event additions; the new counts (66/97/97) reflect the actual current surface including this event.Note:
packages/clientexposes every standard HTTP API groupalso fails on the base branch (pre-existing, unrelated).