Observe real payloads.
Walk nested objects and every array element, record observed types, presence ratios and a small set of safe examples.
CASE STUDY / DATA RELIABILITY
A lightweight data-contract check for the stage where the payload is real, the schema is informal, and downstream breakage is expensive.
THE PROBLEM
A webhook payload can remain syntactically valid while a field disappears, an integer becomes a string, or an almost-required property becomes sparse. Spot checks rarely catch those changes consistently. Full schema governance can also be too heavy for early-stage integrations and operational exports.
Keep deployment friction close to zero. No third-party runtime dependency, no mutation of source data, and reports must remain available even when CI intentionally fails.
Walk nested objects and every array element, record observed types, presence ratios and a small set of safe examples.
Removed paths and type-set changes are high severity. Presence-ratio drift is medium. New fields are informational.
Teams can report only, fail on high severity, fail on medium-or-higher, or fail on any detected drift.
A type change that appears late in an array is still observed. The regression suite explicitly checks a change after the first 50 elements.
Keys containing dots or array-like markers are escaped, preventing collisions between a literal key such as a.b and a nested path.
Duplicate object keys and non-finite values such as NaN or Infinity are rejected instead of being quietly normalized.
Examples under token, password, API-key, authorization and cookie-like paths are redacted, including unusual bracketed keys.
When the configured policy returns exit code 1, JSON and HTML reports have already been written and can be retained as CI artifacts.
The project targets Python 3.10+ and runs its regression suite across multiple supported Python versions in GitHub Actions.
The default remains report-only for backward compatibility. Teams opt into CI failure behavior explicitly and can tune presence-ratio sensitivity with --required-drift-threshold.
Failure behavior, malformed inputs and accidental secret exposure are designed alongside the happy path.
Edge cases are encoded as tests so a later refactor cannot silently erase the reliability work.
The CLI, exit codes, reports and documentation are shaped so another person can run and troubleshoot the tool without hidden context.
I can adapt the same validation and failure-gating approach to API responses, webhooks, ETL exports or AI-agent tool outputs.