Skip to content

feat(cli-bridge): make durable turns resumable - #101

Merged
drewstone merged 1 commit into
mainfrom
fix/cli-bridge-session-contract
Jul 30, 2026
Merged

feat(cli-bridge): make durable turns resumable#101
drewstone merged 1 commit into
mainfrom
fix/cli-bridge-session-contract

Conversation

@drewstone

@drewstone drewstone commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What

  • derive bridge routing only from turn/provider/profile data; no backend or model fallback
  • reuse caller execution IDs or deterministic wire-safe IDs
  • continue sessions and replay from server event cursors
  • cancel active bridge jobs on reader exit or environment shutdown, waiting for confirmed server completion
  • reconstruct full replay results from the bridge-owned run instead of keeping a second local history

Why

cli-bridge jobs survive client disconnects. The SDK provider previously neither sent stable run IDs nor cancelled those durable jobs, and it silently selected OpenCode when no caller selected anything. That made resume unreliable and shutdown capable of leaking paid work.

Proof

  • clean workspace test run: 697/697 unique tests passed
  • provider tests: 29/29 passed
  • workspace type checks and builds passed on the exact commit
  • isolated package check passed: 8 packages, 18 exports, 36 export targets
  • live route check: Pi 0.75.5 exposed pi/tangle-router/glm-5.2; the profile-driven smoke returned exactly READY in 16.4 seconds (15,053 input / 3 output tokens)
  • independent adversarial review: approved exact diff; 0 named provider/model/backend cases

Remaining upstream issue

cli-bridge must serialize concurrent turns that share one backend/session pair. That enforcement belongs in cli-bridge across all clients, not in this provider.

@drewstone
drewstone merged commit b5e6e1b into main Jul 30, 2026
1 check passed
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