Repository navigation
fix(review): gate re-review severity transitions - #1636
waynesun09 merged 10 commits into
Conversation
Functional tests are runningAuthorization passed for this commit. See the Functional Tests workflow for results. |
PR Summary by QodoGate re-review verdicts by severity and prior findings
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
waynesun09
left a comment
There was a problem hiding this comment.
Review findings at 9b01035: 2 HIGH, 3 MEDIUM, all in scripts/post-review.src.sh. Each is inline. The two HIGHs are about where the re-review gate now changes the agent's verdict: advisory prior mediums become blockers that start fix runs, and a deliberate comment verdict gets promoted to approve.
|
@waynesun09 , I addressed the five findings from your review in 28aa552: advisory prior mediums remain non-blocking, empty comments are not promoted to approval, direct approvals remain fail-closed, protected-path findings block promotion at any severity, and the unvalidated post-approval medium floor was removed. |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 12:24 PM UTC · Completed 12:36 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.25 |
|
Risk Assessment: moderate (2/5) DetailsThe score stays at 2 (moderate): a large diff (1249 lines, 11 files) changes existing review-gating behavior in protected paths, offset by no security-sensitive, CI or dependency changes, an established human author, a well-scoped linked issue and heavy test coverage; churn in the touched scripts is high, giving a composite of about 2.4. Previous runRisk Assessment: moderate (2/5) DetailsLarge diff (1124 lines) touching 7 protected paths in the review agent and post-review scripts with modified existing behavior and no flag, offset by no security-sensitive, CI or dependency changes, an established non-bot author, a well-scoped linked issue and moderate file history, giving a composite of about 2.3. |
ReviewFindingsMedium
Low
Earlier findings
Next steps:
Previous runReviewFindingsHigh
Medium
Low
Next steps:
|
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 6:52 PM UTC · Completed 7:03 PM UTC Commit: Runtime: pi · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $3.18 |
There was a problem hiding this comment.
Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:
scripts/post-review.src.sh(file-level): Line 1248 ·
[medium] logic-error
The ledger projection takes actionable from the unfiltered result, which undoes the re-review gate's normalization. Promotion sets actionable=false on new low/info rows in the posted result, but $ledger_findings is built from $unfiltered[0].findings and project_finding (line 1241) copies the raw boolean. A new low finding emitted with actionable:true is posted as advisory but recorded in the marker as actionable:true. On the next re-review, PRIOR_OPEN_BLOCKING_FINDINGS (lines 1116-1120) lets any open prior row with actionable==true through both selects, so that previously advisory low finding now blocks and forces request-changes with no new medium+ finding. This reintroduces the loop the PR is meant to stop.
Suggested fix: Persist the host-normalized actionable value in the ledger while keeping unfiltered rows for reclassification and failure accounting. Add a multi-review round-trip test using a projectable category such as naming-convention.
scripts/post-review.src.sh(file-level): Line 1260 ·
[medium] fail-open
When a prior finding's disposition stays open, the projection pins only severity and category from the prior ledger ($row + {severity: $p.severity, category: $p.category}); actionable still comes from the current row via project_finding. If an open prior actionable finding is re-emitted with actionable:false or without the field, this run still blocks from the prior ledger, but the next ledger drops actionable:true. On the following re-review the blocker filter excludes the still-open low finding, so approval can be reached without a resolution or reclassification. Verified inputs: prior severity and category are protected; prior actionable is not.
Suggested fix: Preserve the prior actionable flag alongside severity and category while the effective disposition is open. Add a multi-review regression showing that changing or omitting actionable cannot silently remove an existing blocker.
|
New findings from the review agent above look legitimate to me (although I didn't trace them to confirm). Carmel, Benjamin - can you take a look? |
|
thanks for the review @ralphbean , addressed in 4c183b5 |
|
Hey @ralphbean @waynesun09, could you please clarify the intended verdict for this case - On a verified re-review where no prior medium+ finding remains open, the agent returns I understand @waynesun09's review that an empty/manual-judgment comment must remain However, in our end-to-end test, the agent returned a visible low-only comment. The host prevented Should visible low/info-only comments be promoted to |
waynesun09
left a comment
There was a problem hiding this comment.
Re-review at 4c183b5: 3 HIGH, 5 MEDIUM, all in scripts/post-review.src.sh. Each was reproduced by running the bundled post-review.sh at head and on main and comparing verdicts. The two that matter most for the fleet: a critical threshold lets an open prior high auto-approve, and on upgrade every open PR (v2 markers have no action) turns advisory mediums into request-changes + fix runs.
Fixed since my last round: empty comment no longer promoted; protected-path check reads the unfiltered result; post-approval medium floor removed. Note: functional-tests-complete failed on a label-removal race between the two gate jobs, not this PR, so behaviour/functional tests have not run on 4c183b5 yet.
On the open question about promoting low-only comments: I will reply separately.
Fail closed for legacy prior-review metadata, preserve carried actionable findings, and document the re-review projection contract. Add regression coverage and regenerate bundled scripts. Co-authored-by: Codex <codex@openai.com> Signed-off-by: csoceanu <csoceanu@redhat.com>
Trim redundant review guidance without changing re-review behavior. Co-authored-by: Codex <codex@openai.com> Signed-off-by: csoceanu <csoceanu@redhat.com>
Keep host-normalized actionable state in the disposition ledger, respect the configured severity threshold, and preserve actionable state for open prior findings. Extend the re-review regression coverage and regenerate the bundled script. Co-authored-by: Codex <codex@openai.com> Signed-off-by: csoceanu <csoceanu@redhat.com>
4b92b4b to
cce4b8d
Compare
Co-authored-by: Codex <codex@openai.com> Signed-off-by: csoceanu <csoceanu@redhat.com>
cce4b8d to
aa820e9
Compare
Co-authored-by: Codex <codex@openai.com> Signed-off-by: csoceanu <csoceanu@redhat.com>
|
Thanks @waynesun09 for the review! addressed all eight findings |
waynesun09
left a comment
There was a problem hiding this comment.
Re-review at b33f1e6: all eight findings from my last round are fixed within the agreed scope (no ledger schema growth, structured notice with links, body rewrite dropped, ::error + exit 1 on the soft-fail path). post-review-test.sh (331 pass), pre-review-test.sh and make check-bundle pass; functional and behaviour tests are green after ok-to-test.
Two MEDIUMs remain, each reproduced by running the bundled post-review.sh at head and on main. Both are inline. Once they are fixed I will approve.
On the open question (promote visible low/info-only comments?): please do not promote an agent-authored comment in this PR. The host cannot tell a deliberate comment from a filter-downgraded one (second inline finding). Promote only a request-changes whose findings are all new low/info, or that the severity filter downgraded to comment. Keeping visible low-only comments as COMMENT is the safe side; if we want #1208's "approve with suggestions" for that case, it needs an explicit signal from the agent and can be a follow-up issue.
Preserve agent-authored comment verdicts and prior reject holds across severity filtering and re-review rounds. Add regressions for filtered comment failures and two-round reject handling. Co-authored-by: Codex <codex@openai.com> Signed-off-by: csoceanu <csoceanu@redhat.com>
|
Thanks @waynesun09 for the review! addressed the two findings |
waynesun09
left a comment
There was a problem hiding this comment.
Both round-3 findings are fixed in c2a22c0: an agent-authored comment is no longer promoted, and the prior-reject hold now persists across rounds (with tests for both). Local post-review-test.sh (333 pass) and check-bundle are clean. Approving.
Summary
This PR implements Workstream B from AISDLC-118 - Re-review Severity Gating.
It reduces re-review noise while preserving actionable findings and safety controls.
Scope
request-changesor start fix-agent loops during re-review.REVIEW_FINDING_SEVERITY_THRESHOLDdefault is unchanged.rejectand legacy review states require human review before approval.COMMENT.Finding ledger
actionablestate when findings remain open.review-findings-v2marker metadata-only.Ticket alignment
This implements the re-review behavior described in agents#1208 and delivers the Workstream B portion of AISDLC-118.
Validation
bash scripts/post-review-test.shmake check-bundlepre-commit run --all-filesgit diff --checkAll checks pass.