Skip to content

fix: stabilize V2 turn lifecycle, event subscription, and WeCom notifications - #463

Merged
william0wang merged 1 commit into
mainfrom
fix/v2-turn-lifecycle-and-push
Dec 1, 2026
Merged

william0wang merged 1 commit into
mainfrom
fix/v2-turn-lifecycle-and-push

Conversation

@william0wang

Copy link
Copy Markdown
Owner

Summary

  • Ensure session/subscribe activates session/event delivery on loadSession, resumeSession, resumeIntoSession, and runRewind (guarded per backend generation and flight), and attach runOrphanTurn synchronously on live streams so reconnect/re-attach never starves on redundant subscribe/replay RPCs.
  • Make session/cancel and force-close stop backend turns even when pendingTurns is empty (preserving the detached auto-compact guard and preventing compact's own turn.started from populating foreignActiveTurns), and settle TurnFailedError in runOrphanTurn instead of wedging running.
  • Prevent legacy session/send from racing an active v4 turn (isV4ForegroundActive), clear stale v4 conversation state on respawn/close/non-ready lifecycle transitions, coalesce inputPrediction per session, and return queueItemId on queued session/prompt acks.
  • Improve V2 WeCom notifications: session-labeled subagent completion/failure notices, settled turn push & user activity tracking on V2 runOrphanTurn / promptV2, and pushAskNotice when V2 MCP OAuth falls back to opening the local browser.

Verification

  • pnpm typecheck passed
  • pnpm lint passed (0 errors)
  • pnpm test: 158/158 files, 1795 tests passed

@william0wang
william0wang merged commit 5770e27 into main Dec 1, 2026
2 checks passed
@william0wang
william0wang deleted the fix/v2-turn-lifecycle-and-push branch December 1, 2026 12:25
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.

1 participant