Repository navigation
fix(dev-fleet): run pods on Windows when Task Scheduler is present - #30971
Conversation
UX Review (Opus 5.5) — ✅ PASS (a BLOCK with no Trigger and no Outcome does not block)UX-level review of 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
Notes
[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 |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The pod gate reuses the backend's own trusted Notes
[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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of 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 shipsInventory (6 items) — 6 justifiedIntent: 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.
[FIRST-PRINCIPLES-REVIEWED] 09f4255 Description read[DESCRIPTION-READ] 1bd6b132f025f39eb19d46c8ec673e0e9593abf97bdcdfd9f5fb044a8c5cafe1 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Review detailsNo findings. Notes:
[OPUS-REVIEWED] 09f4255 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findings (all downgraded on adjudication)GPT 6.1 flagged blocking issues on This comment is updated in place on each push. Review detailsBLOCKING -- src/kiro_crew/pod/windows.py:1325 -- Boot liveness does not reach normal worktree-removal checks
Adjudication (Opus 5.5) — is blocking on each finding proportionate?F1 — Harm: LOW. Two conditions are confirmed. First, The failure needs the operator to remove a clean worktree during the few seconds a The real fix is not one line. Adding preparing pods to False positive or not applicable? A repository writer can comment: |
b6a2802 to
eaf6322
Compare
|
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 [operator: bolichen97] |
eaf6322 to
0af7bfd
Compare
|
[operator: bolichen97]
|
0af7bfd to
99e328f
Compare
|
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] |
99e328f to
c931927
Compare
|
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] |
c931927 to
97a44a8
Compare
[operator: bolichen97] |
[operator: bolichen97] |
|
[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: |
|
[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 |
97a44a8 to
28bba02
Compare
|
Rebased onto main to clear the red checks on 97a44a8. No change to this PR's own diff.
Local checks on 28bba02: [operator: bolichen97] |
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
|
Fixed in 09f4255: the Opus finding on 28bba02 (on a Windows host that has
Tests in [operator: bolichen97] |
28bba02 to
09f4255
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on 09f4255, no conflict, no open change request.
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 upworks 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_downcan stop another checkout's pod of the same name, and Remove can delete a checkout under a running pod.Not a goal
schtasks.exe. On such a host every pod lifecycle call already refuses, so no pod can be running for the guard to collide with.What changed (motivation → approach → change)
The Dev Fleet pod gate (
dev_fleet/runtime.py) admitted only Linux withsystemctland macOS withlaunchctl, 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.exeresolves from a trusted system directory, the same lookup the backend uses, with no process started. Without it, the reason namesschtasks.exeinstead 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 inapp.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 WindowsC:\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.exebut forbid user task creation (Group Policy, a locked-down Schedule service, noTASK_CREATEright). The backend's create probe is refused there, and that refusal used to surface as a plainPodError, so Remove and Prune failed on every attempt. A refused create now raisesWindowsTaskCreateRefused(pod/windows.py), whichpod/runtime.pyreports asPodBackendAbsent, 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_stateinpod/windows.py), so a removal cannot delete a checkout a boot is still preparing. A missingschtasks.exeor a probe that times out stays aPodError.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 onsys.platform = "win32": withschtasks.exeresolvable the gate is open with no reason; without it the gate is closed and the reason namesschtasks.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 aC:\Users\...\python.exeinterpreter 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: aschtasks /Createrefusal from the real gate surfaces asPodBackendAbsent, and a missingschtasks.exestays a plainPodError. Red with theruntime.pyhunk reverted (the refusal escaped asWindowsTaskCreateRefused), 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: apreparingrun 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 beforeready, so a read that missespreparingstill finds the pid). Red with thewindows.pychange reverted (it readinactive), green on this head.-n0, 10 of 10 runs of the whole file at-n 4beside its neighbours, and the file in a shuffled order all pass.-n 4.npm run i18n:checkpasses againstorigin/main(manifest sync, pseudolocale, DNT, changed-value QA), and the frontend i18n and app-manifest suites pass, including the per-locale style checks withI18N_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_availablepayload 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 podCLI, 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
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributed under the project's Apache-2.0 license.