Skip to content

Tolerate a Per-Field workflowRun Error in the Check Query - #2355

Merged
ptr727 merged 5 commits into
developfrom
feature/2338-workflowrun-error
Oct 4, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/2338-workflowrun-error

Conversation

@ptr727

@ptr727 ptr727 commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • gh_graphql reads the JSON gh api graphql leaves on stdout when it exits non-zero, and tolerates an error set made only of errors whose path ends in workflowRun. Any other error, an empty or missing path, a non-zero exit with no JSON errors, or null data still aborts the digest.
  • A tolerated response carries a degraded marker to 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.
  • Tests cover a tolerated workflowRun-only error, a mixed or other-path error aborting, null data aborting, the same-named jobs of two workflows both tallying, and a third-party app rerun still deduping by app slug.

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 path only, with no error type filter. A denial reported on workflowRun.workflow rather than workflowRun would still abort, as before.

Addresses #2338

🤖 Generated with Claude Code

ptr727 and others added 4 commits October 4, 2026 10:45
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>
Copilot AI lite review requested due to automatic review settings October 4, 2026 18:07
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7909be36-93a1-451f-b73c-55acf47cba2b
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.86%. Comparing base (f63c3fb) to head (855a76b).
⚠️ Report is 1 commits behind head on develop.

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     
Flag Coverage Δ
python-3.13 57.86% <100.00%> (+0.15%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

Only a minor documentation nit remains, with no approval-blocking issues identified.

Review effort: Lite
Findings: 1 Low severity

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.

Comment thread tests/test_pr_review.py Outdated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

A critical degraded Actions deduplication issue remains unresolved.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Comment thread scripts/pr_review.py
@ptr727
ptr727 merged commit 8f00dd1 into develop Oct 4, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/2338-workflowrun-error branch October 4, 2026 18:38
ptr727 added a commit that referenced this pull request Oct 4, 2026
…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)
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.

2 participants