Skip to content

symfonic.capabilities.memory.phases.roster

roster

What a roster factory hands back, and the graph it built the phases on.

A cycle commits in one transaction domain, and a composition whose phases write to a different pool from its lease is refused. To refuse it at composition -- before seventeen phases and the model calls five of them make -- something has to be able to answer "which graph did these phases get?".

Nothing could. The phases hold it privately, which is right: a phase's store is its own business. The factory that resolved it is the one place that knows, so the factory says so.

A tuple subclass rather than a new return type, because quick_phases and its siblings return tuples and everything that consumes them -- ConsolidationRuntime, the composition roots, every test -- keeps working unchanged. The declaration rides along for the one caller that needs it.

PhaseRoster

Bases: tuple

A roster of phases, plus the graph they were built on.

No __slots__: a subclass of tuple cannot have a non-empty one, and the alternative -- a named field in the tuple itself -- would change what iterating a roster gives you, which is the compatibility this shape exists to keep.