Skip to content

Feat self healing prs#862

Open
abnegate wants to merge 8 commits intomainfrom
feat-self-healing-prs
Open

Feat self healing prs#862
abnegate wants to merge 8 commits intomainfrom
feat-self-healing-prs

Conversation

@abnegate
Copy link
Copy Markdown
Member

@abnegate abnegate commented Apr 23, 2026

Summary by CodeRabbit

Release Notes

  • Chores
    • Added automated code improvement workflow.
    • Updated CI/CD pipelines with pinned action versions for improved stability and consistency.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Warning

Rate limit exceeded

@abnegate has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 48 minutes and 10 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 10 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 937b62c0-1f61-49b6-9cd3-c939cf44c9b0

📥 Commits

Reviewing files that changed from the base of the PR and between 8f90ade and 157d127.

📒 Files selected for processing (1)
  • .github/workflows/claude.yml
📝 Walkthrough

Walkthrough

This pull request adds a new GitHub Actions workflow that invokes an external orchestrator for pull request automation and updates existing workflows to use pinned commit references for actions instead of floating version tags, improving reproducibility and security.

Changes

Cohort / File(s) Summary
New Claude Orchestrator Workflow
.github/workflows/claude.yml
Introduces a new workflow triggered on pull requests, reviews, comments, and test completion events that invokes the abnegate/claude-pr-owner orchestrator with improvement, healing, bot, and commenting features enabled.
Action Version Pinning
.github/workflows/codeql-analysis.yml, .github/workflows/linter.yml
Updates actions/checkout from v4 to pinned commit SHA v6.0.2 for deterministic action resolution.
Multiple Action Pinning
.github/workflows/tests.yml
Pins actions/checkout, actions/cache, docker/setup-buildx-action, and docker/build-push-action to specific commit SHAs across setup, unit_test, and adapter_test jobs instead of floating version references.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 New workflows hop into place,
Actions pinned with locked-in grace,
Orchestrators dance with pull requests in hand,
Reproducible builds across the land!
(•̀o•́)g

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Feat self healing prs' is vague and generic, using abbreviated terminology ('prs' for pull requests) that lacks clarity about the actual changes being introduced. Improve the title to be more descriptive and specific. Consider: 'Enable Claude AI workflow for automated PR improvements and self-healing' or 'Add Claude PR owner orchestrator workflow and pin GitHub Actions versions'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-self-healing-prs

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.

Copy link
Copy Markdown
Contributor

@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: 6

🧹 Nitpick comments (1)
.github/actions/classify-complexity/action.yml (1)

31-37: Piping curl | bash on every run is a supply-chain soft spot.

