Skip to content

fix(advisor): keep review findings actionable - #6682

Merged
cv merged 3 commits into
mainfrom
codex/pr-advisor-direct-findings
Jul 11, 2026
Merged

fix(advisor): keep review findings actionable#6682
cv merged 3 commits into
mainfrom
codex/pr-advisor-direct-findings

Conversation

@cv

@cv cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

The advisor currently turns discussion, heuristics, and internal test ideas into repeated author work. This change limits findings to concrete defects, makes only blockers affect merge posture, and publishes one concise review while keeping the second model as an independent artifact-only evaluation.

Changes

  • Ground acceptance findings in observable outcomes, current constraints, supported contracts, and explicit maintainer decisions; treat proposals and ordinary discussion as context.
  • Require one concrete present defect per root cause, keep test-depth ideas internal, and remove keyword and file-size heuristics that created speculative findings.
  • Render each finding once, with warnings non-blocking and suggestions optional; keep concrete test coverage in the finding it belongs to.
  • Publish one primary sticky comment. Keep the comparison lane non-blocking, artifact-only, and independent of the primary lane's previous review.
  • Scope process-boundary test-depth signals to added runtime source lines and retain workflow boundary checks for publishing, failure handling, and prior-review context.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Docs updated for user-facing behavior changes
  • Docs not applicable — justification:
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: Independent review covered prompt eligibility, workflow trust boundaries, model-lane isolation, escaping, and failure behavior; no concrete defects remained.
  • Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue:

Verification

  • PR description includes the DCO sign-off declaration and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable
  • Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: advisor suite (6 files, 112 tests passed); after the automated review fix, npx vitest run --project integration test/pr-review-advisor-workflow-boundary.test.ts (1 file, 14 tests passed)
  • Applicable broad gate passed — npm test for broad runtime/test-harness changes; npm run check for repo-wide validation/coverage changes — command/result:
  • Quality Gates section completed with required justifications or waivers
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

Signed-off-by: Carlos Villela cvillela@nvidia.com

Summary by CodeRabbit

  • New Features
    • PR reviews now clearly separate required blockers (merge posture), non-blocking warnings (maintainer attention), and optional suggestions.
    • PR review comments use a simplified “findings” format with streamlined verification guidance.
    • Only the configured publishing lane posts PR comments; other lanes remain artifact-only.
  • Bug Fixes
    • Improved heuristics for runtime-change detection, dependency/simplification signals, and issue-reference extraction.
    • Unavailable/warning-only outcomes no longer block merges.
  • Documentation
    • Updated the PR Review Advisor README to reflect the refined scope, workflow behavior, artifacts, and output semantics.
  • Tests
    • Updated review-advisor fixtures and boundary/gating expectations to match the new behavior.

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv cv self-assigned this Jul 11, 2026
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The PR Review Advisor now designates one publishing lane, keeps other advisor lanes artifact-only, loads prior reviews only for the publishing lane, narrows deterministic signals, updates prompt context, and renders findings-focused summaries and comments.

Changes

PR Review Advisor workflow and publishing contract

Layer / File(s) Summary
Publishing lane contract
.github/workflows/pr-review-advisor.yaml, tools/pr-review-advisor/workflow-boundary.mts, test/pr-review-advisor-workflow-boundary.test.ts, tools/pr-review-advisor/README.md
The workflow marks exactly one advisor lane for comment publication, gates comment posting and previous-review loading to that lane, and makes non-publishing lane failures non-blocking. Boundary tests and documentation reflect the contract.

Deterministic context and review protocol

Layer / File(s) Summary
Deterministic context and review protocol
tools/pr-review-advisor/analyze.mts, test/pr-review-advisor.test.ts
Deterministic metadata drops monolith deltas, runtime boundary detection expands test-depth classification, simplification signals are limited to new dependencies, issue-reference context is added, and prompt-stage instructions are revised.

Findings synthesis and comment rendering

Layer / File(s) Summary
Findings synthesis and comment rendering
tools/pr-review-advisor/analyze.mts, tools/pr-review-advisor/comment.mts, test/pr-review-advisor.test.ts, tools/pr-review-advisor/README.md
Recommendations, unavailable results, summaries, and comments are reorganized around blockers, warnings, optional suggestions, and rendered findings without prior testing-follow-up sections.

Ledger and depth test fixtures

