Skip to content

docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs)#641

Open
devppratik wants to merge 1 commit into
openshift:masterfrom
devppratik:add-claude-and-docs
Open

docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs)#641
devppratik wants to merge 1 commit into
openshift:masterfrom
devppratik:add-claude-and-docs

Conversation

@devppratik
Copy link
Copy Markdown
Contributor

@devppratik devppratik commented May 29, 2026

What type of PR is this?

docs/feature

What this PR does / why we need it?

  • This PR brings the docs up to Agentic SDLC contribution standard
  • It also adds .claude which includes standardized hooks, skills and agents

Changes

New Infrastructure:

  • .claude/agents/ - 5 specialized agents
  • .claude/hooks/ - Validation hooks
  • .claude/skills/prow-ci/ - Prow CI skill
  • .claude/settings.json - Permissions

Validation:

  • prek.toml + hack/prek.ci.toml
  • .gitleaks.toml - Secret scanning
  • hack/ci.sh - CI validation

Documentation:

  • CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md
  • CLAUDE.md - Preserved existing

References

Summary by CodeRabbit

  • Documentation

    • Added comprehensive contributor and development guides covering setup, workflows, testing, and CI processes.
    • Added specialized agent documentation for linting, testing, security scanning, documentation maintenance, and CI validation.
  • Chores

    • Configured automated pre-commit hooks for code quality and secret scanning.
    • Established validation and testing infrastructure with standardized output formats.
    • Set up gitleaks secret scanning with repository-specific allowlisting.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

Warning

Review limit reached

@devppratik, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 9 minutes and 15 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Enterprise

Run ID: 6638549a-3889-40a0-ad7f-ba8922e18ec3

📥 Commits

Reviewing files that changed from the base of the PR and between 4cc24f8 and de1bbc7.

📒 Files selected for processing (21)
  • .claude/agents/README.md
  • .claude/agents/ci-agent.md
  • .claude/agents/docs-agent.md
  • .claude/agents/lint-agent.md
  • .claude/agents/security-agent.md
  • .claude/agents/test-agent.md
  • .claude/hooks/README.md
  • .claude/hooks/cleanup.sh
  • .claude/hooks/pre-edit.sh
  • .claude/hooks/stop-prek-validation.sh
  • .claude/settings.json
  • .claude/skills/README.md
  • .claude/skills/prow-ci/SKILL.md
  • .gitleaks.toml
  • .prek-version
  • CONTRIBUTING.md
  • DEVELOPMENT.md
  • TESTING.md
  • hack/ci.sh
  • hack/prek.ci.toml
  • prek.toml

Walkthrough

This PR establishes comprehensive Claude Code infrastructure for the managed-upgrade-operator repository. It introduces five specialized agents (lint, test, security, docs, ci) with documented responsibilities and workflows, implements pre-commit hooks for file-edit validation and prek-based CI checks, and provides pre-commit validation configuration via gitleaks secret scanning and code quality tools. It also adds developer-facing documentation for contributing, development workflows, and testing approaches, along with a prow-ci skill for CI result analysis.

Changes

Claude Code Integration

