The mutation boundary and write sequence
mainAll planned workspace edits (including those from unify and surface) must follow a strict sequence to ensure safety and recoverability:
- Capture: Capture the relevant source and repository state.
- Plan: Build a deterministic plan with exact authorized paths.
- Revalidate: Revalidate the captured assumptions immediately before writing.
- Apply: Apply only the planned changes and persist recovery evidence when needed.
Note on boundaries: Cache writes, compiler acquisition journals, and installation profiles operate on their own validation and recovery boundaries; they do not pass through the standard workspace mutation plan.