Skip to content

fix: handle localized schtasks access denied fallback#78171

Merged
BradGroux merged 1 commit intoopenclaw:mainfrom
yfge:fix/issue-77993
May 6, 2026
Merged

fix: handle localized schtasks access denied fallback#78171
BradGroux merged 1 commit intoopenclaw:mainfrom
yfge:fix/issue-77993

Conversation

@yfge
Copy link
Copy Markdown
Contributor

@yfge yfge commented May 6, 2026

Summary

  • Treat Spanish-localized schtasks access-denied output (Acceso denegado) as the same recoverable denial as English Access is denied.
  • Add a Windows startup fallback regression test for the localized denial path.
  • Add an unreleased changelog entry.

Fixes #77993

Verification

  • pnpm exec oxfmt --write --threads=1 src/daemon/schtasks.ts src/daemon/schtasks.startup-fallback.test.ts CHANGELOG.md
  • pnpm test src/daemon/schtasks.startup-fallback.test.ts
  • git diff --check

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 6, 2026
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 6, 2026

Codex review: needs maintainer review before merge.

Summary
The PR expands the Windows schtasks Startup-folder fallback matcher to include Spanish Acceso denegado, adds a regression test, and adds an unreleased changelog entry.

Reproducibility: yes. by source inspection and linked runtime logs. On current main, Spanish Acceso denegado reaches the create-failure branch but does not match the fallback predicate, so the install throws instead of writing the Startup-folder launcher.

Real behavior proof
Override: The PR has the proof: override label, added by a maintainer with source-backed rationale and local changed-gate proof.

Next step before merge
No ClawSweeper repair job is needed because the PR already contains the narrow code/test/changelog changes and has no blocking finding.

Security
Cleared: The diff only broadens an existing local Windows fallback predicate and adds a test/changelog entry; it does not add dependencies, CI changes, secret handling, or new external code execution.

Review details

Best possible solution:

Land this narrow matcher, regression test, and changelog entry, then close #77993 and reconcile #78006 as superseded or as a separate broader-locale follow-up.

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

Yes by source inspection and linked runtime logs. On current main, Spanish Acceso denegado reaches the create-failure branch but does not match the fallback predicate, so the install throws instead of writing the Startup-folder launcher.

Is this the best way to solve the issue?

Yes. Updating the shared fallback predicate and adding focused regression coverage is the narrowest maintainable fix for the reported Spanish-locale denial path.

What I checked:

  • Current main predicate misses Spanish denial: shouldFallbackToStartupEntry on current main matches English access is denied, timeout exit code 124, and timeout/no-output text, but not Acceso denegado. (src/daemon/schtasks.ts:38, f531eff6292e)
  • Fallback branch controls install success: When schtasks /Create fails, activateScheduledTask only writes the Startup-folder launcher if shouldFallbackToStartupEntry returns true; otherwise it throws schtasks create failed. (src/daemon/schtasks.ts:853, f531eff6292e)
  • Node install reaches the same service backend: resolveNodeService().install delegates to resolveGatewayService() with node-specific Windows task/script environment, so the reported node install path reaches this fallback logic. (src/daemon/node-service.ts:44, f531eff6292e)
  • Docs define the expected fallback behavior: The Windows docs say denied Scheduled Task creation should fall back to a per-user Startup-folder login item and start immediately. Public docs: docs/platforms/windows.md. (docs/platforms/windows.md:41, f531eff6292e)
  • PR diff targets the implicated path: At head a71d439f4b3363fb920bad88f948c7d3e4b39a31, the diff changes only the fallback regex, adds one Spanish fallback regression test, and adds one changelog line. (src/daemon/schtasks.ts:38, a71d439f4b33)
  • Linked issue has concrete runtime evidence: The linked bug reports OpenClaw 2026.5.4 on Spanish-locale Windows failing openclaw node install with schtasks create failed: Error: Acceso denegado. and no Startup-folder launcher.

