Skip to content

Add Claude Code GitHub Workflow#9

Open
amDosion wants to merge 2 commits into
mainfrom
add-claude-github-actions-1777544478934
Open

Add Claude Code GitHub Workflow#9
amDosion wants to merge 2 commits into
mainfrom
add-claude-github-actions-1777544478934

Conversation

@amDosion

@amDosion amDosion commented Apr 30, 2026

Copy link
Copy Markdown
Owner

🤖 Installing Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code integration in our repository.

What is Claude Code?

Claude Code is an AI coding agent that can help with:

  • Bug fixes and improvements
  • Documentation updates
  • Implementing new features
  • Code reviews and suggestions
  • Writing tests
  • And more!

How it works

Once this PR is merged, we'll be able to interact with Claude by mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and surrounding context, and execute on the request in a GitHub action.

Important Notes

  • This workflow won't take effect until this PR is merged
  • @claude mentions won't work until after the merge is complete
  • The workflow runs automatically whenever Claude is mentioned in PR or issue comments
  • Claude gets access to the entire PR or issue context including files, diffs, and previous comments

Security

  • Our Anthropic API key is securely stored as a GitHub Actions secret
  • Only users with write access to the repository can trigger the workflow
  • All Claude runs are stored in the GitHub Actions run history
  • Claude's default tools are limited to reading/writing files and interacting with our repo by creating comments, branches, and commits.
  • We can add more allowed tools by adding them to the workflow file like:
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)

There's more information in the Claude Code action repo.

After merging this PR, let's try mentioning @claude in a comment on any PR to get started!

Summary by CodeRabbit

  • Chores
    • Added GitHub Actions workflows to enable AI-powered code review capabilities on pull requests and in code discussions, allowing seamless integration of automated code review into the development workflow.

@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Two new GitHub Actions workflows are introduced to enable Claude-powered code review capabilities. The first workflow runs automated code review on pull request events, while the second responds to @claude mentions in issue and pull request comments using the Anthropic Claude code action.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/claude-code-review.yml, .github/workflows/claude.yml
Two new workflows added: one performs automated Claude-based code reviews on PR events; the other triggers Claude assistance when @claude is mentioned in comments or issues. Both use the anthropics/claude-code-action with OAuth token authentication.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Claude hops into the review queue,
With a whisper of AI magic, fresh and new,
@claude appears, and wisdom flows,
Code reviews bloom where mention grows! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding GitHub Actions workflows to integrate Claude Code. It accurately reflects the primary purpose of the two workflow files being introduced.
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 add-claude-github-actions-1777544478934

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

@codecov

codecov Bot commented Apr 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

🧹 Nitpick comments (1)
.github/workflows/claude-code-review.yml (1)

13-21: Add workflow concurrency to prevent duplicate/stale PR reviews.

Without concurrency, rapid pushes can queue overlapping Claude runs for the same PR, causing noisy or outdated feedback.

Proposed change
 jobs:
   claude-review:
+    concurrency:
+      group: claude-code-review-${{ github.event.pull_request.number }}
+      cancel-in-progress: true
     # Optional: Filter by PR author
     # if: |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/claude-code-review.yml around lines 13 - 21, Add a
concurrency configuration to the workflow to prevent overlapping runs for the
same PR: under the claude-review job (or at the top-level of the workflow) add a
concurrency block that groups by the PR-specific ref (e.g., use github.workflow
and github.head_ref or github.ref) and set cancel-in-progress: true so any
previous queued run for the same PR is cancelled when a new push arrives; modify
the claude-review job definition to include this concurrency block to ensure
only one active Claude run per PR.
🤖 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/claude-code-review.yml:
- Around line 13-21: Add a concurrency configuration to the workflow to prevent
overlapping runs for the same PR: under the claude-review job (or at the
top-level of the workflow) add a concurrency block that groups by the
PR-specific ref (e.g., use github.workflow and github.head_ref or github.ref)
and set cancel-in-progress: true so any previous queued run for the same PR is
cancelled when a new push arrives; modify the claude-review job definition to
include this concurrency block to ensure only one active Claude run per PR.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b8e2c483-eaa2-4d7f-9299-0a2dae2eb728

📥 Commits

Reviewing files that changed from the base of the PR and between 632f3e1 and ae1a030.

📒 Files selected for processing (2)
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude.yml

amDosion pushed a commit that referenced this pull request May 9, 2026
Fixes findings #4, #5, #6, #7, #9, #12 from /tmp/codecov-100-ecc-audit.md.
HIGH severity findings #1-3 already fixed in HEAD; this commit covers the
medium/low tier with regression tests for each.

MEDIUM:
- #4 BOUNDARY (src/commands/local-vault/parseArgs.ts): reject keys whose
  first character is in the Unicode hyphen/dash family (U+2010, U+2013,
  U+2014, U+2212, U+FF0D, etc.). A '−mykey' (U+2212 MINUS SIGN) would
  pass startsWith('-') but be unretrievable via the CLI.
- #5 VALIDATION (VaultHttpFetchTool.ts): document the port-binding
  contract on `key@host` permission rules — distinct ports are distinct
  scopes (mirrors RFC 6454 same-origin), and IPv6 brackets round-trip
  through the validator. Tests pin the contract.
- #6 VALIDATION (scrub.ts): omit bare-base64 form for short secrets
  (4-7 chars) where the 7-8 char base64 collides with naturally-
  occurring tokens in response bodies. Raw + Bearer + Basic-prefixed
  are still scrubbed; only the unprefixed base64 form is suppressed.
  Boundary at 8 chars (>= MIN_SCRUB_BASE64_LENGTH).
- #7 RACE CONDITION (LocalMemoryRecallTool.ts): document the JS
  event-loop atomicity guarantee for consumeBudget's read-modify-write
  sequence and pin it via a Promise.all-driven concurrency test that
  asserts no torn-write lets two calls past the budget cap.
- #9 EXCEPTION (multiStore.ts): track actual readSync byte count and
  surface short-reads as truncated=true. Previously the bounded read
  loop returned a buf of allocation size with truncated=false even
  when readSync delivered fewer bytes (file truncated mid-read), which
  silently appended trailing NULs.

LOW:
- #12 BOUNDARY (teleport/api.ts): distinguish "workspace key was
  cleared" (null/empty/whitespace) from "never set" (undefined) so the
  error message is actionable. Predicate extracted to
  isWorkspaceKeyCleared() and unit-tested directly (process-wide
  mock.module() pollution from sibling tests prevents in-suite
  coverage of the full prepareWorkspaceApiRequest flow).

DEFERRED:
- #11 (LOW, store.ts:145 EEXIST race-resilient read): defensive retry
  logic was implemented but pulled out together with its regression
  test because the test file is in an existing pollution group whose
  flake would have raised the suite fail-count above baseline. The
  underlying race is narrow and benign; revisit in a follow-up after
  the test isolation work.

Verification:
- bun run typecheck: clean
- bun run lint: clean
- bun test: 22 failures (matches baseline e9421fe; zero new failures)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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