You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1] 402 history gate: surface upgrade link in SDK + oilprice CLI; ship 1.18.0 #163
Status: confirmed-live (code on origin/main, 2026-11-14)
From Mon 2026-11-16 12:00 UTC (Entitlement::HistoricalAccess::HISTORICAL_ENDPOINT_GATED_FROM, oilpriceapi-api app/services/entitlement/historical_access.rb:33) /v1/prices/historical and /v1/prices/history return 402 UPGRADE_REQUIRED for unentitled accounts (api#10744). The past_* endpoints, which client.historical.get() uses, are already gated.
Bug
The 402 body (V1::PricesController#require_paid_tier_for_historical) carries the link only as upgrade.url; there is no top-level upgrade_url. error_from_response (oilpriceapi/exceptions.py, remediation_url) reads only remediation_url / upgrade_url / action_url, so PaymentRequiredError.remediation_url is None. oilprice historical prints Error: [402] ... (no traceback, already caught at cli.py:127) but no upgrade link.
Repro: tests/unit/test_history_gate_402.py in the linked PR fails on origin/main (2 of 5) and passes with the fix.
Blocker: python-sdk has repository auto-merge disabled and no required status checks, so pai-pr-risk cannot arm any of these; they need a manual merge.
Activity
karlwaldman commentedon Nov 14, 2026
N3 update, re-derived 2026-11-14. Labelled
strategy:p0-now(Now board, 4 of 15 open).api_requests,client_type='sdk-python', external, 2026-10-15 to 2026-11-13: 18,758 requests / 19 users / 45.1% errors (7,293 x 402, 1,164 x 403). By version: 1.5.0 11,525 req / 5 users / 61.3%; 1.17.0 5,734 / 14 / 24.3%; 1.11.0 1,499 / 1 / 0%.Status: #164 open, risk:elevated, 2 checks failing (Python 3.8/3.9 setup on Ubuntu 26.04, #165), 4 green. #164 cannot merge until #165 lands.
karlwaldman commentedon Nov 14, 2026
Status 2026-11-14 (periphery session):
create_small_multiples(['A','B'])still raises on main. Fix: fix(viz): create_small_multiples crashes when commodities fit in one row (#158) #167 (red test on main, 4/8 shapes fail).oilprice priceonly forUPGRADE_REQUIRED(a quota 402 also refuses latest). Needs a fresh review on its new head.gh release create v1.18.0 -R OilpriceAPI/python-sdk --target main --title v1.18.0 --generate-notestriggers publish.yml.chore(release): 1.18.0 (#168)