Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Reviewer's GuideTestsMake denied-prompt coverage use a protected path under a synthetic home on every platform, while retaining the procfs-specific refusal check only on POSIX.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem / Motivation
Goal: Keep the KAS disallowed-prompt regression meaningful on Windows as well as POSIX.
Main CI on a6ae3d4 failed
test_a_disallowed_prompt_path_still_refusesin Windows shard 5: https://github.com/knowlet/KiroCrew/actions/runs/44019710868/job/133830332554 . Checkout is on D:, while pytest's temp directory is on C:. The POSIX/proc/self/environfixture resolves to C:\proc\self\environ, but the pseudo-filesystem anchor resolves against D:. The absent Windows file correctly takes the documented unreadable-file fallback. This is not evidence of process secrets being read.Why it matters
The portable regression must prove that a genuinely denied path cannot be downgraded to the default prompt. A POSIX pseudo-filesystem name cannot reliably express that condition on Windows.
Not a goal
What changed (motivation → approach → change)
Use a synthetic
Path.home()and its protected.config/gh/hosts.ymlpath for the all-platform rejection test. The file is never created and no real credentials are read. Keep both exception assertions. Preserve the original procfs assertion as a separate POSIX-only test, rather than skipping the portable refusal regression on Windows.Backwards compatibility
Compatible: only one test file changes; runtime behavior is unchanged.
Removes nothing: generic refusal coverage remains mandatory on Windows; procfs coverage remains on POSIX.
Tests
Proof: not provable -- test-only change
Manual verification
Original Windows failure and C:/D: paths verified in hosted logs. Native Windows acceptance remains pending CI. Repository local-gate backend passes; its frontend leg fails before tests because the default npm cache is not writable; frontend dependencies are not installed in this cloud checkout. Full-repository validation is not claimed green. Existing base CI also has unrelated missing
kirocrew-runners-windowsand internal-scan configuration blockers.Screenshots / video
N/A: no UI change.
Related Issues
The exact main CI job is linked above; no separate issue.
Sibling sweep
Swept: git grep -n 'file:///proc/self/environ' -- test
Sibling: test/test_kas_agents.py -- not affected -- accepts both denied-location and unreadable-file errors explicitly on Windows.
Sibling: test/test_kas_prompt_paths.py -- not affected -- existing POSIX-layout suite is explicitly platform-scoped.
Pattern harvest
Not generalizable: the portable assertion needs a platform-independent protected-path fixture, not a broader production denylist.
Checklist
Contribution License Agreement
Contribution under the repository's existing Apache-2.0 license; no separate agreement signed.
Summary by Sourcery
Ensure prompt refusal regression tests remain meaningful across Windows and POSIX without changing runtime behavior.
Enhancements:
Tests:
Summary by cubic
Makes the KAS disallowed-prompt regression test pass meaningfully on Windows.
Replaces the POSIX-only
/proc/self/environfixture, which resolves to an irrelevant drive letter on Windows, with a protected path under a synthetic home directory that also refuses on every platform. The procfs assertion survives in a separate POSIX-only test, and no runtime behavior changes.Written for commit 024ec3f. Summary will update on new commits.
Verification update
At head
024ec3fffa50a89665e0fb98169903fdc03131e7, Build 44037232807 completed successfully (wheel and Linux desktop jobs; Windows installer was skipped). CI 44037233020 has passed backend lint/type checks and Linux test shards, but Windows shard 5 and other Windows shards are still pending; no native-Windows acceptance is claimed yet. The Windows Pod Boot Canary remains an independent failed job. PR merge refc28a89079deab6229b2f5921327a9485878649dahas the stated base/head parents and the same treea9db9f91e474ff1ca40fb1de89e0ace035eda172as the published test-only change.The local broad gate pipeline has now completed: mypy reports no issues in 4,812 source files; comment-history, brand and file-line-cap checks pass. Local frontend limitations above remain, and the overall PR is not green.
Native Windows verification completed
CI 44037233020 has now finished for unchanged head
024ec3fffa50a89665e0fb98169903fdc03131e7: all eight Windows backend jobs succeeded, including the previously failing shard 5. That job reports 35,358 passed, 2,047 skipped and 19 xfailed on Python 3.12.10; this is not a zero-skip claim. Its checkout is the verified merge refc28a89079deab6229b2f5921327a9485878649da.The overall CI run remains failure, solely within that workflow due to Pod Boot Canary (Windows): GitHub annotation says
Required runner group 'kirocrew-runners-windows' not found. No runner or test steps ran for that job. Other PR review/security gates may also remain blocked by repository configuration; no global-green or merge-ready claim is made. No rerun, workflow changes, production changes, or security-policy changes were used to obtain the Windows test result.