Repository navigation
Add free OpenRouter PR flow diagrams - #19502
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19502 +/- ##
============================================
- Coverage 67.72% 67.72% -0.01%
Complexity 1430 1430
============================================
Files 3489 3489
Lines 224634 224637 +3
Branches 35468 35468
============================================
+ Hits 152130 152131 +1
+ Misses 60485 60477 -8
- Partials 12019 12029 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gortiz
left a comment
There was a problem hiding this comment.
Approving — the overall design holds up. The two-hop signal → workflow_run split keeps PR code and secrets properly apart without reaching for pull_request_target, and I particularly like that the model emits typed data rather than renderer syntax: validate_graph cross-checks every citation against real +/- lines, and _mermaid entity-encodes every non-alphanumeric character, so model output has no reachable path to Mermaid syntax, link targets, or the ownership markers. That is what makes "PR content is untrusted" structurally true rather than just asked for in the system prompt. Coverage of the adversarial paths (fork spoofing, superseded heads, publication races, quota deferral) is better than most of what lands here.
One thing I would fix before this handles real traffic, inline on main.py — CRLF-normalized PR bodies will permanently break block ownership, and CRLF is already present in ~13% of PR bodies on this repo. Everything else I noticed was minor enough not to hold this up.
Adds a compact, colored Mermaid
PR flowsection to PR descriptions using the repository'sOPEN_ROUTER_API_KEYandnvidia/nemotron-3-super-120b-a12b:free. PR updates and a regeneration checkbox refresh the section; an hourly bounded scan recovers pending work. Author text stays outside the signed managed block.An unprivileged PR signal triggers trusted default-branch code through
workflow_run, following ASF Actions policy. The scripts read public diffs through the GitHub API and use Python's standard library. Free-only routing and zero price caps prevent paid fallback. Quota failures preserve existing flows. Publication checks revisions, audits edit history, and retains recovery snapshots; GitHub's body update API is not atomic.Validation:
actionlint; root-level Spotless, Checkstyle, license formatting, and license checks pass.The permanent workflows activate on merge. Set
PR_FLOW_ENABLED=falseto pause them. Setup, manual preview/regeneration, and recovery instructions are in.github/scripts/pr_flow/README.md.