Repository navigation
fix(release): forward-port #29261 windows stale exec false to 0.12 - #29896
Conversation
…29261) Forward-port of #29261 to release/0.12.0. On Windows, a stored agent.sandbox_allow_unsandboxed_exec: false left by builds before 0.6.0 refuses every agent spawn under KAS, so Crew cannot start any session. The load path now drops that false once, after writing the critical SEL event, records it in the adoption ledger and logs a note; a false set afterwards is kept. Conflict: test/test_memory_v1_golden.py. Kept the release branch's seeded-home file set (no config-provenance entry, which is main-only) and added only this fix's Windows superseded_acked files. (cherry picked from commit fd14faf)
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: this is a clean cherry-pick of the already-merged #29261, and its production files apply to 0.12 unchanged. Notes
[DESIGN-REVIEWED] f7d9545 Description read[DESCRIPTION-READ] f13ffe4c31190150a0d05b94d4d8d498cd4ca161e909e94efb990465a2053147 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 This is a cherry-pick of #29261, which is already merged on main. Each item traces to the Windows spawn refusal or to the audit and lockdown boundary. Two generic riders came along; neither blocks. Notes
What this change shipsInventory (8 items) — 6 justifiedIntent: Windows users upgrading to 0.12 with a pre-0.6.0 stored
[FIRST-PRINCIPLES-REVIEWED] f7d9545 Description read[DESCRIPTION-READ] 308610185c664eec9d3c4884badbd340e4ef3888f8ced8b2b3297156cadbd6cc That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed 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 findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: On 0.12, a Windows install that still stores the pre-0.6.0
agent.sandbox_allow_unsandboxed_exec: falseruns its agent sessions again after upgrading, without the owner editing config.Forward-port of #29261 (merged on main) to
release/0.12.0. Windows users who installed before 0.6.0 see every KAS agent spawn refused with "Sandbox backend unavailable and agent.sandbox_allow_unsandboxed_exec is set to false on this host". None of them set the key: builds before 0.6.0 wrote thatfalseon every save, and the KAS default makes it refuse every spawn on Windows.Why it matters
Every session on an affected Windows host fails at spawn, so Crew is unusable there until the owner edits config by hand. The maintainer approved this fix for 0.12.
Not a goal
true, or to any other key.What changed (motivation → approach → change)
git cherry-pick -x fd14fafa98c6dcc3180ff7018efa8fce4a1c4260(the #29261 merge commit). See #29261 for the full root cause, design and security note: one auto-adoptingsuperseded_defaultsrow drops the stalefalseonce on Windows outside pods, after writing the critical SEL eventkirocrew setupwrites for an exec grant; thefalsestays when that write fails. Afalsewritten after the first load is kept, and setup acks thefalseit writes.One conflict, in
test/test_memory_v1_golden.py: main's seeded-home file set carries aconfig-provenance/publishedentry that is not on this branch. Resolution keeps the release branch's set and adds only this fix's Windows-onlysuperseded_acked.jsonand.lock. All production files applied cleanly.Revert:
kirocrew config set agent.sandbox_allow_unsandboxed_exec false(or the Settings page); that write is acked and never adopted again.Backwards compatibility
Breaking: on Windows outside pods, a stored
falsewith no ack and no ledger entry is removed once and resolves to the Windows default (true). Writer sweep on origin/release/0.12.0 @ ea1c0dc (git grep -n '"sandbox_allow_unsandboxed_exec"\] = '):cli_setup._setup_sandbox_consentacks it in this PR;pod/runtime._force_seed_agent_securityis excluded byKIROCREW_POD;kirocrew config setand the Settings PATCH already ack. Every other value, key and platform loads as before.Reader: src/kiro_crew/config/loader_builders.py:_build_agent_config -- entry: chat|cron|subagent|app -- the absent key resolves through
unsandboxed_exec_platform_default(), pinned bytest_windows_drops_the_stale_false_once_and_logs_itReader: src/kiro_crew/config/loader_document.py:unsandboxed_exec_declared -- entry: chat|cron|subagent|app -- reads absence as undeclared, the state intended for this host
Reader: src/kiro_crew/cli_setup.py:_setup_sandbox_consent -- entry: release -- an undeclared key re-offers the lockdown prompt on the next interactive setup
Tests
PRs into
release/*get no backend CI lanes, so these ran locally on this head (Linux), one file at a time,-n 0, single pytest process:test/test_config_windows_stale_exec_false.py(new in #29261)test/test_config_superseded_defaults.pytest/test_config_loader_agent_section.pytest/test_config_module_boundaries.pytest/test_config_patch.pytest/test_memory_v1_golden.pytest/test_sandbox_unsandboxed_exec_consent.pytest/test_windows_fail_closed_optin.pytest/test_cli_setup.pytest/test_config_loader.pytest/test_cli_config_defaults.pytest/test_cli_config_set_stored_type.pyNo failures. flake8 and mypy are clean on the touched files; black reports only
test/test_sandbox_unsandboxed_exec_consent.py, which is unformatted onrelease/0.12.0already and listed in.github/black-baseline.txt;scripts/check_file_line_cap.pyreports 0 failures.Proof: not provable -- other: on this base prove.py reverts the new windows_exec_adoption module, so the changed tests only error at collection; the PROVEN line for the same code is on #29261
Manual verification
Not run on a real Windows host: the path is driven with
sys.platformpinned towin32through the real loader and real files, as on #29261.Related Issues
Forward-port of #29261.
Sibling sweep
Swept: git grep -n '"sandbox_allow_unsandboxed_exec"] = ' -- src/
Sibling: src/kiro_crew/cli_setup.py -- changed here
Sibling: src/kiro_crew/pod/runtime.py -- not affected -- its seed-floor false is excluded by the KIROCREW_POD check in superseded_defaults
Pattern harvest
Not generalizable: a forward-port of #29261, which adds a row to the existing
superseded_defaultsregistry for this class.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.