Likely related people:

  • steipete: Recent commits changed Windows schtasks, Startup-folder fallback behavior, and the startup-fallback test helpers in the affected daemon surface. (role: recent maintainer and feature-history owner; confidence: high; commits: 13f9deb61979, fccb2b8ace6c, 0fb9a3beacc2; files: src/daemon/schtasks.ts, src/daemon/schtasks.startup-fallback.test.ts, src/daemon/node-service.ts)
  • tmimmanuel: Authored merged Windows Scheduled Task restart/install preservation work with tests in the same daemon area. (role: adjacent Windows scheduled-task contributor; confidence: medium; commits: 0fef95b17d72; files: src/daemon/schtasks.ts, src/daemon/schtasks.startup-fallback.test.ts, src/daemon/schtasks.install.test.ts)
  • vincentkoc: Recent Windows platform docs work touches the page that states the expected Scheduled Task denial fallback behavior. (role: adjacent docs maintainer; confidence: low; commits: 22c1bda2a0fb, 8d1f98ef08cd; files: docs/platforms/windows.md)

Remaining risk / open question:

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

Re-review progress:

@yfge
Copy link
Copy Markdown
Contributor Author

yfge commented May 6, 2026

Addressed the follow-up I could handle from this side:

  • rebased the branch onto current main and force-pushed 3f0ff7c048
  • added changelog contributor credit for @jackonedev
  • re-ran pnpm test src/daemon/schtasks.startup-fallback.test.ts, pnpm exec oxfmt --check --threads=1 src/daemon/schtasks.ts src/daemon/schtasks.startup-fallback.test.ts CHANGELOG.md, and git diff --check

The remaining ClawSweeper blocker is still the real after-fix Windows proof from the reporter/contributor environment. I can't generate that from this macOS checkout, so once we have a screenshot/log from the affected Spanish-localized Windows setup I'll update the PR body with it.

@BradGroux BradGroux added the proof: override Maintainer override for the external PR real behavior proof gate. label May 6, 2026
@BradGroux
Copy link
Copy Markdown
Member

Maintainer prep update:

Verification run locally:

  • pnpm install --frozen-lockfile
  • pnpm test src/daemon/schtasks.startup-fallback.test.ts — 14 tests passed
  • pnpm exec oxfmt --check --threads=1 src/daemon/schtasks.ts src/daemon/schtasks.startup-fallback.test.ts CHANGELOG.md — passed
  • git diff --check — passed
  • pnpm check:changed — blocked by an unrelated current-main core-test typecheck failure in src/agents/model-fallback.test.ts(150,63): Property env is missing in type { config: {}; } but required in type LoadPluginMetadataSnapshotParams. I confirmed the same typecheck failure reproduces on plain origin/main at 1ded8de5a9.

I did not fold that unrelated agents test fix into this Windows daemon PR so this branch stays scoped to #77993.

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. label May 6, 2026
@BradGroux
Copy link
Copy Markdown
Member

Maintainer refresh update:

  • Rebased again onto current origin/main after the unrelated core-test typecheck blocker was fixed upstream.
  • New prepared head: a71d439f4b3363fb920bad88f948c7d3e4b39a31.

Verification run locally on the refreshed head:

  • pnpm test src/daemon/schtasks.startup-fallback.test.ts — 14 tests passed
  • pnpm exec oxfmt --check --threads=1 src/daemon/schtasks.ts src/daemon/schtasks.startup-fallback.test.ts CHANGELOG.md — passed
  • git diff --check — passed
  • pnpm check:changed — passed

The previous src/agents/model-fallback.test.ts typecheck blocker is gone on the refreshed base.

@BradGroux BradGroux merged commit 03e6a02 into openclaw:main May 6, 2026
94 checks passed
@BradGroux
Copy link
Copy Markdown
Member

Merged with squash after maintainer prep and green CI.\n\nPrepared head: a71d439f4b3363fb920bad88f948c7d3e4b39a31\nMerge commit: 03e6a029ab121756507aeaedc8a7ed21988976ef\nLinked issue #77993 is now closed.

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

Labels

gateway Gateway runtime proof: override Maintainer override for the external PR real behavior proof gate. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Windows node install does not fall back when schtasks returns Spanish Acceso denegado

2 participants