symfonic.devtools.archgate¶
archgate ¶
The permanent architecture and DRY gate (T4.4.1, REQ-S4.4).
One command CI runs, composing three checkers that already existed and one that did not:
- architecture rules (T1.2.4) — dependency direction, cycles, module budgets, public-export drift, and the expiring exception registry.
- optional imports (T4.2.1) — IA-1..IA-5 against the integration-adapter map.
- DRY invariants (this task) — one invocation pipeline, one normalizer, and no forbidden process globals.
- exception expiry (this task) — countdown, overdue review, and dead waivers over every registry the gate reads.
Run python -m symfonic.devtools.archgate from the repository root.
Configuration: .agent/team/framework-refactor/evidence/T4.4.1/archgate.toml.
ArchgateConfigError ¶
Bases: ValueError
archgate.toml is missing or structurally invalid.
SingleDefinitionRule
dataclass
¶
SingleDefinitionRule(id: str, rule: str, description: str, names: tuple[str, ...], owners: tuple[str, ...])
Names that may only be defined at top level by declared owners.
SingleSourceRule
dataclass
¶
SingleSourceRule(id: str, rule: str, description: str, targets: tuple[str, ...], owners: tuple[str, ...], allow_lazy: bool = False)
One chokepoint and the modules licensed to reach it.
targets are dotted import targets (a module prefix or a symbol). A
module that is not an owner and imports one of them is a violation.
allow_lazy exists for chokepoints whose deferred import is sanctioned;
it is off by default, because a lazy import is still a second way in.
run_gate ¶
run_gate(config: ArchgateConfig, today: date | None = None, strict_hygiene: bool = False) -> GateResult
Run every composed checker against the repository the config names.