CNTRLPLANE-3757: review-agent: use agentic-ci run like jira-agent - #81394
Conversation
|
@enxebre: This pull request references CNTRLPLANE-3757 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 epic to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
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. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe review-agent process script now runs Claude through an agentic-ci wrapper, extracts session telemetry, writes autodl and transcript artifacts, and the report step links to the transcript. ChangesHyperShift review agent flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Script
participant agentic-ci
participant Claude
participant extract_metrics.py
participant ARTIFACT_DIR
Script->>agentic-ci: run_claude(review, prompt, tool lists)
agentic-ci->>Claude: execute review skill
Claude-->>agentic-ci: stream-json output
agentic-ci-->>Script: exit status
Script->>extract_metrics.py: convert OTEL JSONL to metrics
Script->>ARTIFACT_DIR: write autodl JSON and transcript HTML
Possibly related PRs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh (1)
161-174: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winGuard the
agentic-cipipeline beforePIPESTATUSis clobbered.
Withset -euo pipefail, a non-zeroagentic-ci runor emptygrepmatch can exitrun_claudebefore cleanup runs. SnapshotPIPESTATUSimmediately after the pipeline and before anylocalassignment; the proposedlocal rc=.../local grep_rc=...sequence won’t work because the firstlocaloverwritesPIPESTATUS.🤖 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/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh` around lines 161 - 174, The pipeline in run_claude is reading PIPESTATUS too late, so the exit codes can be lost or cleanup can be skipped under set -euo pipefail. Capture both the agentic-ci run and grep statuses immediately after the pipeline and before any local assignment, using the existing run_claude pipeline and PIPESTATUS as the reference points, then decide success/failure from those saved values without introducing a local statement that overwrites PIPESTATUS.Source: Coding guidelines
🤖 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/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh`:
- Around line 400-421: The transcript rendering in render_blocks() is writing
raw tool_result content into the HTML artifact, which can expose sensitive
command output. Update the tool-result handling path in the transcript-building
logic to redact or strip sensitive values before they reach html.escape(), or
skip emitting raw tool_result bodies altogether. Keep the existing
assistant/tool_use rendering, but ensure any content appended as tool_result
from m.get("tool_use_result") is sanitized first.
---
Outside diff comments:
In
`@ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh`:
- Around line 161-174: The pipeline in run_claude is reading PIPESTATUS too
late, so the exit codes can be lost or cleanup can be skipped under set -euo
pipefail. Capture both the agentic-ci run and grep statuses immediately after
the pipeline and before any local assignment, using the existing run_claude
pipeline and PIPESTATUS as the reference points, then decide success/failure
from those saved values without introducing a local statement that overwrites
PIPESTATUS.
🪄 Autofix (Beta)
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: 34d2cd33-702b-4d92-933b-9d380a89f53b
📒 Files selected for processing (1)
ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-commands.sh
|
/pj-rehearse help |
|
@enxebre: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse pull-ci-openshift-hypershift-main-address-review-comments |
|
@enxebre: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@enxebre: job(s): help either don't exist or were not found to be affected, and cannot be rehearsed |
|
@enxebre: job(s): pull-ci-openshift-hypershift-main-address-review-comments either don't exist or were not found to be affected, and cannot be rehearsed |
|
/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent |
|
@enxebre: your |
|
@enxebre: |
|
/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent |
|
@enxebre: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent |
|
@enxebre: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
Switch the review-agent from direct claude invocation to agentic-ci run, matching the jira-agent pattern: - Install prow-agent plugin for CI integration - Use agentic-ci run wrapper for native OTEL telemetry collection - Add BigQuery autodl generation (table: address_review_agent) - Add session metrics extraction from OTEL data - Add conversation transcript HTML report - Link transcript from summary report - Keep DISALLOWED_TOOLS for credential protection Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
75abc9f to
101d490
Compare
|
@enxebre: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre, muraee The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@enxebre: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/pj-rehearse ack |
|
@enxebre: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
…rt (openshift#81394) Switch the review-agent from direct claude invocation to agentic-ci run, matching the jira-agent pattern: - Install prow-agent plugin for CI integration - Use agentic-ci run wrapper for native OTEL telemetry collection - Add BigQuery autodl generation (table: address_review_agent) - Add session metrics extraction from OTEL data - Add conversation transcript HTML report - Link transcript from summary report - Keep DISALLOWED_TOOLS for credential protection Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rt (openshift#81394) Switch the review-agent from direct claude invocation to agentic-ci run, matching the jira-agent pattern: - Install prow-agent plugin for CI integration - Use agentic-ci run wrapper for native OTEL telemetry collection - Add BigQuery autodl generation (table: address_review_agent) - Add session metrics extraction from OTEL data - Add conversation transcript HTML report - Link transcript from summary report - Keep DISALLOWED_TOOLS for credential protection Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rt (openshift#81394) Switch the review-agent from direct claude invocation to agentic-ci run, matching the jira-agent pattern: - Install prow-agent plugin for CI integration - Use agentic-ci run wrapper for native OTEL telemetry collection - Add BigQuery autodl generation (table: address_review_agent) - Add session metrics extraction from OTEL data - Add conversation transcript HTML report - Link transcript from summary report - Keep DISALLOWED_TOOLS for credential protection Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rt (openshift#81394) Switch the review-agent from direct claude invocation to agentic-ci run, matching the jira-agent pattern: - Install prow-agent plugin for CI integration - Use agentic-ci run wrapper for native OTEL telemetry collection - Add BigQuery autodl generation (table: address_review_agent) - Add session metrics extraction from OTEL data - Add conversation transcript HTML report - Link transcript from summary report - Keep DISALLOWED_TOOLS for credential protection Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
claude -pinvocation toagentic-ci runvia arun_claudewrapper, matching the jira-agent pattern.prow-agent@ai-helpersplugin for CI integration.address_review_agent, agent field:address-review.Note: Last commit temporarily defaults
REVIEW_AGENT_TARGET_PRto PR 8906 for rehearsal — will be reverted before merge.Test plan
/test periodic-review-agentagainst test PR test: trivial change for review-agent rehearsal hypershift#8906🤖 Generated with Claude Code