* fix(#1230): preserve frontmatter status/stopped_at when a state write doesn't change the body source Adds a delta heuristic in `readModifyWriteStateMd`: snapshots the body Status and Stopped At fields before the transform, then after syncStateFrontmatter runs, restores the existing frontmatter values for any field whose body source was not changed by this write. Integrates cleanly with the existing !resync progress-restore block (computes postFm once, applies both restorations, reconstructs frontmatter once). Regression tests added to bug-905 test file (same theme, no new file). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(#1230): add Fixed changeset fragment --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
564 B
564 B
type, pr
| type | pr |
|---|---|
| Fixed | 1252 |
state.* writes no longer silently revert the STATE.md frontmatter status/stopped_at — an incidental write (e.g. state record-session) that doesn't change the body's Status:/Stopped at: source field now preserves the existing frontmatter value instead of re-deriving it from possibly-stale body text. Legitimate transitions (e.g. begin-phase/complete-phase, which do update the body Status) still re-derive normally, so a verified-complete phase can no longer be flipped back to verifying by an unrelated write.