Parity Contract

This document defines the comparison contract and CI gate behavior used by parity workflows.

Scope

Snapshot Schema

Current snapshots are produced by scripts/corpus/run_parity_snapshot.py and include:

Expectation Scenarios

Expectations extracted from SDK tests are tagged in the manifest with scenario:

Extractor normalization for parity fidelity:

Default parity snapshots run against base expectations only.

Comparison Contract

scripts/corpus/compare_to_baseline.py compares a current snapshot against baseline and enforces:

Family drift is keyed by family_key when present (falls back to description for older snapshots).

Default policy is strict no-drift:

PR Gate Behavior

Workflow: .github/workflows/parity-gate.yml

Corpus source for gate:

Archive requirement:

Performance Guard

Performance budget is defined in data/corpus/parity_baseline/v3.4.1/perf_budget.json.

scripts/corpus/check_perf_budget.py validates:

Default policy is fail-on-regression against these limits in PR CI.

Waiver Process

Waivers are declared in data/corpus/parity_baseline/v3.4.1/waivers.json.

Required fields per waiver:

Rules:

Example:

{
  "waivers": [
    {
      "kind": "new_mismatch_family",
      "target": "file_not_found",
      "owner": "openxml-audit-maintainers",
      "reason": "Temporary corpus mirror outage",
      "expires": "2026-04-15"
    }
  ]
}

SDK Usage Policy