Skip to content

fix(daemon): ignore active scheduled gateway task#90501

Closed
sahibzada-allahyar wants to merge 1 commit into
openclaw:mainfrom
sahibzada-allahyar:fastino-90494-doctor-windows-task-b
Closed

fix(daemon): ignore active scheduled gateway task#90501
sahibzada-allahyar wants to merge 1 commit into
openclaw:mainfrom
sahibzada-allahyar:fastino-90494-doctor-windows-task-b

Conversation

@sahibzada-allahyar

Copy link
Copy Markdown
Contributor

Summary

  • Treat schtasks task names with a leading \ as the same canonical Windows launcher task name.
  • Keep genuinely separate legacy gateway-like tasks visible in the duplicate-service detector.
  • Add focused Windows scheduled-task regression coverage.

Fixes #90494.

Real behavior proof

  • Behavior addressed: findExtraGatewayServices no longer reports the active Windows Scheduled Task launcher as an extra gateway-like service when schtasks /Query /FO LIST /V returns TaskName: \OpenClaw Gateway.
  • Real environment tested: local OpenClaw checkout on macOS, branch fastino-90494-doctor-windows-task-b, daemon test shard with mocked Windows schtasks output.
  • Exact steps or command run after this patch:
git diff --check
node scripts/test-projects.mjs src/daemon/inspect.test.ts
  • Evidence after fix:
git diff --check
# no output

[test] starting test/vitest/vitest.daemon.config.ts

 RUN  v4.1.7 /Users/allahyar/Documents/fastino-tasks/openclaw-tui-90494b

 Test Files  1 passed (1)
      Tests  15 passed | 5 skipped (20)
   Start at  02:19:43
   Duration  202ms (transform 94ms, setup 97ms, import 11ms, tests 27ms, environment 0ms)

[test] passed 1 Vitest shard in 2.81s
  • Observed result after fix: the new regression test verifies \OpenClaw Gateway is skipped as the canonical active launcher task, while a distinct legacy \Clawdbot Legacy Runner task is still reported.
  • What was not tested: full CI matrix was not run locally.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 5, 2026
@clawsweeper

clawsweeper Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 4, 2026, 9:27 PM ET / 01:27 UTC.

Summary
This PR normalizes leading-backslash Windows Scheduled Task names in the daemon extra-gateway detector and adds mocked Windows regression coverage.

PR surface: Source +3, Tests +42. Total +45 across 2 files.

Reproducibility: yes. from source, but not from a live Windows run in this review. Current main leaves \OpenClaw Gateway backslash-prefixed before the canonical-name check, then reports it through the Windows marker scan.

Review metrics: none identified.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted Windows proof showing schtasks /Query /FO LIST /V returns TaskName: \OpenClaw Gateway and openclaw gateway status --deep no longer lists it as an extra service.
  • Keep private details out of the proof, including user names, phone numbers, API keys, IPs, non-public endpoints, and local paths beyond what is necessary.

Proof guidance:

  • [P1] Needs real behavior proof before merge: Needs real Windows behavior proof before merge: the PR body supplies mocked daemon-shard output from macOS, but no redacted Windows terminal output, screenshot, recording, or logs showing the scheduled-task/status path after the patch. Updating the PR body with proof should trigger a fresh ClawSweeper review; if not, ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] The supplied after-fix proof is a mocked daemon test shard run on macOS, so maintainers still lack real Windows proof that schtasks /Query /FO LIST /V plus openclaw gateway status --deep no longer reports the active Scheduled Task.

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow task-name normalization after a redacted real Windows terminal proof shows the active scheduled launcher is skipped while genuinely legacy tasks remain visible.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Contributor action is needed rather than an automated repair: add real Windows scheduled-task/status proof for the after-fix behavior before merge.

Security
Cleared: The diff only changes daemon string normalization and tests; it does not alter secrets handling, dependencies, CI, package metadata, or executable download paths.

