Skip to content

fix(ci): queue pending PR review reconciliation runs - #1717

Closed
PierrunoYT wants to merge 4 commits into
Zoo-Code-Org:mainfrom
PierrunoYT:fix/pr-review-reconciliation-queue
Closed

PierrunoYT wants to merge 4 commits into
Zoo-Code-Org:mainfrom
PierrunoYT:fix/pr-review-reconciliation-queue

Conversation

@PierrunoYT

Copy link
Copy Markdown
Contributor

Summary

  • Set the review-state workflow concurrency queue to max so new events do not replace an existing pending reconciliation run.
  • Keep repository-wide serialization to prevent overlapping PR-event and scheduled-sweep writes.
  • Add a regression assertion for the concurrency configuration.

Fixes #1707.

Validation

  • Workflow Vitest suite: 129 tests passed.
  • Repository lint and type-check hooks passed.
  • Working tree clean; pushed commit verified against the remote.

Limitations

GitHub supports up to 100 pending runs with this configuration; excess arrivals are cancelled. This does not increase reconciliation throughput. Live GitHub scheduler behavior was not exercised locally.

Preserve serialized review-state writes while allowing up to 100 pending runs instead of replacing the previous pending event. Add a regression assertion for the concurrency configuration.

Fixes Zoo-Code-Org#1707

Amp-Thread-ID: https://ampcode.com/threads/T-01a0bf0f-6f0a-724b-8d1f-69c1f1bfe3fc
@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review-active

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1acef2b8-a075-4314-a1e1-2e51b796e70a

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. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Zoo-Code-Org/Zoo-Code/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 73057042-5a25-441b-9ddf-f03e00ffea76


📥 Commits

Reviewing files that changed from the base of the PR and between 02b4986 and 0859a75.


📒 Files selected for processing (1)
  • .github/workflows/label-pr-review-state.yml

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
Require full commit SHA pins, least-privilege permissions, safe expression and shell interpolation, and trusted metadata handling.

⚙️ CodeRabbit configuration file

Files:

  • .github/workflows/label-pr-review-state.yml



🔇 Additional comments (1)
.github/workflows/label-pr-review-state.yml (1)

40-41: LGTM!





📝 Summary

Summary by CodeRabbit

  • Bug Fixes

    • Review-state workflow runs are now queued and processed sequentially, preventing overlapping updates and preserving pending runs during bursts.
    • Excessively large queues may still be canceled after reaching the platform limit.
  • Tests

    • Added coverage to verify queued workflow execution and concurrency settings.

Walkthrough

The workflow concurrency block now uses queue: max while retaining its shared group and cancel-in-progress: false. A test verifies these settings.

Changes

Review-state workflow concurrency

Layer / File(s) Summary
Concurrency queue configuration
.github/workflows/label-pr-review-state.yml, src/services/__tests__/pr-review-state-workflow.test.ts
The workflow adds queue: max to the existing concurrency block. The test verifies the group, queue mode, and cancel-in-progress: false setting.

Priority: ➖ Normal

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

Change: Bug fix · Severity of issue fixed: Medium


🚥 Pre-merge checks | ✅ 8
✅ Passed checks (8 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Issue #1707 requires pending review-state reconciliations to remain queued while writes stay serialized. .github/workflows/label-pr-review-state.yml now keeps the shared label-pr-review-state grou…
Out of Scope Changes check ✅ Passed The pull request changes only the review-state workflow concurrency configuration and its focused regression assertion. Both changes directly support issue #1707. No unrelated change is shown.
Regression Evidence ✅ Passed The pull request changes only declarative workflow concurrency and its focused regression assertion. The test parses the actual workflow file and verifies group: label-pr-review-state, queue: max,…
Security Boundaries ✅ Passed PASS. The changed workflow path only adds a static concurrency.queue: max setting and comments. It does not add secret handling, input execution, or changes to approval or allowlist controls. The te…
Persistence Integrity ✅ Passed PASS. The pull request changes only .github/workflows/label-pr-review-state.yml concurrency metadata (queue: max and comments) and adds a matching test assertion. It does not change label, comment…
Lifecycle Resource Cleanup ✅ Passed PASS. The authoritative diff changes only the workflow concurrency metadata and adds a matching test assertion. It keeps group: label-pr-review-state and cancel-in-progress: false, and adds `queue…
Title check ✅ Passed The title clearly identifies the CI change: queueing pending PR review reconciliation runs.
Description check ✅ Passed The description covers the linked issue, implementation, tests, serialization behavior, queue limits, and local validation. It does not reproduce the template headings or checklist, but it provides th…


✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR



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.

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Review status

Thanks for contributing. This comment tracks the review sequence and the next action.

Current step: Resolve the merge conflicts. The review sequence resumes after the branch is mergeable.

Review-state labels are managed by this workflow; do not edit them manually. community-approved is managed the same way — do not add or remove it manually. It signals a fresh community code approval for the current head as an advisory priority only; maintainer review is still required.

@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 20, 2026

@coderabbitai coderabbitai Bot 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.

Pre-merge checks failed. Please resolve the failing checks before merging.

@github-actions github-actions Bot added awaiting-author PR is waiting for the author to address requested changes and removed coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 20, 2026
@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit and removed awaiting-author PR is waiting for the author to address requested changes labels Sep 21, 2026
@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer and removed coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 21, 2026
@github-actions github-actions Bot added awaiting-maintainer CodeRabbit approved; waiting for a human maintainer has-conflicts PR has merge conflicts with the base branch and removed awaiting-maintainer CodeRabbit approved; waiting for a human maintainer labels Oct 5, 2026
@PierrunoYT

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #1739, which fixed #1707 by keying the review-state concurrency group per PR (with sweeps in their own group). That replaces the single shared group this PR was built around, and since each reconciliation run re-reads current PR state, a newer pending run replacing an older one within a per-PR group loses nothing, so adding queue: max on top would add little. Thanks @edelauna for landing the fix.

@PierrunoYT PierrunoYT closed this Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

has-conflicts PR has merge conflicts with the base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Label PR review state workflow: shared concurrency group starves per-PR reconciliation (queued runs cancelled during busy periods)

2 participants