Layer / File(s) Summary
Agent framework and design
.claude/agents/README.md
Core framework documents purpose, design principles, usage patterns (single/multi-agent/pre-commit/pre-PR), output formats, and extension guide for adding new agents. Establishes agent-to-agent communication conventions.
Lint and test agents
.claude/agents/lint-agent.md, .claude/agents/test-agent.md
Lint-agent specifies gofmt/golangci-lint workflow with auto-fix criteria and safe vs prohibited categories. Test-agent defines targeted Go test execution, failure analysis, fix strategies, coverage requirements, and performance targets.
Security and docs agents
.claude/agents/security-agent.md, .claude/agents/docs-agent.md
Security-agent covers gitleaks scanning, RBAC validation, code security patterns, dependency scanning, security policy rules, false-positive handling, and FIPS compliance checks. Docs-agent specifies documentation maintenance, auto-update triggers, validation checks, and style rules for keeping docs synchronized.
CI agent
.claude/agents/ci-agent.md
Defines Tekton pipeline validation, local/CI parity verification, failure investigation procedures, escalation conditions, performance targets, and CI security practices.
Hook implementation and settings
.claude/hooks/pre-edit.sh, .claude/hooks/stop-prek-validation.sh, .claude/hooks/cleanup.sh, .claude/settings.json, .claude/hooks/README.md
Pre-edit hook enforces file-edit safety (blocks generated/vendor files, warns on high-risk patterns, checks file size). Stop-prek-validation hook conditionally runs prek validation on session stop. Settings.json configures permissions and activates hooks. Hooks README documents architecture and setup.
Pre-commit validation configuration
prek.toml, hack/prek.ci.toml, hack/ci.sh, .gitleaks.toml, .prek-version
Prek.toml defines full pre-commit validation (builtin hygiene, Red Hat infosec, gitleaks, golangci-lint, local Go/RBAC checks). Hack/prek.ci.toml provides CI-compatible subset. Hack/ci.sh enforces prek installation and runs CI validation. .gitleaks.toml defines custom rules for OCM tokens, secrets, kubeconfig, and PEM keys with allowlists and stopwords. Prek-version pins v0.4.1.
Skills framework
.claude/skills/README.md, .claude/skills/prow-ci/SKILL.md
Skills README documents framework, invocation patterns, and component structure. Prow-ci skill provides access to OpenShift Prow CI dashboards, job history, troubleshooting, and integration with agents.

Developer Documentation

Layer / File(s) Summary
Contributing and development guide
CONTRIBUTING.md, DEVELOPMENT.md
CONTRIBUTING.md covers quick-start setup, pre-PR checks, development workflows for human and AI-assisted contributors, code style, testing standards, security restrictions, commit conventions, and license. DEVELOPMENT.md provides prerequisites, build/test/lint workflows, code generation, local/container execution, dependency management, architecture pointers, CI parity mapping, boilerplate integration, and troubleshooting.
Testing documentation
TESTING.md
Comprehensive testing guide covering frameworks (Ginkgo v2, Gomega, GoMock, envtest), quick commands, test structure and bootstrapping, mocking guidance, agent-driven validation, common patterns (controller testing, error cases, async Eventually), coverage generation, debugging flaky tests, CI expectations (Tekton constraints and parity), performance targets, and troubleshooting.

🎯 3 (Moderate) | ⏱️ ~25 minutes

documentation, infrastructure, lgtm


Important

