Repository navigation
fix: align persisted-record slugs and stabilize timeout tests - #1412
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 4, 2026, 4:05 AM ET / 08:05 UTC. ClawSweeper reviewWhat this changesThe PR aligns persisted-record readers with the writer’s repository-name encoding and makes timeout tests less sensitive to host scheduling delays. Merge readiness✅ Ready for maintainer review This remains useful: current main still misreads valid persisted-record namespaces, and no verified merged replacement resolves the problem. No blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherClawSweeper hydrates review records from its canonical Worker store before selecting apply and comment-sync work. These utilities read those local records and maintain cursors that determine which items subsequent runs process. flowchart TD
A[Repository name] --> B[Canonical repository slug]
B --> C[Hydrated review records]
C --> D[Proposal and comment selection]
D --> E[Apply and comment synchronization]
E --> F[Cursor update]
C --> F
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep one canonical record namespace across publication, selection, synchronization, and cursor recovery while preserving production deadlines. Do we have a high-confidence way to reproduce the issue? Yes: current-main readers collapse repository punctuation that the writer preserves, so a canonical dotted or underscored record is missed. This review established the path from source; it did not execute a reproduction. Is this the best way to solve the issue? Yes: reusing the existing writer helper removes the conflicting implementation, and the revised timing assertions isolate the behavior they intend to bound. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 238d7b531598. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Landing: CI green on exact head 3bbb195, ClawSweeper review reports real behavior verified (six-namespace slug cases against real record and cursor files, real subprocess lock contention, load runs) and no findings. Fixes the reader/writer slug divergence for dotted and underscored repositories (no configured target changes resolution) and replaces three wall-clock test assertions with mechanism-based ones. |
What Problem This Solves
Persisted apply-record readers used a different repository-slug normalizer from the writer. A record for
openclaw/some.repooropenclaw/some_repowas stored under its literal name but looked up underopenclaw-some-repo. Repeated hyphens and trailing hyphens were also collapsed or trimmed, potentially selecting another repository's cursor timestamp.Loaded macOS hosts also made timing tests fail despite correct runtime behavior: the checkout assertion included repository preparation, the dead-owner assertion included the entire record write, and snapshot admission shared an unnecessarily short fixture budget.
Why This Change Was Made
Use the existing writer's
slugForRepohelper for all workflow-record lookups and delete both local slug helpers. The regression table exercises dotted, underscored, mixed-case, hyphenated, repeated-hyphen, and trailing-hyphen names through proposal selection, inventory, comment synchronization, and open/closed cursor reads.Measure the checkout subprocess with a monotonic clock, retaining the two-second bound and exercising a hung child with the supplied one-millisecond timeout. Assert that dead-owner recovery does not enter the lock wait, and release the live holder only after its contender observes the occupied lock. Give snapshot admission fixtures a bounded two-minute budget and pass the remaining budget into the agent runner; deadline-specific tests retain their existing limits.
User Impact
The timeout-test changes are behavior-neutral; no runtime timeout, config, or workflow change. The intentional bug fix makes persisted-record lookup honor the existing writer contract. No new runtime contract or storage migration is introduced.
Resolution changes only for repository names whose literal dots, underscores, repeated hyphens, or trailing hyphens were previously replaced, collapsed, or trimmed. Mixed case still resolves to lowercase. Ordinary hyphenated names are unchanged.
The current configured targets are
openclaw/openclaw,openclaw/clawhub,openclaw/clawsweeper,openclaw/openclaw-facetime,openclaw/fs-safe,openclaw/crabbox, andsteipete/camsnap. WorkerTARGET_REPOSlists the first three plusopenclaw/fs-safe; apply targets areopenclaw/openclawand optionalopenclaw/clawhub. None changes resolution. The hosted registry uses the same configuration, with generic fallback ownersopenclawandsteipete; this audit checks configured targets, not an enumeration of every dynamically admitted repository.Current
mainwas checked through the GitHub contents API.git log -S 'target_repo' -- config/target-repositories.jsonandgit log -S 'TARGET_REPOS =' -- dashboard/wrangler.toml, plus inspection of every historical target-config revision, found no configured dotted or underscored name. The additional historical explicit target wasopenclaw/openclaw-windows-node.Evidence
pr-behavior-proofcontract:pnpm run checkrun plus the targeted suites, explicitly supplemented by before/after artificial load and injected scheduling gaps./tmp/deslop-bugs3-*, includingslug-regression-before.log,slug-after.log,before-targeted.log,after-targeted.log,jitter-after.log, andcheck.log(the full gate). Pass summaries are below.ENOTEMPTYcleanup failures attest/live-proof-review-environment.test.ts:1262and:1296; both passed focused reruns and the later load run. Each failed cleanup left acleanup.result.tmp.scan.*file, consistent with a cleanup scanner writing after removal began. Their separate cleanup race is not claimed fixed here.The load harness ran these four commands concurrently, unchanged before and after:
Validation commands and summaries:
Independent review: Codex autoreview scoped-clean, no accepted/actionable findings at P0/P1 (
--mode local --base origin/main --max-priority P1, with context explaining the unrelated upstream-only differences). Validated head: 3bbb195.OpenClaw Bay not affected: no dashboard changes.