fix(ci): skip supertonic license/cpu tests when optional dep absent (unblocks releases) - #211
Conversation
…bsent release.yml installs deps with plain 'uv sync' (no optional engines), so test_cpu_only_honest and test_license_gate failed there — is_available() short-circuits with 'supertonic package not installed' before reaching the license check those tests assert on. This blocked EVERY release (preview and stable) at the test gate, not just the preview build that surfaced it. Skip the two when 'supertonic' isn't importable (optional opt-in engine). They still run fully under ci.yml's 'uv sync --all-extras'; the absent-package path is covered independently by test_optional_dep_missing. Also fixes the same two failing on a local '.venv' without the extra. Verified: tests/test_supertonic3.py now 8 passed, 5 skipped, 0 failed without supertonic installed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds conditional test skipping for two license-gate-related tests that depend on the optional ChangesOptional Supertonic Dependency Handling
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
| Filename | Overview |
|---|---|
| tests/test_supertonic3.py | Adds _SUPERTONIC_INSTALLED guard and skipif decorators on two tests; logic is correct and consistent with the existing smoke-test skip pattern, but the new decorators use single-line style where the file elsewhere uses multi-line style for equivalent markers. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[pytest collects test_supertonic3.py] --> B["Module-level: _SUPERTONIC_INSTALLED = find_spec is not None"]
B -->|"supertonic absent - release.yml"| C[_SUPERTONIC_INSTALLED = False]
B -->|"supertonic present - ci.yml --all-extras"| D[_SUPERTONIC_INSTALLED = True]
C --> E[test_cpu_only_honest - SKIP]
C --> F[test_license_gate - SKIP]
C --> G[test_optional_dep_missing - RUN]
D --> H[test_cpu_only_honest - RUN]
D --> I[test_license_gate - RUN]
D --> J[test_optional_dep_missing - RUN]
subgraph smoke ["Always skipped unless OMNIVOICE_SMOKE=1"]
K[test_sha_resolves]
L[test_smoke_3langs_3sec]
M[test_sidecar_selftest]
end
Reviews (1): Last reviewed commit: "fix(ci): skip supertonic license/cpu tes..." | Re-trigger Greptile
| @pytest.mark.skipif(not _SUPERTONIC_INSTALLED, reason="supertonic optional dep not installed (uv sync --all-extras)") | ||
| def test_cpu_only_honest(mock_settings_store): |
There was a problem hiding this comment.
The new
skipif decorators are single-line (116+ chars) while the existing SUPERTONIC_SMOKE skip markers in the same file use a multi-line form. Keeping the style consistent makes diffs and readability easier.
| @pytest.mark.skipif(not _SUPERTONIC_INSTALLED, reason="supertonic optional dep not installed (uv sync --all-extras)") | |
| def test_cpu_only_honest(mock_settings_store): | |
| @pytest.mark.skipif( | |
| not _SUPERTONIC_INSTALLED, | |
| reason="supertonic optional dep not installed (uv sync --all-extras)", | |
| ) | |
| def test_cpu_only_honest(mock_settings_store): |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| @pytest.mark.skipif(not _SUPERTONIC_INSTALLED, reason="supertonic optional dep not installed (uv sync --all-extras)") | ||
| def test_license_gate(mock_settings_store): |
There was a problem hiding this comment.
Same single-line style inconsistency as the decorator above — wrapping to match the multi-line
SUPERTONIC_SMOKE pattern already in the file.
| @pytest.mark.skipif(not _SUPERTONIC_INSTALLED, reason="supertonic optional dep not installed (uv sync --all-extras)") | |
| def test_license_gate(mock_settings_store): | |
| @pytest.mark.skipif( | |
| not _SUPERTONIC_INSTALLED, | |
| reason="supertonic optional dep not installed (uv sync --all-extras)", | |
| ) | |
| def test_license_gate(mock_settings_store): |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Unblocks releases (the preview build died here)
Triggering the first preview build surfaced that
release.ymlcan't get past its test gate:test_cpu_only_honest+test_license_gatefail because release installs deps with plainuv sync(no optional engines), soSupertonic3Backend.is_available()short-circuits with "supertonic package not installed" before reaching the license logic those tests assert on.This blocked every release — preview and stable — not just the build that exposed it. (
ci.ymlpasses because it usesuv sync --all-extras; the same 2 also fail on a local.venvwithout the extra.)Fix: skip those two when
supertonicisn't importable (it's an opt-in optional engine). They still run fully underci.yml --all-extras; the absent-package path is already covered bytest_optional_dep_missing.Verified:
tests/test_supertonic3.py→ 8 passed, 5 skipped, 0 failed without supertonic installed.Once this lands I'll re-trigger the preview build.
🤖 Generated with Claude Code
Summary by CodeRabbit