PENGO Workbench
Workbench / Patterns / Invariant Breakage

PAT-0330

Invariant Breakage

A structural condition where an observed state violates a declared invariant that is supposed to remain true.

Primary Lenses

LEN-0210

Invariant Lens

Verifies that declared invariants are structurally enforceable and not contradicted by observed structure.

Lens Application

The Invariant Lens is a primary inspection mechanism for Invariant Breakage because it compares declared invariants with the structural conditions that are supposed to preserve them. It helps surface places where enforcement is missing, inconsistent, or contradicted by observed states without treating the finding as a final verdict.

Inspect For

  • Declared invariants contradicted by observed state
  • Missing structural enforcement of invariant conditions
  • Exceptions or transitions that bypass invariant protection
  • Conflicting rules that make the invariant unstable

Avoid

Treat a contradiction as an inspection signal rather than conclusive evidence without checking whether scope, timing, or enforcement boundaries affect the observation.

LEN-0150

Conflict Lens

Detects mutually incompatible constraints, claims, states, or declarations that cannot be simultaneously satisfied.

Lens Application

The Conflict Lens is a primary inspection mechanism for Invariant Breakage because it examines where an invariant’s declared condition conflicts with observed system state, behavior, or downstream claims. It helps locate the incompatibility that may indicate structural breakage without treating the mismatch as automatically conclusive.

Inspect For

  • Declared invariants contradicted by observed state
  • Constraints that cannot hold together
  • State transitions that violate required conditions
  • Conflicting records, claims, or enforcement rules

Avoid

Treat a conflict as an inspection signal rather than sufficient closure without checking whether scope, timing, or interpretation explains the apparent incompatibility.

Secondary Lenses

LEN-0200

Interface Contract Lens

Compares declared interface structure to observed runtime structure to detect contract deviations.

Lens Application

As a secondary lens, the Interface Contract Lens supports inspection of Invariant Breakage by highlighting mismatches between declared interface contracts and observed runtime structures. Contract deviations may indicate where an invariant assumption no longer matches actual system behavior, especially when runtime shape, type, nullability, or cardinality changes affect conditions that were supposed to remain true.

Inspect For

  • Runtime fields or shapes missing from declared contracts
  • Extra or unexpected interface members
  • Type, nullability, or cardinality mismatches
  • Contract changes that alter invariant assumptions

Avoid

Treat an interface mismatch as an inspection signal rather than sufficient evidence of Invariant Breakage without checking the related invariant expectation and runtime context.

Primary Issue Matches

No primary issue matches.

Supporting Issue Matches