Skip to main content

Module workflow_local

Module workflow_local 

Source
Expand description

Workflow journal DAG (petgraph + SQLite), one-shot run/resume. One-shot workflow journal (PRD §5H): DAG + SQLite, no live Page/@eN across processes.

§Workload / parallelism

  • DAG validate: CPU-light (petgraph); sequential is fine.
  • Step execution: sequential topo order with fail-fast. Independent ready sets are not fan-out parallel here because the SQLite journal is a single-writer resource and offline steps may share process-local caches. Parallelism lives inside each step (batch scrape, sg scan, find-paths).
  • Justification (rules_rust_paralelismo): coordinating multi-step journal writes under a Mutex would add complexity without measured gain for typical agent workflows (few steps, I/O inside steps already bounded).

Structs§

WorkflowManifest
Workflow manifest file shape.
WorkflowStep
Workflow step in a manifest (no live browser handles).

Functions§

journal_path
Open or create journal DB under XDG state.
load_manifest
Load manifest from JSON path (BOM-aware, size-limited, typed).
validate_dag
Validate DAG with petgraph; return topological order of step ids.
workflow_resume
Resume: skip steps already ok in journal; re-execute pending/error only.
workflow_run
Run workflow one-shot: validate DAG, execute steps that are CLI-data commands, journal state. Browser multi-step with @eN still requires nested run scripts.
workflow_status
Status of journal steps.