Repository navigation
fix(cloud-agent): preserve attachments during offline-first session creation - #8446
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe follow-up correctly closes the discard leak: uploads are released only after a definitively failed creation, with ambiguity, in-progress polling, retries, and restored sessions conservatively excluded, and the new object keys match the server's Assumptions: Files Reviewed (7 files)
Previous Review Summary (commit d3dfb53)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit d3dfb53)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe handoff fix is correct and well covered; the one gap is that uploads are now owned by a local session whose discard path never releases them, leaving R2 objects and pending-ledger rows to the 24-hour reaper. Assumptions: Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (2 files)
Reviewed by deepseek-flash-latest · Input: 79.1K · Output: 19.3K · Cached: 2.5M Review guidance: REVIEW.md from base branch |
Summary
clearAttachments()immediately aftercreateLocalSession(), releasing and deleting pending uploads before asynchronousprepareSessioncould link them.Verification
NewSessionPanel.attachment-handoff.test.ts,useCloudAgentAttachmentUpload.test.ts, andChatInput.finalize.test.ts. Used a database-independent Jest configuration because the default global setup requires PostgreSQL unavailable in this sandbox.git diff --checkpassed.Scope