State and Persistence¶
Persistence in DAG is not incidental. Run directories, node traces, artifact indices, and lineage links are the evidence substrate for inspect/replay/diff.
Visual Summary¶
flowchart TD
run["run execution"] --> run_dir["run directory"]
run_dir --> manifest["manifest and outputs index"]
run_dir --> node_traces["node traces stdout stderr"]
manifest --> lineage["artifact lineage and provenance"]
lineage --> inspect["inspect replay diff consumers"]
Persisted Surfaces¶
- run manifest and run metadata
- node-level outputs, logs, and traces
- outputs/input index files
- artifact integrity and provenance records
- replay and diff proof-relevant metadata
Timed-Out Run Evidence¶
Run-level deadlines now persist their own evidence instead of collapsing into a generic failed run.
manifest.json.statusbecomestimed_outwhen the DAG-level deadline is the terminal cause.manifest.json.run_timeout_behaviorrecords whether the runtime finished already-running nodes or actively cancelled them at the deadline..run-incomplete.jsonremains present for timed-out runs so partial outputs are never misrepresented as fully completed evidence..run-complete.jsonis only written for runs that actually finalized as complete.
Operator interruption now persists dedicated cancellation evidence too.
manifest.json.statusbecomescancelledwhen the operator interrupts the run.manifest.json.run_cancellation_causerecords the durable cancellation cause instead of forcing downstream readers to infer it from partial traces.- already completed nodes keep their existing terminal status, while running or not-yet-started work is finalized as cancelled evidence.
The two supported timeout behaviors are:
finish_runningThe scheduler stops launching new nodes after the deadline and lets already started work finish naturally.cancel_runningThe scheduler stops launching new nodes and caps in-flight execution to the remaining run budget so timeout-capable adapters are terminated at the deadline.
Node Trace Lifecycle Evidence¶
Each persisted trace.json now carries two lifecycle-specific fields in
addition to the coarse terminal status.
lifecycle_staterecords the final runtime state that best matches what actually happened to the node.lifecycle_transitionsrecords the validated state path the runtime observed while scheduling or executing that node.
This separation matters because terminal status alone is not always honest
enough. A node can end with status failed while its lifecycle state is
timed_out or cancelled, and a cached node should never claim that execution
started just because it was scheduled for cache lookup.
The persisted lifecycle states are:
pendingreadyqueuedrunningsucceededfailedskippedcachedcancelledtimed_out
ready means the node satisfied dependency and selector checks. queued
means the scheduler admitted that ready node into the bounded worker queue but
execution has not started yet.
Retry Attempt Evidence¶
Retry execution now persists attempt-level evidence instead of collapsing every attempt into one overwritten node log.
nodes/<node_id>/attempts.jsonrecords each attempt with start time, finish time, terminal status, failure payload, scheduled backoff, retry decision reason, and relative log paths.nodes/<node_id>/attempts/<attempt>/stdout.logandnodes/<node_id>/attempts/<attempt>/stderr.logpreserve the stdout/stderr captured for that specific attempt.- node-level
stdout.logandstderr.logstill reflect the terminal attempt for compatibility with existing operator tooling. run.log.jsonlandobservability.timeline.jsonnow carry explicit retry lifecycle events such asnode_retry_scheduledandnode_retry_exhausted, including the durable retry reason when another attempt was allowed or vetoed.
Code Anchors¶
crates/bijux-dag-artifacts/src/storage/models.rscrates/bijux-dag-artifacts/src/storage/hardening.rscrates/bijux-dag-artifacts/src/lifecycle/lineage.rscrates/bijux-dag-runtime/src/artifacts/crates/bijux-dag-app/src/inspect/run_views.rs