Fix malware verdict formatter Bugbot findings from managed-files rollout - #154
Conversation
Replace VERDICT_RE (optional ** with cross-line \s*) with a standalone-line pattern that only matches own-line Verdict: lines. Use the last standalone match as the official verdict so incidental or prompt-echo mentions cannot override the model conclusion. Add unit tests that load the inline workflow snippet from the template and wire them into make test. Co-authored-by: Gene Hoffman <hoffmang9@users.noreply.github.com>
Restore PR-153-style token capture for line-start and punctuation-glued Verdict: labels while keeping last-match-wins and horizontal whitespace only (no cross-line ** stealing). Stop test loader from exec'ing the full workflow snippet that writes cursor_output.json. Co-authored-by: Gene Hoffman <hoffmang9@users.noreply.github.com>
|
Addressed both Bugbot follow-ups from review #5106299608 in 9d7318d: Finding 1 — Verdict regex skips valid tokens ( Finding 2 — Tests write leftover output file ( Original consumer-repo findings (bold-marker stealing, wrong/inverted verdict from first-match-anywhere) remain fixed; this follow-up narrows the regex without reverting those protections. |
Restrict punctuation glue to sentence terminators (.!?:;) so quoted, backticked, and parenthesized Verdict: mentions are not official tokens. Match either fully paired **Verdict: token** or token-only forms; strip orphan trailing ** from lines after removal. Add tests for both Bugbot follow-ups on PR 154. Co-authored-by: Gene Hoffman <hoffmang9@users.noreply.github.com>
|
Addressed both Bugbot follow-ups from review #5106460243 in 5c8f830: Finding A — Quoted verdicts can invert headline ( Finding B — Unpaired bold breaks comment markdown ( All prior fixes (last valid match wins, no cross-line |
Replace blanket trailing-** stripping with targeted removal of orphan closers on lines where an unpaired **Verdict: token match was spliced out. Preserves legitimate **heading** and end-of-line emphasis in the review body. Co-authored-by: Gene Hoffman <hoffmang9@users.noreply.github.com>
|
Addressed Bugbot follow-up from review #5106583328 in bfa300c: Finding — Cleanup strips unrelated bold markers ( Replaced the blanket pass with |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bfa300c. Configure here.
_lstrip leading whitespace before detecting unpaired bold verdict matches so indented **Verdict: token lines still get targeted orphan trailing ** removal. Co-authored-by: Gene Hoffman <hoffmang9@users.noreply.github.com>
|
Addressed Bugbot follow-up from review #5106643567 on Finding — Orphan cleanup skips indented verdicts ( |
|
Babysitting complete on HEAD During babysitting, Bugbot on Ready for human review. Not merging per instructions. |

Motivation
Today's Cursor Bugbot reviews flagged the newly rolled-out
format_malware_review_verdict/VERDICT_REpost-processing from #153 on consumer "Update Managed Files" PRs. The source of truth istemplates/dependency-cursor-review.yml; this PR fixes the template only.Consumer reviews that motivated this work:
d38d1ba7-f2e1-441c-942c-619216388b9c5cded7af-1635-426a-8ae6-901111fdf37845f10068-1916-46ab-9a47-20cfa05bddb2Follow-up Bugbot reviews on this PR:
Original consumer-repo findings (fixed)
PR 154 Bugbot follow-ups
_orphan_trailing_bold_spannow lstrip leading whitespace before unpaired-bold detectionCI / Bugbot status (HEAD
26976b7)All checks green, including Cursor Bugbot (pass / SUCCESS on
26976b7). No new Bugbot issue threads on HEAD after the indented-orphan fix. Latest review with findings was onbfa300c(1 issue, fixed in26976b7).Checks passing: test, prettier, builds (all platforms), installers, release, dependency-review, commit signing, Socket Security, Cursor Bugbot.
Changes
templates/dependency-cursor-review.yml:VERDICT_RE, formatter helpers, targeted orphan cleanup.internal/workflowscripts/test_malware_verdict_formatter.py: 18 unit tests loading the inline snippet from the template.Makefile: Python tests wired intomake test.Testing
python3 -m unittest discover -s internal/workflowscripts -p 'test_*.py'make test-short(Go tests + Python tests)