Skip to content

feat: disable repair command and simplify report output - #25

Merged
zipsonken merged 1 commit into
mainfrom
feat/disable-repair-and-simplify-output
Nov 2, 2026
Merged

zipsonken merged 1 commit into
mainfrom
feat/disable-repair-and-simplify-output

Conversation

@zipsonken

Copy link
Copy Markdown
Collaborator

Summary

  • Disable the inspect repair command entry point (decorator commented out, code kept)
  • Remove score/grade from report section headers in the markdown report
  • Remove Impact/Fix columns from the markdown report and terminal output
  • Align scanner prompts with pre-inspect-extract classification: Artifact/Carrier/Scaffolding/Reference four-way classification, tool extraction tiers (Tier 1–X), and prompt variable-examination rules
  • Add completeness and evidence fields to ToolContent/PromptContent models (defaulted, backward compatible)
  • Update help panel (3-step Getting Started), README, and tests

Test plan

  • Full suite passes: uv run pytest tests/ -q (356 passed)
  • uv run ruff check and uv run ruff format --check clean on changed files
  • inspect --help shows the 3-step Getting Started panel without repair
  • inspect repair --help fails with "No such command 'repair'"

- Disable 'inspect repair' command entry point
- Remove score/grade from report section headers
- Remove Impact/Fix columns from markdown report and terminal output
- Align scanner prompts with pre-inspect-extract classification
  (Artifact/Carrier/Scaffolding/Reference, extraction tiers,
  completeness/evidence fields on tool/prompt findings)
- Add completeness and evidence fields to Tool/Prompt content models
- Update help panel, README, and tests

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Claude Code Review

PR #25 Code Review

Critical Issues

1. Dead Code: Disabled Repair Command

File: src/sanityops_cli/commands/inspect.py (line 280)

The inspect_repair function is commented out with # @inspect_app.command("repair") but the entire function remains. This creates dead code that will never be executed. Either:

  • Remove the function entirely, or
  • Add proper deprecation handling (raise a clear deprecation error when called)

Recommendation: Remove the function and all related helpers (_find_latest_report, _write_repairs_markdown) if they're no longer needed, or implement proper deprecation messaging.


Important Issues

2. Inconsistent Completeness Enum Values

File: src/sanityops_cli/agents/scanner_agent/models/finding.py (lines 117-125, 134-141)

ToolContent.completeness and PromptContent.completeness have different valid values:

  • ToolContent: full original | assembled | incomplete | summary | not inspectable
  • PromptContent: full original | original · variable unexpanded | assembled | incomplete | summary | not inspectable

The original · variable unexpanded value is only documented for PromptContent, but prompts in prompts.py reference it inconsistently. Consider:

  • Creating a shared Completeness enum
  • Or documenting why they differ

3. Orphaned Test Code

File: tests/commands/test_inspect_repair.py (lines 27-72)

TestFindLatestReport tests _find_latest_report, which appears to be helper code for the disabled repair command. If repair is permanently removed, these tests are testing dead code.

4. Defect Fields Still Generated but Not Displayed

File: src/sanityops_cli/defect_checker/markdown_reporter.py (line 320)

The impact and fix_suggestion fields are removed from output, but defects may still contain these fields. The test helper _defect still generates them. Confirm that downstream systems no longer need this data, otherwise this is a breaking change.


Minor Issues

5. PEP 257 Blank Line After Docstring

File: src/sanityops_cli/agents/scanner_agent/models/finding.py (lines 31-32, 110-111)

Added blank lines after docstrings in Section and ToolContent classes. Per PEP 257, blank lines after docstrings are only needed when followed by additional code, but the style is inconsistent with other classes in the file.

6. Test Helper Contains Unused Fields

File: tests/unit/defect_checker/test_markdown_reporter.py (lines 44-57)

The _defect helper still includes impact and fix_suggestion parameters that are no longer displayed in reports. Consider removing these from the helper to align with the new output format.


Overall Assessment

Ready to merge: With fixes

The PR introduces valuable extraction fidelity tracking (completeness, evidence) and removes the repair workflow cleanly. However, it leaves behind dead code (disabled repair command function and its tests) that should either be removed or properly deprecated. The inconsistency in completeness field values between models should also be resolved.

@zipsonken
zipsonken merged commit dac6063 into main Nov 2, 2026
4 checks passed
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.

1 participant