From 37d9f4297de982e68bb5bd6895845afc341534ed Mon Sep 17 00:00:00 2001 From: luvs01 <27862058+luvs01@users.noreply.github.com> Date: Fri, 20 Nov 2026 10:15:20 +0900 Subject: [PATCH] fix(windows): recognize Korean disabled and queued task states --- src/service/windows-checked-stop-live.ts | 4 ++-- structure/ops/windows-checked-stop.md | 3 +++ tests/windows/windows-checked-stop-live.test.ts | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/service/windows-checked-stop-live.ts b/src/service/windows-checked-stop-live.ts index e367e4ca808..a825e457bc3 100644 --- a/src/service/windows-checked-stop-live.ts +++ b/src/service/windows-checked-stop-live.ts @@ -127,8 +127,8 @@ export const liveWindowsStopCommandRunner: WindowsStopCommandRunner = (program, * falls back to Get-ScheduledTask's locale-independent State enum. */ // A queued instance can launch after Part A. Only ready and disabled prove inactivity. -const TASK_CSV_ACTIVE = new Set(["running", "queued", "正在运行", "已排队", "실행 중"]); -const TASK_CSV_NOT_RUNNING = new Set(["ready", "disabled", "就绪", "已禁用", "준비"]); +const TASK_CSV_ACTIVE = new Set(["running", "queued", "正在运行", "已排队", "실행 중", "대기"]); +const TASK_CSV_NOT_RUNNING = new Set(["ready", "disabled", "就绪", "已禁用", "준비", "사용 안 함"]); export function parseTaskCsvState(csv: string): "running" | "not-running" | "unknown" { for (const line of csv.split(/\r?\n/)) { diff --git a/structure/ops/windows-checked-stop.md b/structure/ops/windows-checked-stop.md index 8ce82db99e5..dcea6899bad 100644 --- a/structure/ops/windows-checked-stop.md +++ b/structure/ops/windows-checked-stop.md @@ -91,6 +91,9 @@ reports a refusal as `WindowsCheckedStopRefusedError` with what had already happ Scheduler it reauthorizes after validating the helper proof, before sending `stop` on stdin. The helper and outer deadlines must still be open after authorization. +For the Korean Scheduler status, `사용 안 함` (disabled) proves inactivity and `대기` +(queued) remains active because that instance can still start. + Each step that asks the machine runs under a cap that races a timer and rechecks the elapsed time on the injected clock. The Scheduler proof-time authorization shares the 2 s task-end cap. Opening bind-time watches and the other authorization calls have no individual cap. Authorization diff --git a/tests/windows/windows-checked-stop-live.test.ts b/tests/windows/windows-checked-stop-live.test.ts index fd50849f3f5..04e630e494d 100644 --- a/tests/windows/windows-checked-stop-live.test.ts +++ b/tests/windows/windows-checked-stop-live.test.ts @@ -169,9 +169,11 @@ describe("capped command answers", () => { expect(parseTaskCsvState('"\\opencodex-proxy","N/A","正在运行"')).toBe("running"); expect(parseTaskCsvState('"\\opencodex-proxy","2026/11/17 9:00:00","就绪"')).toBe("not-running"); expect(parseTaskCsvState('"\\opencodex-proxy","N/A","已禁用"')).toBe("not-running"); - // ko-KR, observed on two machines: Running, Ready. + // System32\ko-KR\schtasks.exe.mui: Running, Ready, Queued (534), Disabled (535). expect(parseTaskCsvState('"\\opencodex-proxy","N/A","실행 중"')).toBe("running"); expect(parseTaskCsvState('"\\opencodex-proxy","N/A","준비"')).toBe("not-running"); + expect(parseTaskCsvState('"\\opencodex-proxy","N/A","대기"')).toBe("running"); + expect(parseTaskCsvState('"\\opencodex-proxy","N/A","사용 안 함"')).toBe("not-running"); // Another task path still does not count, whatever the word. expect(parseTaskCsvState('"\\Tools\\opencodex-proxy","N/A","正在运行"')).toBe("unknown"); });