symfonic.capabilities.governance.ordering¶
ordering ¶
Ordering mechanics: a rulebook is an order plus two declarations (T3.4.4).
A RuleBook is an immutable, totally-ordered list of StageRule. It
answers three questions and refuses everything else:
- what rank does this stage hold?
- does this composition respect the order?
- what does this stage declare — its phase, its failure mode, and why?
Extension is a new rulebook, never a mutation of the shared one, so an adopter adding a stage cannot reorder governance for everyone else in the process.
RuleBook ¶
An ordered, immutable set of stage declarations.
Source code in src/symfonic/capabilities/governance/ordering.py
extend ¶
Return a new rulebook with rule inserted after after.
after=None appends. The result is validated by the constructor,
so a phase inversion is refused here rather than at the first turn.
Source code in src/symfonic/capabilities/governance/ordering.py
validate ¶
Refuse a composition that is not a subsequence of this order.
Source code in src/symfonic/capabilities/governance/ordering.py
StageRule
dataclass
¶
One stage's declaration: where it runs, and what a failure means.
rationale is required and is checked for being a sentence rather
than a label. A failure mode without a stated reason is a coin flip
somebody will later "optimise" in the wrong direction.