Skip to content

Add writer and follower roles to bridge coordinator#25

Merged
wch merged 1 commit into
mainfrom
build-improvements-2
Jul 22, 2026
Merged

Add writer and follower roles to bridge coordinator#25
wch merged 1 commit into
mainfrom
build-improvements-2

Conversation

@wch

@wch wch commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This PR lets multiple development workflows share one ai-provider-bridge build safely. The first watch coordinator becomes the sole writer, while later watch coordinators follow its completed generations and relay readiness markers to their own supervisors. This prevents concurrent Positron, Standalone, and RStudio workflows from fighting over the bridge lock or deleting live output.

Changes

  • Records watch or one-shot intent in the coordinator lock and resolves writer/follower roles from the live owner's declared mode.
  • Publishes token-scoped ready.json state after each complete watch generation so followers cannot accept stale output from an earlier writer session.
  • Adds a generation observer that combines filesystem events with polling, validates live output digests, deduplicates observations, and converges to the latest generation when events coalesce.
  • Keeps one-shot and clean builds exclusive, with a clear failure before any output is removed when a live coordinator exists.

@wch
wch enabled auto-merge (squash) July 22, 2026 21:50
@wch
wch merged commit f525f1c into main Jul 22, 2026
2 of 4 checks passed
@wch
wch deleted the build-improvements-2 branch July 22, 2026 21:50
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