lythonic.compose.dag_provenance¶
SQLite-backed storage for DAG run state and node execution traces.
DagProvenance: SQLite-backed storage for DAG run state and node execution traces.
Records the full lifecycle of each DAG run: creation, node-by-node execution (inputs, outputs, timing, errors), and final status. Supports querying for restart and replay scenarios.
DagProvenance
¶
SQLite-backed storage for DAG run state and node execution traces.
Source code in src/lythonic/compose/dag_provenance.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
create_run(run_id, dag_nsref, source_inputs)
¶
Create a new run record with status 'running'.
Source code in src/lythonic/compose/dag_provenance.py
update_run_status(run_id, status)
¶
Update the status of a run without setting finished_at.
Source code in src/lythonic/compose/dag_provenance.py
finish_run(run_id, status)
¶
Set final status and finished_at timestamp.
Source code in src/lythonic/compose/dag_provenance.py
record_node_start(run_id, node_label, input_json, node_type=None)
¶
Record that a node has started execution.
Source code in src/lythonic/compose/dag_provenance.py
record_node_complete(run_id, node_label, output_json)
¶
Record that a node has completed successfully.
Source code in src/lythonic/compose/dag_provenance.py
record_node_failed(run_id, node_label, error)
¶
Record that a node has failed.
Source code in src/lythonic/compose/dag_provenance.py
record_node_skipped(run_id, node_label, output_json)
¶
Record a node as skipped with a copied output (used in replay).
Source code in src/lythonic/compose/dag_provenance.py
get_run(run_id)
¶
Get a run record by ID, or None if not found.
Source code in src/lythonic/compose/dag_provenance.py
get_node_executions(run_id)
¶
Get all node execution records for a run.
Source code in src/lythonic/compose/dag_provenance.py
get_node_output(run_id, node_label)
¶
Get the output JSON of a completed or skipped node, or None.
Source code in src/lythonic/compose/dag_provenance.py
get_pending_nodes(run_id)
¶
Get labels of nodes that are not yet completed or skipped.
Source code in src/lythonic/compose/dag_provenance.py
record_edge_traversal(run_id, upstream_label, downstream_label)
¶
Record that an edge was traversed during execution.
Source code in src/lythonic/compose/dag_provenance.py
get_edge_traversals(run_id)
¶
Get all edge traversals for a run.
Source code in src/lythonic/compose/dag_provenance.py
NullProvenance
¶
No-op provenance -- discards writes, returns None/empty on reads.
Used when DagRunner is created without explicit provenance.