mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-19 13:33:35 +08:00
Deleting a desktop session marks it unavailable before removing the underlying session file. If that file removal fails, the session can still exist on disk while future startup attempts are rejected as deleted. Roll back the deleted marker on delete failure so the session remains usable and the original delete error stays visible. Constraint: Windows desktop users can hit file deletion failures while the session is still visible after refresh Rejected: Delay marking until after deletion | would allow concurrent startup during an in-flight delete Confidence: high Scope-risk: narrow Directive: Keep the temporary deleted marker during active deletes, but always rollback on failed persistence operations Tested: Real DeepSeek provider call with issue 259 repro path Tested: bun test src/server/__tests__/sessions.test.ts --timeout 20000 Tested: bun test src/server/__tests__/conversations.test.ts --timeout 30000 Tested: bun run check:server Tested: bun run check:native Tested: bun run quality:pr Not-tested: Native Windows filesystem lock behavior on an actual Windows host