Skip to content

Harden Cursor request and bridge liveness - #3

Open
hffmnnj wants to merge 4 commits into
fix/cursor-terminal-semanticsfrom
fix/cursor-request-liveness
Open

Harden Cursor request and bridge liveness#3
hffmnnj wants to merge 4 commits into
fix/cursor-terminal-semanticsfrom
fix/cursor-request-liveness

Conversation

@hffmnnj

@hffmnnj hffmnnj commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • pin semantic progress sources without changing evidence-backed defaults
  • track writable HTTP/2 session and stream state in the bridge protocol
  • reject paused resumes immediately when transport is dead
  • prove non-streaming stalls, truncation, and bridge exits are explicit and sanitized
  • preserve exactly one failed lifecycle state on delayed protocol failure

Verification

  • npx tsc -p tsconfig.json --noEmit
  • bun test/smoke.ts
  • bun run build
  • git diff f4e3e42..HEAD --check

This change is stacked on fork PR #2.

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

1 participant