Repository navigation
Description
Problem
_check_missing_symbol_hallucination (src/devops_cli/ai/review/verification.py) is meant to catch false "ImportError / symbol not defined" claims. It runs on any finding whose title or description contains missing, not defined, undefined, never defined or importerror. It then invalidates the finding if a symbol the finding names is defined in the file. "Missing" is how most real defects are phrased: missing check, missing validation, missing limit. A finding about a missing check always names the function that lacks it, and that function always exists. So the rule invalidates true positives deterministically, with no model involved.
It also passes each invalidated finding to auto_record_invalidated_finding, so a real defect is learned into the common hallucinations catalog and similar findings are suppressed later. That is the poisoning described in docs/SELF_IMPROVEMENT.md §5.3.
Evidence
On a synthetic defect corpus (#415) of 10 injected defects, the personas found 7, and verification kept 1. The rule invalidated 9 of the 56 invalidated candidates, including 4 findings of injected defects:
- "Missing inheritance depth limit in load_policy" (the guard on
_depthwas removed); - "Missing Path Containment Check" and "safe_resolve_subpath allows absolute or symlinked paths to escape base" (an
is_relative_toguard was removed); - "Audit log destination path validation is incomplete".
The catalog then learned "The load_policy function accepts a _depth parameter but never enforces the maximum…" as a hallucination.
Proposed solution
Apply the rule only to findings that claim a symbol is undefined or unimportable: an ImportError/NameError claim, or "<name> is not defined". Leave out findings about a missing check, validation or limit. Findings invalidated by this rule should no longer be auto-recorded into the catalog unless the claim was of that kind.
Acceptance criteria
- "Missing in " findings are not invalidated by the rule, and are not recorded into the catalog.
- True "
foois not defined" / ImportError claims about defined symbols are still invalidated. - Measured on the synthetic corpus: injected defects invalidated by this rule drop to zero.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(review): synthetic defect corpora and recall scoring for reviews (…
fix(review): the missing-symbol check acts on undefined-symbol claims…
fix(review): the missing-symbol check acts on undefined-symbol claims…
fix(review): the missing-symbol check acts on undefined-symbol claims…
dan-petty commentedon Sep 24, 2026
Closed by #508, merged into
release/v0.2.23.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.test(review): regression harness keeps real defects reported and fals…
feat(release): v0.2.23 (#681)