Skip to content

fix: separate schema constructor drift contexts - #694

Open
ApexWorm wants to merge 2 commits into
peteromallet:mainfrom
ApexWorm:fix/schema-drift-context
Open

fix: separate schema constructor drift contexts#694
ApexWorm wants to merge 2 commits into
peteromallet:mainfrom
ApexWorm:fix/schema-drift-context

Conversation

@ApexWorm

@ApexWorm ApexWorm commented Aug 1, 2026

Copy link
Copy Markdown

Problem

The Python schema_drift detector globally clustered declarative schema dictionaries with runtime payload dictionaries. This can flag intentionally optional contract keys as drift, and a normal subsequent scan preserves the invalidated detector output as strict auto_resolved debt.

Fix

  • Keep dictionaries passed directly to named *Schema constructors in their own comparison scope.
  • Preserve genuine drift detection within the same schema-constructor family and within generic runtime payloads.
  • Emit scanner-proven, exact-fingerprint semantic corrections only on a confirmed full scan.
  • Reclassify only those historic items as false_positive, with attestation, and remove them from the uncommitted ledger without using a skip or weakening ordinary auto_resolved strict semantics.

Verification

  • Focused detector, state, plan, scoring, and scan-plan reconciliation suites passed.
  • Exact source probe verified scoped suppression and the historical-item lifecycle.
  • Full suite: 5,818 passed, 4 skipped; two pre-existing review-prompt tests fail because generated prompts no longer include Previously flagged issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant