Skip to content

fix(dev-fleet): run pods on Windows when Task Scheduler is present - #30971

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/27861-windows-pod-gate
Nov 7, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/27861-windows-pod-gate

Conversation

@bolichen97

@bolichen97 bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On Windows, Dev Fleet runs pods through the Task Scheduler backend, with the same pod identity and removal checks that Linux and macOS get.

On Windows, Dev Fleet greys out Spin up, Restart, Stop and Open, and says pods need systemd or launchd, although kirocrew pod up works on the same host. Because the pod gate reports pods unavailable, Dev Fleet loads no pod config. Its pod checkout guard then answers "proceed", and worktree Remove and Prune skip the pod-inactive check, while the agent pod routes and the CLI still start and stop Windows pods.

Why it matters

Windows users see disabled pod controls with a wrong reason. Dev Fleet also acts on real Windows pods without checking which checkout a pod belongs to or whether it is still running: an agent pod_down can stop another checkout's pod of the same name, and Remove can delete a checkout under a running pod.

Not a goal

  • A separate fail-closed branch for Windows without schtasks.exe. On such a host every pod lifecycle call already refuses, so no pod can be running for the guard to collide with.
  • Make Live's own service-manager gates, and any Linux or macOS behaviour.
  • What Restart does on Windows. It stops then starts the pod, so the pod's HOME is reclaimed, as the Dev Fleet spec already documents for that button.
  • Any other change to the pod backend. The one change is how a refused task-create probe is reported (below).

What changed (motivation → approach → change)

The Dev Fleet pod gate (dev_fleet/runtime.py) admitted only Linux with systemctl and macOS with launchctl, so Windows fell into the catch-all arm. That gate predates the Windows pod backend: Windows pods are per-user scheduled tasks, and every pod call Dev Fleet makes already dispatches to that backend.

The gate gains a Windows arm. Pods are available when schtasks.exe resolves from a trusted system directory, the same lookup the backend uses, with no process started. Without it, the reason names schtasks.exe instead of systemd or launchd. With the gate open, the existing checkout guard and the Remove and Prune pod checks run on Windows exactly as on the other platforms, and the page shows the pod controls. The Dev Fleet spec's platform section now names the Windows backend, and so do the App Store highlight and configuration lines in app.json, with their catalog entries in every locale.

The pod buttons run Kiro Crew's own interpreter by its absolute path. Dev Fleet's command runner looked up anything without a / as a bare tool name, so a Windows C:\ interpreter under the user's home was refused before the pod command started. It now runs an absolute path as given, as it already did on Linux and macOS.

Some Windows hosts have schtasks.exe but forbid user task creation (Group Policy, a locked-down Schedule service, no TASK_CREATE right). The backend's create probe is refused there, and that refusal used to surface as a plain PodError, so Remove and Prune failed on every attempt. A refused create now raises WindowsTaskCreateRefused (pod/windows.py), which pod/runtime.py reports as PodBackendAbsent, the same type systemd raises with no user session: no pod can be made on that host, so removal takes the existing absent-backend path. That path still refuses when the pod reads as active and never deletes a pod's HOME. A Windows pod now also reads as active while its boot's producer process is alive, before any gateway pid exists (unit_state in pod/windows.py), so a removal cannot delete a checkout a boot is still preparing. A missing schtasks.exe or a probe that times out stays a PodError.

Backwards compatibility

Compatible: Linux and macOS take the same gate arms as before. On Windows, pod controls that were hidden appear, and pod operations and worktree removal get the identity and liveness checks the other platforms already run. A Windows host whose policy forbids user task creation keeps Remove and Prune working, as before this change: the refused probe reports the backend absent, and removal names the pod HOME it could not reclaim instead of deleting it. A command Dev Fleet names by absolute path now runs as given on Windows too, which Linux and macOS already did.

Removes nothing: the diff adds a gate arm and rewords a reason; no path, key, record or function is taken away.

