symfonic.devtools.archgate.processglobals¶
processglobals ¶
Forbidden process globals.
LAY-ADR SS4: a compiled plan is frozen and per-run state lives in kernel run
state โ "never in process-global config (forbidden pattern)". The detectable
form of that pattern is a global statement: module-level state rebound at
runtime, shared by every tenant, every invocation, and every test in the
process.
Module-level constants are not the target โ a frozen table read by many callers is the opposite of hidden state. What this rule looks for is the rebinding.
check_forbidden_globals ¶
check_forbidden_globals(facts: dict[str, ModuleFacts], sanctioned: tuple[str, ...]) -> list[Violation]
One violation per module that rebinds module state from a function.