Layer / File(s) Summary
Ledger and depth test fixtures
test/pr-review-advisor-ledger-tools.test.ts, test/pr-review-advisor-test-depth.test.ts, test/pr-review-advisor-turns.test.ts
Test metadata and expected outputs are updated for revised recommendation values, deterministic fields, and internal-only test-depth context.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested labels: area: ci, area: cli

Sequence Diagram(s)

sequenceDiagram
  participant AdvisorMatrix
  participant ReviewJob
  participant ReviewAdvisor
  participant CommentStep
  AdvisorMatrix->>ReviewJob: select publishing or artifact-only lane
  ReviewJob->>ReviewAdvisor: run advisor analysis
  ReviewAdvisor->>ReviewJob: return findings and summary
  ReviewJob->>CommentStep: publish comment only for publishing lane
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: making advisor review findings concrete and actionable.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/pr-advisor-direct-findings

Comment @coderabbitai help to get the list of available commands.

@github-code-quality

github-code-quality Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the codex/pr-advisor-dir... branch remains at 78%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main cb1b54f codex/pr-advisor-dir... 061059d +/-
src/lib/messagi...tate-applier.ts 74% 68% -6%
src/lib/subprocess-env.ts 100% 94% -6%
src/lib/messagi.../hook-phases.ts 93% 88% -5%
src/lib/messagi...etup-applier.ts 67% 63% -4%
src/lib/messagi...est-compiler.ts 99% 98% -1%
src/lib/messagi...flow-planner.ts 87% 86% -1%
src/lib/messagi...agent-config.ts 71% 71% 0%
src/lib/actions...lution-probe.ts 93% 94% +1%
src/lib/security/redact.ts 95% 100% +5%

Updated July 11, 2026 16:08 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

E2E Advisor Recommendation

Required E2E: None
Optional E2E: None

Workflow run

Full advisor summary

E2E Recommendation Advisor

Base: origin/main
Head: HEAD
Confidence: high

Required E2E

  • None. No existing NemoClaw E2E job is required. The deterministic risk plan has no required jobs, and the diff is confined to PR Review Advisor CI tooling plus its focused unit/workflow-boundary tests. It does not touch runtime user flows such as installer/onboarding, sandbox lifecycle, credential handling in the product, network policy, inference routing, deployment, or assistant interaction paths.

Optional E2E

  • None.

New E2E recommendations

  • None.

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Changes requested

Merge posture: Do not merge yet
Primary next action: Resolve or justify PRA-1: Advisor no longer surfaces monolith-growth context.
Open items: 0 required · 2 warnings · 0 suggestions · 5 test follow-ups
Since last review: 0 prior items resolved · 2 still apply · 0 new items found

Action checklist

  • PRA-1 Resolve or justify: Advisor no longer surfaces monolith-growth context in tools/pr-review-advisor/analyze.mts:881
  • PRA-2 Resolve or justify: Warning findings are rendered as requiring no response in tools/pr-review-advisor/comment.mts:227
  • PRA-T1 Add or justify test follow-up: Runtime validation
  • PRA-T2 Add or justify test follow-up: Runtime validation
  • PRA-T3 Add or justify test follow-up: Runtime validation
  • PRA-T4 Add or justify test follow-up: Runtime validation
  • PRA-T5 Add or justify test follow-up: Acceptance clause

Findings index

ID Severity Category Location Required action
PRA-1 Resolve/justify architecture tools/pr-review-advisor/analyze.mts:881 Restore monolith-growth context or replace it with an equivalent bounded, tested architecture signal that still surfaces large-file growth without turning unverified heuristics into automatic ledger findings.
PRA-2 Resolve/justify correctness tools/pr-review-advisor/comment.mts:227 Restore warning wording and posture so warning findings are explicitly listed as resolve-or-justify before merge; keep optional/no-response framing limited to suggestion findings, and keep canonical warning-only summaries consistent with that contract.
Review findings by urgency: 0 required fixes, 2 items to resolve/justify, 0 in-scope improvements

⚠️ Resolve or justify before merge

Investigate these in the current review; either fix them, explain why they are not applicable, or document the accepted risk.

