Replace an already-recorded step's ``output`` under the run lock. Fan-out updates its parent step's output after the items have run; routing that nested mutation through the lock keeps it from racing a ``save()`` serializing ``step_results`` — the same invariant ``re
(self, step_id: str, output: Any)
| 445 | self.step_results[step_id] = data |
| 446 | |
| 447 | def set_step_output(self, step_id: str, output: Any) -> None: |
| 448 | """Replace an already-recorded step's ``output`` under the run lock. |
| 449 | |
| 450 | Fan-out updates its parent step's output after the items have run; |
| 451 | routing that nested mutation through the lock keeps it from racing a |
| 452 | ``save()`` serializing ``step_results`` — the same invariant |
| 453 | ``record_step_result`` provides for the top-level assignment. |
| 454 | """ |
| 455 | with self._lock: |
| 456 | if step_id in self.step_results: |
| 457 | self.step_results[step_id]["output"] = output |
| 458 | |
| 459 | def save(self) -> None: |
| 460 | """Persist current state to disk. |