Skip to content

fix: retry and surface check-run creation so required checks post#194

Merged
maximn merged 1 commit into
mainfrom
maximn/check-run-cache-race-blocks-prs
Jul 6, 2026
Merged

fix: retry and surface check-run creation so required checks post#194
maximn merged 1 commit into
mainfrom
maximn/check-run-cache-race-blocks-prs

Conversation

@maximn

@maximn maximn commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

createCheckRun made a single octokit.rest.checks.create call with no retry and no logging, so under concurrent test jobs it could fail or be dropped for some jobs and silently leave a required check-name check run unposted, blocking the PR forever with no signal. This makes check-run posting resilient and observable while still never failing the consumer's CI.

Changes

  • Retry checks.create with jittered exponential backoff (honoring retry-after) on transient 429 / 5xx / rate-limit-403 / network errors; still fail fast on permission 403, 404, 422.
  • Log a success line (Created check run "<name>" (id=…, conclusion=…)) so the outcome is finally visible.
  • On exhausted retries, escalate from silent to core.error plus a job-summary note — while still never calling setFailed (exit 0 preserved). Documented the single deliberate core.error exception in .agents/observability.md.

Test plan

  • pnpm test (745 passing, incl. new retry / rate-limit / exhausted-retry / success-log / never-setFailed cases)
  • pnpm typecheck, pnpm lint, pnpm format:check, pnpm build

createCheckRun made a single octokit.rest.checks.create call with no retry
and no logging, so under concurrent jobs it could fail/drop for some jobs and
silently leave a required check unposted, blocking the PR forever.

- Retry checks.create with jittered backoff on 429/5xx/rate-limit/network
  errors; still fail fast on permission 403, 404, 422.
- Log a success line (id + conclusion) so the outcome is visible.
- On exhausted retries escalate to core.error + a job-summary note, while
  still never calling setFailed (exit 0 preserved).
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

🔬 TestGlance

✅ 745 passed across 1 job — 100.0% · ⏱️ 3.3s

Job Result Pass rate Duration Health
test 745/745 · 100.0% 3.3s 95 Run · Report
🟡 test — details

✅ 745 passed
████████████████ 100.0%
⏱️ 3.3s · 🏥 95/100

Signal Details
🔵 Health Score: 95 → 95

vs main

Metric main PR Delta
Pass rate 100.0% 100.0% +0.0%
Duration 2.9s 3.3s +13.2%

View Run → · 📄 HTML Report


Updated 2026-07-06T19:43:39.513Z

@maximn maximn merged commit 9ddf725 into main Jul 6, 2026
7 checks passed
@maximn maximn deleted the maximn/check-run-cache-race-blocks-prs branch July 6, 2026 19:55
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.

1 participant