Skip to content

fix: surface CI ingest failures in the PR comment#165

Merged
veksen merged 1 commit into
mainfrom
fix-surface-ci-ingest-failure
Jul 4, 2026
Merged

fix: surface CI ingest failures in the PR comment#165
veksen merged 1 commit into
mainfrom
fix-surface-ci-ingest-failure

Conversation

@veksen

@veksen veksen commented Jul 4, 2026

Copy link
Copy Markdown
Member

When POST /ci/runs fails, the run is computed but never saved — previously that produced a degraded PR comment that looked like a normal empty result plus a green check, so the failure silently vanished. This branch surfaces the failure prominently and tailors both the comment copy and the Actions severity to the cause:

  • auth (401/403) — the project token is missing/invalid; CI isn't really running. Fails loudly (setFailed).
  • transient (network/timeout/5xx) — recoverable; warns and suggests a re-run.
  • too_large (413) — the payload exceeded the API's size limit. Distinct from rejected: it's a size issue, not contract skew, so the "out of sync" copy would be wrong. Re-running won't help.
  • rejected (other 4xx) — the API refused a computed run (likely analyzer/API contract skew); our bug, non-blocking unless FAIL_ON_INGEST_ERROR.

The raw error body is echoed (truncated) into a Details block in the comment. Tests cover the classifier and each rendered banner.

Pairs with Query-Doctor/Site #3488 (raise the ingest body limit to 10mb) and #3489 (return a typed payload_too_large 413).

🤖 Generated with Claude Code

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Query Doctor Analysis

3 queries analyzed

0 regressed · 0 improved · 0 new · 0 removed

2 pre-existing issues

Using assumed statistics (10000000 rows/table). For better results, sync production stats.

More detail → get_ci_run({ runId: "019f2d4e-eda2-7a47-8093-6411a072db60" }) · view run · docs

…ync"

A 413 was classified as `rejected`, so the PR comment blamed analyzer/API
skew ("out of sync") for what is really a payload-size limit. Add a distinct
`too_large` kind (status 413) with accurate copy in the comment and the Actions
log; the raw error body is still shown in the Details block.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@veksen veksen force-pushed the fix-surface-ci-ingest-failure branch from aefdd82 to 789da3c Compare July 4, 2026 13:25
@veksen veksen merged commit 5c77186 into main Jul 4, 2026
6 checks passed
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