Skip to content

Add Claude Code GitHub Workflow#3

Closed
MarkusNeusinger wants to merge 2 commits intomainfrom
add-claude-github-actions-1763670486168
Closed

Add Claude Code GitHub Workflow#3
MarkusNeusinger wants to merge 2 commits intomainfrom
add-claude-github-actions-1763670486168

Conversation

@MarkusNeusinger
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!

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Nov 20, 2025

Pull Request Review

Summary

This PR appears to contain empty commits with no actual code changes. The two commits in this PR ( and ) have commit messages suggesting workflow updates, but they don't modify any files.

Key Findings

🔴 Critical Issues

  1. Empty Commits: Both commits in this PR contain no changes:

    • Commit e24c832: "Update Claude PR Assistant workflow"
    • Commit 65089b7: "Update Claude Code Review workflow"

    The workflows mentioned (.github/workflows/claude.yml and .github/workflows/claude-code-review.yml) were already added in PR Add Claude Code GitHub Workflow #2.

  2. No Actual Changes: Running git diff between the base branch and this PR shows no file modifications, additions, or deletions.

Recommendations

  1. Close this PR: Since there are no changes, this PR should be closed.

  2. Investigate the cause: Determine why empty commits were created. This could be due to:

    • A failed automation/bot attempt to update the workflows
    • Manual commit creation without staging changes
    • A merge conflict resolution that resulted in no net changes
  3. If updates are needed: If the workflows actually need updating, create a new PR with the actual changes.

Questions for the Author

  • What was the intended purpose of these commits?
  • Were there supposed to be changes to the workflow files?
  • Can this PR be safely closed?

Verdict: This PR contains no changes and should likely be closed. If there were intended changes, please create a new PR with the actual modifications.

@MarkusNeusinger MarkusNeusinger deleted the add-claude-github-actions-1763670486168 branch November 24, 2025 12:59
MarkusNeusinger added a commit that referenced this pull request Dec 16, 2025
#1089)

Fixes #967

## Summary
- Update quality threshold documentation from 85 to 90
- Add CLI retry logic for intermittent failures
- Change issue lifecycle: spec-ready issues stay open until all
implementations complete

## Changes

### Documentation (Issue Finding #4)
Updates quality threshold from 85 to 90 in documentation to match actual
workflow configuration in `impl-review.yml`.

**Files:**
- CLAUDE.md
- README.md
- docs/workflow.md
- docs/concepts/claude-skill-plot-generation.md
- prompts/quality-evaluator.md

### CLI Retry Logic (Issue Finding #3)
Adds retry mechanism for Claude CLI steps to handle intermittent
"Executable not found in $PATH" errors. Each Claude step now has
`continue-on-error: true` and a retry step that runs if the first
attempt fails.

**Files:**
- .github/workflows/spec-create.yml
- .github/workflows/spec-update.yml
- .github/workflows/impl-generate.yml
- .github/workflows/impl-repair.yml
- .github/workflows/util-claude.yml

### Issue Lifecycle (Bonus)
- `spec-ready` issues now stay open until all 9 library implementations
are merged
- Changed `Closes #...` to `Related to #...` in spec PR body
- Added auto-close logic in `impl-merge.yml` when all
`impl:{library}:done` labels are present

**Files:**
- .github/workflows/spec-create.yml
- .github/workflows/impl-merge.yml

## Test Plan
- [ ] Verify documentation shows correct 90 threshold
- [ ] Trigger a workflow and verify retry works on CLI failure
- [ ] Create a test spec and verify issue stays open after merge
- [ ] Verify issue closes when all 9 libraries have
`impl:{library}:done`
MarkusNeusinger added a commit that referenced this pull request Dec 17, 2025
- Fix #1: Handle missing remote branches in impl-generate.yml
  - Check if branch exists before checkout to avoid 'not a commit' errors
  - Fall back to creating fresh branch from main if remote doesn't exist

- Fix #2: Clean up duplicate labels on failure
  - Remove both 'generate:X' and 'impl:X:pending' when marking as failed
  - Prevents label accumulation (e.g., both pending and failed)

- Fix #3: Auto-close issues when done + failed = 9
  - Previously only closed when all 9 were 'done'
  - Now closes when total (done + failed) reaches 9
  - Shows which libraries failed in closing comment

- Fix #4: Track generation failures and auto-mark as failed
  - Count previous failed runs for same spec/library
  - After 3 failures, mark as 'impl:X:failed' automatically
  - Posts failure comment explaining the library may not support this plot type
MarkusNeusinger added a commit that referenced this pull request Dec 17, 2025
…1308)

## Summary

Fixes several workflow issues discovered during batch processing of
spec-ready issues.

### Fix #1: Branch-Not-Found Errors
**Problem:** `fatal: 'origin/implementation/{spec}/{library}' is not a
commit` errors when workflow tries to checkout a non-existent remote
branch.

**Solution:** Check if remote branch exists before checkout, fall back
to creating fresh branch from main.

### Fix #2: Duplicate Labels
**Problem:** Issues accumulate both `impl:X:pending` and `impl:X:failed`
labels when generation fails.

**Solution:** Failure handler removes both `generate:X` and
`impl:X:pending` when marking as failed.

### Fix #3: Auto-Close with Failures
**Problem:** Issues with 8 done + 1 failed stay OPEN because auto-close
only triggers on 9 done.

**Solution:** Close when `done + failed = 9`, with appropriate summary
(shows which libraries failed).

### Fix #4: Generation Failure Tracking
**Problem:** When `impl-generate` fails (no plot.png), no PR is created
→ no review → no repair → library stays `pending` forever.

**Solution:** Track generation failures and mark as `impl:X:failed`
after 3 consecutive failures. Posts comment explaining the library may
not support this plot type.

## Files Changed
- `.github/workflows/impl-generate.yml` - Fixes #1, #2, #4
- `.github/workflows/impl-merge.yml` - Fix #3

## Testing
- YAML syntax validated
- Logic reviewed against observed failure patterns
MarkusNeusinger added a commit that referenced this pull request Jan 26, 2026
Critical fixes:
- Fix TypeError: flatten tag dict to list for repository call (#6)
  Changed search_by_tags to receive list[str] instead of dict[str, list[str]]
  Repository expects flat list of tag values, not nested dict

- Add missing dataprep and styling parameters (#1, #7)
  Added to search_specs_by_tags function signature and docstring
  These categories were documented but not implemented

- Add filter logic for dataprep and styling (#2)
  Implemented filtering checks similar to other impl-level tags
  Ensures new parameters actually filter results

- Update condition to include dataprep and styling (#3)
  Modified impl-level filtering condition on line 117
  Now checks all 6 impl-level tag categories

Improvements:
- Add database error handling with helpful messages (#8)
  Check is_db_configured() before all database operations
  Provides clear error message if DATABASE_URL not set

- Update test mocks to match fixed interface (#5)
  Tests now verify flattened tag list instead of dict
  Added new test for dataprep/styling filter parameters
  Mock is_db_configured to return True in test fixture

Verification:
- All 16 unit tests passing
- Ruff linting and formatting applied
- No routing conflicts (#4 verified - no /mcp routes in routers)

Related: PR #4132, Issue #4129
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