Skip to content

feat(ztp): add ZTP policy diagnosis prompt#180

Draft
edcdavid wants to merge 1 commit intoopenshift:mainfrom
edcdavid:ztp-prompt-template
Draft

feat(ztp): add ZTP policy diagnosis prompt#180
edcdavid wants to merge 1 commit intoopenshift:mainfrom
edcdavid:ztp-prompt-template

Conversation

@edcdavid
Copy link

Summary

  • Adds a new ztp-policy-diagnose server prompt that automates diagnosis of NonCompliant ACM policies in ZTP GitOps environments
  • The prompt handler pre-fetches live cluster data (policy status, per-cluster compliance history, PlacementBinding/PlacementDecision details, and ArgoCD Application state) and assembles a multi-level investigation workflow
  • Includes pattern-matching heuristics for common ZTP failure modes: placement mismatches, oscillating compliance, immutable field rejections, hub template rendering failures, and deploy-wave ordering violations

Changes

  • pkg/toolsets/openshift/ztp/policy_diagnose.go — new file with prompt definition, data-fetching helpers, and investigation guide builder
  • pkg/toolsets/openshift/toolset.go — register ZTP prompts in the OpenShift toolset

Test plan

  • Verify prompt registration with ztp-policy-diagnose name
  • Test prompt handler with a NonCompliant ACM policy
  • Validate placement data and ArgoCD application fetching
  • Confirm investigation guide output includes all diagnostic levels

Add a new `ztp-policy-diagnose` server prompt that automates the
diagnosis of NonCompliant ACM policies in ZTP GitOps environments.

The prompt handler pre-fetches live cluster data (policy status,
per-cluster compliance history, PlacementBinding/PlacementDecision
details, and ArgoCD Application state) and assembles a multi-level
investigation workflow with pattern-matching heuristics for common
ZTP failure modes such as placement mismatches, oscillating compliance,
immutable field rejections, hub template rendering failures, and
deploy-wave ordering violations.

Changes:
- Create pkg/toolsets/openshift/ztp/policy_diagnose.go with the prompt
  definition, data-fetching helpers, and investigation guide builder
- Register ZTP prompts in the OpenShift toolset
- Bump vendored helm.sh/helm/v3 from v3.20.0 to v3.20.1
@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 Mar 17, 2026
@openshift-ci
Copy link

openshift-ci bot commented Mar 17, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • do-not-merge/work-in-progress

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bff4b2ab-eebe-4c60-b0a8-ed72f09b6b81

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@openshift-ci
Copy link

openshift-ci bot commented Mar 17, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: edcdavid
Once this PR has been reviewed and has the lgtm label, please assign matzew for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant