Repository navigation
fix(update-repair): preserve repair budgets across wall-clock changes - #190298
Conversation
Complete the repair clock-domain conversion after #190064 using the existing process-local monotonic helper in the loop, route selector, and delegated worker. Measure elapsed attempt durations with the same clock. Adapt the remaining correction from SunnyShu0925's #186818. Regressions step the wall clock in both directions while checking budget consumption and deadline cancellation. Allocate 106 test lines for these independently seeded budget owners. Co-authored-by: SunnyShu0925 <[email protected]> Co-authored-by: steipete <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review Replacement for #186818, completing the three remaining clock owners after #190064. Local autoreview completed with no P0–P2 findings; focused RED/GREEN, consumer tests, lint, formatting, and affected typecheck pass. |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesUse the existing monotonic clock for repair-loop, inference-selection, and delegated-worker budgets and attempt durations. Example: A 60,000 ms repair budget encounters a 610,000 ms forward clock correction after 1,000 ms of validation.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR fixes remaining clock-dependent repair budgets on main, with no actionable code or security findings. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCLI triage and delegated update workers pass installation targets, cancellation, and duration budgets into configured inference and embedded repair execution; caller-owned validation determines the repair result. flowchart TD
A[CLI triage] --> B[Repair loop]
C[Delegated worker] --> D[Inference selection]
B --> D
E[Shared monotonic clock] --> B
E --> C
E --> D
D --> F[Embedded repair turn]
F --> G[Validation and result]
Technical reviewBest possible solution: Complete the clock-domain correction through the existing repair owners while preserving duration-based IPC, cancellation, and validation ownership. Do we have a high-confidence way to reproduce the issue? Current-main arithmetic establishes budget collapse or inflation when Date.now() steps between deadline creation and consumption, supported by reported red regressions and the credited original CLI trace; this review ran no target code. Is this the best way to solve the issue? This is the smallest complete correction for the remaining owners: measure elapsed budgets with the shared monotonic clock and retain existing expiry policy without introducing another clock abstraction. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 5342923d897a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +9, Tests +106, Other +2. Total +117 across 7 files. Added test files: 0. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 1, 2026, 7:08 AM ET / 12:08 UTC. |
Repair the inherited core lint failure exposed by CI for #190298. createDeferred already defaults to void; removing the two explicit type arguments preserves the test contract.
|
Merged via squash.
|
…openclaw#190298) Complete the repair clock-domain correction after openclaw#190064: use the existing shared monotonic clock for loop, inference-probe, and delegated-worker budgets and elapsed attempt durations. Preserve budget defaults, cancellation, live authority checks, IPC durations, and absolute timestamps. Adapted from SunnyShu0925's openclaw#186818 after reviewing its complete diff and reviews. Forward/backward clock-jump regressions fail on the original owners and pass with the fix. Allocate 106 regression lines because the three owners independently seed and consume their budgets and need distinct boundary proof. Focused repair and consumer tests pass, and local autoreview found no P0-P2 issues. Live Gateway and stable-upgrade execution were outside the task's production-host constraint. Also remove two redundant default void type arguments in an unchanged test to repair the inherited core-lint failure exposed by this PR's CI. Focused lint, all 19 tests in that file, and independent review pass. Co-authored-by: SunnyShu0925 <[email protected]> Co-authored-by: steipete <[email protected]>
What Problem This Solves
Fixes repair aborts and inflated timeouts when the host wall clock changes during update repair or embedded triage.
User Impact
Repairs retain the operator-granted elapsed-time budget across forward and backward clock corrections, and reported attempt durations remain nonnegative.
Why This Change Was Made
Completes #190064 (381abce), which fixed the embedded runtime, by using the existing shared monotonic clock for the repair loop, inference selection, and delegated worker. Existing budget defaults, cancellation, authority checks, IPC durations, and absolute timestamps are preserved.
Adapted from SunnyShu0925’s #186818 after reading its full diff and reviews. Contributor credit is included in the commit trailers, together with the requested steipete credit.
Evidence
no-unnecessary-type-argumentserrors inexperience-review.test.ts. Removing<void>from twocreateDeferred()calls preserves the existing default type. Focused lint reproduces RED and passes GREEN; all 19 existing tests in that file pass (38.36 s wrapper); fresh local autoreview is scoped-clean. The original repair proof remains valid because those sources are unchanged.Exact-head CI: run 41305564156,
272b4044cf02d404b0dd8c1751261e3c5583d507, success. Changed-node-test job: 286 s.