Pre-merge checks failed

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

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error stop-prek-validation.sh captures gitleaks output including detected secret values and logs it in JSON response, exposing passwords, tokens, API keys found by security scanning. Filter PREK_OUTPUT to redact/exclude gitleaks secret detections before logging, or log only summary counts instead of full detection details with secret values.
Topology-Aware Scheduling Compatibility ⚠️ Warning PR adds deploy/operator.yaml with master node affinity and single replica, which breaks HyperShift (no control-plane nodes) and SNO/Two-Node topologies. Add topology-aware scheduling checks in operator manifest; use topology.kubernetes.io/zone for soft affinity or implement ControlPlaneTopology awareness for replica scaling.
✅ Passed checks (13 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 Only documentation/config files present. TESTING.md has 5 test examples with stable names like "should create deployment". No dynamic values found.
Test Structure And Quality ✅ Passed PR contains no Ginkgo test code (*_test.go files). Check applies only to PRs with test code changes; this PR is documentation and configuration only.
Microshift Test Compatibility ✅ Passed PR adds no new Ginkgo e2e tests—only documentation, configuration, and shell scripts for Claude integration. MicroShift test compatibility check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed This PR adds no new Ginkgo e2e tests. It contains documentation (TESTING.md is guidance only), configuration files, and shell scripts—not test code. SNO compatibility check does not apply.
Ote Binary Stdout Contract ✅ Passed PR contains only documentation, configuration files, and bash scripts; no Go code changes. OTE Binary Stdout Contract check applies only to Go test code and binaries.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR adds no Ginkgo e2e tests; only documentation, configuration files, and bash scripts. Check for IPv4/external connectivity issues in tests is not applicable.
No-Weak-Crypto ✅ Passed PR adds security policies explicitly forbidding weak crypto (MD5, SHA1, DES) with FIPS 140-2 requirements. No weak implementations, custom crypto, or insecure comparisons found.
Container-Privileges ✅ Passed PR contains only documentation, agent configs, hooks, and scripts—no Kubernetes manifests or Dockerfiles with container privilege settings.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title references the main objectives (SREP-4460, SREP-4926, Claude hooks/skill/agents/docs), but is moderately complex with multiple components combined by commas and semicolons.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot requested review from ravitri and rbhilare May 29, 2026 08:03
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: devppratik
Once this PR has been reviewed and has the lgtm label, please assign rafael-azevedo 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

@devppratik devppratik changed the title docs, feat(SREP-4460, SREP-4926): Add Standardized Claude hooks, skill, agents. Update standardised docs docs, feat(SREP-4460, SREP-4926: Add Standardized Claude hooks, skill, agents. Update standardised docs) May 29, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 29, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 29, 2026

@devppratik: This pull request references SREP-4460 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.

This pull request references SREP-4926 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 task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

docs/feature

What this PR does / why we need it?

  • This PR brings the docs up to Agentic SDLC contribution standard
  • It also adds .claude which includes standardized hooks, skills and agents

Changes

New Infrastructure:

  • .claude/agents/ - 5 specialized agents
  • .claude/hooks/ - Validation hooks
  • .claude/skills/prow-ci/ - Prow CI skill
  • .claude/settings.json - Permissions

Validation:

  • prek.toml + hack/prek.ci.toml
  • .gitleaks.toml - Secret scanning
  • hack/ci.sh - CI validation

Documentation:

  • CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md
  • CLAUDE.md - Preserved existing

References

Summary by CodeRabbit

  • Documentation

  • Added comprehensive contributor and development guides covering setup, workflows, testing, and CI processes.

  • Added specialized agent documentation for linting, testing, security scanning, documentation maintenance, and CI validation.

  • Chores

  • Configured automated pre-commit hooks for code quality and secret scanning.

  • Established validation and testing infrastructure with standardized output formats.

  • Set up gitleaks secret scanning with repository-specific allowlisting.

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🤖 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 @.claude/agents/docs-agent.md:
- Around line 188-198: The Markdown fenced block in .claude/agents/docs-agent.md
(the changelog-style block shown in the diff) is missing a language tag which
triggers MD040; update the opening fence to include a language (e.g., change ```
to ```text) so the block becomes a labeled code/fenced block; ensure the rest of
the block contents remain unchanged and the closing fence is intact.

In @.claude/hooks/stop-prek-validation.sh:
- Line 21: The script currently uses "set -uo pipefail" which omits the "-e"
flag; update the shell option invocation in the script so the options include -e
(i.e., change the "set -uo pipefail" invocation to include -e) so the hook exits
immediately on any failing command; ensure there are no duplicate or conflicting
set lines and keep the final invocation as "set -euo pipefail".

In @.claude/skills/prow-ci/SKILL.md:
- Line 138: Update the prose so the product name uses the official
capitalization: change the plaintext mention of `.github` in the sentence that
reads "Skip rules: Changes to `.tekton/`, `.github/`, `.md` files, `OWNERS`,
`LICENSE` don't trigger most jobs" to use "GitHub" (i.e., keep the `.github/`
path literal intact but replace the surrounding prose mention with "GitHub") in
SKILL.md; ensure only the human-readable product name is capitalized and path
literals/quotes are unchanged.

In @.claude/skills/README.md:
- Around line 66-72: The fenced code block in README.md (the tree listing under
.claude/skills/) lacks a language identifier and triggers markdownlint MD040;
update that fenced block (the ```...``` surrounding the .claude/skills/ tree in
README.md) to include a language tag such as "text" (e.g., change ``` to
```text) so the block is labeled and the lint error is resolved.

In @.gitleaks.toml:
- Around line 25-32: The current gitleaks allowlist includes a broad pattern
('''.*_test\.go''') that exempts all Go test files; remove that
'''.*_test\.go''' entry from .gitleaks.toml and instead keep only explicit
fixture/deploy paths (e.g., test/fixtures/.*, test/deploy/.*) and, if needed,
add narrowly scoped exceptions (specific filenames or commit hashes) for known
test fixtures; update any CI documentation to explain using targeted regexes or
commit-specific allowlists rather than a global *_test.go exemption to avoid
bypassing secret scanning for normal test code.
- Around line 12-18: Add an [extend] block to explicitly enable Gitleaks'
default rules by setting useDefault = true so the custom .gitleaks.toml doesn't
override baked-in rules; update the .gitleaks.toml (near the top, before or
after the [allowlist] block) to include an [extend] section with useDefault =
true to restore full rule coverage for scans.

In `@TESTING.md`:
- Around line 266-275: The README currently gives contradictory guidance about
the 'go-test' pre-commit hook: either remove the incorrect statement that "Tests
run automatically in pre-commit when Go files change" or remove the note saying
"This is NOT in current pre-commit config"; update the TESTING.md section to
state only the truth — if the 'go-test' hook (id: go-test) is not enabled, say
"go tests are NOT run by pre-commit; run them locally with `make go-test` before
pushing", otherwise state that pre-commit will run the 'go-test' hook and remove
the manual-run instruction; ensure the text references the 'go-test' hook id and
the Makefile target `make go-test` so contributors know how to run tests.
🪄 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: 03678a15-64a0-4e27-89f4-ecdc0316fcd6

📥 Commits

Reviewing files that changed from the base of the PR and between 35338f3 and 4cc24f8.

📒 Files selected for processing (21)
  • .claude/agents/README.md
  • .claude/agents/ci-agent.md
  • .claude/agents/docs-agent.md
  • .claude/agents/lint-agent.md
  • .claude/agents/security-agent.md
  • .claude/agents/test-agent.md
  • .claude/hooks/README.md
  • .claude/hooks/cleanup.sh
  • .claude/hooks/pre-edit.sh
  • .claude/hooks/stop-prek-validation.sh
  • .claude/settings.json
  • .claude/skills/README.md
  • .claude/skills/prow-ci/SKILL.md
  • .gitleaks.toml
  • .prek-version
  • CONTRIBUTING.md
  • DEVELOPMENT.md
  • TESTING.md
  • hack/ci.sh
  • hack/prek.ci.toml
  • prek.toml

Comment thread .claude/agents/docs-agent.md
# - Validates changed files only (5-10s typical)
# - Uses hack/prek.ci.toml (skips network-dependent hooks)
#
set -uo pipefail
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Missing -e flag in error handling setup.

All other scripts in this PR use set -euo pipefail, but this one uses set -uo pipefail (missing the -e flag). The -e flag ensures the script exits immediately on command failures, which is important for validation hooks to avoid incomplete checks.

🛡️ Proposed fix
-set -uo pipefail
+set -euo pipefail
📝 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.

Suggested change
set -uo pipefail
set -euo pipefail
🤖 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 @.claude/hooks/stop-prek-validation.sh at line 21, The script currently uses
"set -uo pipefail" which omits the "-e" flag; update the shell option invocation
in the script so the options include -e (i.e., change the "set -uo pipefail"
invocation to include -e) so the hook exits immediately on any failing command;
ensure there are no duplicate or conflicting set lines and keep the final
invocation as "set -euo pipefail".

- Configuration: `ci-operator/config/openshift/managed-upgrade-operator/openshift-managed-upgrade-operator-master.yaml`
- Runs: lint, test, validate, coverage, e2e-binary-build
- Uses Codecov for coverage reporting (secret: `managed-upgrade-operator-codecov-token`)
- Skip rules: Changes to `.tekton/`, `.github/`, `.md` files, `OWNERS`, `LICENSE` don't trigger most jobs
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use official “GitHub” capitalization in prose.

At Line 138, update .github mention in sentence text to “GitHub” for product-name consistency (keep path literals unchanged).

🧰 Tools
🪛 LanguageTool

[uncategorized] ~138-~138: The official name of this software platform is spelled with a capital “H”.
Context: ...) - Skip rules: Changes to .tekton/, .github/, .mdfiles,OWNERS, LICENSE` don...

(GITHUB)

🤖 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 @.claude/skills/prow-ci/SKILL.md at line 138, Update the prose so the product
name uses the official capitalization: change the plaintext mention of `.github`
in the sentence that reads "Skip rules: Changes to `.tekton/`, `.github/`, `.md`
files, `OWNERS`, `LICENSE` don't trigger most jobs" to use "GitHub" (i.e., keep
the `.github/` path literal intact but replace the surrounding prose mention
with "GitHub") in SKILL.md; ensure only the human-readable product name is
capitalized and path literals/quotes are unchanged.

Comment thread .claude/skills/README.md
Comment thread .gitleaks.toml Outdated
Comment on lines +12 to +18
title = "gitleaks config for OCM Agent Operator"

# =============================================================================
# GLOBAL ALLOWLIST
# =============================================================================

[allowlist]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

For current Gitleaks config syntax, when a repository defines a custom .gitleaks.tomlwith[[rules]]but no[extend]section, are the default rules still loaded automatically, or must the config set[extend] useDefault = true (or equivalent) to inherit them?

💡 Result:

When you provide a custom.gitleaks.toml configuration file, the default (baked-in) rules are not loaded automatically [1][2]. Gitleaks treats a custom configuration as a full replacement for the default ruleset unless you explicitly configure it to extend the default [1][2]. To inherit the default rules while adding your own, you must include an [extend] section in your.gitleaks.toml file and set useDefault = true [1][2][3]. Example configuration to inherit and extend: [extend] useDefault = true [[rules]] # Your custom rules go here id = "my-custom-rule"... If you omit the [extend] section or do not set useDefault = true, Gitleaks will only use the rules explicitly defined in your custom file [1][2]. When extending, rules defined in your custom file take precedence over default rules if there are naming collisions [1][4][5].

Citations:


Explicitly extend Gitleaks defaults ([extend] useDefault = true)

Custom .gitleaks.toml files don’t load the baked-in default rules automatically; without an [extend] block (e.g., useDefault = true), the scan will only run the four custom [[rules]], materially reducing coverage.

🔧 Suggested fix
 title = "gitleaks config for OCM Agent Operator"
+
+[extend]
+useDefault = true
 
 # =============================================================================
 # GLOBAL ALLOWLIST
🤖 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 @.gitleaks.toml around lines 12 - 18, Add an [extend] block to explicitly
enable Gitleaks' default rules by setting useDefault = true so the custom
.gitleaks.toml doesn't override baked-in rules; update the .gitleaks.toml (near
the top, before or after the [allowlist] block) to include an [extend] section
with useDefault = true to restore full rule coverage for scans.

Comment thread .gitleaks.toml
Comment on lines +25 to +32
paths = [
'''test/fixtures/.*''',
'''test/deploy/.*''',
'''.*_test\.go''',
'''boilerplate/.*''',
'''vendor/.*''',
'''zz_generated\..*\.go''',
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't exempt every Go test file from secret scanning.

Line 28 allowlists all *_test.go files, which turns off gitleaks for normal test code as well as fixtures. That makes it much easier to merge real tokens, kubeconfigs, or PEM material in tests. Prefer keeping the fixture paths and handling remaining false positives with narrow regex/commit allowlists instead.

🔧 Suggested fix
 paths = [
   '''test/fixtures/.*''',
   '''test/deploy/.*''',
-  '''.*_test\.go''',
   '''boilerplate/.*''',
   '''vendor/.*''',
   '''zz_generated\..*\.go''',
 ]

Based on learnings "Never commit API keys, tokens, passwords, AWS credentials, kubeconfig files, private keys, certificates, .env files with secrets, or debug statements printing sensitive data".

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

Suggested change
paths = [
'''test/fixtures/.*''',
'''test/deploy/.*''',
'''.*_test\.go''',
'''boilerplate/.*''',
'''vendor/.*''',
'''zz_generated\..*\.go''',
]
paths = [
'''test/fixtures/.*''',
'''test/deploy/.*''',
'''boilerplate/.*''',
'''vendor/.*''',
'''zz_generated\..*\.go''',
]
🤖 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 @.gitleaks.toml around lines 25 - 32, The current gitleaks allowlist includes
a broad pattern ('''.*_test\.go''') that exempts all Go test files; remove that
'''.*_test\.go''' entry from .gitleaks.toml and instead keep only explicit
fixture/deploy paths (e.g., test/fixtures/.*, test/deploy/.*) and, if needed,
add narrowly scoped exceptions (specific filenames or commit hashes) for known
test fixtures; update any CI documentation to explain using targeted regexes or
commit-specific allowlists rather than a global *_test.go exemption to avoid
bypassing secret scanning for normal test code.

Comment thread TESTING.md
Comment on lines +266 to +275
Tests run automatically in pre-commit when Go files change:
```yaml
- id: go-test
entry: make go-test
files: '\.go$'
```

This is NOT in current pre-commit config (too slow for pre-commit).
Run manually before pushing: `make go-test`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Resolve contradictory pre-commit test guidance.

This section states both that go-test runs automatically in pre-commit and that it is not in the current config. Please keep only one accurate statement to avoid false assumptions in contributor workflows.

🤖 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 `@TESTING.md` around lines 266 - 275, The README currently gives contradictory
guidance about the 'go-test' pre-commit hook: either remove the incorrect
statement that "Tests run automatically in pre-commit when Go files change" or
remove the note saying "This is NOT in current pre-commit config"; update the
TESTING.md section to state only the truth — if the 'go-test' hook (id: go-test)
is not enabled, say "go tests are NOT run by pre-commit; run them locally with
`make go-test` before pushing", otherwise state that pre-commit will run the
'go-test' hook and remove the manual-run instruction; ensure the text references
the 'go-test' hook id and the Makefile target `make go-test` so contributors
know how to run tests.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.27%. Comparing base (35338f3) to head (de1bbc7).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #641   +/-   ##
=======================================
  Coverage   54.27%   54.27%           
=======================================
  Files         123      123           
  Lines        6204     6204           
=======================================
  Hits         3367     3367           
  Misses       2631     2631           
  Partials      206      206           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@devppratik devppratik force-pushed the add-claude-and-docs branch 3 times, most recently from ee075a0 to 4492a9f Compare May 29, 2026 18:42
- Add .claude/ directory with agents, hooks, and skills
- Add prek validation framework (prek.toml, hack/prek.ci.toml)
- Add gitleaks secret scanning (.gitleaks.toml)
- Add CONTRIBUTING.md, DEVELOPMENT.md, TESTING.md
- Add CLAUDE.md (if not already present)
- Add stop hook for automatic validation

Based on ocm-agent-operator PR openshift#257 (SREP-4410, SREP-4411)

Brings the repo up to Agentic SDLC contribution standard
@devppratik devppratik force-pushed the add-claude-and-docs branch from 4492a9f to de1bbc7 Compare May 29, 2026 18:47
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 29, 2026

@devppratik: The following test 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/lint de1bbc7 link true /test lint

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

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.

3 participants