Skip to content

Migration tooling: golden parity harness + client inventory (Phase 0/2)#1602

Closed
PavelMakarchuk wants to merge 5 commits into
mainfrom
migration-parity-tools
Closed

Migration tooling: golden parity harness + client inventory (Phase 0/2)#1602
PavelMakarchuk wants to merge 5 commits into
mainfrom
migration-parity-tools

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Contributor

Tooling for the api-v2 migration (experiment; see plan discussion).

  • tools/parity/parity.py — freezes golden response snapshots from a reference deployment and diffs any candidate endpoint with numeric tolerance. Corpus = the real partner payloads (MyFriendBen, Amplifi ×2, Impactica) + synthetics. Goldens in-tree were captured from production via calculate_demo. Found UK /calculate returns 500 in production: Simulation.__init__() got an unexpected keyword argument 'tax_benefit_system' #1601 (prod UK 500) on first run.
  • tools/parity/inventory.py — read-only Phase-0 client matrix from the prod user-analytics Cloud SQL DB: volumes, countries, channels, error rates, per-client variables. Headline: 100% of 90-day traffic is US; frontier channel is actively used.

First cross-implementation diff against the resurrected v2 household endpoint: 5/5 parity on all partner payloads.

🤖 Generated with Claude Code

PavelMakarchuk and others added 5 commits July 2, 2026 09:06
- tools/parity/parity.py: freezes golden response snapshots from a reference
  deployment (corpus = real partner payloads + synthetic basics) and diffs any
  candidate endpoint against them with numeric tolerance. Goldens captured
  from production (calculate_demo) included. Found prod UK breakage (#1601)
  on first run.
- tools/parity/inventory.py: read-only Phase-0 inventory against the prod
  user-analytics Cloud SQL DB -> per-client compatibility matrix (volumes,
  countries, channels, errors, variables). Key finding: 100% of 90-day
  traffic is US; frontier channel is in active use.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Exercises the validation/warnings layer the v2 endpoint hasn't ported yet:
partial-month warning, deprecated-input drop+warning, axes sweep. Goldens
captured from production. 8 cases total.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
corpus_from_inventory.py turns each top client's real variable usage
(requested outputs, entities, period granularity, inferred state) into an
executable synthetic case — passing parity on client-<id> means the candidate
covers that client's contract. Goldens captured from production for the top 5
clients (CO, WA, CA screener profiles). 13 golden cases total.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Prod returns 400 with an errors list for unknown variables; the v2 experiment
doesn't port that validation yet. Golden captured from production;
parity.py diff now checks status + error body for expected_status!=200
goldens. 14 cases total.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk deleted the migration-parity-tools branch July 2, 2026 15:22
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