Expand description
keel flows resume <FLOW> [-- ARGS…] / keel flows resume --all —
re-invoke a resumable flow’s recorded entrypoint through keel run
semantics (architecture spec §4.3 “Recovery … re-execute”; §6 laptop model
“a crashed script resumes when re-invoked”).
§What the journal actually lets the CLI know
The frozen schema (contracts/journal.sql) records a flow’s identity —
entrypoint ("py:<module>:<function>") and args_hash (a one-way
digest) — never the script path the user originally typed at
keel run <script>, nor the literal CLI arguments. That is enough to
recognize a flow’s provenance but never enough to reconstruct the exact
command that created it. This command is the honest middle ground between
pure re-invocation (dx-spec/§6, which asks the operator to remember the
command) and a fully automatic background scan (§4.3, which would face the
identical gap with nobody present to fill it in) — it does the lookup and
the eligibility checks, and is explicit about what it cannot know:
- The script. A
py:<module>:<function>entrypoint’s module maps to a candidate file the same way the Python front end’smatch_flow(python/keel/src/keel/_flow.py) matches one on the way in: a dotted module (jobs.nightly) names an exact path (jobs/nightly.py); a single-component module (pipeline) matches anypipeline.pyunder the project, so this command searches the tree for one. Zero matches, or more than one for a single-component module, and it stops rather than guess. - The arguments.
args_hashcannot be inverted. Passing none reproduces the original flow_id only when the original invocation also had none; otherwise the front end derives a different deterministic flow_id (spec §4.3) and a fresh flow starts next to the one this command was asked to resume. Pass the original arguments after--when the flow took any. After the child exits, this command re-reads the flow’supdated_atand says plainly when it looks like the wrong flow ran.
Non-py: entrypoints (no other front end designates durable flows yet),
completed flows (nothing to resume — see keel replay), and dead flows
(KEEL-E032, never auto-resumed) are refused with a precise what/why/next;
see [Ineligible].
Structs§
- Resume
Options keel flows resumeoptions: either oneflow(id or substring) orall, never both —argsonly makes sense for a single flow.
Functions§
- run
keel flows resumeforproject: dispatch to the single-flow or--allpath, judging leases and the retention-adjacent “already gone” case againstnow_ms.Renderedis only ever produced for a precondition failure or the--allsummary — a single successful resume is invisible on the way in (likekeel run), because the child IS the resume.