Repository navigation
test: add single-source coverage gate - #382
Conversation
Problem: running the coverage gate under instrumentation made provider-payload Hypothesis strategies trip slow-generation health checks, and the broader CI-shaped gate exposed an MCP search integration assertion that still expected the old flat search-hit payload.\n\nWhat changed: explicitly suppress the slow-generation health check for the generated provider/source properties that are expected to be expensive under coverage, and update the real-repository MCP search assertion to the current nested conversation/match payload.\n\nVerification: devtools coverage-gate reached the 84% threshold after this stabilization, with the final branch reporting 5355 passed and total coverage 85.60%.\n\nRef #197
Problem: the committed coverage floor and CI enforcement had drifted, with pyproject.toml declaring 83% while CI still passed --cov-fail-under=80 directly to pytest.\n\nWhat changed: add devtools coverage-gate as the shared coverage entrypoint, read the threshold from tool.coverage.report.fail_under, point CI at that entrypoint, document the command in the generated devtools catalog, and ratchet the floor to the measured safe 84%.\n\nVerification: devtools coverage-gate passed with 5355 tests and total coverage 85.60%; devtools verify --quick also passed.\n\nRef #197
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 19 minutes and 8 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
✨ Finishing Touches🧪 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 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 427c487a46
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary: Adds a shared `devtools coverage-gate` command, points CI at it, and ratchets the committed coverage floor from 83% to 84% using the current measured suite. Problem: #197 tracks restoring the coverage floor toward the original 90%, but enforcement had drifted: `pyproject.toml` declared `fail_under = 83` while CI still invoked pytest with `--cov-fail-under=80`. A fresh coverage run also showed that instrumentation made several generated-payload Hypothesis properties trip `HealthCheck.too_slow`, so the gate could fail for test-generation cost rather than product behavior. Solution: Added `devtools coverage-gate`, which reads `tool.coverage.report.fail_under` from `pyproject.toml` and passes that value to pytest. Updated CI to call the shared gate, raised the floor to 84%, registered the command in the generated devtools catalog, stabilized generated provider/source properties under coverage, and updated the MCP search integration assertion to the current nested search-hit payload. Verification: `devtools coverage-gate --ignore-integration` passed with 5175 tests and total coverage 84.83%. `devtools coverage-gate` passed with 5355 tests and total coverage 85.60%. `devtools verify --quick` passed locally and in the pre-push hook. Ref #197
|
Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.
Only the rows listed above are dispositioned. Held findings remain open. |
Summary
Adds a shared
devtools coverage-gatecommand, points CI at it, and ratchets the committed coverage floor from 83% to 84% using the current measured suite.Problem
#197 tracks restoring the coverage floor toward the original 90%, but enforcement had drifted:
pyproject.tomldeclaredfail_under = 83while CI still invoked pytest with--cov-fail-under=80. A fresh coverage run also showed that instrumentation made several generated-payload Hypothesis properties tripHealthCheck.too_slow, so the gate could fail for test-generation cost rather than product behavior.Solution
devtools coverage-gate, which readstool.coverage.report.fail_underfrompyproject.tomland passes that value to pytest.uv run devtools coverage-gateinstead of hard-coding a separate threshold.docs/devtools.md.conversation/matchsearch-hit payload.Verification
pytest -q tests/unit/devtools/test_coverage_gate.py tests/unit/devtools/test_command_catalog.py tests/unit/devtools/test_devtools_main.py tests/unit/sources/test_parsers_props.py-> 51 passed.pytest -q tests/unit/sources/test_source_laws.py::test_detect_provider_recognizes_generated_payloads tests/integration/test_mcp.py::TestMCPRealRepositoryPaths::test_search_uses_real_repository_and_filter_stack-> 2 passed.devtools coverage-gate --ignore-integration-> 5175 passed, required coverage 84% reached, total coverage 84.83%.devtools coverage-gate-> 5355 passed, required coverage 84% reached, total coverage 85.60%.devtools verify --quick-> all checks passed.git push -u origin feature/test/coverage-ratchet-gate-> pre-pushdevtools verify --quickpassed.Ref #197