Skip to content

feat(review): reflection pass — filter false positives & normalize severity before persisting #723

Closed

Description

@ajianaz

What

Add a reflection pass before persisting review findings: a cheap second check (LLM or deterministic hybrid) that re-validates each candidate finding against its bundled context — is it real, is the severity right, is it in scope (not docs/tests/lockfiles). Drop or step down before storage. Also normalize the severity enum defensively so an invalid model value never discards a whole batch.

Why

Documented recurring false-positive classes: CORS wildcard flagged in markdown docs, create_dir_all flagged when the parent path is already validated, GLM returning invalid severity ("severity": "performance") silently skipping entire batches. Upstream precedent: open-code-review ships a dedicated "comment-reflection module"; openai/codex-security validates exploitability of candidates before reporting. Same idea, applied to cora's quality review. Related: #719 (deterministic rule FP — rule-level fix, this issue covers the LLM-side half).

Testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:mediumscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions