@@ -64,8 +64,8 @@ removal, just as with ordinary Git operations. Damaged checkout paths or missing
6464inspection; the recovery record remains. For a missing path whose Git
6565registration survives, use the reviewed rescue below.
6666
67- Carrying uncommitted changes into an isolated checkout, reviewed return/merge
68- operations and recovery controls for missing/ damaged checkouts remain part of the
67+ Carrying uncommitted changes into an isolated checkout, desktop return controls
68+ and repair of damaged checkouts remain part of the
6969[ native migration gates] ( NATIVE_MIGRATION.md ) .
7070
7171Inventory and individual actions share the same bounded, non-following record
@@ -99,3 +99,38 @@ commit, together with the uncommitted-file limitation. **Restore in new worktree
9999creates the separate checkout; ** Cancel recovery** closes the review without
100100changes. Errors clear stale reviews. Use ** Open worktree** on the newly listed
101101checkout to enter the usual project trust flow.
102+
103+ ## Review and return committed changes
104+
105+ ``` sh
106+ shadowcode --workspace /source/project worktree --review-return FULL_WORKTREE_ID
107+ shadowcode --workspace /source/project worktree --return-changes FULL_WORKTREE_ID --return-hash REVIEW_HASH
108+ ```
109+
110+ The review includes the exact source/worktree branches and commits, their merge
111+ base, and the worktree's incoming diff from that base. This is the incoming
112+ branch diff, not a promise of a conflict-free merge. Reviews larger than the
113+ 64 KB Git-output limit must be handled through ordinary Git review tools.
114+ Both checkouts must be attached to branches, free of tracked/untracked changes
115+ and unfinished Git operations. Locked worktrees and already-integrated commits
116+ are rejected. The source must be trusted and writable. Active tasks/manual
117+ operations or background processes in either checkout block the return.
118+
119+ The return rechecks the review hash, then prepares ` git merge --no-commit --no-ff `
120+ in the source checkout. HEAD stays unchanged: review the staged result and commit
121+ separately using the source project's normal Git review tools. Git preserves
122+ nonconflicting source-branch work when histories have diverged. Conflicts remain
123+ in the source files/index for explicit resolution; the result is
124+ ` needs_attention ` , with a nonzero CLI exit status. Inspect ` git status ` , resolve
125+ and commit, or run ` git merge --abort ` in the source project to abandon the merge.
126+ Interrupted operations retain a ` returning ` recovery record explaining what was
127+ attempted. No reset, auto-stash, automatic commit, branch deletion or checkout
128+ removal is performed. Ignored source files cannot be overwritten by the merge.
129+ The worktree branch and committed contents remain available throughout.
130+
131+ Git hooks and filesystem-monitor hooks are disabled for these operations; Git's
132+ configured merge drivers and checkout filters still apply. Keep external Git or
133+ filesystem writers idle during review and return, as with ordinary Git merges.
134+ After committing or aborting, the record's last-operation status is historical;
135+ future actions inspect the actual Git state again. Dedicated desktop return
136+ controls remain in development.
0 commit comments