symfonic.kernel.traces¶
traces ¶
The record one stage execution leaves behind.
Split from :mod:.dispatch when that module crossed its 300-line budget, and
the seam is a real one rather than a convenient cut: the dispatcher is the
runner and this is the record. They are read for different reasons โ one
when you are asking how a phase executes, the other when you are asking what
happened in a turn that already ran.
StageTrace
dataclass
¶
StageTrace(stage_id: str, phase: Phase, capability: str, outcome: StageOutcome, reason: str = '', declared_events: tuple[str, ...] = (), returned_events: int = 0, published_events: int = 0, counts: Mapping[str, int] = (lambda: EMPTY_COUNTS)(), error: BaseException | None = None)
One stage execution, as the record a reader needs to explain a turn.
declared/returned/published are separate on purpose. Equal
numbers are the boring case; the interesting bugs are a stage that declared
events and returned none, or returned some the dispatcher refused to
publish.
inert
property
¶
Ran, changed nothing, emitted nothing.
Not an error โ a stage can legitimately have nothing to do. But it is the shape worth counting, because a capability whose stages are always inert is a capability that is wired and doing nothing, which is exactly the state RCH-1 catches statically and this catches at runtime.