Repository navigation
fix: scope per-target state hydration - #938
Merged
Merged
Conversation
azaj01
pushed a commit
to azaj01/clawsweeper
that referenced
this pull request
Sep 21, 2026
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
This was referenced Oct 9, 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.
Summary
ledger/v1andassetsR2 download at all 25 workflowsetup-statecallersRoot cause
An empty
records-repo-slugsinput makes both snapshot-cache preparation andhydrate-statediscover every repository in the canonical Worker store.materializeWorkerRecordsthen hydrates each discovered slug sequentially. After #937 raised exact-review concurrency, every exact-item publication run repeated that roughly 120-slug sequence through the same Worker/DO path.Live evidence matched the code path: a queue snapshot showed 30 exact-item runs simultaneously in progress and no exact-item completion among the latest 100 runs. In https://github.com/openclaw/clawsweeper/actions/runs/30449281061 the actual review completed in 70 seconds, then
setup-stateremained in progress from 11:54 UTC onward.Setup-state classification
commit-review.yml: plan, review, publishexact-review-batch-publish.yml: publishThe slug derivation mirrors canonical record storage: trim/lowercase the
owner/name, then replace the slash or other non-[a-z0-9_.-]separators with-. Batch publication calls the sharednormalizeRepo+slugForRepohelpers directly.Expected impact
Exact-item setup drops from roughly 120 serial repository hydrations to one, a 99.2% reduction per run. At 33 concurrent reviews that changes the hot path from roughly 3,960 slug hydration sequences to 33, while also eliminating the full R2 ledger/assets tree download. Once the existing DO backlog drains, per-review hydration should return to seconds rather than 60-90+ minutes.
Proof
node --test test/state-writer-workflow.test.ts test/sweep-workflow.test.ts test/clawsweeper.test.ts test/review-reliability-workflow.test.ts test/repair/exact-review-batch-workflow.test.ts test/repair/gitcrawl-store.test.ts test/repair/repair-cluster-worker-containment.test.ts— 188 passedpnpm run check— formatting, all TypeScript builds, all lint targets, and coverage thresholds passed; the macOS run reached 2,755 passes and hit five unrelated Linux containment harness failures because Apple libc does not exportcapset$HOME/.claude/skills/autoreview/scripts/autoreview --mode local— clean, no accepted/actionable findingsThis PR intentionally does not change Worker serialization or the full-fleet discovery contract; it removes unnecessary callers from that path.