Skip to content

fix(ci): skip superseded workflow runs without PR bindings - #2814

Open
oliver-mee wants to merge 1 commit into
larksuite:mainfrom
oliver-mee:fix/semantic-review-stale-bindings
Open

oliver-mee wants to merge 1 commit into
larksuite:mainfrom
oliver-mee:fix/semantic-review-stale-bindings

Conversation

@oliver-mee

@oliver-mee oliver-mee commented Oct 14, 2026 •

Copy link
Copy Markdown

Summary

Skip superseded CI workflow runs when their PR bindings and historical commit associations are empty. The current fallback throws before reaching the stale-head check.

Changes

  • Retain the pull-list result and classify a unique matching source repository and branch with a different head as stale.
  • Exit before checkout or publication. Ambiguous or unidentified targets still fail closed, and current-head SHA and artifact checks remain unchanged.
  • Execute both workflow resolution scripts in behavioural regression tests and include them in make script-test.

Test Plan

  • make script-test: 181 tests passed, plus workflow shell checks.
  • Superseded-head regressions fail on unmodified upstream and pass with the fix.
  • Current-head resolution, closed stale targets, wrong repository identities, ambiguity and missing bindings covered.
  • CLI manual verification: N/A, workflow-only change.

Related Issues

Fixes #2812


🤖 Generated with GPT-6.1 Sol
🧑‍💻 Ideated, directed and reviewed by a human, @oliver-mee

Summary by CodeRabbit

  • Bug Fixes
    • Pull request review workflows now recognize when a run corresponds to one matching pull request whose head has since changed. These runs are marked stale instead of failing with a missing-open-PR error.
    • If there is no unique matching pull request, workflows continue to report the existing error.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Oct 14, 2026
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b918cf28-54e3-40d6-8632-3bd0cec28206
Commits

Reviewing files that changed from the base of the PR and between 9ea0b36 and d203920.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

Both workflow resolution steps now retain the full pull-request list and use it to detect a unique superseded pull request when exact-head resolution finds no match. Tests cover stale-run handling and error cases for both steps.

Changes: Superseded run resolution

Layer / File(s) Summary
Resolve stale runs and validate behavior
.github/workflows/semantic-review.yml, scripts/semantic-review-stale-run.test.js, Makefile
Both workflow steps check the full pull-request list for a unique stale match when exact-head resolution fails. Tests cover current, superseded, closed, invalid, ambiguous, and unmatched cases. The script-test target runs the new tests.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: liangshuo-1

Merge Risk: Minimal · previous review 9ea0b

No actionable merge-blocking risk is identified; the change is ready for normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed

Check name Status Explanation
Description check Passed The description includes the required Summary, Changes, Test Plan, and Related Issues sections. It clearly explains the workflow change and reports the relevant tests. The CLI verification item is mar…
Title check Passed The title clearly and concisely describes the main change: skipping superseded CI workflow runs that lack PR bindings.
Linked Issues check Passed Issue #2812 requires stale-run detection when exact-head resolution has no match. Both workflow resolution scripts now retain the full pull-list result and accept only one candidate with the verified …
Out of Scope Changes check Passed The changes are limited to the two resolution scripts, their behavioral regression tests, and the make script-test registration. These changes directly support issue #2812 and do not add unrelated b…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)

Finishing Touches

🧪 Generate unit tests (beta)

  • Create a new PR
  • Autofix · 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

ℹ️ Recent review info

⚙️ Run configuration

  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8094ad01-00d1-4567-8247-77f140efe2b8
📥 Commits

Reviewing files that changed from the base of the PR and between ac81f50 and 9ea0b36.

📒 Files selected for processing: 3

  • .github/workflows/semantic-review.yml
  • Makefile
  • scripts/semantic-review-stale-run.test.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@github-actions

Copy link
Copy Markdown

PR Quality Summary

CI did not complete successfully. Use the failed check links below to decide whether this PR needs a code change or a rerun.

CI status

  • Workflow conclusion: failure.

@oliver-mee
oliver-mee force-pushed the fix/semantic-review-stale-bindings branch from 9ea0b36 to d203920 Compare November 16, 2026 10:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): skip superseded workflow runs with empty PR bindings

1 participant