Skip to content

feat: add Spark SDK debug logging patch #1589

feat: add Spark SDK debug logging patch

feat: add Spark SDK debug logging patch #1589

Workflow file for this run

name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned, labeled]
pull_request_review:
types: [submitted]
jobs:
claude:
# --- Trigger filter ---
# Comments & reviews: @claude must be mentioned in the body
# Issues: @claude in title/body, assigned to "claude", or "claude" label added
if: >-
github.event_name == 'issue_comment'
&& contains(github.event.comment.body, '@claude')
||
github.event_name == 'pull_request_review_comment'
&& contains(github.event.comment.body, '@claude')
||
github.event_name == 'pull_request_review'
&& contains(github.event.review.body, '@claude')
||
github.event_name == 'issues' && (
contains(github.event.issue.title, '@claude')
|| contains(github.event.issue.body, '@claude')
|| github.event.action == 'assigned'
&& github.event.assignee.login == 'claude'
|| github.event.action == 'labeled'
&& github.event.label.name == 'claude'
)
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: claude-${{ github.event.issue.number || github.event.pull_request.number }}
cancel-in-progress: false
permissions:
contents: write # Push commits, create branches
pull-requests: write # Create/comment on PRs
issues: write # Create/comment on issues
actions: read # Read CI results
id-token: write # OIDC token for claude-code-action auth
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Setup Devenv
uses: ./.github/actions/setup-devenv
with:
frozen-lockfile: 'false'
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
use_commit_signing: true # Commits via GitHub API → "Verified" badge, no extra setup. Disallows rebase/cherry-pick (use ssh_signing_key for that).
assignee_trigger: claude
label_trigger: claude
allowed_non_write_users: ''
additional_permissions: |
actions: read
# Claude Code auto-loads CLAUDE.md (coding standards, commands, patterns).
# --append-system-prompt adds GitHub-specific context without replacing the
# default system prompt or affecting mode detection.
#
# Allowed Bash tools:
# Package mgmt: bun, bunx
# Version ctrl: git (scoped subcommands — no reset/clean/force)
# GitHub CLI: gh (PRs, issues, CI)
# File ops: cp, ls, mkdir, rm, mv
# Utilities: jq, which
claude_args: |
--model opus
--append-system-prompt "You are Claude, an AI developer running in GitHub Actions for the agicash repo. devenv is pre-loaded (bun, git, gh, jq, supabase CLI available).
## Communication style
- Match response length to complexity. Simple fix = short comment. Architectural change = explain the reasoning.
- No filler, no preamble, no restating the request. Get to the point.
- Always say what you did and why. Link relevant files/lines if helpful.
- If you can't do something, say what blocked you concisely.
## General rules
- Read CLAUDE.md and relevant code before making changes.
- Run bun run fix:all after editing TypeScript to catch errors early.
- NEVER install packages unless explicitly asked. When asked, use bun add --exact.
- Keep changes minimal and focused on what was requested.
## Behavior by context
**Issue (feature request or bug):**
- If requirements are ambiguous, ask clarifying questions as a comment — don't guess.
- Implement on a new branch, then open a PR linking the issue.
**PR review feedback:**
- Address every comment. If you disagree, explain why briefly.
- Push follow-up commits to the existing branch — don't open a new PR.
**PR with failing CI:**
- Read CI logs with the CI MCP tools (get_ci_status, download_job_log).
- Fix and push to the same branch. If stuck, comment what's wrong.
**General question or discussion:**
- Answer directly in a comment. Don't open PRs for questions.
## PR workflow
- Branch naming: claude/issue-NUMBER-short-description
- Commit messages: concise, imperative tense (e.g. 'fix balance calculation for zero-amount proofs')
- One logical change per commit when possible."
--allowedTools "Bash(bun *),Bash(bunx *),Bash(git add *),Bash(git commit *),Bash(git push *),Bash(git checkout *),Bash(git switch *),Bash(git branch *),Bash(git diff *),Bash(git log *),Bash(git status *),Bash(git fetch *),Bash(git merge *),Bash(git stash *),Bash(git rev-parse *),Bash(gh *),Bash(cp *),Bash(ls *),Bash(mkdir *),Bash(rm *),Bash(mv *),Bash(jq *),Bash(which *)"