Repository navigation
Replace batch-barrier queue drain with a rolling four-repository scheduler - #498
Merged
maryliag merged 5 commits intoOct 28, 2026
Conversation
Pull request dashboard statusMerged · refreshed 2026-10-28 13:09 UTC Status above doesn't look right?
|
Co-authored-by: trask <218610+trask@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Copilot Request
Replace batch-barrier queue drain with a rolling four-repository scheduler
Oct 26, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The refill loop can start additional repository jobs after an existing job has already failed, violating the intended stop-on-failure behavior.
1 open issue
What changed in this PR
Replaces batch-based dashboard queue draining with a rolling scheduler that refills available repository slots without waiting for slower jobs.
Changes:
- Adds persistent four-repository scheduling, admission deadlines, and per-repository job handling.
- Extends the claim API with repository exclusions and limits, and locks shared execution caches.
- Updates scheduler and API tests and documents rolling execution.
| File | Description |
|---|---|
pull-request-dashboard/README.md |
Describes rolling queue processing. |
.github/scripts/pull-request-dashboard/test_owned_execution.py |
Adapts owned-execution tests to repository jobs. |
.github/scripts/pull-request-dashboard/test_drain_queue.py |
Covers rolling scheduling, concurrency, and failure handling. |
.github/scripts/pull-request-dashboard/test_dashboard_queue.mjs |
Tests repository filtering and claim limits. |
.github/scripts/pull-request-dashboard/test_dashboard_queue_worker.mjs |
Tests endpoint validation and filter forwarding. |
.github/scripts/pull-request-dashboard/RATIONALE.md |
Updates the scheduling rationale. |
.github/scripts/pull-request-dashboard/netlify/lib/dashboard-queue.mjs |
Adds repository-aware claim selection. |
.github/scripts/pull-request-dashboard/netlify/functions/dashboard-queue-worker.mjs |
Validates and forwards optional claim filters. |
.github/scripts/pull-request-dashboard/execution_code.py |
Locks shared code and checkout caches. |
.github/scripts/pull-request-dashboard/drain_queue.py |
Implements rolling repository jobs and slot refill. |
.github/scripts/pull-request-dashboard/CONTEXT.md |
Documents scheduling, deadlines, and checkout reuse. |
Review effort: Balanced
trask
reviewed
Oct 26, 2026
Co-authored-by: trask <218610+trask@users.noreply.github.com>
trask
reviewed
Oct 26, 2026
Co-authored-by: trask <218610+trask@users.noreply.github.com>
trask
reviewed
Oct 26, 2026
Co-authored-by: trask <218610+trask@users.noreply.github.com>
trask
marked this pull request as ready for review
October 27, 2026 02:21
trask
approved these changes
Oct 27, 2026
maryliag
approved these changes
Oct 28, 2026
maryliag
deleted the
copilot/fix-49998002-1279488627-83478a5e-fd81-40e0-a227-7194766ff0a5
branch
October 28, 2026 13:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Remove the queue drain's batch barrier so a slow repository no longer leaves workers idle while other repositories have queued work.
The drain currently claims up to 16 queue items and processes their repositories with four workers. Workers can pick up more repositories within that batch, but the next claim waits for the entire batch to finish. Near the end of a batch, one slow repository can leave three workers idle.
For example, if a batch contains repositories A, B, C, and D, and B, C, and D finish first, repositories E, F, and G in the queue must still wait for A. This PR lets them start alongside A.
Rolling scheduling
Keep one four-worker pool for the drain. Whenever a repository job finishes, claim eligible work for the available slots without waiting for the other jobs.
Each job still processes a bounded group of items from one repository, preserving sequential processing and coalesced publication. New claims exclude repositories already running in that lane. The live and maintenance lanes each retain their existing four-repository limit.
Deadline and retry behavior
Stop admitting jobs ten minutes before the hard processing deadline, replacing the estimate based on the longest completed batch. Running jobs keep the existing deadline and lease protections, and remaining work passes to the successor drain.
If admission stops after a claim, return unstarted items to the queue without consuming retries or marking them complete. If a newer event arrived during the claim, its follow-up gets a fresh retry budget.
This changes scheduling, not dashboard evaluation or publication rules. Stable/canary code selection, delivery leases, and the promoted release remain unchanged. The expected benefit is less idle time between batches, not higher concurrency; no end-to-end speedup has been measured yet.