Tests

  • test/test_dev_fleet_app_context.py::test_pod_gate_admits_windows_when_task_scheduler_resolves, two cases on sys.platform = "win32": with schtasks.exe resolvable the gate is open with no reason; without it the gate is closed and the reason names schtasks.exe, not systemd. The gate runs at import, so the test loads a private copy of the module (testing-conventions D11).
  • test/test_dev_fleet_server_more_coverage.py::test_run_cmd_spawns_a_windows_absolute_interpreter_as_given: with Windows path rules, the runner spawns a C:\Users\...\python.exe interpreter as given, even when the trusted-directory lookup would refuse it.
  • test/test_pod_windows.py::test_a_refused_task_create_means_the_pod_backend_is_absent: a schtasks /Create refusal from the real gate surfaces as PodBackendAbsent, and a missing schtasks.exe stays a plain PodError. Red with the runtime.py hunk reverted (the refusal escaped as WindowsTaskCreateRefused), green on this head; the whole file passes at -n 1.
  • test/test_pod_windows.py::test_unit_state_is_active_while_a_boot_producer_lives_before_its_gateway: a preparing run whose producer is alive reads as active, a dead producer or a finished run does not, and the run is read before the pid (the producer writes the pid before ready, so a read that misses preparing still finds the pid). Red with the windows.py change reverted (it read inactive), green on this head.
  • Determinism: 20 of 20 runs at -n0, 10 of 10 runs of the whole file at -n 4 beside its neighbours, and the file in a shuffled order all pass.
  • Related Dev Fleet and built-in manifest tests pass at -n 4. npm run i18n:check passes against origin/main (manifest sync, pseudolocale, DNT, changed-value QA), and the frontend i18n and app-manifest suites pass, including the per-locale style checks with I18N_BASE_REF=origin/main.

Proof: PROVEN test/test_dev_fleet_app_context.py::test_pod_gate_admits_windows_when_task_scheduler_resolves[C:\Windows\System32\schtasks.exe], test/test_dev_fleet_app_context.py::test_pod_gate_admits_windows_when_task_scheduler_resolves[None], test/test_dev_fleet_server_more_coverage.py::test_run_cmd_spawns_a_windows_absolute_interpreter_as_given, test/test_pod_windows.py::test_unit_state_is_active_while_a_boot_producer_lives_before_its_gateway (head 09f4255)

Manual verification

Still needed on a Windows host: open Dev Fleet with a provisioned worktree, confirm the pod controls show and Spin up / Stop work, and confirm Remove on a worktree with a running pod stops it first. Not run here (Linux host); the gate itself is covered by the unit test above.

Screenshots / video

N/A: the frontend change is catalog text only, the wording of one App Store highlight and one configuration line; no component, control or layout changes. The page already renders the pod controls from the pods_available payload field; on Windows that field now reads true.

Related Issues

Closes #27861

Sibling sweep

Swept: git grep -n "sys.platform ==" -- src/kiro_crew/apps/builtins/dev_fleet/
Sibling: src/kiro_crew/apps/builtins/dev_fleet/live.py:436 -- not affected -- it picks the LIVE gateway's service manager for Make Live, which keeps its own gates by design.

Swept: git grep -n -i -E "pods need systemd|Pods run on Linux" -- src website/src/i18n/locales/en.json
Sibling: src/kiro_crew/builtin_skills/kirocrew-dev/kirocrew-worktree-dev/SKILL.md:205 -- not affected -- it describes the kirocrew pod CLI, which already ran on Windows before this change.

Swept: git grep -n -F ""/" not in" -- src/kiro_crew/apps/builtins/dev_fleet/
Sibling: src/kiro_crew/apps/builtins/dev_fleet/runtime.py:568 -- changed here

Pattern harvest

Not generalizable: one platform gate that was written before its module gained a Windows backend, and one /-only path test that a repo-wide grep finds nowhere else on an executable; there is no repeatable code shape to lint for.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 6, 2026 01:36
@bolichen97
bolichen97 requested a review from CrysisDeu November 6, 2026 01:36
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 6, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) November 6, 2026 01:43
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)

