Skip to content

Recover durable subscribers across history pruning and bound preview queues - #4222

Open
juruoO-o wants to merge 6 commits into
agentscope-ai:mainfrom
juruoO-o:feat/durable-subscriber-recovery
Open

juruoO-o wants to merge 6 commits into
agentscope-ai:mainfrom
juruoO-o:feat/durable-subscriber-recovery

Conversation

@juruoO-o

@juruoO-o juruoO-o commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Keep subscriber-local preview queues bounded and reject stale previews against the committed Thread projection, including a completed tool whose Turn is still active. Expired cursors recover through the existing snapshot and incremental replay APIs, including Turn-filtered subscriptions and Thread-scoped cursors.

Verification

On the latest main, the PostgreSQL Docker regression covered concurrent subscribers with different cursors, pruning, a subscriber dying after display and before saving its cursor, 4,608 historical completions, cross-session isolation, and a slow subscriber. Both stale-preview scenarios delivered zero stale previews, new previews reached the healthy subscriber, and the slow subscriber received at most 128 of 4,096 preview updates under pressure.

Run agentscope-durable/scripts/subscriber-regression/run.sh to reproduce.

Copilot AI balanced review requested due to automatic review settings November 17, 2026 02:56

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@mintlify

mintlify Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit a60230d.

Approve preview

@juruoO-o
juruoO-o requested a review from chickenlj December 2, 2026 05:20
@juruoO-o

juruoO-o commented Dec 2, 2026

Copy link
Copy Markdown
Collaborator Author

Please focus the review on subscriber recovery after history pruning and on what subscribers observe when the preview queue reaches capacity.

This branch has not been deployed

No deployments
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.

2 participants