Repository navigation
refactor: consolidate async timing helpers - #99721
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 3, 2026, 8:44 PM ET / 00:44 UTC. Summary PR surface: Source -109, Tests +56, Other -66. Total -119 across 43 files. Reproducibility: not applicable. this is a cleanup/refactor PR, not a bug report with a failing user reproduction. The review used source contracts, dependency inspection, related issue context, and current-head CI instead. Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land this focused cleanup after normal maintainer review, keeping the clamped core/plugin sleep and raw script sleep contracts distinct. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a cleanup/refactor PR, not a bug report with a failing user reproduction. The review used source contracts, dependency inspection, related issue context, and current-head CI instead. Is this the best way to solve the issue? Yes: this is the right maintainable shape because it preserves the existing clamped core/plugin helper, keeps raw script timing separate, and only reuses AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against f59310a555d7. Label changesLabel justifications:
Evidence reviewedPR surface: Source -109, Tests +56, Other -66. Total -119 across 43 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Land-ready verification for
|
What Problem This Solves
OpenClaw had many exact-contract
setTimeoutpromise wrappers spread across core, bundled plugins, and scripts, plus a localPromise.racetimeout that duplicated the shared timeout lifecycle. These copies obscured which timing differences were intentional and repeated timer mechanics across owner boundaries.Why This Change Was Made
sleepcontract through a focused utility leaf and the Plugin SDK runtime export..mjscallers whose durations must be forwarded directly to globalsetTimeout.withTimeouthelper for realtime fast-context lookup while preserving duration normalization, custom error identity/message, race behavior, and timer cleanup.User Impact
No intended user-visible behavior change. Timing resolution/rejection shapes, timer observability for fake clocks, zero/negative/infinite duration handling, and caller-specific timeout errors remain unchanged.
Evidence
node scripts/run-vitest.mjs test/scripts/sleep.test.ts src/utils.test.ts src/talk/fast-context-runtime.test.ts extensions/feishu/src/app-registration.test.tscheck:changedpassed in Blacksmith Testboxtbx_01kwn79rj5gdj387ryb9h4yf05on exact headda57a754670f(Actions run 28688802468).git diff --check origin/main...HEAD