Fix Windows gateway scheduled task normalization#90502
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 4, 2026, 10:21 PM ET / 02:21 UTC. Summary PR surface: Source +14, Tests +14. Total +28 across 2 files. Reproducibility: yes. for a source-level reproduction: current main preserves the leading backslash, so 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one focused Windows Scheduled Task normalization fix, preferably with this PR's profile and copy-style coverage, after redacted native Windows proof confirms managed tasks are skipped and extra tasks still warn. Do we have a high-confidence way to reproduce the issue? Yes for a source-level reproduction: current main preserves the leading backslash, so Is this the best way to solve the issue? Yes for the code shape: normalizing at the Windows task-name classifier keeps the fix local and preserves default/profile task handling while restoring warnings for copy-style tasks. It is not merge-ready until native Windows proof and duplicate-PR coordination are resolved. AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 5d350e785a91. Label changesLabel justifications:
Evidence reviewedPR surface: Source +14, Tests +14. Total +28 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
|
|
I cannot access the OpenClaw Blacksmith org from this account, so I cannot produce the requested native Windows Testbox proof myself. The mocked regression covers the classifier behavior, including the additional |
Fixes #90494
Summary
schtasksbefore comparing them to managed OpenClaw Gateway task names.\OpenClaw Gatewayand\OpenClaw Gateway (work).clawdbottasks.Root cause
schtasks /Query /FO LIST /Vcan report root-folder task names with a leading backslash, for example\OpenClaw Gateway. The inspector compared that raw name against the durable OpenClaw task nameOpenClaw Gateway, so the managed gateway task could be reported as an extra service.Real behavior proof
Behavior addressed: Windows
schtasksroot-folder task names like\OpenClaw Gatewayare treated as the managed OpenClaw Gateway task instead of an extra service, while copy-style tasks like\OpenClaw Gateway Copystill report as extra gateway jobs.Real environment tested: Local macOS checkout on latest
origin/main(126ebfc99710) using the repo Vitest wrapper with mockedprocess.platform = "win32"and mockedschtasksoutput for the Windows inspection path.Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/daemon/inspect.test.ts;git diff --check;.agents/skills/autoreview/scripts/autoreview --mode local.Evidence after fix:
src/daemon/inspect.test.tsnow feedsTaskName: \OpenClaw Gateway,TaskName: \OpenClaw Gateway (work),TaskName: \OpenClaw Gateway Copy,TaskName: Clawdbot Legacy, andTaskName: Other TaskthroughfindExtraGatewayServices(..., { deep: true }).Observed result after fix: Vitest reported
Test Files 1 passed (1)andTests 13 passed | 5 skipped (18). The expected result includes only\OpenClaw Gateway CopyandClawdbot Legacy; managed default/profile gateway tasks and unrelated tasks are not reported. Final autoreview was clean with no accepted/actionable findings.What was not tested: Native Windows Task Scheduler execution was not run; this PR covers the source-level detection path with mocked
schtasksoutput.Verification
node scripts/run-vitest.mjs src/daemon/inspect.test.tsgit diff --check.agents/skills/autoreview/scripts/autoreview --mode local