Skip to content

fix: correlate CI checks with the exact commit - #167

Open
tridev-tej wants to merge 5 commits into
Agent-Field:mainfrom
tridev-tej:tejesh/swe-af-159-ci-head-correlation
Open

tridev-tej wants to merge 5 commits into
Agent-Field:mainfrom
tridev-tej:tejesh/swe-af-159-ci-head-correlation

Conversation

@tridev-tej

Copy link
Copy Markdown

Summary

The watcher stops because gh pr checks rejects headSha. I switched it to commit-scoped GraphQL checks, preserved distinct check identities and followed fixer commits. Watcher payloads are validated before the fixer runs; ordinary failed/error envelopes return error at that boundary.

Validation

  • make check
  • Real GitHub watcher checked against passing and empty rollups.

Behavior Impact

  • Backward compatible behavior change

Notes

No migration. Closes #159.

@tridev-tej
tridev-tej requested a review from AbirAbbas as a code owner October 23, 2026 15:24
GitHub reports STARTUP_FAILURE when a workflow can't start. It was missing from the completed-conclusion buckets, so the watcher raised KeyError, returned status=error and never reached the fixer. Map it to fail like the other terminal failures; the new test drives a startup failure through the watcher to the fixer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ AbirAbbas
❌ tridev-tej
You have signed the CLA already but the status is still pending? Let us recheck it.

@AbirAbbas

Copy link
Copy Markdown
Collaborator

Thanks for fixing #159. The exact-commit watcher now handles head movement, missing vs pending checks, commit statuses, re-runs and pagination without accepting results from an older commit.

I pushed one small follow-up (55b43ce): STARTUP_FAILURE now counts as a failed check and reaches the fixer. Before, a workflow that couldn't start returned error and skipped the fixer. The new regression test fails on the original PR code and passes with the fix, 5 times each.

Validated the merge with main:

  • make check passed: 2,441 passed, 1 skipped.
  • Go formatting, build, vet and race tests passed.
  • Focused tests passed 5 times each on the merged tree, the working tree and the main baseline.
  • All 11 fake-API scenarios (older-commit checks, pending, re-runs, legacy statuses, startup failure, 101 checks across two pages) matched their expected outcomes in 5 runs.

This is ready to merge once the CLA is signed.

@AbirAbbas AbirAbbas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 55b43ce. Validation is in the comment above; merge once the CLA is signed.

This branch has not been deployed

No deployments
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.

Python CI gate: gh pr checks --json ...,headSha always fails ("Unknown JSON field"), so every watch returns status="error"

3 participants