Skip to content

fix: resolve stale Amber Session check runs stuck in_progress#1255

Open
ambient-code[bot] wants to merge 1 commit intomainfrom
fix/amber-session-check-completion
Open

fix: resolve stale Amber Session check runs stuck in_progress#1255
ambient-code[bot] wants to merge 1 commit intomainfrom
fix/amber-session-check-completion

Conversation

@ambient-code
Copy link
Copy Markdown
Contributor

@ambient-code ambient-code bot commented Apr 8, 2026

Summary

  • Root cause: The batch-pr-fixer job created in_progress check runs when dispatching sessions but never updated them to completed when the session finished. Healthy PRs were skipped entirely without resolving their stale checks.
  • Adds update_check_run and resolve_stale_checks functions to the batch Python script
  • Resolves stale in_progress checks for healthy/skipped PRs on each batch cycle
  • Resolves stale checks before posting new ones when dispatching sessions
  • Polls pending sessions after dispatch (up to 30 min) and updates checks on completion
  • In the handle-comment job, updates existing in_progress checks instead of creating duplicates

Test plan

  • Trigger the batch job via workflow_dispatch and verify stale checks on healthy PRs are completed
  • Comment @ambient-code on a PR and verify the existing in_progress check is updated (not duplicated)
  • Verify a new session dispatched by the batch job has its check updated to success/failure after completion

Closes #1253


🤖 Ambient Session

…efinitely

The batch-pr-fixer job created in_progress check runs when dispatching
sessions but never updated them to completed when the session finished.
Healthy PRs were skipped entirely without resolving their stale checks.

Closes #1253

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ambient-code ambient-code bot added the ambient-code:managed PR managed by AI automation label Apr 8, 2026
@ambient-code
Copy link
Copy Markdown
Contributor Author

ambient-code bot commented Apr 8, 2026

This fixes the Amber Session check run staying in_progress indefinitely (#1253).

Root cause: The batch-pr-fixer job created in_progress check runs when dispatching sessions but had no mechanism to update them to completed when the session finished. Additionally, healthy PRs were skipped without resolving their stale checks.

What changed:

  1. Added update_check_run() — PATCHes an existing check run with the session's final status
  2. Added resolve_stale_checks() — finds all in_progress "Amber Session" checks on a PR's head commit and completes them based on the session phase
  3. Healthy/skipped PRs now get their stale checks resolved on each batch cycle
  4. After dispatching new sessions, polls for completion (up to 30 min) and updates checks
  5. The handle-comment job now updates existing in_progress checks instead of creating duplicates

🤖 Session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ambient-code:managed PR managed by AI automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Amber Fix in PR CI not working

0 participants