Repository navigation
Fix inspect defect check level at L3 and drop --check-level flag - #26
Conversation
The defect check depth is no longer user-configurable. Every inspect run now executes at the deep L3 level: - Remove the --check-level option and its L1/L2/L3 validation from the inspect command - Add a DEFAULT_CHECK_LEVEL constant (L3) used by both the defect check and the saved markdown report - Change DefectChecker.check and save_markdown_report defaults from L2 to L3 - Update README: remove check-level examples and the Check Levels table - Add regression tests covering the removed flag and the fixed L3 level - Record the breaking change in CHANGELOG
There was a problem hiding this comment.
🤖 Claude Code Review
Code Review: PR #26 — Remove --check-level option
Summary
This PR removes the --check-level CLI option and fixes defect checks at L3 depth. The change is properly documented as breaking in the CHANGELOG.
Findings
Important
- Inconsistent default in test mock —
tests/unit/commands/test_inspect.py:386The mock function's default is "L2" while the actual implementation now defaults to "L3". While the test passes (L3 is explicitly passed), this is misleading for future maintainers. Update toasync def fake_check(self, findings, check_level="L2"):
check_level="L3"for consistency.
Minor
-
Scattered default value —
DEFAULT_CHECK_LEVELis defined ininspect.pybutchecker.pyandmarkdown_reporter.pyhardcode "L3" in their function signatures. Consider centralizing the constant (e.g., in a shared constants module) to avoid drift if the level ever changes. -
No config file migration/deprecation — If users had
check_levelin theirinspect_config.yaml, this change doesn't address it. Consider whether config file support existed and if a deprecation warning should be added when parsing configs.
Positive Observations
- Breaking change properly documented in CHANGELOG with clear migration implication
- New tests verify both the removal of the flag and the L3 enforcement
- README updated consistently
- All existing tests updated to use L3
Overall Assessment
Ready to merge: With fixes
Fix the test mock inconsistency (Important #1). The other findings are optional improvements for maintainability.
Summary
The defect check depth is no longer user-configurable: every
inspectrun now executes at the fixed deep L3 level.--check-leveloption and its L1/L2/L3 validation from theinspectcommandDEFAULT_CHECK_LEVELconstant (L3) used by both the defect check and the saved markdown reportDefectChecker.checkandsave_markdown_reportdefaults fromL2toL3--check-levelexamples and the Check Levels tableTest plan
ruff checkclean on all changed filesinspect --helpno longer lists--check-level--check-levelflag is rejected (exit code 2); defect check always receivesL3