PRA-1 Resolve/justify — Advisor no longer surfaces monolith-growth context

  • Location: tools/pr-review-advisor/analyze.mts:881
  • Category: architecture
  • Problem: The PR removes monolith-growth detection from the deterministic review context and prompt-facing metadata, leaving the scope/risk stage without the prior architecture guardrail for large-file growth.
  • Impact: Large additions to already-large runtime files may stop being highlighted for reviewer scrutiny, weakening the advisor's architecture review and making monolith growth easier to miss.
  • Recommended action: Restore monolith-growth context or replace it with an equivalent bounded, tested architecture signal that still surfaces large-file growth without turning unverified heuristics into automatic ledger findings.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `tools/pr-review-advisor/analyze.mts` around `DeterministicReviewContext` and `collectDeterministicContext()`, then search for `monolith`, `large_file_hotspot`, `classifyMonolith`, or `computeMonolith`.
  • Missing regression test: Add a focused test showing that a changed already-large runtime file still produces bounded architecture context for scope/risk review without creating an automatic ledger finding.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `tools/pr-review-advisor/analyze.mts` around `DeterministicReviewContext` and `collectDeterministicContext()`, then search for `monolith`, `large_file_hotspot`, `classifyMonolith`, or `computeMonolith`.
  • Evidence: `tools/pr-review-advisor/analyze.mts` `DeterministicReviewContext` contains `driftEvidence` but no `monolithDeltas` or equivalent large-file growth field. `tools/pr-review-advisor/analyze.mts` `collectDeterministicContext()` returns `driftEvidence: collectDriftEvidence(...)` but no monolith-growth computation. Repository search found no `monolith`, `large_file_hotspot`, `classifyMonolith`, or `computeMonolith` implementation in `tools/pr-review-advisor/analyze.mts`. `tools/pr-review-advisor/README.md` changes the advisor scope from `codebase drift, monolith growth, and architecture guardrails` to `codebase drift and architecture review grounded in current behavior and contracts`.

PRA-2 Resolve/justify — Warning findings are rendered as requiring no response

  • Location: tools/pr-review-advisor/comment.mts:227
  • Category: correctness
  • Problem: The public advisor comment now groups warnings with optional suggestions as not requiring response or follow-up, and warning-only reviews are presented as `No blocking advisor findings` with only `Review the warnings below` as the primary next action.
  • Impact: Significant correctness, security, or architecture warnings can be treated like optional information, so authors may merge without addressing or justifying unresolved warning findings that the advisor intentionally kept actionable.
  • Recommended action: Restore warning wording and posture so warning findings are explicitly listed as resolve-or-justify before merge; keep optional/no-response framing limited to suggestion findings, and keep canonical warning-only summaries consistent with that contract.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `tools/pr-review-advisor/comment.mts` around `buildComment()`, `reviewPosture()`, `primaryNextAction()`, and `renderFindingsDetails()`, then compare `tools/pr-review-advisor/analyze.mts` around `withCanonicalReviewLedgerFindings()` and the system prompt severity mapping.
  • Missing regression test: Add or update a comment-rendering test where the only finding has `severity: "warning"` and assert the comment asks to resolve or justify the warning rather than saying no response/follow-up is required.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `tools/pr-review-advisor/comment.mts` around `buildComment()`, `reviewPosture()`, `primaryNextAction()`, and `renderFindingsDetails()`, then compare `tools/pr-review-advisor/analyze.mts` around `withCanonicalReviewLedgerFindings()` and the system prompt severity mapping.
  • Evidence: `tools/pr-review-advisor/comment.mts:227` states `Warnings and optional suggestions do not require a response or follow-up.` `tools/pr-review-advisor/comment.mts` `reviewPosture()` returns `No blocking advisor findings` when there are warnings but no blockers. `tools/pr-review-advisor/comment.mts` `primaryNextAction()` returns `Review the warnings below.` for warning-only findings. `tools/pr-review-advisor/comment.mts` `renderFindingsDetails()` describes warnings as maintainer attention that `do not block by themselves`. `tools/pr-review-advisor/analyze.mts` `withCanonicalReviewLedgerFindings()` sets `merge_after_fixes` only when blocker findings exist, so warning-only canonical ledgers no longer produce a fix/justify posture.

💡 In-scope improvements

These are lower-risk, not throwaway. Prefer fixing them in this PR when they are local to changed code; defer only with rationale or a linked follow-up.

  • None.
Test follow-ups to resolve or justify

