CNTRLPLANE-3853: Extract generic review-agent step registry from HyperShift#82096
CNTRLPLANE-3853: Extract generic review-agent step registry from HyperShift#82096bryan-cox wants to merge 1 commit into
Conversation
|
@bryan-cox, Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
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 change introduces a reusable generic review-agent workflow with configurable repositories, setup/process/report steps, onboarding documentation, and updated ownership metadata. HyperShift now delegates to these generic steps through a wrapper workflow and supplies repository-specific configuration. ChangesGeneric Review Agent
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CIWorkflow
participant ReviewAgentSetup
participant ReviewAgentProcess
participant GitHub
participant ReviewAgentReport
CIWorkflow->>ReviewAgentSetup: verify Claude Code CLI
CIWorkflow->>ReviewAgentProcess: run repository-aware review
ReviewAgentProcess->>GitHub: clone fork and query upstream pull request
ReviewAgentProcess->>GitHub: address review comments and push changes
CIWorkflow->>ReviewAgentReport: generate HTML report
ReviewAgentReport->>GitHub: fetch pull request metadata
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 1 warning)
✅ Passed checks (13 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox 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 |
9c26b72 to
b994a8c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/review-agent/process/review-agent-process-commands.sh`:
- Around line 83-95: Update the missing-credentials branch in the review-agent
process command script to exit with a non-zero status after reporting
unavailable Vault secrets. Preserve the existing diagnostics and graceful
termination flow, but replace the successful exit so skipped review processing
marks the job as failed.
🪄 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: d7b2571d-2f06-4705-a248-85b8e2d18434
📒 Files selected for processing (21)
ci-operator/step-registry/hypershift/review-agent/README.mdci-operator/step-registry/hypershift/review-agent/hypershift-review-agent-workflow.metadata.jsonci-operator/step-registry/hypershift/review-agent/hypershift-review-agent-workflow.yamlci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-ref.metadata.jsonci-operator/step-registry/hypershift/review-agent/report/hypershift-review-agent-report-ref.metadata.jsonci-operator/step-registry/hypershift/review-agent/report/hypershift-review-agent-report-ref.yamlci-operator/step-registry/hypershift/review-agent/setup/hypershift-review-agent-setup-ref.metadata.jsonci-operator/step-registry/hypershift/review-agent/setup/hypershift-review-agent-setup-ref.yamlci-operator/step-registry/review-agent/ONBOARDING.mdci-operator/step-registry/review-agent/OWNERSci-operator/step-registry/review-agent/README.mdci-operator/step-registry/review-agent/process/OWNERSci-operator/step-registry/review-agent/process/review-agent-process-commands.shci-operator/step-registry/review-agent/process/review-agent-process-ref.yamlci-operator/step-registry/review-agent/report/OWNERSci-operator/step-registry/review-agent/report/review-agent-report-commands.shci-operator/step-registry/review-agent/report/review-agent-report-ref.yamlci-operator/step-registry/review-agent/review-agent-workflow.yamlci-operator/step-registry/review-agent/setup/OWNERSci-operator/step-registry/review-agent/setup/review-agent-setup-commands.shci-operator/step-registry/review-agent/setup/review-agent-setup-ref.yaml
💤 Files with no reviewable changes (6)
- ci-operator/step-registry/hypershift/review-agent/setup/hypershift-review-agent-setup-ref.yaml
- ci-operator/step-registry/hypershift/review-agent/report/hypershift-review-agent-report-ref.yaml
- ci-operator/step-registry/hypershift/review-agent/setup/hypershift-review-agent-setup-ref.metadata.json
- ci-operator/step-registry/hypershift/review-agent/report/hypershift-review-agent-report-ref.metadata.json
- ci-operator/step-registry/hypershift/review-agent/hypershift-review-agent-workflow.metadata.json
- ci-operator/step-registry/hypershift/review-agent/process/hypershift-review-agent-process-ref.metadata.json
b994a8c to
1741e43
Compare
|
@bryan-cox: This pull request references CNTRLPLANE-3853 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. 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. |
1 similar comment
|
@bryan-cox: This pull request references CNTRLPLANE-3853 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. 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. |
1741e43 to
c0c616f
Compare
|
/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent |
|
@bryan-cox: your |
|
/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent |
|
@bryan-cox: 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 |
|
@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
c0c616f to
5521f5b
Compare
|
/pj-rehearse periodic-ci-openshift-hypershift-main-periodic-review-agent |
|
@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/review-agent/report/review-agent-report-ref.yaml`:
- Around line 15-18: Update the report step’s documentation description to state
that the script consumes artifacts produced by the review-agent processing step
and generates the HTML report from those artifacts, removing the inaccurate
claim that it directly parses Claude stream-json output.
🪄 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: fbea7288-502d-4fa4-a8a7-142253522dcd
📒 Files selected for processing (21)
ci-operator/step-registry/hypershift/review-agent/README.mdci-operator/step-registry/hypershift/review-agent/hypershift-review-agent-workflow.yamlci-operator/step-registry/hypershift/review-agent/report/hypershift-review-agent-report-ref.yamlci-operator/step-registry/hypershift/review-agent/setup/hypershift-review-agent-setup-ref.yamlci-operator/step-registry/review-agent/ONBOARDING.mdci-operator/step-registry/review-agent/OWNERSci-operator/step-registry/review-agent/README.mdci-operator/step-registry/review-agent/process/OWNERSci-operator/step-registry/review-agent/process/review-agent-process-commands.shci-operator/step-registry/review-agent/process/review-agent-process-ref.metadata.jsonci-operator/step-registry/review-agent/process/review-agent-process-ref.yamlci-operator/step-registry/review-agent/report/OWNERSci-operator/step-registry/review-agent/report/review-agent-report-commands.shci-operator/step-registry/review-agent/report/review-agent-report-ref.metadata.jsonci-operator/step-registry/review-agent/report/review-agent-report-ref.yamlci-operator/step-registry/review-agent/review-agent-workflow.metadata.jsonci-operator/step-registry/review-agent/review-agent-workflow.yamlci-operator/step-registry/review-agent/setup/OWNERSci-operator/step-registry/review-agent/setup/review-agent-setup-commands.shci-operator/step-registry/review-agent/setup/review-agent-setup-ref.metadata.jsonci-operator/step-registry/review-agent/setup/review-agent-setup-ref.yaml
💤 Files with no reviewable changes (5)
- ci-operator/step-registry/review-agent/report/OWNERS
- ci-operator/step-registry/review-agent/OWNERS
- ci-operator/step-registry/hypershift/review-agent/report/hypershift-review-agent-report-ref.yaml
- ci-operator/step-registry/hypershift/review-agent/setup/hypershift-review-agent-setup-ref.yaml
- ci-operator/step-registry/review-agent/process/OWNERS
🚧 Files skipped from review as they are similar to previous changes (15)
- ci-operator/step-registry/review-agent/setup/review-agent-setup-ref.metadata.json
- ci-operator/step-registry/review-agent/setup/review-agent-setup-commands.sh
- ci-operator/step-registry/review-agent/process/review-agent-process-ref.metadata.json
- ci-operator/step-registry/review-agent/setup/OWNERS
- ci-operator/step-registry/review-agent/review-agent-workflow.yaml
- ci-operator/step-registry/review-agent/review-agent-workflow.metadata.json
- ci-operator/step-registry/review-agent/process/review-agent-process-ref.yaml
- ci-operator/step-registry/hypershift/review-agent/hypershift-review-agent-workflow.yaml
- ci-operator/step-registry/review-agent/ONBOARDING.md
- ci-operator/step-registry/review-agent/report/review-agent-report-commands.sh
- ci-operator/step-registry/review-agent/report/review-agent-report-ref.metadata.json
- ci-operator/step-registry/review-agent/setup/review-agent-setup-ref.yaml
- ci-operator/step-registry/review-agent/README.md
- ci-operator/step-registry/hypershift/review-agent/README.md
- ci-operator/step-registry/review-agent/process/review-agent-process-commands.sh
| documentation: |- | ||
| Generates an HTML report from the review-agent processing output. | ||
| Parses stream-json output from Claude and produces a readable report | ||
| in ${ARTIFACT_DIR} with token usage, cost estimates, tool calls, and errors. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the report-step description.
The report script consumes artifacts extracted by the processing step; it does not parse Claude stream-json directly. Update the documentation to describe the actual contract.
Proposed wording
documentation: |-
Generates an HTML report from the review-agent processing output.
- Parses stream-json output from Claude and produces a readable report
+ Consumes extracted review-agent artifacts and produces a readable report
in ${ARTIFACT_DIR} with token usage, cost estimates, tool calls, and errors.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| documentation: |- | |
| Generates an HTML report from the review-agent processing output. | |
| Parses stream-json output from Claude and produces a readable report | |
| in ${ARTIFACT_DIR} with token usage, cost estimates, tool calls, and errors. | |
| documentation: |- | |
| Generates an HTML report from the review-agent processing output. | |
| Consumes extracted review-agent artifacts and produces a readable report | |
| in ${ARTIFACT_DIR} with token usage, cost estimates, tool calls, and errors. |
🤖 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/review-agent/report/review-agent-report-ref.yaml`
around lines 15 - 18, Update the report step’s documentation description to
state that the script consumes artifacts produced by the review-agent processing
step and generates the HTML report from those artifacts, removing the inaccurate
claim that it directly parses Claude stream-json output.
Extract the hypershift/review-agent setup/process/report steps into a generic review-agent/ step registry that any OpenShift team can consume by creating a thin wrapper workflow with two env vars. CNTRLPLANE-3853 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d41d06b to
21fff61
Compare
|
[REHEARSALNOTIFIER]
Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
@bryan-cox: 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 |
|
@bryan-cox: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
Summary
hypershift/review-agentsetup/process/report steps into a genericreview-agent/step registry that any OpenShift team can consumehypershift-review-agentworkflow into a thin wrapper that sets two env vars (REVIEW_AGENT_FORK_REPO,REVIEW_AGENT_UPSTREAM_REPO) and delegates to the generic stepsONBOARDING.mdwith step-by-step instructions for new teams, including credential handling via thin ref YAML wrappersjira-agent-github-app-authpre step instead of duplicating token generation logicrepofield to autodl telemetry schema for per-team filteringTest plan
hypershift-review-agentworkflow still references the correct generic stepsperiodic-review-agentCI job triggers the refactored workflowaddress-review-commentstrigger job is untouchedCNTRLPLANE-3853
🤖 Generated with Claude Code
Summary by CodeRabbit
review-agentworkflows and step references.address-review-commentstrigger.repofield.