UX-level review of 09f42555898e9fbdd508c14fc9d3dfadc8d982d8 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

cannot evaluate: missing screenshots of Dev Fleet on Windows. The PR attaches no image, so the blind read was not performed. The diff turns on pod controls and changes user-visible pod copy that nobody has seen rendered.

Evidence gaps

  • Pod controls on Windows. Spin up, Restart, Stop and Open go from greyed out to enabled when the _POD_AVAILABLE Windows arm admits the host. Close it with a screenshot of the Dev Fleet worktree row on a Windows host with a provisioned pod, showing the enabled controls.
  • New disabled reason on Windows. The new string is "Pods are per-user Task Scheduler tasks on Windows, but no trusted schtasks.exe was found." Close it with a screenshot of a worktree row on a host without schtasks.exe, showing where this reason renders.
  • Reworded App Store copy. highlight_7 and configuration_1 now name "Windows (Task Scheduler)". Close it with a screenshot of the Dev Fleet App Store detail page.

Notes

  • "trusted schtasks.exe": "trusted" doesn't tell the user what to fix. Say where the file is expected, e.g. "no schtasks.exe was found in C:\Windows\System32", and the reason becomes something they can act on.

[UX-REVIEWED] 09f4255

Description read

[DESCRIPTION-READ] 231045dcb2382a5b1ff5d8cf2213a776b866b2d0b10f7a0928a38c52f2b6ac92

That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 09f42555898e9fbdd508c14fc9d3dfadc8d982d8 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks. The pod gate reuses the backend's own trusted schtasks.exe lookup, the refused-create probe now takes the absent-backend path that already exists, and CI's Windows job runs test_pod_windows.py.

Notes

  • The description is inconsistent. "Not a goal" says the only backend change is how a refused task-create probe is reported. But unit_state in pod/windows.py now also reports "active" while a boot is still preparing. That is a second backend change, and the CLI's pod up health wait and orphan sweep (pod/cli.py around lines 718 and 1364) read it on every Windows path, not only Dev Fleet. The PR should say so.
  • _boot_in_progress treats an unreadable run record as "active". If a record is corrupt for good, the pod reads as active forever: orphan cleanup skips it and a failed boot is never reported as crashed. Choosing to fail closed is fine here, but there is no way out of that state. Name one, e.g. clearing the record on pod down.
  • Manual verification on a Windows host is still outstanding. The PR says so honestly. Spin up, Stop and Remove-under-a-running-pod should be checked on a real Windows host before merge.

[DESIGN-REVIEWED] 09f4255

Description read

[DESCRIPTION-READ] 826cd9f24a9af4025223751b3d660f3e7713c8824e3cf76fd2dc27f06c9dd4ea

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 09f42555898e9fbdd508c14fc9d3dfadc8d982d8 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. Each item traces to #27861 or to a guard that only runs once the Windows gate opens.

What this change ships

Inventory (6 items) — 6 justified

Intent: Windows Dev Fleet users can spin up, stop and remove pods through Task Scheduler, with the same identity and liveness checks as Linux and macOS. This is a FIX.

  1. Windows with schtasks.exe shows the pod controls instead of greying them out — justified
  2. Windows without schtasks.exe gives a reason naming schtasks.exe, not systemd or launchd — justified
  3. Pod buttons run a Windows C:\ interpreter as given, instead of refusing it as a bare tool name — justified
  4. A host whose policy refuses task creation now reports the pod backend absent, so Remove and Prune take the existing absent-backend path (2 consumers in worktree_ops_removal.py) — justified
  5. A Windows pod reads as active while its boot is still preparing, before any gateway pid exists — justified
  6. Spec, app.json highlight and configuration line, and all locale catalogs now name Task Scheduler — justified

[FIRST-PRINCIPLES-REVIEWED] 09f4255

