Repository navigation
fix: restore apply backlog throughput - #925
Merged
Merged
Conversation
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.
Summary
ledger/v1andassetsblob archiveworkflow_dispatchruns a run-unique concurrency group, so scheduled review, hot-intake, or audit traffic cannot supersede a plain dispatched sweep before its first job startsRoot cause
The 128-item audit in #920 was not blocked by packet age or the 20-close mutation budget. Scheduled apply runs did not reach candidate selection.
In https://github.com/openclaw/clawsweeper/actions/runs/30384546731, the read-only proof job restored the canonical Worker record snapshot, then entered
Hydrate generated stateat18:00:22Z. With no blob-cache hit it tried to materialize the full immutable ledger/assets archive and stayed there until the 60-minute job timeout cancelled it at18:57:58Z;Apply close proposalswas skipped. The same failure repeated on currentmainin https://github.com/openclaw/clawsweeper/actions/runs/30406246536 from23:01:38Zuntil cancellation at00:01:06Z.Meanwhile, all scheduled OpenClaw apply runs share the workflow-level
clawsweeper-apply-openclaw/openclawgroup. GitHub retains only one pending member of a concurrency group, so the continuing 15-minute schedule replaced waiting successors. Runs such as https://github.com/openclaw/clawsweeper/actions/runs/30404568524 therefore ended with zero jobs. The one close noted around the #920 audit was not evidence of apply throughput: #920 records item 109065 as manually closed before the 128-row table was captured.The apply policy itself already has the right split. Canonical high-confidence packets remain actionable only while their stored revision matches live state, and apply rechecks labels, authorship, locks, activity, relations, and reason-specific policy before mutation. Only duplicate/superseded PRs require a fresh bounded close-coverage proof. Candidate inventory prioritizes already-authorized fast closes and reserves two proof-required candidates per cycle. This PR leaves all of those rules unchanged.
Expected drain rate
The default remains 20 fresh closes per successful apply run. Of the #920 audit, 93 items do not require the duplicate-PR coverage proof and fit in about five full cycles. The table contains 35 duplicate/superseded PRs; at the existing two-proof reserve they need at most 18 successful proof cycles. Even at one completed cycle per hour, that is under a day rather than months, while any changed or newly blocked item still skips safely.
Dispatch concurrency
All non-apply operator dispatches without exact item inputs now use
clawsweeper-operator-dispatch-<run_id>. This also fixes the same supersession trap for operator-dispatched hot-intake and audit runs. Exact-item dispatches retain their per-item coalescing, manual apply/comment-sync dispatches were already run-unique, and scheduled background lanes still coalesce.Proof
mise exec node@24 -- pnpm run build:allmise exec node@24 -- node --test test/sweep-workflow.test.ts test/state-writer-workflow.test.ts test/worker-state-blobs.test.ts— 104 passedmise exec node@24 -- pnpm run formatandformat:check— cleanmise exec node@24 -- pnpm run check— static checks, build, format, and lint passed; exhaustive coverage then hit seven unrelated baseline macOS failures (five Linuxcapset/Landlock cases, one/varvs/private/varassertion, and one dashboard repository-name casing assertion)mise exec node@24 -- actionlint .github/workflows/sweep.yml— only the workflow's existing ShellCheck notices and two repo-nativequeue: maxextension diagnostics~/.claude/skills/autoreview/scripts/autoreview --mode local— clean, no accepted/actionable findings