If these cover changed behavior, prefer adding them in this PR; otherwise state why existing coverage is enough or link the follow-up.

  • PRA-T1 Runtime validation — Add or identify targeted runtime/integration validation for the changed behavior; do not report external E2E job pass/fail here.. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/pr-review-advisor.yaml, tools/pr-review-advisor/README.md, tools/pr-review-advisor/analyze.mts, tools/pr-review-advisor/comment.mts, tools/pr-review-advisor/workflow-boundary.mts. Workflow/runtime advisor files changed, so targeted runtime or integration validation is recommended. Checked-in focused tests cover workflow-boundary validation, comment rendering, test-depth normalization, ledger atomicity, turn orchestration, previous-review provenance, and trusted-code boundaries. The remaining concrete regression gaps are attached to F-001 and F-002.
  • PRA-T2 Runtime validation — For F-001, add a focused test showing that a changed already-large runtime file still produces bounded architecture context for scope/risk review without creating an automatic ledger finding.. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/pr-review-advisor.yaml, tools/pr-review-advisor/README.md, tools/pr-review-advisor/analyze.mts, tools/pr-review-advisor/comment.mts, tools/pr-review-advisor/workflow-boundary.mts. Workflow/runtime advisor files changed, so targeted runtime or integration validation is recommended. Checked-in focused tests cover workflow-boundary validation, comment rendering, test-depth normalization, ledger atomicity, turn orchestration, previous-review provenance, and trusted-code boundaries. The remaining concrete regression gaps are attached to F-001 and F-002.
  • PRA-T3 Runtime validation — For F-002, add or update a comment-rendering test where the only finding has severity="warning" and assert the comment asks to resolve or justify the warning rather than saying no response/follow-up is required.. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/pr-review-advisor.yaml, tools/pr-review-advisor/README.md, tools/pr-review-advisor/analyze.mts, tools/pr-review-advisor/comment.mts, tools/pr-review-advisor/workflow-boundary.mts. Workflow/runtime advisor files changed, so targeted runtime or integration validation is recommended. Checked-in focused tests cover workflow-boundary validation, comment rendering, test-depth normalization, ledger atomicity, turn orchestration, previous-review provenance, and trusted-code boundaries. The remaining concrete regression gaps are attached to F-001 and F-002.
  • PRA-T4 Runtime validation — Identify targeted runtime/integration validation for the changed advisor workflow/analyzer/comment path; do not report external E2E job pass/fail here.. Runtime/sandbox/infrastructure paths need behavioral runtime validation: .github/workflows/pr-review-advisor.yaml, tools/pr-review-advisor/README.md, tools/pr-review-advisor/analyze.mts, tools/pr-review-advisor/comment.mts, tools/pr-review-advisor/workflow-boundary.mts. Workflow/runtime advisor files changed, so targeted runtime or integration validation is recommended. Checked-in focused tests cover workflow-boundary validation, comment rendering, test-depth normalization, ledger atomicity, turn orchestration, previous-review provenance, and trusted-code boundaries. The remaining concrete regression gaps are attached to F-001 and F-002.
  • PRA-T5 Acceptance clause — No linked issue clauses were available for this PR. — add test evidence or identify existing coverage. The reconciliation context returned an empty linkedIssues array; PR body/checklist text was treated as untrusted, non-binding context only.
Since last review details

Current findings, using the urgency labels above:

PRA-1 Resolve/justify — Advisor no longer surfaces monolith-growth context

  • Location: tools/pr-review-advisor/analyze.mts:881
  • Category: architecture
  • Problem: The PR removes monolith-growth detection from the deterministic review context and prompt-facing metadata, leaving the scope/risk stage without the prior architecture guardrail for large-file growth.
  • Impact: Large additions to already-large runtime files may stop being highlighted for reviewer scrutiny, weakening the advisor's architecture review and making monolith growth easier to miss.
  • Recommended action: Restore monolith-growth context or replace it with an equivalent bounded, tested architecture signal that still surfaces large-file growth without turning unverified heuristics into automatic ledger findings.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `tools/pr-review-advisor/analyze.mts` around `DeterministicReviewContext` and `collectDeterministicContext()`, then search for `monolith`, `large_file_hotspot`, `classifyMonolith`, or `computeMonolith`.
  • Missing regression test: Add a focused test showing that a changed already-large runtime file still produces bounded architecture context for scope/risk review without creating an automatic ledger finding.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `tools/pr-review-advisor/analyze.mts` around `DeterministicReviewContext` and `collectDeterministicContext()`, then search for `monolith`, `large_file_hotspot`, `classifyMonolith`, or `computeMonolith`.
  • Evidence: `tools/pr-review-advisor/analyze.mts` `DeterministicReviewContext` contains `driftEvidence` but no `monolithDeltas` or equivalent large-file growth field. `tools/pr-review-advisor/analyze.mts` `collectDeterministicContext()` returns `driftEvidence: collectDriftEvidence(...)` but no monolith-growth computation. Repository search found no `monolith`, `large_file_hotspot`, `classifyMonolith`, or `computeMonolith` implementation in `tools/pr-review-advisor/analyze.mts`. `tools/pr-review-advisor/README.md` changes the advisor scope from `codebase drift, monolith growth, and architecture guardrails` to `codebase drift and architecture review grounded in current behavior and contracts`.

