Repository navigation
fix: tighten two file read checks on windows - #35684
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. This is a two-call fix that uses the existing Notes
What this change shipsInventory (4 items) — 4 justifiedIntent: on Windows, make the deps ABI-marker read and the provision-stamp read refuse a link planted at the name, as they already do on POSIX. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 555bebb Description read[DESCRIPTION-READ] 911cfe7ec59615cba51958a63ed359cca68b48fc974dbc1826732806aca58832 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: both reads now use the same no-reparse open already used at [DESIGN-REVIEWED] 555bebb Description read[DESCRIPTION-READ] 622f9388da78a82277213bf1a3ac3511fc5c0ecfab644158c03aca786d39db3d 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 |
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: |
buluoray
left a comment
There was a problem hiding this comment.
Approve on be2d5f4. On Windows, the two reads of the dependency stamp and ABI marker files now refuse a link at the file's name in the same step that opens it, the way the requirements read already does. Linux and macOS make exactly the same call as before. A refused read still means "not installed yet", so the worst a user sees is a dependency reinstall. Each fix has a test that fails when the fix is undone. Decisive lines: src/kiro_crew/apps/backend_runtime/provisioning.py:167, src/kiro_crew/apps/backend_runtime/provisioning.py:742, test/test_app_backend_refactor_characterization.py:443, test/test_apps_backend_coverage_dependency_install.py:1066
On Windows two reads the gateway makes of files an app can write did not refuse, at the name they open, what their comments say they refuse there, as they already do on Linux and macOS. Each read now makes that refusal in the open itself. Linux and macOS make the same call as before. Part of #9731
be2d5f4 to
555bebb
Compare
|
Rebased: main moved in src/kiro_crew/apps and in test/test_update_boot_apply.py and src/kiro_crew/dashboard/handlers/updates.py (the red-main fix #35625, which clears the two red Backend Tests checks on the old head) since this head's CI ran (ee7a026 -> cf4578c); CI re-running. [operator: bolichen97] |
Problem / Motivation
Goal: On Windows, two more file reads the gateway makes of files an app controls refuse what their documentation says they refuse at that name, as they already do on Linux and macOS.
Part of the class of cases tracked in #9731: that issue already describes, in public, how a read can keep its documented refusal on Linux and macOS and lose it on Windows. This PR closes the two cases that sit beside the one #34484 closed.
Why it matters
Both reads run in the gateway, on files the app itself can write, on every Windows host that starts such an app, and what they read decides whether the app's installed dependencies are used as they are or installed again. The refusal their documentation promises at that name could be skipped there, and no test pinned it on Windows.
Not a goal
What changed (motivation → approach → change)
On Windows the two reads did not reliably make the refusal their documentation promises at the name they open. Each now refuses exactly what its documentation names at that name, as the case in #34484 does, and nothing else. Linux and macOS make the same call as before. Two tests in
testpin the refusal for each read and run on Windows hosts that can create links. The code change is insrc/kiro_crew/apps.Backwards compatibility
Compatible: Linux and macOS make the same call as before. On Windows the only difference is that what each read documents as refused is refused, and both callers already treat a refused read as "not installed yet": the dependencies are installed again, or the installed ones are not used.
Removes nothing: no caller, key or field changes.
Tests
Two tests check that each read refuses what its documentation says it refuses when the check before the open misses it, as it would when the link lands after that check. One is new; the other is an existing test given a second case. Linux and macOS run them too, where the reads already refused. On Windows they run wherever the host can create links and are skipped where it cannot.
Proof: not provable -- other: the changed reads differ only on Windows and prove.py runs on this Linux host, where they already refused; CI's Windows shards run the tests where they can create links
Determinism: both tests passed 20 runs at
-n0and 10 runs at-n 4 --dist loadgroup --max-worker-restart=2beside two sibling files; their two files passed in a shuffled order (seed 14958). With the open swapped for one that follows a link, both cases where the check before the open misses it fail, and the case where it does not miss still passes.Manual verification
N/A — unit coverage sufficient: the tests run on CI's Windows shards wherever their runner can create links; whether they passed or were skipped on this head is read from the Windows shard results.
Screenshots / video
N/A — no user-visible change.
Related Issues
Part of #9731
Sibling sweep
Swept: the same read shape across the codebase, on origin/main @ cf4578c.
Siblings: tracked in #9731 -- each remaining case needs its own check that it is reachable on Windows.
Pattern harvest
Not generalizable: a single repository-wide rule for this class was tried and closed in #17557 because it changed no runtime behaviour, so the class is being closed one reachable case at a time under #9731.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Submitted under the project's Apache-2.0 license.