fix(server): thread.turn.start bootstrap parity between websocket and http dispatch - #7996
Open
pablospe wants to merge 6 commits into
Open
fix(server): thread.turn.start bootstrap parity between websocket and http dispatch#7996pablospe wants to merge 6 commits into
pablospe wants to merge 6 commits into
MacroscopeApp / Macroscope - Correctness Check
succeeded
Aug 23, 2026 in 1m 19s
No issues identified (3 code objects reviewed).
• Merge Base:
b1670ac
• Head:a4ec449
Details
| ✅ | File Path | Comments Posted | Reason |
|---|---|---|---|
| ✅ | apps/server/src/orchestration/TurnStartBootstrap.ts |
0 | |
| ➖ | apps/server/src/server.test.ts |
Excluded by default ignore patterns | |
| ✅ | packages/contracts/src/environmentHttp.ts |
0 | |
| ✅ | apps/server/src/orchestration/http.ts |
0 | |
| ➖ | apps/server/src/ws.ts |
No code objects identified |
Filtered Issues Details
apps/server/src/orchestration/TurnStartBootstrap.ts
- line 366: The interrupt-only branch returns immediately without calling
cleanupCreatedThread. If the request/fiber is interrupted afterthread.createsucceeds (for example an HTTP client disconnects while Git/setup work is running), the newly created thread—and possibly its worktree—remains even though no turn was started. The non-interruption path already makes cleanup uninterruptible, so this branch should perform the same rollback rather than bypass it. [ Previously rejected ] - line 369:
cleanupCreatedThreadonly dispatchesthread.delete; it never removes a worktree successfully created earlier in the bootstrap. Ifthread.meta.update, setup activity recording, or the finalthread.turn.startfails aftercreateWorktreesucceeds, line 369 reports rollback while leaving the physical Git worktree and its branch behind. Retrying can then fail on the existing branch/worktree and repeated HTTP attempts leak directories; cleanup should track the created worktree and callgitWorkflow.removeWorktreeas part of rollback. [ Previously rejected ]
Loading