You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: post check runs on PRs with Amber session link (#1201)
<!-- acp:session_id=session-59da355d-1aa3-4de7-84ae-79ee7b5e2a5a
source=#1201 last_action=2026-04-06T17:48:08Z retry_count=0 -->
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
<!-- acp:session_id=session-59da355d-1aa3-4de7-84ae-79ee7b5e2a5a
source=#1201 last_action=2026-04-06T16:48:46Z retry_count=0 -->
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
<!-- acp:session_id=session-59da355d-1aa3-4de7-84ae-79ee7b5e2a5a
source=#1201 last_action=2026-04-06T16:47:48Z retry_count=1 -->
[git remote -v]
[git config --get-regexp ^remote\..*\.gh-resolved$]
<!-- acp:session_id=session-59da355d-1aa3-4de7-84ae-79ee7b5e2a5a
source=#1201 last_action=2026-04-06T16:19:50Z retry_count=1 -->
## Summary
When Amber works on a PR, post a GitHub check run so the session shows
up in the PR checks tab with a direct link to the session UI.
## Where it posts
- **`handle-comment` on PR**: After any `@ambient-code` comment triggers
a fix/custom session
- **`batch-pr-fixer`**: After each PR is processed in the 30 min cron
## What it shows
- **Check name**: "Amber Session"
- **Conclusion**: success (Completed/Running), failure (Error/Failed),
neutral (other)
- **Details URL**: Direct link to the session in Ambient UI
- **Summary**: Session name, phase, and prompt type
## Permissions
Added `checks: write` to workflow permissions.
## Test plan
- [ ] Comment `@ambient-code` on a PR — verify check appears in PR
checks tab
- [ ] Click "Details" on the check — verify it opens the session URL
- [ ] Batch cron processes a PR — verify check appears
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Posts an "Amber Session" status check on pull requests to show session
progress and outcome.
* Sends Slack notifications for circuit-breaker events when a webhook is
configured.
* **Behavior Changes**
* Automated corrections must be explicitly logged for each fix to
improve visibility.
* Retry-count and circuit-breaker handling moved into
session/frontmatter logic, triggering human review at the threshold.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Ambient Code Bot <bot@ambient-code.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: ambient-code[bot] <235912155+ambient-code[bot]@users.noreply.github.com>
The current retry_count is {current_retry}. Increment it by 1.
570
+
If retry_count reaches 3 or more, stop working, add `ambient-code:needs-human` label,
571
+
remove `ambient-code:managed` label, comment on the PR, and send a Slack notification.
572
+
5. Add the `ambient-code:managed` label.
573
+
6. Do not merge. Do not close. Do not force-push.
574
+
7. If fundamentally broken beyond repair, add a comment explaining and stop.
575
+
576
+
## Slack Notifications
577
+
578
+
When you need human attention — circuit breaker, stuck, or using AskUserQuestion — send:
579
+
580
+
curl -X POST -H 'Content-type: application/json' \\
581
+
--data '{{"text":"I need human attention\\n*PR*: https://github.com/{REPO}/pull/{number}\\n*Session*: '"$PLATFORM_HOST/projects/$AGENTIC_SESSION_NAMESPACE/sessions/$AGENTIC_SESSION_NAME"'\\n*Reason*: <brief reason>"}}' \\
0 commit comments