Skip to content

fix(server): make bootstrap turn starts idempotent - #240

Merged
badcuban merged 1 commit into
mainfrom
threadlines/fix-duplicate-thread-creation
Sep 6, 2026
Merged

fix(server): make bootstrap turn starts idempotent#240
badcuban merged 1 commit into
mainfrom
threadlines/fix-duplicate-thread-creation

Conversation

@badcuban

@badcuban badcuban commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

What Changed

Bootstrap turn starts are now idempotent under their command ID. Retries join an in-flight bootstrap run, while later retries use the stored command receipt instead of creating the thread and worktree again.

Why

A dropped WebSocket or slow response could cause the client to retry after part of the bootstrap had already completed, leading to duplicate work or a failed thread.create. A server-wide in-flight run registry and receipt lookup make retries return the original result safely.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

- Join retries to an in-flight bootstrap run instead of creating duplicate threads
- Preserve bootstrap results after dropped WebSocket connections and replay command receipts
- Update orchestration test doubles for command receipt lookups
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Sep 6, 2026 7:32am UTC

Request Review

@badcuban
badcuban enabled auto-merge September 6, 2026 07:32
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 6, 2026
@badcuban
badcuban added this pull request to the merge queue Sep 6, 2026
Merged via the queue into main with commit 9d7191d Sep 6, 2026
16 checks passed
@badcuban
badcuban deleted the threadlines/fix-duplicate-thread-creation branch September 6, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant