mirror of
https://github.com/Comfy-Org/github-workflows.git
synced 2026-11-05 00:17:37 +00:00
[PR #162] [MERGED] feat(pr-risk): complement grade + reducibility verdict in the concentration sentence (BE-7378) #171
Labels
No labels
cursor-review-catalog-drift
groom
groom
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/github-workflows#171
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/github-workflows/pull/162
Author: @mattmillerai
Created: 8/13/2026
Status: ✅ Merged
Merged: 8/13/2026
Merged by: @mattmillerai
Base:
main← Head:matt/be-7378-complement-grade📝 Commits (3)
25891f9feat(pr-risk): complement grade + reducibility verdict in the concentration sentence (BE-7378)6acbca4fix(pr-risk): gate the reducibility clause on the printed share, label it from the record (BE-7378)81bd375test(pr-risk): make the not-path-decided fixture gradable (BE-7378)📊 Changes
3 files changed (+134 additions, -9 deletions)
View changed files
📝
scripts/pr-risk/README.md(+18 -1)📝
scripts/pr-risk/publish-risk-surfaces.sh(+52 -8)📝
scripts/pr-risk/tests/test_publish_risk_surfaces.sh(+64 -0)📄 Description
ELI-5
The risk grader already tells you "94% of this diff is R0/R1/R2; the 6% that puts the path floor at R3 is 1 file, 40 lines." That is half an answer. It does not say what the other 94% would grade as if you peeled the risky file out — and that is the whole decision: split into two PRs, or don't bother. The same sentence is true whether the remainder rubber-stamps at R1 or is still a normal R2 review.
Now it says: "…is 1 file(s), 40 lines; peeled into their own PR, the remaining 1 file(s) would path-floor at R0 (final grade still depends on provenance and checks at PR time)."
What changed
publish-risk-surfaces.sh— the render program computes the complement floor: the worst per-file path floor over the files strictly below the overall floor (exactly the set the sentence already counts as the below-floor share). It is appended to the concentration sentence when the path axis is what decided the tier and that remainder is non-empty.grade-pr-risk.shand are re-derived here by the same worst-of rule the floor itself uses. This script computes no risk of its own and does not become a second grading model.$driversmoved above the sentence (it now gates both conditional clauses, from opposite sides), and$driver's path branch now reads the shared$path_decidedpredicate instead of re-spelling it — so the<details>cannot offer a split under a headline that credits another axis.Where it stays silent
unknownrecords never reach the sentence.Verification
All six hermetic pr-risk suites green, 386 assertions, 0 failed (
test_publish_risk_surfaces.sh76 — was 66, +10 new).shellcheck -xclean on both changed shell files.Ten new hermetic assertions cover complement→R0, →R1 (worst-of over a mixed remainder, proving it is not "biggest file" or "last file"), →R2 (the ticket's worked example: the split that is not worth much, reported honestly), irreducible, non-path-decided, the tie, and the ungraded record.
Byte-identity was measured, not asserted from my own premise. I ran the
origin/mainrender program and this one side by side over twelve synthetic records: the whole surfaces object (check_title,check_summary,comment_body,concentration,tier,graded) is byte-identical on all nine suppression records, and on the three path-decided ones exactly one line differs — the concentration sentence. That is what rules out a regression from the$driverrefactor, which no unit test of mine could establish on its own.Bounds kept
Markdown escaping is unchanged and untouched by this clause: everything it interpolates is an integer (
$below | length, and a rank fromtier_rank, which maps any unrecognised tier to 3 rather than passing text through), so no new PR-controlled string reaches the body. The added text is a fixed ~140 characters regardless of file count, so the 65536-char comment bound, the row-dropping and the unconditional truncation backstop are all unaffected.RENDER_ONLY=1still writes nothing. No change to grading semantics, the label sync, or the record schema.Judgment calls
$conc_short) is deliberately unchanged. It stays "6% of 640 changed lines carry it (1 file(s))." The file header defends a one-line visible budget on a surface that already sits under CodeRabbit and an 8-cell review panel, and the ticket's acceptance criteria name the concentration sentence. Promoting the complement above the fold is a real product question — worth doing if the v1/deriskrung wants it, not worth spending the line here unasked.$conc_shortalready gates on. Suppressing is the conservative direction — it withholds an offer rather than promising a reduction that peeling would not deliver.grade-pr-risk.shmatches each per-file floor against destination and origin path, so a rename out of a guarded class keeps that class's tier on its row and lands at-or-above the floor — it never appears in the reducible remainder. No regression, and no new feature was added for it.hasntassertions scope new text rather than denying an existing capability, and nothing that worked before stops working.All five acceptance criteria are met; none unmet.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.