Skip to content

[Phase 4] Implement AI Suppression Feedback Loop & CLI Overrides #105

@omsherikar

Description

@omsherikar

Description

To prevent recurring API costs on identical suppressed code, the pattern heuristics engine must memorize AI decisions. Furthermore, developers need a way to overrule the AI if it incorrectly suppresses a genuine smell.

Acceptance Criteria

  • Update PatternLearner (refactron/patterns/learner.py) to accept and store a new feedback action: "suppressed_by_ai".
  • Ensure PatternMatcher checks for "suppressed_by_ai" fingerprints and drops the issue locally before hitting the LLM API.
  • Update the CLI refactron report command to support an --include-suppressed flag.
  • Update the CLI refactron feedback command to allow users to override: refactron feedback <id> --action accepted_as_smell.
  • Add end-to-end tests validating that a manual override permanently overrides the AI's suppression caching.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions