Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR carries Doctor’s remaining timeout through preparation, maintenance admission, worker startup, and native service-stop admission. Example: Doctor receives a 5-second allowance, and custody preparation consumes all 5 seconds.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this PR addresses a current deadline-accounting defect, and both previously reported fixture regressions are corrected. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe updater prepares managed-service custody, delegates Doctor to a fresh process, and receives maintenance results before continuing or recovering the Gateway. flowchart TD
A[Update CLI] --> B[Finalization deadline]
B --> C[Custody preparation]
B --> D[Doctor worker]
D --> E[Maintenance admission]
E --> F[Native service stop]
F --> G[Settlement and restoration]
Technical reviewBest possible solution: Preserve one deadline across the existing updater and Doctor owners while keeping admitted-stop settlement and restoration outside forward-work expiry. Do we have a high-confidence way to reproduce the issue? Current-main source starts the phase deadline after custody preparation and gives Doctor a fresh timeout; the added regression exercises preparation exceeding the allowance, but no code was executed during this read-only review. Is this the best way to solve the issue? The patch repairs the existing deadline owners and native admission path without adding a competing timer, public option, or persistent storage model. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c2e29980f087. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +174, Tests +404, Docs +7. Total +585 across 31 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 HistoryReview history (18 earlier review cycles; latest 8 shown)
Reviewed October 25, 2026, 12:22 AM ET / 04:22 UTC (Revision 19). |
|
Addressed the native stop-dispatch deadline gap in The original product demonstrably dispatched The fix propagates the existing This is scoped regression proof, not published-driver expiry/recovery acceptance. The real package/installed-candidate cell and current-head hosted CI remain pending. The repeated legacy migration CI timeout has no established cause or fix; it is not labeled a flake. Production state was untouched. Test-only CI follow-up: current public head Exact-head hosted CI update: |
Pass the already-validated service environment into the restoration reporter. Check the remaining Doctor allowance in native settlement and package tests, including preparation time. Integrate current main without changing the original deadline regression.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Windows service simulations under Bun searched for Windows Node executable names on POSIX after #148857 added real SQLite header probes. Extend the fixture's existing host-platform scope to that synchronous probe, preserving its real child process and file reads. The three candidate-activation failures reproduce on main and before #166000; the running-service case passes before #148857. Keep production behavior, Doctor deadlines, and all service-ordering assertions unchanged. Validation: all 14 candidate-activation tests pass under Bun; update-test typecheck, focused lint, formatting, and Codex autoreview through P2 pass.
…et and host ports (#183578) The requester-revoked package receipt test pinned Doctor's timeout to the full budget although #166000 passes the remaining admitted budget, so it failed whenever setup consumed time (seen on #183279 CI). The native systemd stop fixture inspected the host's real Gateway port; it now stubs port inspection like the rest of its service boundary.
…meout (openclaw#166000) * fix(update): prevent Doctor service inspection from restarting its timeout * fix(update): honor doctor deadline before predecessor stop * fix(doctor): recheck expiry before final service stop * test(update): repair Doctor deadline CI regressions * test(update): prune retired Doctor mock exemption * test(update): align Doctor diagnostics with structured warnings * test(update): preserve ordered recovery guidance assertion * fix: prevent Doctor service stops after the admitted deadline * test: preserve Doctor fixtures without duplicate imports * test(update): account for custody within Doctor deadline * test(update): remove redundant Doctor deadline helper suite * test(subagents): settle detached cleanup owner before timer assertions Join existing Gateway root work after retry callbacks and before fixture teardown; preserve bounded retry and zero-timer assertions. Include pending timer diagnostics. Focused full file247 tests and lint passed; original CI timer race did not reproduce locally. * fix(update): retain explicit Doctor budget across post-plugin checks Co-authored-by: Daniil Karpenko <[email protected]>
Windows service simulations under Bun searched for Windows Node executable names on POSIX after openclaw#148857 added real SQLite header probes. Extend the fixture's existing host-platform scope to that synchronous probe, preserving its real child process and file reads. The three candidate-activation failures reproduce on main and before openclaw#166000; the running-service case passes before openclaw#148857. Keep production behavior, Doctor deadlines, and all service-ordering assertions unchanged. Validation: all 14 candidate-activation tests pass under Bun; update-test typecheck, focused lint, formatting, and Codex autoreview through P2 pass.
…et and host ports (openclaw#183578) The requester-revoked package receipt test pinned Doctor's timeout to the full budget although openclaw#166000 passes the remaining admitted budget, so it failed whenever setup consumed time (seen on openclaw#183279 CI). The native systemd stop fixture inspected the host's real Gateway port; it now stubs port inspection like the rest of its service boundary.
…meout (#166000) * fix(update): prevent Doctor service inspection from restarting its timeout * fix(update): honor doctor deadline before predecessor stop * fix(doctor): recheck expiry before final service stop * test(update): repair Doctor deadline CI regressions * test(update): prune retired Doctor mock exemption * test(update): align Doctor diagnostics with structured warnings * test(update): preserve ordered recovery guidance assertion * fix: prevent Doctor service stops after the admitted deadline * test: preserve Doctor fixtures without duplicate imports * test(update): account for custody within Doctor deadline * test(update): remove redundant Doctor deadline helper suite * test(subagents): settle detached cleanup owner before timer assertions Join existing Gateway root work after retry callbacks and before fixture teardown; preserve bounded retry and zero-timer assertions. Include pending timer diagnostics. Focused full file247 tests and lint passed; original CI timer race did not reproduce locally. * fix(update): retain explicit Doctor budget across post-plugin checks Co-authored-by: Daniil Karpenko <[email protected]> (cherry picked from commit a200356) Co-authored-by: RomneyDa <[email protected]>
…meout (#166000) * fix(update): prevent Doctor service inspection from restarting its timeout * fix(update): honor doctor deadline before predecessor stop * fix(doctor): recheck expiry before final service stop * test(update): repair Doctor deadline CI regressions * test(update): prune retired Doctor mock exemption * test(update): align Doctor diagnostics with structured warnings * test(update): preserve ordered recovery guidance assertion * fix: prevent Doctor service stops after the admitted deadline * test: preserve Doctor fixtures without duplicate imports * test(update): account for custody within Doctor deadline * test(update): remove redundant Doctor deadline helper suite * test(subagents): settle detached cleanup owner before timer assertions Join existing Gateway root work after retry callbacks and before fixture teardown; preserve bounded retry and zero-timer assertions. Include pending timer diagnostics. Focused full file247 tests and lint passed; original CI timer race did not reproduce locally. * fix(update): retain explicit Doctor budget across post-plugin checks Co-authored-by: Daniil Karpenko <[email protected]> (cherry picked from commit a200356) Co-authored-by: RomneyDa <[email protected]> Candidate test-only adaptation: make Doctor preparation consume a deterministic 125ms of its existing 1000ms monotonic budget; require exactly 875ms at dispatch while preserving refusal receipts and unbounded method-switch coverage.
…meout (#166000) * fix(update): prevent Doctor service inspection from restarting its timeout * fix(update): honor doctor deadline before predecessor stop * fix(doctor): recheck expiry before final service stop * test(update): repair Doctor deadline CI regressions * test(update): prune retired Doctor mock exemption * test(update): align Doctor diagnostics with structured warnings * test(update): preserve ordered recovery guidance assertion * fix: prevent Doctor service stops after the admitted deadline * test: preserve Doctor fixtures without duplicate imports * test(update): account for custody within Doctor deadline * test(update): remove redundant Doctor deadline helper suite * test(subagents): settle detached cleanup owner before timer assertions Join existing Gateway root work after retry callbacks and before fixture teardown; preserve bounded retry and zero-timer assertions. Include pending timer diagnostics. Focused full file247 tests and lint passed; original CI timer race did not reproduce locally. * fix(update): retain explicit Doctor budget across post-plugin checks Co-authored-by: Daniil Karpenko <[email protected]> (cherry picked from commit a200356) Co-authored-by: RomneyDa <[email protected]> Candidate test-only correction: inject transport expiry only while the real native stop is preparing, not during preceding discovery. Retain the initial stop/no-dispatch contract, cover both wall-clock directions and an already-expired pre-stop deadline.
…meout (#166000) * fix(update): prevent Doctor service inspection from restarting its timeout * fix(update): honor doctor deadline before predecessor stop * fix(doctor): recheck expiry before final service stop * test(update): repair Doctor deadline CI regressions * test(update): prune retired Doctor mock exemption * test(update): align Doctor diagnostics with structured warnings * test(update): preserve ordered recovery guidance assertion * fix: prevent Doctor service stops after the admitted deadline * test: preserve Doctor fixtures without duplicate imports * test(update): account for custody within Doctor deadline * test(update): remove redundant Doctor deadline helper suite * test(subagents): settle detached cleanup owner before timer assertions Join existing Gateway root work after retry callbacks and before fixture teardown; preserve bounded retry and zero-timer assertions. Include pending timer diagnostics. Focused full file247 tests and lint passed; original CI timer race did not reproduce locally. * fix(update): retain explicit Doctor budget across post-plugin checks Co-authored-by: Daniil Karpenko <[email protected]> (cherry picked from commit a200356) Co-authored-by: RomneyDa <[email protected]> Candidate test-only correction: inject transport expiry only while the real native stop is preparing, not during preceding discovery. Retain the initial stop/no-dispatch contract, cover both wall-clock directions and an already-expired pre-stop deadline. Candidate parent-environment follow-up: pin predecessor build identity and read-only listener discovery so an ambient dist artifact cannot trigger the native-dispatch expiry fault before stop. Preserve actual native transport, initial stop, expired-deadline refusal, no-dispatch, receipt and restoration assertions. Add discovery assertions and fail forbidden fixture dispatch immediately. Test-only delta; no production authority or deadline changes.
What Problem This Solves
Fixes Doctor receiving a fresh timeout after update preparation or maintenance admission has already spent part of the updater's allowance.
User Impact
An update's Doctor phase now includes preparation and service inspection in its timeout. If a native service stop has already begun, it still settles and restores the service safely before reporting failure. There are no new CLI options or configuration changes.
Why This Change Was Made
The finalization owner captures the deadline before custody preparation and carries the remaining allowance through the private Doctor worker input. Each process translates that handoff once to its monotonic clock. Forward admission checks the remaining budget; settlement and restoration keep their existing authority. This also preserves the current worker decoder and native command-gate contracts.
Original fix by @dankarization (Daniil Karpenko). The integration removes the unrelated subagent-test change and keeps restoration refusal reporting in the existing restoration module.
Evidence