Repository navigation
Conversation
UX Review (Fable 5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] bbc7d74 Description read[DESCRIPTION-READ] e878bf48b8fab8c4fa8ad40e1c27f28f7c861a633a312aa2cbc60ba6dc8885c0 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 (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify on a rebuilt signed desktop app (update/restart with an active session, Windows included) — the PR itself names this as untested. [DESIGN-REVIEWED] bbc7d74 Description read[DESCRIPTION-READ] 3ba6aae6de01482608d7888ecd45fb97fc1ce790533838b0e985194493ca593d 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 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsFINDING -- website/electron/gateway-supervisor.js:1353 -- |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify on a rebuilt signed app and native Windows — the description itself says both remain unexercised, and the case-insensitive delete only matters there. What this change shipsInventory (5 items) — 5 justifiedIntent: FIX — a packaged desktop gateway launched from a development shell imports the checkout instead of its bundled code, breaking member chats; strip the inherited Python overrides at spawn.
Evidence checked: defect has provenance (reproduction in description; new tests the description says fail on base). Grep [FIRST-PRINCIPLES-REVIEWED] bbc7d74 Description read[DESCRIPTION-READ] f17168304e1dc5e237f528831c68949597b88a8f0644f064dfe78dc2d2bc0748 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo blocking defects; one advisory — the new bundled-backend import isolation covers only the gateway spawn. FINDING — website/electron/gateway-supervisor.js:316 — the two other spawns of the same [OPUS-REVIEWED] bbc7d74 |
2444ec3 to
1109566
Compare
1109566 to
edc11b4
Compare
edc11b4 to
4d4e82b
Compare
A desktop app launched from a development shell can inherit PYTHONPATH and load checkout code instead of its packaged backend. That makes the saved prompt URI fail essential document admission after an update. Drop Python import-root overrides at the bundled spawn boundary while preserving them for source-tree gateways.
4d4e82b to
bbc7d74
Compare
|
Thank you for this fix, @pstarkgit! The desktop bundled-gateway Python isolation has been carried into an in-repo replacement PR #17852 (rebased onto current main, with your commit co-authored to you), which is green and ready for review. Closing this one in favor of #17852. Much appreciated! |
Problem / Motivation
Goal: The bundled desktop gateway always runs its own bundled Python code and runtime, whatever Python environment variables the app inherits.
A bundled Kiro Crew gateway can import Python code from a development checkout when the desktop app inherits
PYTHONPATH. The saved bundledprompt.mdURI then resolves as an external essential source, interrupting member chats withoutside the admitted document root.PYTHONHOMEcan likewise override the bundled runtime.Why it matters
After an update or restart, the app may appear healthy while member chats fail. On Windows, Python environment keys are case-insensitive, so mixed-case inherited names bypass exact-key deletion.
Not a goal
What changed (motivation → approach → change)
website/electron/gateway-env.js, the environment builder used by every owned gateway spawn. Remove inheritedPYTHONPATHandPYTHONHOME; on Windows, remove every case variant.website/electron/gateway-supervisor.jssupplies the bundled flag and platform; source launches retain their development overrides. The packaged launcher already uses-sfor its own user-site isolation, so no inherited user-site setting is changed for child tools.website/electron/test/gateway-env.test.jsand document the launch behavior indocs/build/desktop-app.md.Backwards compatibility
Compatible: only bundled gateway launches receive Python import isolation. Source-tree development gateways retain their inherited Python environment. The parent process environment is not modified.
Tests
Manual verification
The failure mechanism was reproduced with an installed interpreter and inherited checkout
PYTHONPATH; clearing that override restored bundled-package imports. This revised patch has not yet been exercised in a rebuilt signed desktop app, so release validation must include an update/restart with an active session.Screenshots / video
N/A — the change is in the gateway process environment and has no rendered interface delta.
Related Issues
Related to #13664, which handles stale gateway adoption after a desktop update.
Pattern harvest
Rule candidate: review-prompt
Pattern: packaged Python launchers must exclude inherited import-root and user-site overrides, including case variants on Windows, without changing child-tool user-site settings.
Checklist