curl -fsSL https://claude.ai/install.sh | bash trusts whatever install.sh resolves to at the moment the action runs. On a self-hosted runner this is low severity (the runner is already trusted), but the command -v claude gate only protects runners where Claude is already installed; a fresh runner will execute the script sight-unseen. If you want to harden this, consider pinning to a known installer hash or preinstalling claude as part of the runner image and letting this step just fail fast if it's missing.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/actions/classify-complexity/action.yml around lines 31 - 37, The
"Install Claude CLI" step currently pipes curl | bash (curl -fsSL
https://claude.ai/install.sh | bash) which is a supply-chain risk; change the
step to either (A) download the installer to a file, verify a pinned
checksum/signature before executing, and only then run it, or (B) remove the
inline installer and make the step fail fast if command -v claude returns false
so the runner image must include claude; update the step around the existing
command check (command -v claude) and the install invocation to implement one of
these hardened approaches and reference the same step name ("Install Claude
CLI") and installer URL when adding the checksum/verification logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/actions/classify-complexity/action.yml:
- Around line 62-72: The jq extraction is querying the wrong key and silencing
errors: update the CLASSIFICATION extraction to read from RAW's structured
output (use .structured_output.classification // empty) instead of .result |
fromjson? | .classification, and stop discarding stderr so failures surface
(remove or redirect the 2>/dev/null suppression for the claude call and/or log
RAW when CLASSIFICATION is empty); locate the RAW assignment and the
CLASSIFICATION parsing lines to apply these changes (references: RAW variable,
CLASSIFICATION variable, the jq expression and the --json-schema/--output-format
json flags).

In @.github/workflows/claude-comments.yml:
- Around line 32-35: Summary: The checkout step uses actions/checkout@v6 without
a ref, so on issue_comment events it checks out the default branch instead of
the PR head. Fix: modify the "Checkout repository" step that uses
actions/checkout@v6 to explicitly fetch the PR head by adding a ref and full
fetch (e.g. ref: ${{ github.event.pull_request.head.ref || github.head_ref ||
github.sha }} and fetch-depth: 0) so the job sees PR files; this preserves
current classifier behavior but prevents future steps (like the classifier step)
from accidentally analyzing the default branch instead of the PR head.
- Around line 13-15: The concurrency group currently named with the pattern
claude-comments-${{ github.event.issue.number ||
github.event.pull_request.number }}-${{ github.event.comment.id ||
github.event.review.id || github.run_id }} doesn't coordinate with the other
workflows; update the concurrency.group to use the same claude-pr-<branch> key
the other two workflows use (i.e., align with the claude-pr-${{ head.ref /
workflow_run.head_branch }} convention used in claude-improvement.yml and
claude-healing.yml) or, at minimum, remove the per-comment unique id so the key
is per-PR (PR number or resolved head branch) to ensure serialization against
improvement/healing runs and against other comment-triggered runs.

In @.github/workflows/claude-healing.yml:
- Around line 48-53: The checkout step uses fetch-depth: 10 which can be too
shallow for the rebase flow; change the actions/checkout usage to use
fetch-depth: 0 (or remove the fetch-depth key) so the full history is fetched,
or alternatively add a pre-rebase step that runs git fetch --unshallow (or git
fetch --deepen) before the git fetch origin && git pull --rebase origin
$HEAD_BRANCH command to ensure a proper merge base; update the Checkout PR
branch action configuration (the actions/checkout@v6 step and its fetch-depth
setting) or add the unshallow fetch step accordingly.
- Around line 3-6: The workflow_run trigger is referencing workflows: [CI],
which doesn't exist so the trigger is inert; update the workflow_run definition
in the YAML (the on: workflow_run block) to use the actual upstream workflow
name (replace workflows: [CI] with workflows: [Tests] or the correct name such
as "Tests") so the workflow_run will match the upstream workflow's name field
and fire when that workflow completes.

In @.github/workflows/claude-improvement.yml:
- Around line 7-12: The comment mentioning the sibling workflow incorrectly
names it "claude-watcher"; update the comment in claude-improvement.yml (the
block around the concurrency: group using claude-pr-${{
github.event.pull_request.head.ref }}) to reference the actual sibling workflow
filename `claude-healing.yml` and/or its `name: "Claude CI Watcher"`, or
alternatively rename the sibling workflow to match the comment; ensure the text
and any other mentions (e.g., the prompt near Line 98) consistently use the same
filename/name so repo-wide greps and future maintainers are accurate.

---

Nitpick comments:
In @.github/actions/classify-complexity/action.yml:
- Around line 31-37: The "Install Claude CLI" step currently pipes curl | bash
(curl -fsSL https://claude.ai/install.sh | bash) which is a supply-chain risk;
change the step to either (A) download the installer to a file, verify a pinned
checksum/signature before executing, and only then run it, or (B) remove the
inline installer and make the step fail fast if command -v claude returns false
so the runner image must include claude; update the step around the existing
command check (command -v claude) and the install invocation to implement one of
these hardened approaches and reference the same step name ("Install Claude
CLI") and installer URL when adding the checksum/verification logic.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 36169d4f-dd21-412f-9111-4b457b03cd0d

📥 Commits

Reviewing files that changed from the base of the PR and between d765945 and 564ac1a.

📒 Files selected for processing (4)
  • .github/actions/classify-complexity/action.yml
  • .github/workflows/claude-comments.yml
  • .github/workflows/claude-healing.yml
  • .github/workflows/claude-improvement.yml

Comment thread .github/actions/classify-complexity/action.yml Outdated
Comment thread .github/workflows/claude-comments.yml Outdated
Comment thread .github/workflows/claude-comments.yml Outdated
Comment thread .github/workflows/claude-healing.yml Outdated
Comment thread .github/workflows/claude-healing.yml Outdated
Comment thread .github/workflows/claude-improvement.yml Outdated
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR adds a new claude.yml orchestrator workflow for automated self-healing and improvement, and hardens the existing CI/CD workflows by pinning all action references to specific commit SHAs. The SHA-pinning is good supply-chain hygiene, but the pinning commits also silently upgrade actions/checkout from v4 to v6.0.2 across all three existing workflows, mixing a version upgrade into what reads as a security hardening change.

Confidence Score: 4/5

Safe to merge after verifying actions/checkout v6 compatibility and confirming docker/build-push-action pin is not a regression.

The only new findings are P2: a bundled major-version upgrade (v4→v6) hidden inside a SHA-pinning PR, and a potential point-release downgrade for docker/build-push-action. The supply-chain concerns around claude.yml were flagged in prior review threads. No P0/P1 issues are introduced by the changes themselves.

.github/workflows/tests.yml — verify docker/build-push-action pin is not a regression and that actions/checkout v6 is compatible with all job steps.

Important Files Changed

Filename Overview
.github/workflows/claude.yml New workflow delegating to external reusable workflow at abnegate/claude-pr-owner@main (mutable ref) with broad write permissions — supply-chain risk already flagged in previous review threads.
.github/workflows/tests.yml SHA-pinned all actions; actions/checkout silently upgraded from v4 to v6.0.2 and docker/build-push-action pinned to v3.3.1 which may be older than where @v3 previously resolved.
.github/workflows/codeql-analysis.yml SHA-pins actions/checkout but upgrades from v4 to v6.0.2 in the process; otherwise straightforward change.
.github/workflows/linter.yml SHA-pins actions/checkout but upgrades from v4 to v6.0.2 in the process; otherwise straightforward change.

Reviews (5): Last reviewed commit: "(chore): retrigger Claude workflow" | Re-trigger Greptile

Comment thread .github/actions/classify-complexity/action.yml Outdated
Comment thread .github/workflows/claude-comments.yml Outdated
Comment thread .github/workflows/claude-comments.yml Outdated
Comment thread .github/workflows/claude-healing.yml Outdated
Comment thread .github/workflows/claude-improvement.yml Outdated
Comment thread .github/workflows/claude-healing.yml Outdated
Comment thread .github/workflows/claude.yml
Copy link
Copy Markdown
Contributor

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

🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)

25-25: docker/build-push-action@v3.3.1 is several majors behind.

v3.3.1 is from 2023; the action is now on v6/v7 with numerous BuildKit/cache fixes. Since this step uses cache-from: type=gha / cache-to: type=gha,mode=max, staying on v3 risks incompatibility with the current GHA cache service (same v1→v2 cache-service migration affecting actions/cache). Consider bumping to the latest v6.x and pinning its SHA. Same recommendation for docker/setup-buildx-action on line 22 if versions need to stay in sync.

What is the latest release tag and commit SHA for docker/build-push-action and docker/setup-buildx-action?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/tests.yml at line 25, The workflow pins
docker/build-push-action to an old commit
("docker/build-push-action@1104d471...") which is several major versions behind;
update the uses entry for docker/build-push-action to the latest v6.x release
tag and its corresponding commit SHA (pin the SHA instead of just the tag) and
likewise update docker/setup-buildx-action to the current vX release tag and SHA
so BuildKit/cache fixes are included; locate the two uses lines (the "uses:
docker/build-push-action@..." and "uses: docker/setup-buildx-action@..."
entries) and replace them with the latest stable v6 (for build-push-action) and
matching setup-buildx-action releases, ensuring cache-from/cache-to settings
remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/tests.yml:
- Line 25: The workflow pins docker/build-push-action to an old commit
("docker/build-push-action@1104d471...") which is several major versions behind;
update the uses entry for docker/build-push-action to the latest v6.x release
tag and its corresponding commit SHA (pin the SHA instead of just the tag) and
likewise update docker/setup-buildx-action to the current vX release tag and SHA
so BuildKit/cache fixes are included; locate the two uses lines (the "uses:
docker/build-push-action@..." and "uses: docker/setup-buildx-action@..."
entries) and replace them with the latest stable v6 (for build-push-action) and
matching setup-buildx-action releases, ensuring cache-from/cache-to settings
remain unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b074e1b0-871d-4813-86c7-8a5ec01688e3

📥 Commits

Reviewing files that changed from the base of the PR and between 564ac1a and 8f90ade.

📒 Files selected for processing (4)
  • .github/workflows/claude.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/linter.yml
  • .github/workflows/tests.yml
✅ Files skipped from review due to trivial changes (3)
  • .github/workflows/linter.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/claude.yml

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant