Skip to content

OSAC-2136: trigger design review on README.md and case-insensitive filenames - #101

Merged
openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
ItzikEzra-rh:feat/OSAC-2136-design-readme-detection
Jul 7, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
ItzikEzra-rh:feat/OSAC-2136-design-readme-detection

Conversation

@ItzikEzra-rh

@ItzikEzra-rh ItzikEzra-rh commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The enhancement template tells authors to name design docs README.md, but the EP Review Action only triggered on lowercase design.md
  • 21 out of 25 design docs in the repo use README.md — all invisible to the review system
  • Now handles Design.md, DESIGN.md, and README.md inside enhancements/ directories
  • Made detect_skills case-insensitive for prd.md and design.md

Test plan

  • Tested on fork: PR Add Baremetal Observability Enhancement #10 with README.md change triggered design review, posted ## AI Design Review: comment with design scores
  • enhancements/ scoping prevents triggering on root README.md

Test evidence

ItzikEzra-rh#10

Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • PR review detection now recognizes more documentation file name variants, including additional capitalization patterns.
    • Reviews also trigger for README files in enhancement-related folders.
  • Bug Fixes

    • Improved consistency in file detection so relevant documentation changes are less likely to be missed.

…lenames

The enhancement template tells authors to name design docs README.md,
but the EP Review Action only triggered on lowercase design.md. Now
handles Design.md, DESIGN.md, and README.md inside enhancements/.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci-robot

openshift-ci-robot commented Jul 7, 2026 •

Copy link
Copy Markdown

@ItzikEzra-rh: This pull request references OSAC-2136 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:

Summary

  • The enhancement template tells authors to name design docs README.md, but the EP Review Action only triggered on lowercase design.md
  • 21 out of 25 design docs in the repo use README.md — all invisible to the review system
  • Now handles Design.md, DESIGN.md, and README.md inside enhancements/ directories
  • Made detect_skills case-insensitive for prd.md and design.md

Test plan

  • Tested on fork: PR Add Baremetal Observability Enhancement #10 with README.md change triggered design review, posted ## AI Design Review: comment with design scores
  • enhancements/ scoping prevents triggering on root README.md

Test evidence

ItzikEzra-rh#10

Generated with Claude Code

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 requested review from avishayt and eliorerz July 7, 2026 07:58
@coderabbitai

coderabbitai Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Modified detect_skills() to perform case-insensitive matching for prd.md/design.md files and added detection of readme.md under enhancements/ as a design trigger. Updated the ep-review workflow's path filters to include DESIGN.md, Design.md, and enhancements/**/README.md.

Changes

EP Document Detection Expansion

Layer / File(s) Summary
Case-insensitive skill detection
.github/scripts/ep_review.py
detect_skills() now lowercases filenames for matching and treats readme.md under enhancements/ as an additional design trigger, alongside existing prd.md/design.md matches.
Workflow trigger path filters
.github/workflows/ep-review.yml
Added **/DESIGN.md, **/Design.md, and enhancements/**/README.md to the pull request target path filters so EP reviews trigger on these variants.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Related Issues: Not specified in the provided context.

Related PRs: Not specified in the provided context.

Suggested labels: ci, documentation

Suggested reviewers: Not specified in the provided context.

Poem

A rabbit hopped through paths anew,
DESIGN, Design, README too,
Case no longer trips the switch,
Detection now without a hitch,
Hooray, the docs all trigger true! 🐰

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning AI use is mentioned, but the commit only has a Co-Authored-By trailer and no Assisted-by/Generated-by Red Hat attribution. Replace the AI co-author line with a Red Hat Assisted-by or Generated-by trailer in the commit/PR metadata.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: triggering design review on README.md and case-insensitive filenames.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
No-Hardcoded-Secrets ✅ Passed No hardcoded secrets were added; the workflow only references GitHub Secrets and the Python change contains no credential literals.
No-Weak-Crypto ✅ Passed PASS: the diff only changes filename/path matching; no MD5/SHA1/DES/RC4/ECB/custom crypto or secret-comparison code was added.
No-Injection-Vectors ✅ Passed No introduced SQL/shell/eval/pickle/yaml/innerHTML sinks; subprocess is arg-list based and jq use is fixed-filter extraction.
Container-Privileges ✅ Passed Changed files are a Python script and GitHub Actions workflow; no container/K8s manifests or privileged settings found.
No-Sensitive-Data-In-Logs ✅ Passed The patch only changes path detection; it adds no new logging of secrets, PII, tokens, hostnames, or customer data.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 @.github/scripts/ep_review.py:
- Around line 45-50: The design-review detection in ep_review.py is using a
broad substring check for "enhancements/" that can match unrelated paths; update
the has_design logic to anchor the check to a real path segment instead of any
substring so only files actually under an enhancements directory qualify. Use
the existing files iteration in the has_design expression and adjust the path
test on f.lower() accordingly, keeping the design.md/readme.md detection
behavior otherwise unchanged.
🪄 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: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 52d4ca2c-7eae-4c3c-8837-9763b0f91bcf

📥 Commits

Reviewing files that changed from the base of the PR and between b19c0fd and 7fea78d.

📒 Files selected for processing (2)
  • .github/scripts/ep_review.py
  • .github/workflows/ep-review.yml

Comment on lines +45 to +50
has_prd = any(f.lower().endswith("prd.md") for f in files)
has_design = any(
f.lower().endswith("design.md") or
(f.lower().endswith("readme.md") and "enhancements/" in f.lower())
for f in files
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔵 Trivial | 💤 Low value

Substring match on "enhancements/" can false-positive.

"enhancements/" in f.lower() matches any path containing that substring, not just files under an enhancements/ directory — e.g. foo-enhancements/README.md would incorrectly trigger design review, since "foo-enhancements/" contains "enhancements/" as a substring.

♻️ Anchor to path segment instead of substring
     has_design = any(
         f.lower().endswith("design.md") or
-        (f.lower().endswith("readme.md") and "enhancements/" in f.lower())
+        (f.lower().endswith("readme.md") and (
+            f.lower().startswith("enhancements/") or "/enhancements/" in f.lower()
+        ))
         for f in files
     )
📝 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
has_prd = any(f.lower().endswith("prd.md") for f in files)
has_design = any(
f.lower().endswith("design.md") or
(f.lower().endswith("readme.md") and "enhancements/" in f.lower())
for f in files
)
has_prd = any(f.lower().endswith("prd.md") for f in files)
has_design = any(
f.lower().endswith("design.md") or
(f.lower().endswith("readme.md") and (
f.lower().startswith("enhancements/") or "/enhancements/" in f.lower()
))
for f in files
)
🤖 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 @.github/scripts/ep_review.py around lines 45 - 50, The design-review
detection in ep_review.py is using a broad substring check for "enhancements/"
that can match unrelated paths; update the has_design logic to anchor the check
to a real path segment instead of any substring so only files actually under an
enhancements directory qualify. Use the existing files iteration in the
has_design expression and adjust the path test on f.lower() accordingly, keeping
the design.md/readme.md detection behavior otherwise unchanged.

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

/lgtm

@eranco74

eranco74 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eranco74, ItzikEzra-rh

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 label Jul 7, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit b3f175c into osac-project:main Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants