Repository navigation
fix(process): keep large command queues responsive - #127145
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
steipete
marked this pull request as ready for review
August 21, 2026 10:08
Contributor
Author
|
Land-ready proof for exact head
No agent transcript is attached because consent was not provided. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 22, 2026
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.
What Problem This Solves
Fixes an issue where large bursts of same-priority queued commands became progressively slower to enqueue and start. A 10,000-command burst spent 3.23 seconds enqueueing and 1.89 seconds draining because each operation repeatedly scanned or shifted the full pending array.
Why This Change Was Made
The process command-queue owner now uses three fixed-priority FIFO circular queues, giving append and head removal amortized constant-time behavior while retaining existing foreground/normal/background priority and FIFO ordering. The process-global singleton performs one versioned in-memory conversion after a SIGUSR1 restart so pending work created by the prior array-backed implementation is preserved; there is no persisted migration or public contract change.
User Impact
Large command bursts remain responsive instead of blocking the process for seconds. Queue priority, lane/group arbitration, wait diagnostics, cancellation/clear behavior, restart preservation, and admission policy are unchanged.
Evidence
src/processsuite (385 passed, 8 skipped) and 22/22 embedded-agent lane caller tests.node scripts/check-changed.mjs -- <four changed paths>passed all core/core-test typechecks, changed-file lint, formatting, dead exports, import cycles, and repository guards. The patch ID is byte-identical after the non-overlapping rebase.patch is correctconfidence 0.98.Risk is low-to-moderate and internal: the queue representation changes, but the tests cover partial drain/growth wraparound, every priority, capacity-group arbitration, clear/reject, restart migration, caller liveness, and backing allocation release.
AI-assisted. I understand the change and verified the final patch; no agent transcript is included because transcript-sharing consent was not provided.