Skip to content

fix(release): forward-port #29261 windows stale exec false to 0.12 - #29896

Merged
buluoray merged 1 commit into
release/0.12.0from
crew/slack/fwd-0.12-29261
Nov 4, 2026
Merged

buluoray merged 1 commit into
release/0.12.0from
crew/slack/fwd-0.12-29261

Conversation

@buluoray

@buluoray buluoray commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On 0.12, a Windows install that still stores the pre-0.6.0 agent.sandbox_allow_unsandboxed_exec: false runs 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 that false on 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

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-adopting superseded_defaults row drops the stale false once on Windows outside pods, after writing the critical SEL event kirocrew setup writes for an exec grant; the false stays when that write fails. A false written after the first load is kept, and setup acks the false it writes.

One conflict, in test/test_memory_v1_golden.py: main's seeded-home file set carries a config-provenance/published entry that is not on this branch. Resolution keeps the release branch's set and adds only this fix's Windows-only superseded_acked.json and .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 false with 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_consent acks it in this PR; pod/runtime._force_seed_agent_security is excluded by KIROCREW_POD; kirocrew config set and 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 by test_windows_drops_the_stale_false_once_and_logs_it
Reader: 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:

File Result
test/test_config_windows_stale_exec_false.py (new in #29261) 18 passed
test/test_config_superseded_defaults.py 130 passed
test/test_config_loader_agent_section.py 88 passed
test/test_config_module_boundaries.py 5 passed
test/test_config_patch.py 194 passed
test/test_memory_v1_golden.py 32 passed
test/test_sandbox_unsandboxed_exec_consent.py 40 passed
test/test_windows_fail_closed_optin.py 7 skipped (real-win32 only)
test/test_cli_setup.py 47 passed
test/test_config_loader.py 146 passed
test/test_cli_config_defaults.py 34 passed
test/test_cli_config_set_stored_type.py 9 passed

No failures. flake8 and mypy are clean on the touched files; black reports only test/test_sandbox_unsandboxed_exec_consent.py, which is unformatted on release/0.12.0 already and listed in .github/black-baseline.txt; scripts/check_file_line_cap.py reports 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.platform pinned to win32 through 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_defaults registry for this class.

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

Contributions are accepted under the project's Apache-2.0 license.

…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)
@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners November 4, 2026 19:42
@buluoray
buluoray requested review from cruisercohen and removed request for a team November 4, 2026 19:42
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision f7d9545206cb7664075043306e0fba0272b7d7f1 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

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

  • This Windows-only branch has run only on main's Windows CI, never against release/0.12.0. Run test/test_config_windows_stale_exec_false.py and test/test_windows_fail_closed_optin.py on a real win32 runner at this head before tagging 0.12. On Linux the second file only reports "7 skipped", which proves nothing.

[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 .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 4, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of f7d9545206cb7664075043306e0fba0272b7d7f1 — 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

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

  • Item 6 — undeclared: the row-note log line and the Note: in adoption_summary apply to every auto-adopt row that has a note, not only this one. The description never mentions it. Subtraction: limit the if entry.note: warning in persist_write_back to this one key, or drop the adoption_summary change and keep the note in the log line only.
  • Item 1 — inherited provenance: "owner decision 2026-11-03" and "The maintainer approved this fix for 0.12" point to no RFC or override record you can check. It isn't a BLOCK: the undeclared-key Windows default was already decided, and this item only removes a stale stored copy of it.

What this change ships

Inventory (8 items) — 6 justified

Intent: Windows users upgrading to 0.12 with a pre-0.6.0 stored false can start agent sessions again without editing config — FIX.

  1. Windows (outside pods): a stored exec false is removed once on load and resolves to true — justified
  2. A critical SEL audit event is written before the drop; if that write fails, false is kept — justified
  3. A Windows load that finds the key absent or true acks false once; new superseded_acked.json file appears — justified
  4. A false written by the kirocrew setup lockdown answer is now acked and kept — justified
  5. config defaults --adopt now records the adoption for every auto-adopt row, so a value written back later is kept — undeclared
  6. Adoption log and summary now print the row's note, for any auto-adopt row that has one — undeclared
  7. The config document isn't cached while the Windows close is deferred on a busy lock — justified
  8. In-memory adoption resolves this key through the platform default — justified

[FIRST-PRINCIPLES-REVIEWED] f7d9545

Description read

[DESCRIPTION-READ] 308610185c664eec9d3c4884badbd340e4ef3888f8ced8b2b3297156cadbd6cc

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 4, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] f7d9545

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

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of f7d9545206cb7664075043306e0fba0272b7d7f1 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] f7d9545

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

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 4, 2026
@buluoray
buluoray merged commit c6ac5cc into release/0.12.0 Nov 4, 2026
22 checks passed
@buluoray
buluoray deleted the crew/slack/fwd-0.12-29261 branch November 4, 2026 20:07
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 4, 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

Development

Successfully merging this pull request may close these issues.

1 participant