Description read

[DESCRIPTION-READ] 1bd6b132f025f39eb19d46c8ec673e0e9593abf97bdcdfd9f5fb044a8c5cafe1

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 09f42555898e9fbdd508c14fc9d3dfadc8d982d8 — this comment is updated in place on each push.

Review details

No findings.

Notes:

  • On Windows, active_names counts only pods that already have a recorded gateway pid. A pod still in its preparing boot is therefore not seen by the removal liveness gates in worktree_ops_removal.py, although the new unit_state does count it. Before this PR that path had no pod check on Windows at all, so this is not a regression.

[OPUS-REVIEWED] 09f4255

Verdict parsed from the review's SHA-scoped output markers for commit 09f42555898e9fbdd508c14fc9d3dfadc8d982d8.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 09f42555898e9fbdd508c14fc9d3dfadc8d982d8 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)

GPT 6.1 flagged blocking issues on 09f42555898e9fbdd508c14fc9d3dfadc8d982d8; Opus 5.5 adjudication downgraded every one of them. Downgraded: the remedy each one needs is disproportionate to the harm it prevents. Adjudication downgraded all 1 blocking finding(s): the remedy each one requires is disproportionate to the harm it prevents.

This comment is updated in place on each push.

Review details

BLOCKING -- src/kiro_crew/pod/windows.py:1325 -- Boot liveness does not reach normal worktree-removal checks

if _boot_in_progress(cfg, name) or supervised_pid(cfg, name) is not None:
Trigger: Start kirocrew pod up on Windows, then Remove its clean worktree while the producer is preparing, before .winpid exists. With Task Scheduler usable, _worktree_remove_locked checks active_names, not this boot-aware unit_state; enumeration misses the producer, and the installed .cmd excludes its HOME from orphan reclamation. The CLI does not hold Dev Fleet's worktree lock.
Outcome: Both removal checks pass and git worktree remove deletes the checkout the producer is preparing to launch, causing the gateway launch to fail.
Anchor: defect
Fix: Consult boot-aware unit_state in the normal removal checks, including the final check under _GIT_MUTATION_LOCK, and refuse removal while the producer is preparing.
Sites: src/kiro_crew/apps/builtins/dev_fleet/worktree_ops_removal.py:660, src/kiro_crew/apps/builtins/dev_fleet/worktree_ops_removal.py:685, and src/kiro_crew/apps/builtins/dev_fleet/worktree_ops_removal.py:811; Prune and auto-prune reach the same remover through src/kiro_crew/apps/builtins/dev_fleet/worktree_ops.py:467 and src/kiro_crew/apps/builtins/dev_fleet/worktree_ops.py:720.
[BLOCK-MERGE-DOWNGRADED] 09f4255
[GPT-REVIEWED] 09f4255

Adjudication (Opus 5.5) — is blocking on each finding proportionate?

F1 — Harm: LOW. Two conditions are confirmed. First, active_names (src/kiro_crew/pod/windows.py:1333) lists only .winpid records, so a producer still in preparing is not counted; only unit_state checks for it (src/kiro_crew/pod/windows.py:1325). Second, all three removal checks use active_names (src/kiro_crew/apps/builtins/dev_fleet/worktree_ops_removal.py:660, :685, :811).

The failure needs the operator to remove a clean worktree during the few seconds a pod up from that same worktree is still preparing. The result is a loud gateway launch failure. Nothing retries automatically, but no uncommitted work is lost because the checkout was clean, and recreating the worktree fixes it.

The real fix is not one line. Adding preparing pods to active_names would send a booting pod into _reclaim_pod_locked's shutdown path (:663). The alternative is a boot-aware check at three sites, including the final one under the git lock, in a built-in app that is being moved out of core. Either way, every future reader of that path carries a new ordering contract, which costs more than a rare, visible, recoverable race.

