Skip to content

fix: reconcile stale billing state and correct PAIR mapping - #6698

Merged
bokelley merged 2 commits into
mainfrom
work-through-all-items
Aug 20, 2026
Merged

fix: reconcile stale billing state and correct PAIR mapping#6698
bokelley merged 2 commits into
mainfrom
work-through-all-items

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • heal stale, incomplete, or incorrectly canceled organization billing state from authoritative Stripe data while preserving canonical tier/product metadata and failing closed on organization mismatches or concurrent webhook writes
  • correct PAIR OpenRTB guidance to emit pair-protocol.com, preserve the publisher-owner EID.matcher scope, and treat the older AdCP source only as a legacy input alias
  • clarify schema and glossary language for publisher-scoped PAIR identifiers and add the required patch changeset

Issue disposition

Resolves #6684.

This is a follow-up toward #6686, which must remain open until the named production accounts are synced and a production reconciliation run is observed.

#6687 is already covered by merged PR #6659; its same-day send behavior was revalidated here.

Validation

  • code, security, and protocol expert reviews passed
  • targeted billing and newsletter tests: 24/24
  • TypeScript typecheck
  • schema validation suite
  • full build
  • changeset protocol scope and status checks
  • push-time version, docs-link, and navigation checks

@bokelley
bokelley marked this pull request as ready for review August 19, 2026 22:13

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated-paths approval gate not yet satisfied.

This PR modifies files under static/schemas/source/** (match-id-type.json, uid-type.json), which are declared under a hard, deterministic approval gate (gated_paths: true). The required review status is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied and the PR cannot be auto-approved (decision table row 2).

No blocking, High, or Medium findings were surfaced. The reviewer confirms:

  • Billing self-heal rewrite in lazy-reconcile.ts is well-tested (correct payload↔column mapping, optimistic updated_at CAS guarding concurrent webhooks, customer_org_mismatch guard failing closed on cross-org entitlement transfer, 20s Stripe timeout, membership cache invalidation).
  • PAIR OpenRTB mapping correction (pair-protocol.com replacing iabtechlab.com/pair) is accurate and coherent across match-id-type.json, uid-type.json, glossary.mdx, and migration-from-axe.mdx, ships a correct patch changeset, and is patch-eligible as an erratum with legacy-alias handling. Schema↔docs coherence holds.

The diff is mechanically clean, but the schema-source gate requires a real human/CODEOWNERS approval before merge.

Escalation reasons

  • Modifies gated schema-source files static/schemas/source/enums/match-id-type.json and static/schemas/source/enums/uid-type.json; review_decision is REVIEW_REQUIRED. Human/CODEOWNERS approval required to lift the gate.

Why human review

  • Modifies gated schema-source files static/schemas/source/enums/match-id-type.json and static/schemas/source/enums/uid-type.json; review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required to satisfy the hard approval gate.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/enums/match-id-type.json (modified) matches static/schemas/source/**; static/schemas/source/enums/uid-type.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Aug 19, 2026
@bokelley
bokelley requested a review from bmilekic August 19, 2026 22:21
@bokelley
bokelley enabled auto-merge (squash) August 19, 2026 22:21
@bokelley
bokelley disabled auto-merge August 20, 2026 04:55
@bokelley
bokelley merged commit 9995b91 into main Aug 20, 2026
51 checks passed
@bokelley
bokelley deleted the work-through-all-items branch August 20, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PAIR uid_type: source-string mismatch with prebid + per-publisher-scoping ambiguity

1 participant