Review details

Best possible solution:

Land the narrow task-name normalization after a redacted real Windows terminal proof shows the active scheduled launcher is skipped while genuinely legacy tasks remain visible.

Do we have a high-confidence way to reproduce the issue?

Yes from source, but not from a live Windows run in this review. Current main leaves \OpenClaw Gateway backslash-prefixed before the canonical-name check, then reports it through the Windows marker scan.

Is this the best way to solve the issue?

Yes for the bounded false-positive bug. Normalizing the root task path before the existing canonical-name comparison is the narrow maintainable fix; the remaining gap is real Windows after-fix proof.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 126ebfc99710.

Label changes

Label changes:

  • add P2: This is a normal-priority Windows daemon/status false-positive fix with limited blast radius, not an urgent runtime outage or security issue.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Needs real Windows behavior proof before merge: the PR body supplies mocked daemon-shard output from macOS, but no redacted Windows terminal output, screenshot, recording, or logs showing the scheduled-task/status path after the patch. Updating the PR body with proof should trigger a fresh ClawSweeper review; if not, ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Label justifications:

  • P2: This is a normal-priority Windows daemon/status false-positive fix with limited blast radius, not an urgent runtime outage or security issue.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Needs real Windows behavior proof before merge: the PR body supplies mocked daemon-shard output from macOS, but no redacted Windows terminal output, screenshot, recording, or logs showing the scheduled-task/status path after the patch. Updating the PR body with proof should trigger a fresh ClawSweeper review; if not, ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +3, Tests +42. Total +45 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 1 44 2 +42
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 48 3 +45

What I checked:

  • Current main behavior: On current main, isOpenClawGatewayTaskName normalizes the raw task name without stripping the root task path prefix, so a \OpenClaw Gateway name misses the canonical-name skip before the Windows scan checks task name/command markers. (src/daemon/inspect.ts:201, 126ebfc99710)
  • PR implementation: The PR strips one leading backslash before the existing canonical-name comparison, preserving the existing Windows detector flow that skips canonical OpenClaw task names and reports noncanonical marker tasks. (src/daemon/inspect.ts:202, 015da9016c98)
  • Regression coverage: The PR adds mocked Windows schtasks coverage for \OpenClaw Gateway being skipped and \Clawdbot Legacy Runner still being reported as legacy. (src/daemon/inspect.test.ts:390, 015da9016c98)
  • User-visible caller: Doctor/status surfaces use findExtraGatewayServices to print Other gateway-like services detected and cleanup hints, so the detector output directly controls the false-positive warning and deletion hint described by the linked issue. (src/commands/doctor-gateway-services.ts:661, 126ebfc99710)
  • Windows task contract in docs: The gateway docs document native Windows managed startup as a Scheduled Task named OpenClaw Gateway or OpenClaw Gateway (<profile>), matching the canonical name this detector is meant to skip. Public docs: docs/gateway/index.md. (docs/gateway/index.md:277, 126ebfc99710)
  • Current-main containment check: The PR head commit is not contained in current main or origin/main, so current main has not already absorbed this patch. (015da9016c98)

Likely related people:

  • steipete: Current blame and symbol history for the daemon extra-service detector, doctor warning surface, and Windows task-name constants all point to the same current-main commit by Peter Steinberger; history is shallow, so this is a routing signal rather than sole ownership. (role: current-main area contributor; confidence: medium; commits: 29f5e9d35c33; files: src/daemon/inspect.ts, src/commands/doctor-gateway-services.ts, src/daemon/constants.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 5, 2026
@sahibzada-allahyar

Copy link
Copy Markdown
Contributor Author

Closing this to free active external PR capacity. The remaining blocker is real Windows scheduled-task/status proof, which I cannot produce from this macOS environment. This can be reopened if Windows proof becomes available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor/status: false positive 'Other gateway-like services detected' for active Windows Scheduled Task

1 participant