PRA-2 Resolve/justify — Warning findings are rendered as requiring no response

  • Location: tools/pr-review-advisor/comment.mts:227
  • Category: correctness
  • Problem: The public advisor comment now groups warnings with optional suggestions as not requiring response or follow-up, and warning-only reviews are presented as `No blocking advisor findings` with only `Review the warnings below` as the primary next action.
  • Impact: Significant correctness, security, or architecture warnings can be treated like optional information, so authors may merge without addressing or justifying unresolved warning findings that the advisor intentionally kept actionable.
  • Recommended action: Restore warning wording and posture so warning findings are explicitly listed as resolve-or-justify before merge; keep optional/no-response framing limited to suggestion findings, and keep canonical warning-only summaries consistent with that contract.
  • Expected follow-up: Resolve in this PR or explain why the risk is acceptable.
  • Verification: Read `tools/pr-review-advisor/comment.mts` around `buildComment()`, `reviewPosture()`, `primaryNextAction()`, and `renderFindingsDetails()`, then compare `tools/pr-review-advisor/analyze.mts` around `withCanonicalReviewLedgerFindings()` and the system prompt severity mapping.
  • Missing regression test: Add or update a comment-rendering test where the only finding has `severity: "warning"` and assert the comment asks to resolve or justify the warning rather than saying no response/follow-up is required.
  • Done when: The risk is fixed or explicitly justified in the PR. Verification: Read `tools/pr-review-advisor/comment.mts` around `buildComment()`, `reviewPosture()`, `primaryNextAction()`, and `renderFindingsDetails()`, then compare `tools/pr-review-advisor/analyze.mts` around `withCanonicalReviewLedgerFindings()` and the system prompt severity mapping.
  • Evidence: `tools/pr-review-advisor/comment.mts:227` states `Warnings and optional suggestions do not require a response or follow-up.` `tools/pr-review-advisor/comment.mts` `reviewPosture()` returns `No blocking advisor findings` when there are warnings but no blockers. `tools/pr-review-advisor/comment.mts` `primaryNextAction()` returns `Review the warnings below.` for warning-only findings. `tools/pr-review-advisor/comment.mts` `renderFindingsDetails()` describes warnings as maintainer attention that `do not block by themselves`. `tools/pr-review-advisor/analyze.mts` `withCanonicalReviewLedgerFindings()` sets `merge_after_fixes` only when blocker findings exist, so warning-only canonical ledgers no longer produce a fix/justify posture.

Workflow run details

This is an automated, non-binding review; it still expects maintainers and agents to respond to each required or warning item. Treat suggestions as current-PR improvements when they touch changed code; defer only with maintainer rationale or a linked follow-up. A human maintainer must make the final merge decision.

@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

PRA-1 is intentionally not adopted. It is based on a file-size threshold, not an observed defect. Removing that heuristic is one of this PR’s intended outcomes: file size may prompt inspection, but it should not create a finding by itself. This run used the trusted advisor from current main, so its repeated warning and synthetic test tasks demonstrate the behavior this PR changes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tools/pr-review-advisor/workflow-boundary.mts (1)

188-201: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Missing validation for the new PR_REVIEW_ADVISOR_WORKFLOW_NAME fixed value.

COMMENT_MARKER, COMMENT_TITLE, and COMMENT_LABEL are all asserted against fixed constants here, but the new PR_REVIEW_ADVISOR_WORKFLOW_NAME env var (set to "PR Review / Advisor" in the workflow) has no matching requireJobEnvValue check. This value is used to match workflow runs for previous-review loading, so an accidental drift between the workflow's actual name and this literal would go undetected by the boundary validator.

