fix: surface CI ingest failures in the PR comment#165
Merged
Conversation
There was a problem hiding this comment.
Query Doctor Analysis
3 queries analyzed
0 regressed · 0 improved · 0 new · 0 removed
2 pre-existing issues
SELECT "guests"."id", "guests"."session_id", "guests"."username", "guests"."avatar_path", "guests"."color", "guests"."side", "guests"."audio_recording_path", "guests"."audio_recording_public", "gue...
indexassets(event_id, inserted_at desc)
cost 31,003,449 → 1,498 (100% reduction)SELECT * FROM guest_ip_addresses WHERE ip_address = '127.0.0.1';
indexguest_ip_addresses(ip_address)
cost 154,402 → 8 (100% reduction)
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>
aefdd82 to
789da3c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
POST /ci/runsfails, 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 fromrejected: 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 unlessFAIL_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_large413).🤖 Generated with Claude Code