fix(sandbox): delegate Windows Kiro spawns internally - #5620
Conversation
GPT 5.6 Review — ✅ human override acceptedHuman judgment by @bolichen97 overrides the GPT 5.6 finding for This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
UX Review (Fable 5) — ✅ PASSUX-level review of All evidence confirms this PR is backend sandbox delegation plus test/gate portability: the UX-Verdict: PASS No rendered UI changes; the diff removes a Windows first-run outage and its new failure text names the missing dependency plainly. [UX-REVIEWED] c71e9b9 |
|
/ai-review override gpt c71e9b9: Official Kiro CLI is the explicitly trusted inner-sandbox boundary on Windows across supported releases; adding a version or capability gate would recreate the fresh-install outage this fix addresses, while unknown or non-Kiro spawns and audit or path-policy failures still fail closed. |
Human judgment recorded@bolichen97 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
First Principles Review (Fable 5) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The Windows fix is cause-level and fail-closed, but a cross-platform env-scrub tightening and a WeChat MIME change ride along undeclared, and one helper ships twice. What this change shipsIntent: let a fresh Windows install run its first official Kiro CLI chat without opting into globally unsandboxed execution — a FIX.
Watch
Subtractions
[FIRST-PRINCIPLES-REVIEWED] c71e9b9 |
Design Review (Fable 5) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Windows delegation trusts an inner sandbox it never verifies — the macOS path is config-confirmed, the Windows path is asserted by classification alone. Watch
Suggestions
[DESIGN-REVIEWED] c71e9b9 |
|
Review dispositions for First Principles:
Design:
No code change or new SHA is required for these advisory concerns. |
Opus 4.8 Review — ✅ no blocking findingsReviewed Review detailsI have enough to complete the validation. Let me verify the one remaining factual pivot — whether the default-tier behavior actually changed, by confirming the launcher already strips My analysis of CANDIDATE 1:
It does not meet the 80+ real-defect bar, and adding-a-scrub is the secure direction, so it neither blocks nor rises to an advisory finding. Step 2 review of the reworked No findings. [OPUS-REVIEWED] c71e9b9 Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
Problem / Motivation
A fresh KiroCrew Nightly install on Windows cannot start its first official Kiro CLI agent. The backend requires an outer OS sandbox before spawning the CLI, but KiroCrew has no supported Windows sandbox backend, so every launch fails with
SandboxUnavailableErrorbefore Kiro CLI can activate its own sandbox.The same clean Windows validation run also exposed host-dependent test and gate failures that prevented the repository's own blocking checks from being run reliably on a supported desktop platform.
Why it matters
This is a first-run outage for new Windows users: chat, auto-title, and every ACP session fail at process launch. Asking each new user to opt into globally unsandboxed execution is both poor onboarding and broader than necessary.
A Windows fix also needs trustworthy Windows verification. Leaving unrelated local gate failures in place would make regressions indistinguishable from harness noise and keep contributors from reproducing CI locally.
What changed (motivation → approach → change)
Kiro CLI already owns and enables the agent sandbox, so the backend now delegates isolation to that inner sandbox on Windows only when the spawn path has explicitly identified the executable as the official Kiro CLI. The identity is propagated through ACP, pod, dashboard, and CLI spawn paths rather than inferred from a basename.
Before delegation, KiroCrew still scrubs the child environment and completes the synchronous SEL spawn audit. Audit failures deny the spawn. Unknown identity, non-Kiro executables, and requests for additional visible/hidden path policy continue to fail closed when no outer OS sandbox exists. There is intentionally no version floor or best-effort capability probe that could recreate the fresh-install outage.
The clean-host failures found while proving the Windows path are fixed in the same commit: real-symlink capability inventory, event-loop/port and subprocess portability, Git Bash/path separator handling, vendor-manifest and checksum portability, deterministic frontend probes, Linux-targeted mypy configuration, paid-down lockdown debt, and bounded timeouts for genuinely disk-heavy Windows tests. Two production-facing portability fixes are also explicit: ACP secret/Python environment scrubbing is now enforced parent-side on every platform (including
sandbox="off"; that mode disables the OS wrapper, not credential hygiene), and CSV attachments are normalized totext/csvbecause Windows registry-backed MIME lookup otherwise reports an Excel MIME.Tests
61,032 passed, 2,520 skipped, 6 xfailed.913 passed, 70 skipped.hljsCoreOnly.test.ts— 4 passed.c71e9b953db438cbe58ed201df49ca05c0863ac0.Manual verification
N/A — a release-packaged Nightly was not rebuilt locally. The Windows-native spawn boundary and every retained fail-close branch are covered directly, and the full backend plus platform-specific gate matrix passed on the affected host.
Screenshots / video
N/A — frontend changes are test/gate portability only; no rendered UI, interaction, or layout changed.
Related Issues
no linked issue: reported from a fresh Windows Nightly installation; no public issue was provided.
Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)