🛡️ Proposed fix
   requireJobEnvValue(errors, reviewJob, "PR_REVIEW_ADVISOR_COMMENT_TITLE", "PR Review Advisor");
   requireJobEnvValue(errors, reviewJob, "PR_REVIEW_ADVISOR_COMMENT_LABEL", "PR review advisor");
+  requireJobEnvValue(
+    errors,
+    reviewJob,
+    "PR_REVIEW_ADVISOR_WORKFLOW_NAME",
+    "PR Review / Advisor",
+  );
   requireJobEnvValue(
     errors,
     reviewJob,
     "PR_REVIEW_ADVISOR_LOAD_PREVIOUS_REVIEW",
     "${{ matrix.advisor.publish_comment }}",
   );
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tools/pr-review-advisor/workflow-boundary.mts` around lines 188 - 201, Add a
requireJobEnvValue validation in the workflow-boundary checks for
PR_REVIEW_ADVISOR_WORKFLOW_NAME, asserting the fixed value "PR Review / Advisor"
alongside the existing COMMENT_MARKER, COMMENT_TITLE, and COMMENT_LABEL
validations. Keep the existing publish-comment validation unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@tools/pr-review-advisor/workflow-boundary.mts`:
- Around line 188-201: Add a requireJobEnvValue validation in the
workflow-boundary checks for PR_REVIEW_ADVISOR_WORKFLOW_NAME, asserting the
fixed value "PR Review / Advisor" alongside the existing COMMENT_MARKER,
COMMENT_TITLE, and COMMENT_LABEL validations. Keep the existing publish-comment
validation unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 93449138-5aca-4bcb-b74b-674be724db24

📥 Commits

Reviewing files that changed from the base of the PR and between c245efa and 0f2133c.

📒 Files selected for processing (10)
  • .github/workflows/pr-review-advisor.yaml
  • test/pr-review-advisor-ledger-tools.test.ts
  • test/pr-review-advisor-test-depth.test.ts
  • test/pr-review-advisor-turns.test.ts
  • test/pr-review-advisor-workflow-boundary.test.ts
  • test/pr-review-advisor.test.ts
  • tools/pr-review-advisor/README.md
  • tools/pr-review-advisor/analyze.mts
  • tools/pr-review-advisor/comment.mts
  • tools/pr-review-advisor/workflow-boundary.mts
💤 Files with no reviewable changes (1)
  • test/pr-review-advisor-turns.test.ts

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@cv

cv commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator Author

PRA-2 is also intentional. A warning identifies a concrete concern worth maintainer attention, but only blockers determine merge posture. Requiring every warning to be resolved or justified recreates the coercive behavior this PR removes. Any finding severe enough to require author action should be classified as a blocker.

@cv
cv merged commit 0b99487 into main Jul 11, 2026
50 checks passed
@cv
cv deleted the codex/pr-advisor-direct-findings branch July 11, 2026 16:16
Hadar301 pushed a commit to Hadar301/NemoClaw-OpenShift that referenced this pull request Jul 12, 2026
<!-- markdownlint-disable MD041 -->
## Summary

The advisor currently turns discussion, heuristics, and internal test
ideas into repeated author work. This change limits findings to concrete
defects, makes only blockers affect merge posture, and publishes one
concise review while keeping the second model as an independent
artifact-only evaluation.

## Changes

- Ground acceptance findings in observable outcomes, current
constraints, supported contracts, and explicit maintainer decisions;
treat proposals and ordinary discussion as context.
- Require one concrete present defect per root cause, keep test-depth
ideas internal, and remove keyword and file-size heuristics that created
speculative findings.
- Render each finding once, with warnings non-blocking and suggestions
optional; keep concrete test coverage in the finding it belongs to.
- Publish one primary sticky comment. Keep the comparison lane
non-blocking, artifact-only, and independent of the primary lane's
previous review.
- Scope process-boundary test-depth signals to added runtime source
lines and retain workflow boundary checks for publishing, failure
handling, and prior-review context.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [x] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [x] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification: Independent review
covered prompt eligibility, workflow trust boundaries, model-lane
isolation, escaping, and failure behavior; no concrete defects remained.
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes the DCO sign-off declaration and every
commit appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — command/result or justification:
advisor suite (6 files, 112 tests passed); after the automated review
fix, `npx vitest run --project integration
test/pr-review-advisor-workflow-boundary.test.ts` (1 file, 14 tests
passed)
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new pages only)

