PAT-0160
Schema Breakage
A structural condition where an instance, graph, payload, or object violates the type, shape, or rule requirements of a declared schema.
Primary Lenses
Interface Contract Lens
Compares declared interface structure to observed runtime structure to detect contract deviations.
Lens Application
The Interface Contract Lens is a primary inspection mechanism for Schema Breakage because it compares what an interface declares against what instances, payloads, or objects actually contain. It helps surface contract deviations such as missing fields, unexpected structures, invalid types, or shape mismatches.
Inspect For
- Missing required fields or properties
- Unexpected fields, nesting, or object shapes
- Type mismatches between declared and observed values
- Runtime payloads that violate interface rules
Avoid
Treat contract deviations as inspection signals that need correlation with schema rules and runtime context, not as confirmation that Schema Breakage has been established.
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 Schema Breakage because it compares declared schema invariants with the actual structure being observed. It helps surface places where required fields, types, cardinalities, relationships, or validation rules are structurally contradicted or cannot be consistently enforced.
Inspect For
- Required fields or nodes that are missing
- Type, shape, or cardinality mismatches
- Constraints contradicted by observed structure
- Invariants that validation cannot reliably enforce
Avoid
Treat structural mismatches as inspection signals rather than confirmation that Schema Breakage has been established.
Secondary Lenses
Conflict Lens
Detects mutually incompatible constraints, claims, states, or declarations that cannot be simultaneously satisfied.
Lens Application
As a secondary lens, the Conflict Lens supports inspection of Schema Breakage by surfacing tensions between schema expectations and observed structure, values, or declarations. It can help identify where incompatible constraints or states may be related to schema breakage without treating conflict alone as sufficient confirmation.
Inspect For
- Conflicting type or shape declarations
- Payload fields that satisfy one rule but violate another
- Incompatible required, optional, or forbidden states
- Constraint combinations that cannot all be met
Avoid
Treat conflicts as inspection signals for Schema Breakage, not as confirmation, without checking the declared schema requirements and the specific instance behavior.
Primary Issue Matches
AI Output Breaks Parser
The AI output causes a parser, validator, importer, or structured-output consumer to fail.
Invalid JSON Output
The AI returns malformed JSON or structured output that cannot be parsed.
Nested Fields Do Not Match
The AI returns nested structured fields whose internal shape, hierarchy, parent-child relationship, or contained values do not match the expected structure.
Wrong Field Types
The AI returns fields with values whose types do not match the expected schema, such as strings where numbers, booleans, arrays, objects, or enums are required.
Supporting Issue Matches
Downstream Steps Magnify Hallucinated Claim
A hallucinated or unsupported claim from an AI output is reused by later workflow steps until it becomes more influential than the evidence supports.
Duplicate Fields With Same Meaning
The AI returns multiple fields, labels, sections, or structured elements that carry the same meaning and create ambiguity about which one should be used.
Duplicate Output Sections
The AI repeats sections, headings, blocks, or output areas in a way that creates redundancy, confusion, or downstream handling problems.
Format Rule Too Weak
The format instruction is too vague, incomplete, or optional to reliably produce output that satisfies the expected structure.
Hallucinated Fields
The AI adds fields, keys, attributes, columns, or structured elements that were not declared, requested, or allowed by the expected schema.
Missing Required Fields
The AI returns structured output that omits fields required by the schema, workflow, parser, form, or downstream consumer.
Output Breaks the Next Step
The AI output looks acceptable by itself but cannot be used by the next tool, workflow step, parser, reviewer, or downstream consumer.
Schema Reference Loops Without Base Case
A schema, field, type, object, or structured reference points through a loop without a base case that allows validation or interpretation to resolve.
Single Field Carries Too Many Obligations
One field, label, score, status, or structured value is expected to carry too many meanings, decisions, or workflow obligations.
Tool Call Contract Mismatch
The AI or agent calls a tool with names, arguments, types, modes, or shapes that do not match the declared tool interface.
Validation Result Changes on Retry
A validation, grading, review, classification, or pass/fail result changes after retry even though the input and declared validation rules did not change.