Skip to content

ci: keyless demo smoke tier + fix weekly-health skips/failures (#48)#53

Open
karlwaldman wants to merge 1 commit into
mainfrom
fix/live-smoke-tiering
Open

ci: keyless demo smoke tier + fix weekly-health skips/failures (#48)#53
karlwaldman wants to merge 1 commit into
mainfrom
fix/live-smoke-tiering

Conversation

@karlwaldman

Copy link
Copy Markdown
Member

Summary

Implements the two-tier live-smoke pattern from #48 and fixes the failures/silent skips that were keeping Weekly SDK Health Check red (last run 2026-07-06: 2 failures + live futures/subscriptions silently skipped).

Tier the live jobs (#48)

  • live-tests.yml: new always-run keyless demo smoke step (tests/integration/test_demo_contract.py, hits public /v1/demo/*, needs no secret, has no gate — it structurally cannot silently skip), followed by the keyed live suite which now emits a ::warning:: instead of silently exiting 0 when the secret is unavailable (forks).
  • weekly-health.yml: same keyless tier added, and the secret is now exported as both OILPRICEAPI_KEY and OILPRICEAPI_TEST_KEY. The conftests read the former but test_live_futures.py / test_live_subscriptions.py read the latter — the mismatch meant those live tests skipped on every weekly run even though the secret is populated.

Fix the tests that kept weekly-health red

  • test_historical_endpoints.py: two tests asserted >300 / >1000 datapoints for 1-year/5-year queries, but the API paginates time-window responses at 100 points/page — they could never pass. Now assert non-empty data and keep the timing baselines (<120s / <180s), which are the actual v1.4.1-regression guards.
  • test_api_contract.py: the API now returns HTTP 400 invalid_code (with suggestions) for unknown commodity codes instead of 404 — exactly the kind of drift these contract tests exist to catch, but the failures were masked because the weekly job died at the earlier step. Both tests updated to the current contract (verified live).

Test evidence (local, against production API)

  • Keyless demo smoke with no key in env — 4 passed
  • pytest tests/ -m integration --timeout=90 (both env names set, as the workflow now does) — 16 passed, 2 skipped (previously 2 failed + 5 silently skipped)
  • pytest tests/ -m contract --timeout=9021 passed, 1 skipped (previously 2 failed)
  • Unit gate pytest tests/ --ignore=tests/integration --ignore=tests/contract -m 'not slow' — 328 passed, 10 skipped

Closes #48

🤖 Generated with Claude Code

…#48)

- live-tests.yml: split into (1) an always-run keyless demo smoke against
  /v1/demo/* with no secret and no gate, and (2) the keyed live suite,
  which now warns loudly (::warning::) instead of silently exiting when
  the secret is unavailable.
- weekly-health.yml: export the secret as BOTH OILPRICEAPI_KEY and
  OILPRICEAPI_TEST_KEY — the env-name mismatch was silently skipping the
  live futures/subscriptions tests every Monday. Also add the keyless
  demo smoke tier.
- test_historical_endpoints.py: the 1-year/multi-year length assertions
  (>300 / >1000 points) could never pass against the API's 100-point
  page cap and kept weekly-health red; assert non-empty data and keep the
  timing baselines as the real regression guards.
- test_api_contract.py: unknown commodity codes now return HTTP 400
  invalid_code (was 404) — update the two stale contract tests to the
  current API contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@karlwaldman, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d6ea7446-9566-43a3-9c38-719a0765fcf0

📥 Commits

Reviewing files that changed from the base of the PR and between 6cfa2d8 and 479ade4.

📒 Files selected for processing (4)
  • .github/workflows/live-tests.yml
  • .github/workflows/weekly-health.yml
  • tests/contract/test_api_contract.py
  • tests/integration/test_historical_endpoints.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/live-smoke-tiering

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

Live smokes: prefer keyless demo endpoints so coverage never silently skips

1 participant