---
Signed-off-by: Carlos Villela <cvillela@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- PR reviews now clearly separate required blockers (merge posture),
non-blocking warnings (maintainer attention), and optional suggestions.
- PR review comments use a simplified “findings” format with streamlined
verification guidance.
- Only the configured publishing lane posts PR comments; other lanes
remain artifact-only.
- **Bug Fixes**
- Improved heuristics for runtime-change detection,
dependency/simplification signals, and issue-reference extraction.
  - Unavailable/warning-only outcomes no longer block merges.
- **Documentation**
- Updated the PR Review Advisor README to reflect the refined scope,
workflow behavior, artifacts, and output semantics.
- **Tests**
- Updated review-advisor fixtures and boundary/gating expectations to
match the new behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Carlos Villela <cvillela@nvidia.com>
@wscurran wscurran added area: ci CI workflows, checks, release automation, or GitHub Actions bug-fix PR fixes a bug or regression labels Jul 30, 2026
jyaunches added a commit that referenced this pull request Aug 19, 2026
<!-- markdownlint-disable MD041 -->
## Summary

The PR Review Advisor should block material codebase-design defects
without sending authors through review-driven growth loops. This change
keeps the evidence and anti-noise safeguards from #6682 and #6832, makes
maintainability defects first-class blockers, and requires simplicity
feedback to point toward a smaller complete source-and-test design.

## Changes

- Define duplicated authority, unnecessary machinery, repeated setup,
widened dependencies, unrelated churn, and unsupported product scope as
present design defects when checked-in evidence supports a
behavior-preserving reduction.
- Require blocker severity when the advisor expects author action before
merge. Keep warnings optional only when maintainers can reasonably
accept the current design without author action.
- Require an unnecessary-complexity finding to name its reduction case
across source and tests. Prefer a negative total line delta; permit a
line-neutral result only for a material reduction in owners, concepts,
invalid combinations, or dependency width.
- Reject net-new helpers, registries, configuration surfaces,
compatibility layers, fallbacks, migrations, test frameworks, and
parallel fixture owners as simplification remedies unless current
consumers adopt them and the complete change removes more structure than
it adds.
- Preserve semantic regression coverage while allowing duplicated
fixtures, matrices, assertions, and test owners to be consolidated.
- Keep follow-on findings grounded in current code, scope ownership
findings to checked-in duplication, and classify merge-order-only
redundancy as superseded or a limitation.
- Keep a prior design root cause stable when a review response adds
machinery instead of creating a serial chain of architecture findings.
- Apply the same deletion and consolidation questions in the shared
code-change considerations and the issue implementation skill so agents
optimize the design before publication.
- Add prompt, shared-guidance, and skill contract coverage for the new
direction and retained anti-noise rules.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [x] Code change with doc updates
- [ ] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [x] Tests added or updated for changed behavior
- [ ] Existing tests cover changed behavior — justification:
- [ ] Tests not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## DGX Station Hardware Evidence

- [ ] Tested on DGX Station
- Tested commit:
- Station profile/scenario:
- Result:
- Supporting evidence:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run validate:pr` passed after refreshing `origin/main` when hooks
were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npm exec -- vitest run
test/code-change-considerations.test.ts
test/pr-review-advisor-writing-guides.test.ts
test/pr-review-advisor-context.test.ts test/skills-frontmatter.test.ts`
(82 passed); `npm run test:changed` (growth guardrails: 32 passed; no
changed CLI, plugin, or E2E-support tests)
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — command/result:
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only)
- [ ] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [ ] New doc pages include SPDX header and frontmatter (new doc pages
only)

---
Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Improvements**
* Review guidance now more consistently identifies material design,
security, authorization, scope, duplication, and complexity issues as
blockers when supported by evidence.
* Simplification recommendations favor reducing source and test
complexity, avoiding added mechanisms and unsupported future-use
justifications.
* Checks better distinguish current defects from hypothetical risks,
resolved behavior, and non-actionable concerns.
* Terminology reviews and retry handling now provide clearer, more
reliable outcomes.

* **Documentation**
* Clarified expectations for documenting reductions, line changes,
preserved regression coverage, ownership evidence, and independent
follow-on risks.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Julie Yaunches <jyaunches@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci CI workflows, checks, release automation, or GitHub Actions bug-fix PR fixes a bug or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants