Repository navigation
Tolerate a Per-Field workflowRun Error in the Check Query - #2355
Conversation
A token without Actions read access can fail the workflowRun field alone. gh_graphql now reads the response gh emits on a non-zero exit and tolerates an error set made only of workflowRun paths, so the dedupe falls back to the app slug. Any other error still aborts the digest. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With the workflowRun error tolerated, every Actions suite keyed by app slug and same-named jobs of two workflows collapsed into one group, hiding a failure. The degraded state now travels from gh_graphql to check_nodes, which keys by suite id so every run stays visible, and the digest names it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Only Actions runs lose their workflow key, so a third-party app rerun keeps deduping by app slug. The digest note and docstrings state the current rule, and tolerated errors with null data now have a test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2355 +/- ##
===========================================
+ Coverage 57.70% 57.86% +0.15%
===========================================
Files 16 16
Lines 7919 7944 +25
===========================================
+ Hits 4570 4597 +27
+ Misses 3349 3347 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Only a minor documentation nit remains, with no approval-blocking issues identified.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
This pull request makes GraphQL check retrieval resilient to per-field workflowRun errors while preserving conservative deduplication.
Changes:
- Tolerates only workflow-specific GraphQL errors and marks degraded responses.
- Uses suite-based deduplication for affected Actions checks.
- Adds coverage for tolerated, rejected, and deduplication scenarios.
| File | Summary |
|---|---|
tests/test_pr_review.py |
Adds transport, failure-path, and degraded deduplication tests. |
scripts/pr_review.py |
Implements tolerant GraphQL handling, degraded propagation, diagnostics, and suite-based fallback. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd Review Digest Tolerance (#2360) ## Summary Promotes `develop` to `main` with four pull requests, each already reviewed and merged into `develop`: - [#2352](#2352) asserts that `hub-fetch-run.py`'s fallback fetch uses the `main` path. - [#2355](#2355) tolerates a per-field `workflowRun` error in `pr_review.py`, keying unreadable Actions runs per suite so no failure is hidden. - [#2356](#2356) reads the `comments` label live in the validate task's lint job rather than off the event payload, on public repositories, with private repositories following in #2354. - [#2359](#2359) reads composite-action files through PyYAML under `uvx`, in isolated mode, where PyYAML is not importable, replacing the unprovisioned `yq` fallback. Closes #2339 Closes #2338 Closes #1703 Closes #2348 🤖 Generated with [Claude Code](https://claude.com/claude-code)


Summary
gh_graphqlreads the JSONgh api graphqlleaves on stdout when it exits non-zero, and tolerates an error set made only of errors whosepathends inworkflowRun. Any other error, an empty or missing path, a non-zero exit with no JSON errors, or nulldatastill aborts the digest.check_nodes, which then keys each Actions run by its own suite and drops none, and the digest says so (CHECKS DEDUPED WITHOUT WORKFLOW KEYS). A warning goes to stderr.Deliberate deviation from #2338 "Done When"
The issue asked for the dedupe to fall back to the app slug. While degraded, that collapses same-named jobs of two workflows into one group and keeps only the highest suite id, which reads a failure as green. So Actions runs are keyed by suite instead (a superseded failure may show, which reads red rather than hiding a failing check), and other apps keep the app-slug key.
Not reproduced
The error path was never reproduced against a live token. The tolerance matches on
pathonly, with no error type filter. A denial reported onworkflowRun.workflowrather thanworkflowRunwould still abort, as before.Addresses #2338
🤖 Generated with Claude Code