Harden Cursor request and bridge liveness - #3
Open
hffmnnj wants to merge 4 commits into
Open
Conversation
Strengthen liveness coverage without changing production defaults after reconciling the completed turnEnded terminal path with the existing semantic watchdog, refresh bound, and HTTP/2 handlers.\n\nChanges:\n- Assert thinking, positive token, and execution transitions re-arm semantic liveness\n- Assert zero-token and interaction-query traffic never count as semantic progress
A live bridge subprocess can outlast its HTTP/2 stream, making stdin writes appear successful while Cursor cannot receive tool results. Track explicit session and stream writability across the bridge protocol and fail paused resumes through a sanitized, bounded SSE terminal when that transport is unavailable.\n\nChanges:\n- Require transport writability for retained tool-result writes\n- Preserve fresh-request fallback for fully exited bridges\n- Add deterministic process-alive dead-transport coverage
Prove truncated, stalled, and failed bridge collection paths return bounded sanitized errors instead of clean partial completions.
A test-delayed bridge failure could continue through the H2 end handler and publish a contradictory clean transport terminal. Return immediately after the Connect protocol failure and cover the delayed-exit lifecycle so only the failed control state and exit code are observable.
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 f4e3e42..HEAD --checkThis change is stacked on fork PR #2.