caelum0x 9b66375f8f fix: address review findings on reversal auditability and session persistence
HIGH — the reversal clamp no longer erases the alerting/audit trail: a
reversal that applies nothing (already fully reversed, or clamped to zero)
now records a 'clamped_reversal' adjustment row with zero applied amount
and the provider-claimed cumulative, and partial clamps store the
provider-claimed cumulative on the refund row, so provider-side
over-refunds are queryable instead of silently absorbed (migration 0024
extends the adjustment_type/amount CHECKs accordingly).

MEDIUM — persistProviderCheckoutSession now throws on a zero-row UPDATE
instead of returning nulls, so a missing checkout intent fails the request
rather than handing the buyer an unsettleable provider session.

LOW — launch-notify origin check uses the configured appUrl (same policy
as checkout); repository URLs are stored WHATWG-normalized (parsed.href);
the launch_notifications email CHECK now mirrors the application regex.

Integration: +1 over-refund audit scenario; refund-after-dispute now
asserts the no-op refund id is recorded (8/8 green vs real Postgres 16).
2026-09-05 17:29:18 +03:00
..