[ADJUDICATION] 09f42555898e9fbdd508c14fc9d3dfadc8d982d8 total=1 uphold=0 downgrade=1
DOWNGRADE F1 src/kiro_crew/pod/windows.py:1325 reason=disproportionate-remedy
[GPT-ADJUDICATED] 09f42555898e9fbdd508c14fc9d3dfadc8d982d8

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 09f42555898e9fbdd508c14fc9d3dfadc8d982d8 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 force-pushed the fix/27861-windows-pod-gate branch from b6a2802 to eaf6322 Compare November 6, 2026 04:21
@bolichen97

bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in docs/system-specs/modules/ beside this change since this head went green (b764e20 -> cddbec1); CI re-running. The new base also carries #30984, which fixes the test_dashboard_server_composition_contract.py count that failed Backend Tests shard 6 on the previous head; the diff itself is unchanged.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 force-pushed the fix/27861-windows-pod-gate branch from eaf6322 to 0af7bfd Compare November 6, 2026 07:55
@bolichen97

bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97]

  • span=e264b4bb4c37 App Store copy still lists only Linux and macOS for pods

fixed in 0af7bfd: the highlights line and the configuration line in app.json now name Task Scheduler on Windows.
The matching en.json entries are byte-identical to the manifest (manifest-sync passes), the eleven translated catalogs carry the same change in each language, and en-XA is regenerated.
The old wording appears nowhere else in the copy this app ships.

@bolichen97
bolichen97 force-pushed the fix/27861-windows-pod-gate branch from 0af7bfd to 99e328f Compare November 6, 2026 09:54
@bolichen97

bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/locales/ (catalogs this change edits) and beside src/kiro_crew/apps/builtins/dev_fleet/ since this head went green (f5340cc -> 4619ff1); CI re-running. The patch is unchanged; the review lanes on the previous head stopped on a GitHub API rate limit, not on a finding.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 force-pushed the fix/27861-windows-pod-gate branch from 99e328f to c931927 Compare November 6, 2026 12:33
@bolichen97

bolichen97 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased: main moved in website/src/i18n/locales/ (catalogs this change edits), test/test_dev_fleet_app_context.py and the dev_fleet tests that import runtime.py since this head went green (4619ff1 -> 090dad8); CI re-running. The patch is unchanged: the added and removed lines are identical to the reviewed head 99e328f.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 6, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97
bolichen97 force-pushed the fix/27861-windows-pod-gate branch from c931927 to 97a44a8 Compare November 6, 2026 14:47
@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=4141cec80f1d Newly enabled Windows pod controls reject per-user interpreters

fixed in 97a44a8: _run_cmd now resolves only a bare name; an absolute path (C:\... on Windows too) runs as given, which Linux and macOS already did.
The pod verbs pass our own interpreter from _find_cli, so a venv or per-user Python under the home no longer reaches _trusted_bin's home refusal.
Pinned by test/test_dev_fleet_server_more_coverage.py::test_run_cmd_spawns_a_windows_absolute_interpreter_as_given (Windows path rules, trusted lookup stubbed to refuse).

[operator: bolichen97]

@bolichen97

Copy link
Copy Markdown
Contributor Author
  • span=565f1a255c19 Remove and Prune refuse where Task Scheduler forbids user task creation

Rebutted: intended and disclosed. Backwards compatibility states that a Windows host whose policy forbids user task creation refuses Remove and Prune with the backend's own reason, and the maintainer recommendation on #27861 accepts that such a host passes the gate and fails later with require_backend's message.
The refusal is the fail-closed direction and matches macOS, where a failed launchd.require_backend() refuses removal the same way. Before this PR, Windows removed checkouts with no pod check at all, which is the bug #27861 reports.
Fix 1 (gate _POD_AVAILABLE on the create probe) restores that unchecked removal on these hosts and creates a scheduled task at import. Fix 2 retypes a kiro_crew.pod.runtime error, a pod-backend change this PR lists under Not a goal.
Letting removal proceed on policy-restricted hosts is a separate request, not a defect in this diff.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 6, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] The red Backend Tests shard 2 (Linux, Windows and macOS) and the Coverage Gate that follows it come from main, not this diff: test/test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget fails because the security package on main is 34733 lines against a 34699 budget, and this PR does not touch that package. #31469 raises the budget to main's size. This PR waits for it to merge, then re-runs on the fixed base.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 6, 2026
@bolichen97

