Expand description
Checkout + the restart matrix (plan §2.1).
| State on wake | Action |
|---|---|
| No marker, empty tree | full checkout |
| No marker, partial tree | resume (local-wins skips present paths) |
| Marker present | NEVER re-materialize: reload baseline, |
| rescan rebuilds dirt, lease self- | |
| recognizes via the persisted id |
Re-checkout over a live tree is forbidden: local-wins protects only
PRESENT paths, so it would resurrect the agent’s unpublished deletes
(LeanRematerialize.cfg rediscovers exactly that). The marker is
written LAST — it is the agent-start gate.