Repository navigation
fix(daemon): keep native service checks within their timeout - #154565
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: blocked before merge. Reviewed September 25, 2026, 9:26 PM ET / September 26, 2026, 01:26 UTC (Revision 15). ClawSweeper reviewWhat this changesThe branch gives Gateway service inspection and Windows Scheduled Task, Startup, process, and port reads one timeout budget, while retaining cleanup failures and marking incomplete observations unknown. Merge readiness⛔ Blocked before merge - 4 items remain Keep this PR open. The merged absent-Gateway fix overlaps with it, but current main still lacks the native inspection deadline repair. Exact-head Windows observations support the repair. The changed stopped-service classification needs explicit owner acceptance, and the published-updater qualification did not complete recovery. Priority: P2 Review scores
Verification
How this fits togetherCLI status and maintenance ask the daemon service layer to inspect the installed Gateway service. That layer reads native service and process evidence, then returns running, stopped, or unknown state to the caller. flowchart LR
A[CLI status or maintenance] --> B[Shared service inspection]
B --> C[Native service manager]
B --> D[Launcher and process reads]
D --> E[Port observation]
C --> F[Deadline and evidence decision]
E --> F
F --> G[Running, stopped, or unknown]
Decision needed
Why: The exact-head guest showed this user-visible compatibility change; the qualification comment recommends it but does not record an explicit acceptance of the tradeoff. Before merge
Agent review detailsSecurityNone. PR surfaceSource +426, Tests +872, Other -1. Total +1297 across 25 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared inspection deadline and conservative ownership checks, obtain an explicit decision on the Windows stopped-state tradeoff, and verify a published-driver upgrade that restores the service without manual installation. Do we have a high-confidence way to reproduce the issue? Yes, at the source boundary: current main passes separate allowances through native Windows reads, while the branch's focused regressions and installed guest observations cover expiry and incomplete process evidence. This read-only review did not execute the failing baseline. Is this the best way to solve the issue? Yes for sharing the deadline at the service inspection owner and preserving cleanup refusals. The stopped-state compatibility choice and published-upgrade recovery still need resolution before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 55ee0e0dfcea. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (14 earlier review cycles; latest 8 shown)
|
f93eb2d to
939baa8
Compare
c7a06d2 to
2b5bd4e
Compare
Retain stopped Startup observations and structured unknown diagnostics. Keep ownership and cleanup refusals authoritative and join admitted reads. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]>
Move the shared timeout fixture into existing test support and inline the redundant positive-only observation wrapper. Preserve all assertions. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]>
Move the unchanged 14-case table and its type to the existing maintenance test support module so composed main tests stay within the line cap. Preserve mock initialization, assertions, deadlines, and all test bodies. Validation: fresh scoped source review, exact relocation reconstruction, formatting, diff check, and canonical line-cap ratchet pass. Runtime and type gates remain assigned to replacement-head CI and installed proof. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]>
Keep strict absence out of the migration-to-owner gap and retain ordinary startup grace after observed or unreadable migration activity. Charge the read-only checkpoint query to the existing readiness budget. Reuse the existing migration owner; add no logging or new data contract. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]>
Require readable process identities and command lines before interpreting no matching Startup process as stopped. Keep positive exact PID matches and charge completeness validation to the existing inspection deadline. Reuse the native snapshot owner and cover incomplete Gateway/node rows; add no logging, native probes or timeout changes. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]>
2b5bd4e to
1056ffb
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Windows qualification on exact head
The native runtime/strict-state probes loaded the existing shipped bundle exports. Service lifecycle and updater/repair cases used the installed CLI. The external delay fixture targeted only the task’s read-only native inspection and preserved the real child timeout/result. Final normal recovery passed: after stopping the owned Gateway, candidate The conservative Startup result remains a maintainer tradeoff: positive running evidence and start/stop work, while a stopped fallback cannot prove absence through unreadable process rows. I recommend retaining the conservative result rather than filtering native rows to manufacture a stopped observation. Published-updater limitation: this was not a clean A live comparison explains the old updater's long pre-activation wait: published code reports healthy RPC and matching version/build but runtime unknown from @clawsweeper re-review |
|
🦞👀 Re-review progress:
|
* commit '66b812f26e725cd709e08860d2cb46ba496cd308': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (#158689) fix(gateway): reset staged headers on authority errors (#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (#158612) fix(ui): keep automation starter prompts out of startup (#158482) fix(cli): distinguish configuration read failures from invalid input (#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (#158662) fix(daemon): keep native service checks within their timeout (#154565) fix(test): restore gateway steering fixture contracts (#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (#158633) perf(gateway): release event payloads from live text guards (#158643) perf(sessions): reduce stalls when saving large chat messages (#158402) fix(qa): reject history-bearing utility requests without session affinity (#158496) test: allow intentional progress snapshot coercion ...
* fix(test): verify followup completion ordering Exercise the real presentation settlement helper with asynchronous cleanup, preserve continuation and admission semantics, and unconditionally release and join the held work. Remote proof covers the strengthened ordering contract and both missing-await faults. * fix(test): verify followup completion ordering * chore: retain followup test branch ancestry The current-main reconstruction preserves the original reviewed scope and supersedes its stale base. Keep the remotely qualified candidate tree unchanged while retaining the original PR ancestry for a non-force branch update. * commit 'ff35145de21cf6296bec05e86bee37b5ed53bcb8': fix(test): verify followup completion ordering * test(auto-reply): signal queued presentation entry * chore: refresh followup test on boundary fix * commit '66b812f26e725cd709e08860d2cb46ba496cd308': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (#158689) fix(gateway): reset staged headers on authority errors (#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (#158612) fix(ui): keep automation starter prompts out of startup (#158482) fix(cli): distinguish configuration read failures from invalid input (#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (#158662) fix(daemon): keep native service checks within their timeout (#154565) fix(test): restore gateway steering fixture contracts (#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (#158633) perf(gateway): release event payloads from live text guards (#158643) perf(sessions): reduce stalls when saving large chat messages (#158402) fix(qa): reject history-bearing utility requests without session affinity (#158496) test: allow intentional progress snapshot coercion ... Co-authored-by: Vincent Koc <[email protected]>
…w#154565) * fix(status): report deliberately absent gateways promptly * fix(status): preserve inspection contracts through CI checks * refactor(daemon): keep service staging alias private * test(daemon): compare native fixture paths without coercion * fix(status): preserve native diagnostics across inspection deadlines Retain stopped Startup observations and structured unknown diagnostics. Keep ownership and cleanup refusals authoritative and join admitted reads. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]> * refactor(status): keep deadline fixtures within line caps Move the shared timeout fixture into existing test support and inline the redundant positive-only observation wrapper. Preserve all assertions. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]> * test(status): extract native offline fixture cases Move the unchanged 14-case table and its type to the existing maintenance test support module so composed main tests stay within the line cap. Preserve mock initialization, assertions, deadlines, and all test bodies. Validation: fresh scoped source review, exact relocation reconstruction, formatting, diff check, and canonical line-cap ratchet pass. Runtime and type gates remain assigned to replacement-head CI and installed proof. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]> * fix(status): preserve startup grace before ownership Keep strict absence out of the migration-to-owner gap and retain ordinary startup grace after observed or unreadable migration activity. Charge the read-only checkpoint query to the existing readiness budget. Reuse the existing migration owner; add no logging or new data contract. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]> * fix(status): keep incomplete Windows process snapshots unknown Require readable process identities and command lines before interpreting no matching Startup process as stopped. Keep positive exact PID matches and charge completeness validation to the existing inspection deadline. Reuse the native snapshot owner and cover incomplete Gateway/node rows; add no logging, native probes or timeout changes. Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]> * test(daemon): control status inspection deadline clock * test(daemon): remove moved platform helper import * fix(daemon): preserve status refusal and absence contracts --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: steipete <[email protected]> Co-authored-by: vincentkoc <[email protected]> Co-authored-by: jalehman <[email protected]> Co-authored-by: Dallin Romney <[email protected]>
* fix(test): verify followup completion ordering Exercise the real presentation settlement helper with asynchronous cleanup, preserve continuation and admission semantics, and unconditionally release and join the held work. Remote proof covers the strengthened ordering contract and both missing-await faults. * fix(test): verify followup completion ordering * chore: retain followup test branch ancestry The current-main reconstruction preserves the original reviewed scope and supersedes its stale base. Keep the remotely qualified candidate tree unchanged while retaining the original PR ancestry for a non-force branch update. * commit 'ff35145de21cf6296bec05e86bee37b5ed53bcb8': fix(test): verify followup completion ordering * test(auto-reply): signal queued presentation entry * chore: refresh followup test on boundary fix * commit '622be54be3ffe0fce27d6a4b147c76d4b19c528c': (70 commits) fix(gateway): preserve typed boxed-number coercion chore(ui): refresh control ui locales (openclaw#158689) fix(gateway): reset staged headers on authority errors (openclaw#158669) fix(workers): keep inbound staging stable during quota scans fix: preserve Telegram delivery after bot identity changes (openclaw#158612) fix(ui): keep automation starter prompts out of startup (openclaw#158482) fix(cli): distinguish configuration read failures from invalid input (openclaw#158671) test: remove retired progress coercion suppression allowance refactor(gateway): schedule worker placement maintenance (openclaw#158662) fix(daemon): keep native service checks within their timeout (openclaw#154565) fix(test): restore gateway steering fixture contracts (openclaw#158478) fix(acpx): use SDK filesystem publication boundary fix(agentsapi): load OpenClaw persona and workspace context (openclaw#158328) fix(gateway): drop progress snapshot coercion suppression fix(qa): accept native Codex truncation in cache evidence (openclaw#158454) fix(gateway): keep chat subscriptions stable during unrelated approvals (openclaw#158633) perf(gateway): release event payloads from live text guards (openclaw#158643) perf(sessions): reduce stalls when saving large chat messages (openclaw#158402) fix(qa): reject history-bearing utility requests without session affinity (openclaw#158496) test: allow intentional progress snapshot coercion ... Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
Native service inspection can reuse its full timeout at successive stages, start additional Windows process/listener checks after the budget is spent, or accept late observations as current service state. Cleanup failures can also be hidden by ordinary diagnostic fallbacks.
Why This Change Was Made
Carry one remaining inspection budget through command, registration, runtime, and Windows Startup/process/port reads. Stop admitting work after expiry, keep expired ordinary diagnostics unknown, and preserve strict-operation failures. Join admitted parallel reads before returning and propagate cleanup/ownership refusals.
The absent-Gateway status fix is already on main through #154637. This PR now contains only the remaining native-inspection work; the superseded status adapter, readiness shortcut, status documentation, and associated tests have been removed. Existing systemd target selection, Windows structured diagnostics, and main's startup/legacy-owner safeguards are preserved. Related: #154549.
User Impact
Diagnostic reads share the caller's existing budget. Explicitly timed Windows reads retain exact positive process matches and report unknown when incomplete process or listener evidence cannot establish a stopped service. Untimed lifecycle defaults remain unchanged. No configuration or stored-data format changes.
Evidence
4acdf1a4f3bwhile preserving the original authored commits. Reduced the introduced diff from 31 files / +2,597 net lines to 25 files / +1,297 net lines. The existing maintenance fixture table moved to its support module unchanged to respect the line cap.--maxWorkers=1, 35.72 seconds wrapper wall. The earlier Windows/diagnostic group passed in 31.47 seconds; command-reader/deadline/maintenance group passed 140 cases in 18.26 seconds. These groups overlap and are not additive. Most cold-run wall time was compilation.pnpm buildpassed in 11m55.6s before the final PID-0 predicate/test correction and unused-export cleanup; the behavior correction passed focused tests and fresh review, and final production types passed. Repository changed-file checks: production types, all 25 core test-type groups, formatting, lint, and required static guards passed. The aggregate run initially stopped at unused exports; those were removed, then the failed and remaining checks passed separately.48f886998765without changing the production patch. The prior Windows Crabbox PID-reuse assertion failure passed on the refreshed head. A related status fixture still assumed no elapsed wall time; its clock is now controlled, with guaranteed restoration, and the complete case moved into existing service-inspection test support to satisfy the line cap. All 133 status tests and 16 deadline tests passed; fresh review found no actionable findings.d36ae040a6069759ebb3489b07a80d36fd877210, including all five Windows shards and the previously failing status/service-absence shards. ClawSweeper reviewed the same head with no actionable code findings and platinum hermit patch quality; the overall gold rating reflects the installed-platform and updater qualification gaps below.Installed Windows 11 ARM64 qualification now covers the exact candidate’s Scheduled Task and Startup lifecycle, required-RPC health, real native inspection expiry, deferred-repair state preservation, and completed normal repair recovery. Detailed Windows evidence. The published 2026.9.5 updater installed the candidate but failed its schema-handoff/autostart recovery; this is not a clean published-upgrade pass. Stopped Startup fallback remains conservatively unknown when process command lines are unreadable. Fresh ClawSweeper review requested; no merge or release qualification is claimed.