Repository navigation
Closed
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/bugType bug: the code does not do what it must
Milestone
Description
Summary
Found in the release/v0.2.23 review (line numbers at 7fdaa9d).
- Findings about something missing are invalidated as hallucinations.
- Examples: "Missing
timeouton outbound HTTP request" at arequests.get(url)line, or "Missing@login_required". Both are INVALIDATED (deterministic:construct_location,reportable=False) and dropped fromfindings.json. - Each drop also writes an
auto_learnedcatalog entry, such as(?=.*\btimeout\b)(?=.*\boutbound\b)for*.py. That entry then suppresses the same true positive in later reviews.
- Examples: "Missing
- Relocated findings get lowercased paths.
Pkg/Handler.py:4becomespkg/handler.py:11. That path does not exist on case-sensitive filesystems, and the excerpt lookup misses it. - Location canonicalization keeps surrounding prose.
src/app.py:42 in get_userandsrc/app.py:42 - missing checkare kept verbatim;mainreduced them tosrc/app.py:42.See src/app.py:42parses as the filesee src/app.py.- As a result, line checks, excerpts, anchoring, deduplication and corpus scoring all miss these findings.
- The symbol delta compares against the base branch tip, not the merge-base, and its cache ignores the base. When
mainaddsfooto a file the branch also edits, the analysis recordssymbols_removed: ["foo"]. A hallucinated finding that citesfoois then kept. Re-running with another--basereuses the stale comparison. - The synthetic pipe-to-shell defect eats the URL.
curl -fsSL -O https://example.com/install.shbecomescurl -fsSL | sh.
Root Cause
src/devops_cli/ai/review/construct_validator.py:461-463invalidates any finding whose cited construct is absent from the file. The catalog write is at:327-344.construct_validator.py:316,:318and:403rebuild the location from_parse_location, which lowercases the path (src/devops_cli/ai/review_schema.py:793)._PATH_CHARSnow includes a space (review_schema.py:184), andcanonicalize_finding_location(:197-207,:412-418) no longer isolates thepath:linetoken.src/devops_cli/commands/analyze.py:167reads the old file withgit show <base>:path, while the changed-file list at:454comes fromgit diff base...target. The cache at:196-217is keyed only by target branch and file modification time._SCRIPT_DOWNLOAD(src/devops_cli/ai/review/defects.py:786-789) treats curl's-Oas taking a filename argument, but-Otakes none.
Remediation Plan
- Exempt absence-type findings ("missing", "lacks", "without", "no ...") from construct-location invalidation. Never auto-learn catalog entries from deterministic invalidations.
- Preserve the original case of the path when relocating.
- Canonicalize to the
path:line[-line]token only, and drop surrounding prose. - Compare symbols against the merge-base, and key the cached comparison by base.
- Treat
-Oas a flag in_SCRIPT_DOWNLOAD. - Add a test for each case above.
Metadata
Metadata
Assignees
Labels
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/reviewMulti-persona code review engine, verification, and findingstype/bugType bug: the code does not do what it must
Type
Projects
- StatusShow more project fieldsDone
Activity
fix(review): remediate response repair, review pipeline and verifier …