Repository navigation
v6.2.0
A MINOR release: each Stripe dispute's evidence state is stored and shown in the admin payments view, the dispute appeal statuses are published, and a webhook stored while the broker was down reaches its order within about a minute of the broker's return instead of 20 (F-CHAOS-3 from the November 2026 audit). The long route and payment modules were split by job under new CI limits on module length and function size, with no route, response or behaviour changed. One migration (0c86df1cbf98, five nullable columns): run it before starting the new image. The fixes were tested in the test suite; the servers were not audited again after them.
Upgrade notes
- The
sweep_stripe_eventsbeat task runs every minute instead of every 5. No new setting. - Migration
0c86df1cbf98adds five nullable columns topayment_disputes(evidence deadline and state). Rundocker compose --profile migrate run --rm migratebefore starting the new image.
Added
- Each dispute stores what Stripe reports about its evidence (
Dispute.evidence_details): the deadline (due_by), whether evidence was staged and submitted, whether it is past due, how many times it was submitted and how (manual,smart_disputes,not_submitted). Updated on everycharge.dispute.*event; disputes stored before this release show nothing until their next event. The admin payments view (GET /api/v1/orders/{order_id}/payments) shows it per dispute asevidence(null until reported). - OpenAPI: a dispute's
statuslists Stripe's appeal stage,appeal_needs_responseandappeal_under_review(API 2026-09-30.endive and later). Such a dispute was already treated as open (order on hold, no refund); only the published values were missing.
Fixed
- A Stripe webhook stored while the Celery broker (Redis) was unreachable was applied only about 20 minutes later: the sweeper re-queued an event only once it had been unchanged for
STRIPE_EVENT_SWEEP_AFTER_MINUTES, a wait meant for messages lost in other ways and for events backing off between retries. In the November 2026 audit, a payment confirmed during a 75 s Redis freeze reached its order 21 minutes later (F-CHAOS-3). When the webhook route or an admin replay cannot publish an event, the event is now marked (last_error: "Not enqueued: ...", visible in the admin's webhook event list) and the sweeper publishes it on its next run, then clears the mark; a payment confirmed that way reaches its order within about a minute of the broker's return. Unmarked events keep the 20-minute wait, so a long queue gets no duplicate messages.
Changed
- Dependency age rule for Python packages: one week instead of two (
[tool.uv] exclude-newer, Dependabot's uv cooldown). Over the last year every yanked release of a locked package was replaced within 4 days and no release found to be bad was found within 14 days, while 30 security fixes waited a week longer. Images, GitHub Actions and tools keep two weeks. - CI fails when a module under
app/passes 800 lines. The longest ones were split by job: the order routes intoapp/api/v1/orders/andapp/api/v1/admin/andapp/api/v1/users/packages, the payment helpers the routes and the webhook processing share intoapp/services/payment/, and the GDPR redaction of stored Stripe events intoapp/services/stripe_event_redaction.py. No route, response or behaviour changed. - Ruff now limits function size in
app/: complexity 15, branches 15, statements 60 (C901, PLR0912, PLR0915). The one function past them, the Stripe webhook'sapply_event, now looks up the payment attempt and hands the event to one handler per event type; what each event does is unchanged. - Test tooling: pytest 9.1.1 -> 9.2.0, pytest-benchmark 5.3.0 -> 5.3.1 (held back in 6.0.0 and 6.1.0 by the two-week rule).
Security
- dnspython 2.9.1 -> 2.9.2: CVE-2026-128089 (GHSA-vvf4-9x63-8xvv), excessive memory and CPU use when parsing a crafted WKS record from zone-file text. The app does not parse zone files (dnspython is loaded by email-validator, with the deliverability check off), so no exposure is known; upgraded all the same.
- OpenTelemetry 1.45.1 -> 1.45.2 (instrumentation 0.66b1 -> 0.66b2): CVE-2026-126360 (GHSA-mf5v-w3w3-f6cg), quadratic-time parsing of a crafted
traceparentvalue inTraceContextTextMapPropagator.extract(). Conforming HTTP header values cannot carry the newline the attack needs, and the app's other carrier, Celery task headers, is written by the app itself, so no exposure is known; upgraded all the same. 1.45.2 was released on 2026-10-29.
Documentation
docs/OPERATIONS.md: a failed/readyzcheck means the dependency did not answer this instance within 2 s (a saturated instance can fail one probe while the database is healthy); remove an instance only after several consecutive failures.- Load and chaos audit report: corrections from a re-verification of every numeric claim against the raw data.
docs/API.mddescribes the disputeevidenceand the appeal statuses;SECURITY.mdthe one-week age rule for Python packages;docs/TESTING.mdthe module-length and function-size checks.