Repository navigation
ci: add bestaxbot-reply — respond to trusted humans (reviews + @bestaxbot) - #252
Conversation
…xbot) Closes the gap where bestaxbot ignored human input: the convergence loop only ever engaged CodeRabbit/Claude/Copilot threads (first-author filter), so a human reviewer or an @bestaxbot mention got no response. New workflow bestaxbot-reply.yml responds as the bestaxbot machine account when a TRUSTED human either (a) submits a review on a bestaxbot-authored PR (no mention needed) or (b) writes @bestaxbot in a comment/review. It can answer, refute with reasoning, or push a small in-scope fix — like robobun does for Bun's maintainers. Security (public repo, external input) is two-layered: - Job requires sender.type==User + OWNER/MEMBER/COLLABORATOR association + the trigger condition, so a stranger typing @bestaxbot never starts the job (zero usage). - A live permission re-check step requires admin/maintain/write/triage, so a read-only collaborator can't trigger it either (matches claude-implement / on-slop). Kill switch: AI_LOOP_ENABLED=false. The triggering text is treated as UNTRUSTED data (no perms/rule changes, no protected paths). Fixes commit via the git CLI (SSH-signed Verified), replies use the gh-api thread-reply recipe, and show_full_output is on for diagnosis. bestaxbot never merges/closes/resolves — humans still rule. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVR5yWevceZEFbTJmpviiM
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughAdds a new GitHub Actions workflow that triggers on issue comments, PR review comments, and PR reviews. It gates execution with sender and collaborator checks, resolves whether a PR is same-repo, then runs ChangesBestaxbot Reply Workflow
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Preview DeploymentPreview URL: https://c72f9130.bestax.pages.dev |
There was a problem hiding this comment.
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/workflows/bestaxbot-reply.yml:
- Around line 40-53: Add a self-exclusion guard so `bestaxbot` cannot trigger
`bestaxbot-reply.yml` on its own activity. The current `if` on the workflow uses
`github.event.sender.type == 'User'`, but that still allows PAT-backed
`bestaxbot` events to re-enter on `pull_request_review`, `issue_comment`, and
`pull_request_review_comment`. Update the workflow condition to explicitly
exclude events where the sender/login is `bestaxbot`, keeping the existing
`AI_LOOP_ENABLED` and association checks intact.
🪄 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 Plus
Run ID: 819e074a-bae4-41dc-b13d-67ef14d59828
📒 Files selected for processing (1)
.github/workflows/bestaxbot-reply.yml
…share loop concurrency - Exclude bestaxbot itself as sender (User-type account is not filtered by sender.type=='User'), preventing a self-reply loop (CodeRabbit finding). - Add a Resolve context step computing CAN_FIX (head repo == this repo); reply-only on fork PRs and plain issues where there is no writable branch. - Share the loop's per-branch ai-loop-<head-ref> concurrency group for PR review events so a fix-pushing reply never races claude-pr-loop fix/verify. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NVR5yWevceZEFbTJmpviiM
Preview DeploymentPreview URL: https://13a85ef8.bestax.pages.dev |
|
🎉 This PR is included in version 5.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What
A new workflow,
bestaxbot-reply.yml, so bestaxbot answers trusted humans — closing the gap where the convergence loop only ever engaged CodeRabbit/Claude/Copilot threads (first-author filter) and ignored human reviewers and@bestaxbotmentions.It responds as the bestaxbot machine account when a trusted human:
@bestaxbotin a comment or review.It can answer, refute with reasoning, or push a small in-scope fix (git-CLI, SSH-Verified) — like robobun does for Bun's maintainers.
Security (public repo, external input) — two layers
if:pre-gate:sender.type == User+ association isOWNER/MEMBER/COLLABORATOR+ the trigger condition. A stranger typing@bestaxbotnever starts the job → zero Claude usage.gh api …/collaborators/SENDER/permissionmust beadmin/maintain/write/triage. So aCOLLABORATORwith only read access is still rejected. Same pattern asclaude-implement+on-slop.Kill switch:
AI_LOOP_ENABLED=false. The triggering text is treated as UNTRUSTED data — it can't grant permissions, change the rules, or touch protected paths (.github/**, jest/commitlint/release configs,pnpm-workspace.yaml,.npmrc,.coderabbit.yaml,turbo.json).Details
show_full_outputon for diagnosis.claude-opus-4-8, 60 turns; fix-agent allowlist +git fetch+gh issueverbs.Note
New
.githubworkflow → human-merged (the loop refuses.github/**). YAML validated. No behavior change to the existing loop.Generated by Claude Code
Summary by CodeRabbit