Repository navigation
fix(mothership): extend the workflow pickup grace for a view that re-attaches during it - #10152
Merged
Merged
Conversation
…attaches during it A reload drops the send's response, so a call dispatched right then got the 5s grace even though the view re-attaches about two seconds later. Presence is now read again when the short grace ends, and a view attached by then gets the rest of the full grace. A reader's refresh also drops lapsed entries, and the send's in-process attachment signal is covered by a test.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryThis PR gives a reconnected chat view the remaining workflow pickup time and removes expired reader records.
The previously reported slow-check delay is fixed. No new actionable issues were found. Reviews (2) · Last reviewed commit: "fix(mothership): never hold a finished w..." · Reviewed by Greptile |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…ension check The presence re-check at the end of the short grace now races the browser's result, so a run that finishes or a Stop during a slow read returns at once, and the time the check took comes out of the extension.
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously deployed
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.
Summary
ZCOUNT, only on turns that started with no view.ZREMRANGEBYSCORE key -inf <now>in the sameMULTI, so entries left by a crashed instance don't linger while another reader keeps the key alive.Type of Change
Testing
handlers.test.ts: a view that re-attaches during the short grace is not claimed before 30s (fails on the code before this change).start.test.ts: the send counts as viewed while its response is attached and defers to reader presence once it disconnects (fails if the in-process signal is inverted).viewer.integration.tsagainst real Redis, plusworkflow-client-fallback.test.tsandapp/api/copilot/chat/stream/route.test.ts; biome on changed files. Full type-check and audits left to CI.Checklist
test-auditauthoring gate)