Expand description
Resume planner — classify each freshly-pre-mapped phase
against the saved checkpoint document and emit a
ResumePlan the executor consults before dispatch.
Per SRD-44 §“Resume protocol”, the planner walks the pre-map phase list (already in DFS-of-the-scenario-tree order) and for each phase asks:
- Is there a structural match (same
yaml_pathandcoords) in the saved doc? If not →ReRun(this is a new phase that wasn’t in the last invocation). - If matched and the saved status is
Completed:- phase declared
checkpoint: idempotent(or long form withidempotent: true) →Skipwhen hashes match,IdentityMismatch(and re-run) when they don’t. - phase declared
checkpoint: none(or absent) →ReRunregardless of saved status (operator opted out).
- phase declared
- If matched and the saved status is
Running:- the phase has cursor state recorded →
CursorResumewith that opaque snapshot (Tier 2). - no cursor state →
ReRun(Tier 1 inflight crash).
- the phase has cursor state recorded →
- If matched and the saved status is
Failed→ReRun(the errors cascade decides whether to surface the failure again — see SRD-44 §“Error handling is invocation-agnostic”). The planner doesn’t pre-decide. - If matched and the saved status is
Pending→ReRun(the previous invocation never started this phase).
Structs§
- Resume
Plan - The resume plan for one pre-mapped scenario tree. Maps each
phase’s identity-key to its
ResumeAction. A “fresh” plan (no saved checkpoint) maps every phase toReRun.
Enums§
- Resume
Action - What the executor should do with one pre-mapped phase. The
planner emits one of these per phase keyed by identity-key
(see
super::writerfor the key shape).