Copy link
Copy Markdown
Contributor Author

[operator: bolichen97] Main's line-budget fix (#31469) has merged, so the shard 2 and Coverage Gate failures here should clear once CI runs on a base that includes it. A re-run of the existing jobs would test the same old merge commit, so the branch needs one more rebase. This PR has already used its three re-syncs, so it waits for a maintainer to comment Re-sync budget reset before that rebase, and it still needs a maintainer review. The patch itself is unchanged, and every review lane passes at 97a44a8.

@bolichen97
bolichen97 force-pushed the fix/27861-windows-pod-gate branch from 97a44a8 to 28bba02 Compare November 6, 2026 23:40
@bolichen97

Copy link
Copy Markdown
Contributor Author

Rebased onto main to clear the red checks on 97a44a8. No change to this PR's own diff.

  • Backend Tests (3.12, 2), Backend Tests (Windows) (2), macOS Tests / Backend Tests (macOS) (2) and Coverage Gate: all four failed on one test, test_security_gate_liveness.py::test_the_package_stays_within_its_line_budget (package at 34,733 lines over the old budget). The macOS annotation names the same assertion at line 711. Main has since raised the budget, and the test passes on this head.

Local checks on 28bba02: test_dev_fleet_app_context.py and test_dev_fleet_server_more_coverage.py pass (136 tests), flake8 and isort are clean, and both local reviews found nothing.

[operator: bolichen97]

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 6, 2026
The Dev Fleet pod gate admitted only Linux with systemctl and macOS
with launchctl, so on Windows it reported pods unavailable with a
systemd/launchd reason even though the pod runtime drives Windows pods
as per-user scheduled tasks. With the gate closed Dev Fleet loaded no
pod config, so the checkout guard answered "proceed" and worktree
Remove and Prune skipped the pod-inactive check.

Admit win32 when schtasks.exe resolves from a trusted system
directory, name schtasks.exe in the reason when it does not, and
update the Dev Fleet spec's platform lines. The App Store highlight
and configuration lines, and their catalog entries in every locale,
now name Task Scheduler on Windows too.

Closes #27861
@bolichen97

Copy link
Copy Markdown
Contributor Author

Fixed in 09f4255: the Opus finding on 28bba02 (on a Windows host that has schtasks.exe but forbids user task creation, Remove and Prune failed on every attempt).

  • A refused schtasks /Create probe now raises WindowsTaskCreateRefused, which require_backend reports as PodBackendAbsent, the same type systemd raises with no user session. Removal takes the existing absent-backend path. A missing schtasks.exe or a probe timeout stays a plain PodError.
  • That path refuses when the pod reads as active. A Windows pod now reads as active while its boot's producer process is alive, before any gateway pid exists, so a removal cannot delete a checkout a boot is still preparing. The run record is read before the pid, because the producer writes the pid before it publishes ready.

Tests in test/test_pod_windows.py: test_a_refused_task_create_means_the_pod_backend_is_absent and test_unit_state_is_active_while_a_boot_producer_lives_before_its_gateway, both red without the change and green on this head. Not run on a Windows host.

[operator: bolichen97]

@bolichen97
bolichen97 force-pushed the fix/27861-windows-pod-gate branch from 28bba02 to 09f4255 Compare November 7, 2026 04:22
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Nov 7, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for the on-call. Review lanes pass on 09f4255, no conflict, no open change request.

@KiroCrewCaptain
KiroCrewCaptain merged commit 480d162 into main Nov 7, 2026
97 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/27861-windows-pod-gate branch November 7, 2026 05:38
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants