← Back to Pull requests

CVEAUTO-94 | feat(cve-triage): meme image at the top of auto-fix PR descriptions #150

Closed
unknown closed this pull request without merging on Oct 12, 2026 12:53 UTC
View on GitHub
unknown unknown commented on Oct 12, 2026 12:44 UTC
Author

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->

What

Every PR opened by the CVE auto-fix agents can now start with a meme image. The images are configured per repo in images.yaml under an optional top-level memes: mapping with four keys, each holding a full image line (an HTML <img ...> tag):

memes:
  critical: '<img ...>'
  backport: '<img ...>'
  pileup:   '<img ...>'
  high:     '<img ...>'

meme_for(u, memes) picks the line for a fix unit and render_issue adds one bullet to the constraints block, right after the "Open exactly one pull request ..." bullet, asking the agent to start the PR description with that exact line and keep it there in later edits. The line sits in a ``html fence so Linear passes it through verbatim instead of rendering or mangling the tag.

Why

Makes the auto-fix PRs recognisable at a glance in the PR list, and the category of the fix (critical / backport / pileup / plain high) readable from the image alone.

Precedence

1. critical — any finding with severity critical
2.
backport — unit mode is backport or backport-bundle (release line)
3.
pileup — the fix clears 10 or more distinct advisory IDs
4.
high — everything else

meme_for returns "" when memes is empty or the chosen key is missing, and without memes the issue text is byte-for-byte unchanged (asserted in the tests).

Tests

New cve-triage/tests/test_memes.py covers the four cases, the critical-wins-over-everything ordering, the pileup threshold (10 IDs yes, 9 no, and an agent bundle with few IDs gets high), a missing key, and "no memes configured means no extra bullet" — the latter asserts the rest of the rendered issue is byte-for-byte identical to the plain render.

python3 -m unittest discover -s cve-triage/tests — 44 tests, OK.

Drive-by: stale CI assertion

The CVE auto-fix tests workflow asserted issues = 4 for the fixture end-to-end run. #147 added a fifth fixture unit (central-ui npm) and bumped test_triage.py to 5, but left the workflow at 4, so unit-tests fails on every PR that touches cve-triage/. Verified the fixtures yield 5 units on main` as well, with issue descriptions byte-identical to this branch's; the workflow assert is now 5.

<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a href="https://cursor.com/agents/bc-21f69362-f61e-4347-ab65-e5100d813e3b?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-21f69362-f61e-4347-ab65-e5100d813e3b&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

Diff: 408 lines (+306 / -102) across 5 files Reviewer: aviadhahami Review duration: 8m
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.50) × (1 − Review Confidence (0.56)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 408 lines diff across 5 files
0.50
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 80% · Reviewer familiarity: 35%
55%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.360
Shallow Review Depth shallow_review_depth
0.289
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #150"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 55.6% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 49.8% (MEDIUM) · Higher = larger blast radius
49.8%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 55.6% · Lower = rushed or shallow review
55.6%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 22.1% · Safe to merge
22.1%