Machine-readable summary of a run/resume outcome.
(state: Any)
| 169 | |
| 170 | |
| 171 | def _workflow_run_payload(state: Any) -> dict[str, Any]: |
| 172 | """Machine-readable summary of a run/resume outcome.""" |
| 173 | payload = { |
| 174 | "run_id": state.run_id, |
| 175 | "workflow_id": state.workflow_id, |
| 176 | "status": state.status.value, |
| 177 | "current_step_id": state.current_step_id, |
| 178 | "current_step_index": state.current_step_index, |
| 179 | } |
| 180 | gate = _gate_outcome(state) |
| 181 | if gate is not None: |
| 182 | payload["gate"] = gate |
| 183 | return payload |
| 184 | |
| 185 | |
| 186 | def _is_gate_step(step: dict[str, Any]) -> bool: |
no test coverage detected