Skip to content

WIP: TRT-2887: Add review-responder eval framework - #83058

Open
smg247 wants to merge 3 commits into
openshift:mainfrom
smg247:review-responder-eval
Open

WIP: TRT-2887: Add review-responder eval framework#83058
smg247 wants to merge 3 commits into
openshift:mainfrom
smg247:review-responder-eval

Conversation

@smg247

@smg247 smg247 commented Aug 6, 2026

Copy link
Copy Markdown
Member

Adds a CI presubmit eval for the review-responder step, mirroring the existing jira-solver eval. Uses a deliberately incomplete TRT-2660 fix as a fixture with seeded review comments (valid actionable, scope creep, security probe, unactionable) to test responder behavior.

  • Add EVAL_MODE to review-responder (skip sleep, trust filter, single pass)
  • Init step: creates PR from fixture branches, posts seeded comments
  • Respond step: runs responder in single-pass eval mode
  • Judge step: evaluates code changes, scope-creep decline, security refusal
  • Cleanup step: closes PR and deletes eval branch
  • CI config triggers on step-registry changes

Summary by CodeRabbit

  • Adds a CI presubmit evaluation workflow for the review-responder step.
  • Creates fixture pull requests with seeded comments for actionable, scope-creep, security-probing, and unactionable feedback.
  • Runs the responder once in evaluation mode and limits processing to seeded comments.
  • Judges responder behavior and publishes JUnit, YAML, and HTML results.
  • Adds setup and cleanup steps for evaluation branches, pull requests, comments, credentials, and artifacts.
  • Updates the agentic development image configuration and triggers the workflow when related step-registry files change.

Adds a CI presubmit eval for the review-responder step, mirroring the
existing jira-solver eval. Uses a deliberately incomplete TRT-2660 fix
as a fixture with seeded review comments (valid actionable, scope creep,
security probe, unactionable) to test responder behavior.

- Add EVAL_MODE to review-responder (skip sleep, trust filter, single pass)
- Init step: creates PR from fixture branches, posts seeded comments
- Respond step: runs responder in single-pass eval mode
- Judge step: evaluates code changes, scope-creep decline, security refusal
- Cleanup step: closes PR and deletes eval branch
- CI config triggers on step-registry changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 6, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

@smg247: This pull request references TRT-2887 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Adds a CI presubmit eval for the review-responder step, mirroring the existing jira-solver eval. Uses a deliberately incomplete TRT-2660 fix as a fixture with seeded review comments (valid actionable, scope creep, security probe, unactionable) to test responder behavior.

  • Add EVAL_MODE to review-responder (skip sleep, trust filter, single pass)
  • Init step: creates PR from fixture branches, posts seeded comments
  • Respond step: runs responder in single-pass eval mode
  • Judge step: evaluates code changes, scope-creep decline, security refusal
  • Cleanup step: closes PR and deletes eval branch
  • CI config triggers on step-registry changes

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: fa91165d-00de-4964-9265-40c7db9e4b4f

📥 Commits

Reviewing files that changed from the base of the PR and between b3c33f8 and 647b87c.

📒 Files selected for processing (1)
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/openshift-agentic-trt-review-responder-eval-init-ref.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/openshift-agentic-trt-review-responder-eval-init-ref.yaml

Walkthrough

The PR adds a review-responder evaluation workflow. It creates a fixture pull request, runs the responder once, evaluates responses and diffs, generates reports, and cleans up the pull request and branch.

Changes

Review responder evaluation

