Fix Cursor terminal and interaction-query semantics - #2
Open
hffmnnj wants to merge 4 commits into
Open
Conversation
Split the ambiguous turnEnded fixture into deterministic kept-open and transport-close sequences before changing proxy behavior. The smoke coverage shows that turnEnded is currently a no-op, leaving semantic watchdog or transport-close handling to finish the response.\n\nChanges:\n- Add text-plus-turnEnded scenarios with kept-open and closed HTTP/2 transports\n- Name terminal-less transport closure and assert the explicit finishTerminal cascade\n- Bound the kept-open reproduction with test-controlled semantic watchdog settings
Cursor can signal normal completion with InteractionUpdate.turnEnded while leaving the HTTP/2 response open. Route that signal through the existing idempotent terminal owner so SSE clients receive stop, usage, and exactly one completion marker without waiting for the semantic watchdog.\n\nPreserve strict errors for terminal-less transport closure and protect the clean result from a later close. Adapted from tanushshukla/opencode-cursor@a067e099.
Reply with typed protocol rejections for Cursor queries whose generated responses support a negative result, allowing the server to continue the same turn. Keep VM setup and server controls fail-fast rather than falsely acknowledging unperformed privileged operations.\n\nChanges:\n- encode typed rejections for web, question, mode, Exa, and plan queries\n- cover continued turnEnded completion and explicit control failure\n- document the protocol disposition and tanushshukla/opencode-cursor@a067e099 attribution
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
Verification
npx tsc -p tsconfig.json --noEmitbun test/smoke.tsbun run buildgit diff 7affbe4..HEAD --checkThis change is stacked on fork PR #1.