Skip to content

fix: old queued runs no longer hide a complete queue listing - #77

Merged
ktechmidas merged 1 commit into
masterfrom
fix/queue-listing-leftovers
Nov 22, 2026
Merged

ktechmidas merged 1 commit into
masterfrom
fix/queue-listing-leftovers

Conversation

@ktechmidas

@ktechmidas ktechmidas commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #76, found on the live console minutes after it was deployed (dashpay/infra#99).

Problem

A queue_wait case ends when its job is gone from two whole listings of its repository. A listing counted as whole only if it returned fewer than the 30 runs it asked for.

dashpay/platform has 31 runs that GitHub still calls queued. Two were created in the last day; the other 29 are leftovers, the oldest from 2026-09-13. dashpay/rust-dashcore has 40, one of them recent. So the first poll after the deploy listed six repositories as covered and left out exactly the two where most jobs wait. Their cases would only end on GitHub's record of the job starting on one of our runners, or after a day.

Change

The poller asks for 100 runs per status (GitHub's maximum) and goes by total_count: a listing is whole when it holds every run with that status. Without a count, a full page is still treated as cut.

Only runs created in the last 24 hours are looked into, as before, so the number of API requests per poll is unchanged.

Tested

server/ci.test.js: 40 runs queued for two months beside 2 recent ones, with a matching total, are covered; a total above what was returned, and a full page without a total, are not.

Prepared by Claude (infraclaw) at latte's request.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved workflow queue polling to retrieve up to 100 runs at a time and more accurately determine whether repository listings are complete, including when run counts exceed the previous limit.

A queue_wait case ends when its job is gone from two whole listings of
its repository (#76). A listing counted as whole only when it returned
fewer than the 30 runs it asked for. dashpay/platform carries 31 runs
that GitHub still calls queued, 29 of them left over since September,
and dashpay/rust-dashcore 40, so their listings never counted and the
rule never applied to the repositories with most of the waiting jobs.

Ask for 100 runs and go by GitHub's own total: a listing is whole when
it holds every run with that status. Only runs created in the last day
are looked into, as before, so the number of requests does not change.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Queue polling requests up to 100 workflow runs for each status. Repository listing coverage now uses total_count when it is a safe integer; otherwise, a full 100-run page is treated as potentially incomplete. Tests cover complete and incomplete listings.

Changes: Queue Listing Coverage

Layer / File(s) Summary
Request size and coverage checks
server/ci.js, server/ci.test.js
Queue polling requests up to 100 runs per status. Coverage checks use a safe total_count when available and treat a full page as potentially incomplete otherwise. Tests cover a complete 42-run listing and cases that leave the repository uncovered.

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

Change: Bug fix

Possibly related PRs

  • dashpay/status#76: Defines a recovery rule that relies on complete repository listings, whose completeness check this PR changes.

Suggested reviewers: pastapastapasta

Merge Risk: Minimal · up to a82d7

This change lets repositories with many old queued runs be counted as covered again, while still excluding listings that might be cut off. No concrete merge-blocking risk remains after review.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title says old queued runs no longer hide a complete queue listing. The changeset matches this: server/ci.js raises the queue polling page size from 30 to 100 and uses total_count to decide whethe…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title says old queued runs no longer hide a complete queue listing. The changeset matches this: server/ci.js raises the queue polling page size from 30 to 100 and uses total_count to decide whether a listing is complete. The test file checks that listings covering all 42 runs stay covered even when only two recent runs are inspected. The PR objectives describe the same fix for dashpay/platform and dashpay/rust-dashcore. The title is concise and specific, though it omits the total_count and page-size details.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • 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

  • 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: 2c33645b-b7b0-43e2-b0ea-a6d127d27f02
Commits

Reviewing files that changed from the base of the PR and between 66ce4fa and a82d7c2.

Files selected for processing: 2

  • server/ci.js
  • server/ci.test.js

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

@ktechmidas
ktechmidas merged commit 627860f into master Nov 22, 2026
6 checks passed
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.

1 participant