Repository navigation
feat(session-ingest): clone and export a session up to a message - #7439
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryI re-reviewed the incremental commits and verified both prior findings are resolved: rollback now recognizes a cut-built stage by source + destination, and Files Reviewed (4 files)
Previous Review Summary (commit c76fc53)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit c76fc53)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryThe message-cut clone/export feature is otherwise well-tested and correct; the highest-risk gap is that the clone rollback RPC cannot match a message-cut stage, so a failed cut clone's destination row, DO stage, and R2 bodies are left behind. Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (13 files)
Reviewed by deepseek-v4.1-flash · Input: 51K · Output: 10.5K · Cached: 572.4K Review guidance: REVIEW.md from base branch |
bot: Adds an inclusive message cut to the session clone and export. This supports "Fork from here" in the mobile app.
Summary
createSessionForCloudAgentacceptscloneUpToMessageId.GET /api/session/:id/exportacceptsupToMessageId.util/message-cut.ts) keeps the session row, messages with ID <= the cut, and the parts of those messages. It dropssession_diff. The filter reads only item IDs, so R2-backed rows need no body read.destination_conflictfor a published one.clone_cut_not_found(RPC) or 404clone_cut_not_found(export).Related
Verification
session-ingesttest suite passes, and the typechecks forsession-ingestandsession-ingest-contractsare clean.