feat: yield background review under exact pressure#559
Merged
Conversation
Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com>
Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com>
Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com>
Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com>
Co-authored-by: brokemac79 <255583030+brokemac79@users.noreply.github.com>
Contributor
|
Confirmed against #542: this is the opt-in background-yield scheduler slice. #542 is being closed as superseded. Please land #555 first: this PR consumes its durable I am removing the release-owned |
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.
Related: #542 (closed; superseded)
Depends on: #555 (merged as
41ea43b)What Problem This Solves
Periodic and commit-review background work can consume the worker budget needed to drain an exact-review backlog. Operators had no opt-in admission policy that causes lower-priority broad-review lanes to yield when exact review is congested or saturated.
Why This Change Was Made
This is the scheduler/admission-policy portion of closed contributor PR #542. It deliberately consumes the durable
exact_review_queue.generated_atandexact_review_queue.pressure.statuscontract published by #555 instead of duplicating pressure classification.When explicitly enabled, the policy:
Exact-review, repair, apply, and other priority lanes remain outside this background cap. The default behavior remains unchanged until
CLAWSWEEPER_ENABLE_EXACT_REVIEW_BACKGROUND_YIELD=1is explicitly set.User Impact
With the opt-in variable enabled, broad work yields capacity when the exact-review lane is under pressure. This is a safe guardrail, not a replacement for #545's recovery work and not a fix for post-review state-ledger/lease-completion contention.
Evidence
7/7, includingpnpm check.pnpm run build:allandnode --test test/sweep-workflow.test.ts test/repair/workflow-utils.test.ts dist/repair/workflow-utils.test.js—115/115passing. The container copy normalized Windows checkout CRLF only; no tracked file was changed.pnpm run check:limitspassed in the same Linux container.git diff --check origin/main...HEADpassed.codex review --uncommittedclean for the release-owned changelog removal.codex review --base origin/mainclean with no actionable findings after feat(dashboard): expose exact-review pressure telemetry #555 integration.actionlintimage reports the repository's pre-existingqueue: maxconcurrency extension, including occurrences already onmain; GitHub Actions' ownAnalyze (actions)check is the authoritative validation for this workflow syntax.Maintainer follow-up — 2026-07-14
CHANGELOG.mdentry; release notes are release-owned in this repository.brokemac79in the original commits.