fix(themes): enable theme pack routes on Windows - #3293
Conversation
fbe9694 to
c6eb0a7
Compare
GPT 5.6 Review (fork) — 🔴 changes requested (blocking)Reviewed BLOCKING -- src/kiro_crew/dashboard/handlers/themes.py:508 -- Windows GitHub installs now raise an uncaught sandbox error BLOCKING -- test/conftest.py:56 -- Unsupported filesystems now abort test collection |
Design Review (Fable 5, fork) — ✅ PASSAdvisory design-level review of Design-Verdict: PASS Removing a gate whose prerequisite landed is the right shape; every Windows read still funnels through the fail-closed descriptor-containment chokepoint. Suggestions
[DESIGN-REVIEWED] c6eb0a7 |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsBoth candidates in Candidate 1 ( Candidate 2 ( Neither survivor answers (a)/(b)/(c) from code I opened without assuming unverified behavior. Nothing reaches the 80 threshold. No findings. [OPUS-REVIEWED] c6eb0a7 |
c6eb0a7 to
fa24308
Compare
|
CI forensic A/B for head a243083f9cec7d0f9767e76eb02abc52882e96c:
Classification: unrelated performance-test flake / runner variance (case D), not a theme/fd regression. No #3293 code change is warranted. |
Remove the stale Windows 501 gates now that the shared descriptor-path resolver supports Windows. Exercise the existing containment path on Windows and keep symlink skips limited to genuine capability absence. Lifting the gate exposes a failure it was hiding: a github source clones through the sandbox chokepoint, which fails CLOSED wherever no OS sandbox backend exists -- Windows, and every GitHub runner. That refusal is translated at `_clone_github` into an explicit install failure and answered as 503 with `theme_install_sandbox_unavailable`, rather than escaping as a generic 500 that says "the server broke" for a host behaving exactly as designed. 503 because this is a host CAPABILITY gap: the request was fine, and the operator's remedy is not something a retry or a different body can carry. There is no unsandboxed retry -- the URL is user-influenced and `git clone` executes remote content, which is why the spawn is chokepointed at all. A local source spawns nothing and stays installable, so the capability this change exists to enable is not re-gated under a new status. The symlink capability probe keeps the fail-soft contract it has on main: any failure to create a symlink means "this host cannot", and the tests it guards skip. The probe runs at conftest IMPORT time, so a propagating error is not a loud signal on one test -- it is a collection error that takes down the whole session, including every test that never touches a symlink. An errno allowlist has to enumerate every way a filesystem can decline, and the cases it misses (a read-only or full temp dir, an overlay or network mount answering EINVAL) are exactly the environments least likely to have been anticipated. `test_symlink_capability_probe.py` pins that contract, including the Windows privilege shape, which carries an unrelated errno alongside winerror 1314 and so has to survive on the OSError type alone. Fixes kirodotdev#311
fa24308 to
eeb816f
Compare
|
👋 Hi! This PR's description is missing some required sections from our PR template. Workflow runs won't be auto-approved until the description is updated. Missing sections:
Please update your PR description to include these sections, then push or re-save the description. The workflows will be approved on the next cycle. |
|
Hi @leonlaiyc, a maintainer nudge on this one: it is carrying the Current state:
Could you resolve the conflicts against the latest git fetch upstream # or: git fetch origin, if this branch lives here
git rebase upstream/main
# resolve any conflicts, run the local gates below, then update the branch with
# a force-with-lease so the rebase lands without clobbering anyone else's workThe local gates to run before updating the branch: black src/kiro_crew test && isort src/kiro_crew test
flake8 src/kiro_crew test && mypy src/kiro_crew
python -m pytest
cd website && npm run build && npm run testA good part of this branch's redness is likely stale rather than a real defect: it predates a lot of what is now on |
|
Kiro Crew [operator: chenmingwei23#de330d0c]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:
Please rebase onto main, decide the Windows install/sandbox contract, and push. The pipeline will re-assess on its next cycle. |
|
This PR is the only thing standing between #311 and done, so here is a precise conflict inventory to make the rebase cheap. Probed read-only with State: head Three files conflict; everything else auto-merges:
One thing that should make the Related: main's
Happy to take the rebase off your hands if you'd rather not: say the word and I'll either push it to this branch ( |
|
Hi @leonlaiyc — closing this in favour of #5943, which is your commit, rebased onto current Why a successor instead of a rebase in place: this branch had drifted 1234 commits behind Your design survived intact, and it is the reason the PR reads well. Three calls in particular I kept verbatim because they were better than the obvious alternatives:
The only substantive edits were conflict resolutions, both caused by one upstream rename — One thing worth your eye if you have a moment: Thanks for the work, and for the commit message — I lifted most of the reasoning in the PR description straight from it. Happy to hand #5943 back to you, or to close it if you would rather reopen and rebase this one yourself; just say which. |
Pull request was closed
Problem / Motivation
#311 originally kept theme-pack routes disabled on Windows because the shared descriptor-path resolver could not establish the opened file's real path there.
That prerequisite has since landed independently in #530:
_fd_real_pathnow resolves Windows handles withGetFinalPathNameByHandleW, and containment continues to fail closed when the opened path cannot be established. The theme handlers, however, still retain their old Windows 501 gate.Why it matters
Theme packs are simply unavailable to every Windows user — the routes 404, so the
Themes surface cannot install, list, or remove a pack at all. The block was a
deliberate temporary measure while a descriptor-path resolver gap was open, and it
outlived the gap.
What changed
This PR does not introduce a new Windows descriptor resolver; it enables the theme routes against the shared resolver already landed in #530.
Theme-pack reads continue to use descriptor-pinned containment. Windows uses the shared
_fd_real_pathimplementation, and any inability to resolve or compare the opened descriptor fails closed.Tests
pytest -q test/test_error_code_contract.py— 6 passedgit diff --checkFixes #311