fix(daemon): strip schtasks backslash prefix when matching gateway task name#91181
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 13, 2026, 7:28 PM ET / 23:28 UTC. Summary PR surface: Source +5, Tests +35. Total +40 across 2 files. Reproducibility: yes. at source level: current main keeps the leading backslash on Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this narrow normalization fix after normal maintainer review and CI; keep broader launcher path or parent-process correlation as follow-up only if stale-task false positives remain. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main keeps the leading backslash on Is this the best way to solve the issue? Yes. Stripping the scheduler root backslash in the Windows task-name matcher, then matching only exact default/profile task names, is the narrowest maintainable fix for the proven false positive while preserving duplicate-task detection. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 47759c35063c. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +5, Tests +35. Total +40 across 2 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. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…sk name Windows schtasks /Query /FO LIST /V returns task names with a leading backslash prefix (e.g. \OpenClaw Gateway for root-folder tasks). isOpenClawGatewayTaskName() compared the raw normalized name against the configured task name, so \openclaw gateway never matched openclaw gateway, causing the live gateway task to be flagged as an extra gateway-like service and recommending schtasks /Delete cleanup. Strip the leading backslash before comparison so the live launcher task is correctly recognized and excluded from the warning. Fixes openclaw#90494
4e5457d to
1d8a740
Compare
|
Maintainer verification for current head
Merging by squash. |
Summary
\OpenClaw GatewayScheduled Task is falsely flagged as an extra gateway-like service with aschtasks /Deletecleanup hint. Following the hint removes the user's auto-start mechanism. Issue doctor/status: false positive 'Other gateway-like services detected' for active Windows Scheduled Task #90494.schtasks /Query /FO LIST /Vreturns task names with a leading\(e.g.TaskName:\OpenClaw Gateway).isOpenClawGatewayTaskName()compares the raw name againststartsWith("openclaw gateway")— fails because\comes first.normalized.replace(/^\\+/, "").src/daemon/inspect.ts(+6/-1) andsrc/daemon/inspect.test.ts(+4/-1).Real behavior proof
\OpenClaw GatewayScheduled Task falsely flagged as extra gateway service withschtasks /Deletecleanup recommendation.\OpenClaw Gatewaycanonical,\Clawdbot Legacylegacy) created viaschtasks /Create. Fullschtasks /Query /FO LIST /Vcaptured (257 tasks).schtasks /Query /FO LIST /Vvia PowerShell, applied before/after detection logic to each task. Console output captured below.\OpenClaw Gatewayis correctly identified as the canonical task and excluded from the extra-services warning.\Clawdbot Legacyis still correctly detected as a legacy extra service. No regression for the other 255 system tasks.Fixes #90494