Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/service/windows-checked-stop-live.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/)) {
Expand Down
3 changes: 3 additions & 0 deletions structure/ops/windows-checked-stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion tests/windows/windows-checked-stop-live.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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");
});
Expand Down
Loading