Preserve reviewed document edits when reconciliation inputs change
After an agent edits a merge candidate and acknowledges it with --resolved, a later source or draft change could silently omit those reviewed edits from the exported proposal. Reconciliation now retains hash-checked input snapshots and carries the existing candidate forward. Source reverts remain meaningful; when both inputs move, export requires explicit review of the retained versions. Older workspaces without usable snapshots fail closed.
The guide documents recovery and the updated helper hash. All 25 focused tests pass locally, including regressions that failed on the old helper for lost reviewed edits, overlapping changes, source reverts, ambiguous two-input changes, altered snapshots and review-state persistence. Independent source review found no concrete scoped defect. Originals remain read-only; application code, data access and integration authority are unchanged. Hosted CI remains pending until observed.
Summary by cubic
Fixes reconciliation so reviewed edits to a document candidate survive later source or draft changes instead of being silently dropped from the exported proposal.
- Reconciliation now stores and hash-checks source/draft input snapshots and rebases the reviewed candidate forward when an input moves.
- When both inputs change, the candidate is retained but export requires explicit review with
--resolved. - Older workspaces without usable snapshots fail closed to avoid losing reviewed work; the guide documents recovery.
- Adds regression tests for source/draft changes, source reverts, overlapping edits, tampered snapshots, and both-input changes, including a test fix that canonicalizes the temporary root for reliable path comparison on macOS.