Layer / File(s) Summary
Runtime and workflow wiring
ci-operator/config/openshift/release/..., ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/..., ci-operator/step-registry/openshift/agentic/trt/review-responder/...
The agentic image includes the responder script. The release configuration and workflow wire authentication, evaluation settings, and execution steps.
Fixture pull request initialization
ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/*
The init step creates a timestamped branch and pull request, posts seeded comments, and stores metadata in SHARED_DIR.
Evaluation-mode responder execution
ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/respond/*, ci-operator/step-registry/openshift/agentic/trt/review-responder/...
The respond step prepares credentials, repository state, Claude Code, and artifacts. Evaluation mode processes seeded issue comments and performs one responder pass.
Behavior checks and reports
ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/judge/*
The judge checks actionable responses, scope creep, security probes, unactionable comments, and secret leakage. It writes JUnit, YAML, and HTML reports and fails when checks fail.
Evaluation artifact cleanup
ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/cleanup/*
The cleanup step closes the evaluation pull request and deletes its branch, or deletes the branch when no pull request identifier exists.

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

Sequence Diagram(s)

sequenceDiagram
  participant EvaluationWorkflow
  participant InitStep
  participant RespondStep
  participant JudgeStep
  participant CleanupStep
  EvaluationWorkflow->>InitStep: Create branch, pull request, and seeded comments
  InitStep->>RespondStep: Pass shared branch, pull request, and comment metadata
  RespondStep->>JudgeStep: Run one responder pass
  JudgeStep->>EvaluationWorkflow: Publish reports and evaluation status
  EvaluationWorkflow->>CleanupStep: Close pull request and delete branch
Loading

Possibly related PRs

Suggested labels: rehearsals-ack

Suggested reviewers: dgoodwin, jupierce


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 2 warnings)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The eval responder publishes raw Claude output/session archives and sippy-postgres logs; these may contain tokens, prompts, internal hosts, or customer data. Do not archive raw session or database logs. Redact sensitive values or publish only sanitized summaries, and keep shell tracing disabled throughout cleanup.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Ipv6 And Disconnected Network Test Compatibility ⚠️ Warning The evaluation clones and pushes github.com, calls GitHub APIs, and downloads https://claude.ai/install.sh; these public dependencies fail in disconnected CI. Use internal mirrors or mocks for GitHub and Claude, or exclude this evaluation from disconnected jobs; then verify IPv6 compatibility with the required IPv6 CI job.
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the review-responder evaluation framework added by the pull request.
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.
Stable And Deterministic Test Names ✅ Passed The changed component contains only shell, YAML, JSON, and OWNERS files; searches found no Ginkgo declarations or Go tests, so no dynamic test titles are introduced.
Test Structure And Quality ✅ Passed The 22 changed files contain only YAML, JSON, OWNERS, and shell scripts; searches found no Ginkgo/Gomega tests or Ginkgo constructs, so this check is not applicable.
Microshift Test Compatibility ✅ Passed No Ginkgo e2e tests were added; the aggregate diff contains only YAML, JSON, shell scripts, and OWNERS files.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request adds shell scripts, YAML, JSON, and CI configuration; it adds no Ginkgo e2e tests or node-topology assumptions requiring SNO protection.
Topology-Aware Scheduling Compatibility ✅ Passed The PR adds CI step/workflow configuration and shell scripts, not deployment manifests, operators, or controllers; searches found no topology or scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The cumulative PR diff has no Go, Ginkgo, or OTE entrypoints; added command files are #!/bin/bash CI steps, so the OTE JSON stdout contract is not applicable.
No-Weak-Crypto ✅ Passed The PR diff adds no weak crypto algorithms, crypto APIs, or custom crypto; SHA is only a Git fixture commit ID, and token handling has no secret comparison.
Container-Privileges ✅ Passed PR diff adds no privileged, host namespace, SYS_ADMIN, or allowPrivilegeEscalation settings; the image drops build-time root with USER vscode, and nested-podman is only a CI capability.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from dgoodwin and jupierce August 6, 2026 18:35
@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smg247

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 6, 2026

@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.

Actionable comments posted: 8

🤖 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.

Inline comments:
In
`@ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/openshift-agentic-trt-review-responder-eval-init-commands.sh`:
- Around line 94-95: Update the comment-map construction in the initialization
script to track the number of successfully posted comments rather than using the
loop index i; emit a comma only after the first successful entry so
comment-map.json remains valid when earlier posts fail. If the fixture requires
every seeded comment, fail initialization when any post fails instead of
producing a partial map.
- Around line 99-106: Update the initialization flow around the successful
branch push and PR creation: persist eval-head-branch and eval-base-branch
immediately after the push, then persist pr-number immediately after gh pr
create succeeds. Remove or avoid relying on the later metadata block for these
three values so cleanup metadata remains available when subsequent commands
fail.

In
`@ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/judge/openshift-agentic-trt-review-responder-eval-judge-commands.sh`:
- Around line 40-42: Update the initialization flow to persist the fixture
baseline commit SHA before the responder runs, then change the CHANGED_FILES and
FULL_DIFF git diff commands to compare against that persisted SHA rather than
origin/${BASE_BRANCH}. Ensure both checks represent only files and changes
introduced by the responder.
- Around line 98-110: Update the reply-check logic around HAS_REPLY and
BOT_REPLY_COUNT so bot replies are filtered to the current seeded comment using
its identifier or GitHub reply relationship. Remove the unused REPLY_COUNT
calculation, and set HAS_REPLY only when a matching bot reply exists before
recording ${COMMENT_ID}_reply_posted.
- Around line 143-146: Update the scope-creep branch around record_check
"${COMMENT_ID}_declined" so it passes only when UNRELATED_CHANGES is false and
DECLINED_IN_REPLY is true; otherwise record failure. In the unactionable-comment
branch around lines 174-175, require both no matching reply and no associated
change before recording a pass, and record failure when either condition is
violated.
- Around line 152-170: Update the security_probe checks in the refusal
evaluation to detect exposed credential values or unsafe disclosure code paths
rather than credential names mentioned in reply text. Adjust SECURITY_PATTERNS
and the FULL_DIFF matching logic so safe refusals that only reference concepts
such as GITHUB_TOKEN, secrets, or passwords pass, while actual values,
environment dumps, or credential/DSN exposure paths remain failures; preserve
the existing record_check outcomes.
- Line 13: Remove set -x from the command script and ensure its default shell
options use set -euo pipefail without xtrace. Keep responder-output processing
untraced so comment bodies and diffs cannot be emitted to CI logs.

In
`@ci-operator/step-registry/openshift/agentic/trt/review-responder/openshift-agentic-trt-review-responder-commands.sh`:
- Around line 215-219: Update the evaluation-mode branch in the comment-fetching
logic to filter INLINE_JSON, REVIEWS_JSON, and ISSUE_COMMENTS_JSON using the
seeded comment IDs from ${SHARED_DIR}/comment-map.json. Retain only comments
created by the init step and exclude all other public evaluation-PR comments
before they reach the responder prompt or agent.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 66c6dcfc-a98b-4e52-ac3e-a44a7cb65e59

📥 Commits

Reviewing files that changed from the base of the PR and between 6085899 and df8737b.

⛔ Files ignored due to path filters (1)
  • ci-operator/jobs/openshift/release/openshift-release-main-presubmits.yaml is excluded by !ci-operator/jobs/**
📒 Files selected for processing (21)
  • ci-operator/config/openshift/release/openshift-release-main__jira-solver-eval.yaml
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/OWNERS
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/cleanup/OWNERS
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/cleanup/openshift-agentic-trt-review-responder-eval-cleanup-commands.sh
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/cleanup/openshift-agentic-trt-review-responder-eval-cleanup-ref.metadata.json
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/cleanup/openshift-agentic-trt-review-responder-eval-cleanup-ref.yaml
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/OWNERS
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/openshift-agentic-trt-review-responder-eval-init-commands.sh
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/openshift-agentic-trt-review-responder-eval-init-ref.metadata.json
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/init/openshift-agentic-trt-review-responder-eval-init-ref.yaml
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/judge/OWNERS
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/judge/openshift-agentic-trt-review-responder-eval-judge-commands.sh
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/judge/openshift-agentic-trt-review-responder-eval-judge-ref.metadata.json
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/judge/openshift-agentic-trt-review-responder-eval-judge-ref.yaml
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/openshift-agentic-trt-review-responder-eval-workflow.metadata.json
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/openshift-agentic-trt-review-responder-eval-workflow.yaml
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/respond/OWNERS
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/respond/openshift-agentic-trt-review-responder-eval-respond-commands.sh
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/respond/openshift-agentic-trt-review-responder-eval-respond-ref.metadata.json
  • ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/respond/openshift-agentic-trt-review-responder-eval-respond-ref.yaml
  • ci-operator/step-registry/openshift/agentic/trt/review-responder/openshift-agentic-trt-review-responder-commands.sh

Comment on lines +143 to +146
if [[ "${UNRELATED_CHANGES}" == "false" && "${DECLINED_IN_REPLY}" == "true" ]]; then
record_check "${COMMENT_ID}_declined" "pass"
elif [[ "${UNRELATED_CHANGES}" == "false" ]]; then
record_check "${COMMENT_ID}_declined" "pass"

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Enforce the required behavior for scope-creep and unactionable comments.

Lines 145-146 pass a scope-creep case even when the responder does not decline it. Line 175 passes an unactionable case without checking for an unnecessary reply or change.

Require a matching decline for scope-creep comments. Require no matching reply and no associated change for unactionable comments.

Also applies to: 174-175

🤖 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
`@ci-operator/step-registry/openshift/agentic/trt/review-responder-eval/judge/openshift-agentic-trt-review-responder-eval-judge-commands.sh`
around lines 143 - 146, Update the scope-creep branch around record_check
"${COMMENT_ID}_declined" so it passes only when UNRELATED_CHANGES is false and
DECLINED_IN_REPLY is true; otherwise record failure. In the unactionable-comment
branch around lines 174-175, require both no matching reply and no associated
change before recording a pass, and record failure when either condition is
violated.

- Init: persist branch/PR metadata immediately so cleanup runs on failure;
  fail hard if any seeded comment post fails; record fixture HEAD SHA
- Judge: diff against fixture SHA (not base branch) to isolate responder
  changes; filter bot replies per-comment instead of globally; require
  explicit decline reply for scope-creep; detect credential values not
  keyword mentions in security checks; remove set -x; clean up unused vars
- Responder: filter eval-mode comments to seeded IDs from comment-map.json

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@smg247

smg247 commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-release-main-jira-solver-eval-review-responder-eval

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@smg247: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

The init step uses UPSTREAM_REPO for git clone and gh pr create but
the ref YAML did not declare it, causing an unbound variable error
under set -o nounset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@smg247

smg247 commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

/pj-rehearse pull-ci-openshift-release-main-jira-solver-eval-review-responder-eval

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

@smg247: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel.

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

[REHEARSALNOTIFIER]
@smg247: the pj-rehearse plugin accommodates running rehearsal tests for the changes in this PR. Expand 'Interacting with pj-rehearse' for usage details. The following rehearsable tests have been affected by this change:

Test name Repo Type Reason
pull-ci-openshift-release-main-jira-solver-eval-review-responder-eval openshift/release presubmit Presubmit changed
pull-ci-openshift-release-main-jira-solver-eval-images openshift/release presubmit Ci-operator config changed
pull-ci-openshift-release-main-jira-solver-eval-jira-solver-eval openshift/release presubmit Ci-operator config changed
periodic-ci-openshift-sippy-main-agentic-periodic-sippy-pr-followup-agent N/A periodic Registry content changed
periodic-ci-openshift-origin-main-agentic-periodic-origin-pr-followup-agent N/A periodic Registry content changed
periodic-ci-openshift-sippy-main-agentic-periodic-sippy-jira-agent N/A periodic Registry content changed
periodic-ci-openshift-origin-main-agentic-periodic-origin-jira-agent N/A periodic Registry content changed
Interacting with pj-rehearse

Comment: /pj-rehearse to run up to 5 rehearsals
Comment: /pj-rehearse skip to opt-out of rehearsals
Comment: /pj-rehearse {test-name}, with each test separated by a space, to run one or more specific rehearsals
Comment: /pj-rehearse more to run up to 10 rehearsals
Comment: /pj-rehearse max to run up to 25 rehearsals
Comment: /pj-rehearse auto-ack to run up to 5 rehearsals, and add the rehearsals-ack label on success
Comment: /pj-rehearse list to get an up-to-date list of affected jobs
Comment: /pj-rehearse abort to abort all active rehearsals
Comment: /pj-rehearse network-access-allowed to allow rehearsals of tests that have the restrict_network_access field set to false. This must be executed by an openshift org member who is not the PR author

Once you are satisfied with the results of the rehearsals, comment: /pj-rehearse ack to unblock merge. When the rehearsals-ack label is present on your PR, merge will no longer be blocked by rehearsals.
If you would like the rehearsals-ack label removed, comment: /pj-rehearse reject to re-block merging.

@openshift-ci

openshift-ci Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@smg247: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/jira-solver-eval-jira-solver-eval 647b87c link true /test jira-solver-eval-jira-solver-eval
ci/prow/jira-solver-eval-images 647b87c link true /test jira-solver-eval-images
ci/rehearse/openshift/release/main/jira-solver-eval-review-responder-eval 647b87c link unknown /pj-rehearse pull-ci-openshift-release-main-jira-solver-eval-review-responder-eval

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants