Skip to content

fix(desktop): recover stale transcript subscriptions - #3754

Merged
Astro-Han merged 1 commit into
apache:mainfrom
testikun:codex/issue-3748-transcript-recovery
Aug 25, 2026
Merged

fix(desktop): recover stale transcript subscriptions#3754
Astro-Han merged 1 commit into
apache:mainfrom
testikun:codex/issue-3748-transcript-recovery

Conversation

@testikun

@testikun testikun commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat only session.transcript.page + not_found as a recoverable subscription failure.
  • Reuse the existing subscription replacement and snapshot/transcript reconciliation path.
  • Add a deterministic observer regression test proving that live frames continue after the stale subscription is replaced.
  • Keep other not_found operations and session_removed terminal.

Fixes #3748

Verification

  • Desktop typecheck passes.
  • Focused Runtime Host session observer suite passes (37 tests).
  • Full Desktop main-process suite passes (1,476 tests).

简体中文摘要

当旧 Session subscription 在 transcript 分页期间失效时,Runtime Host 返回的是 RuntimeHostOperationError("session.transcript.page", "not_found")。Desktop 之前没有把它识别为可恢复错误,导致后台任务继续运行但界面停止接收实时更新。

本 PR 只放行这一组精确错误,复用现有的重新订阅、snapshot/transcript reconcile 和后续 frame 处理流程;其他 not_foundsession_removed 行为保持不变,并增加确定性回归测试。

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this head and found no blocking issues.

The fix correctly narrows the not_found predicate to only operation=session.transcript.page — the sole exact pair emitted when an active transcript subscription is reaped. Other not_found failures remain terminal. The linearisation (detach/close failed attempt, open new subscription, recover via snapshot/projector reconcile) is sound, and the new test covers the page-not-found window without requiring renderer resubscribe.

Checks on 97105e7d3c are test: in_progress — code is GO.

简体中文该头未发现阻断。

@Astro-Han Astro-Han left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — 97105e7, no P0-P2, replacement seam correctly scoped.

@Astro-Han
Astro-Han merged commit 4bae93a into apache:main Aug 25, 2026
1 check passed
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 observer stops after transcript paging returns subscription not_found

2 participants