Repository navigation
fix(test): repair CI regressions from the property tests - #2665
Merged
Merged
Conversation
CI runs mypy over tests/unit/. importlib returns Optional spec and loader, so assert both before use. Regression from the property tests PR. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The pagination tests import hypothesis. Without it the service failed to collect and the coverage job reported no result for common. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
📊 Code Quality Report
📈 Quality Gates✅ Passed: All checks completed successfully 🔧 How to FixRun locally before pushing: make pre-commit-setup # Install pre-commit hooks
make lint # Run all linters
make test-bats # Run shell script tests
pytest --cov=. --cov-report=term-missing # Check coverageSee Code Quality Standards for more details. |
Contributor
📊 Code Quality Report
📈 Quality Gates✅ Passed: All checks completed successfully 🔧 How to FixRun locally before pushing: make pre-commit-setup # Install pre-commit hooks
make lint # Run all linters
make test-bats # Run shell script tests
pytest --cov=. --cov-report=term-missing # Check coverageSee Code Quality Standards for more details. |
The 80% gate counts only imported source. The property tests imported generator.py at 30%, dropping the total to 35% and failing Python Lint & Test on main. Test load_score, generate_all, resource manifests and the CLI: total 97.9%. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Contributor
📊 Code Quality Report
📈 Quality Gates✅ Passed: All checks completed successfully 🔧 How to FixRun locally before pushing: make pre-commit-setup # Install pre-commit hooks
make lint # Run all linters
make test-bats # Run shell script tests
pytest --cov=. --cov-report=term-missing # Check coverageSee Code Quality Standards for more details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Main CI has been red since #2661 merged, and that was my regression, in three parts. All three are fixed here, root cause first:
Python Lint & Test):tests/unit/test_score_generator.pyused the OptionalModuleSpec/loader from importlib without narrowing. One assert.Python Lint & Test, found after fixing 1):pytest --cov=. --cov-fail-under=80 tests/unit/only counts source files the tests import. It measured 9 statements until my property tests importedcharts/score-transformer/generator.py(106 statements, 30% covered): total fell to 34.97%. Fixed by testing the generator's untested paths (load_scorevalidation,generate_all, volume and database manifests, CLI exit codes). Total is now 97.9%, generator 99%. Not fixed by excluding the file or lowering the gate.Test (common)(Service Python Tests):services/common/tests/test_pagination.pyimportshypothesis, absent from that service'srequirements-dev.txt. Pinned to the root version. Also why the per-service coverage job showed NO RESULT forcommon.Why I missed them: I ran ruff and the new tests locally, not the whole CI job.
Test plan
pytest --cov=. --cov-fail-under=80 tests/unit/-> 97.90%, 329 passed (the only local failures are the 7 Java-template tests that need Maven output, absent in CI)common: 16 tests pass with its own requirements files, 86%Still red on main after this, unrelated to it
Deploy MkDocs to GitHub Pagesfails every run since #2647 (git commiton the runner:fatal: empty ident name). Separate fix, not in this PR.AI-generated; human review requested.
🤖 Generated with Claude Code