You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(test): daemons the tests start read no ACL through PowerShell on Windows - #1934
Implement: done (2/2 green) Review: round 1, 0 blocking Hardware: n/a Gate: not run
Done when:
Every startDaemon call in a test under src/ or packages/ passes a directoryAccess reader, so none starts PowerShell on Windows (test: test-daemons-host-load.test.ts, "pass a directoryAccess reader…"; the hunks add directoryAccess: new FakeDirectoryAccessReader(…) to 24 files) — checked by the guard test passing at 1ec7c34, and review round 1 confirming it fails when the reader is removed from a helper.
Assumptions
Assumption: where does the reader go in a start with no hostLoadProbe line (five in main-host-load.test.ts)? — next to its filesystem option.
No actionable comments were generated in the recent review.
Walkthrough
Daemon test configurations now inject an empty FakeDirectoryAccessReader with a fixed test user SID. The source scan uses generic option matching to check for directoryAccess and hostLoadProbe configurations.
Suggested reviewers:leonardoxr
Merge Risk: Minimal · up to 1ec7c
This change only updates test setup so test daemons skip PowerShell on Windows, and it adds a guard test. It has no production impact, and I found no merge-blocking risk.
Pre-merge checks: 3 · 1
Failed checks: 1 inconclusive
Check name
Status
Explanation
Resolution
Linked Issues check
Issue #1913 requires that src/daemon/main-update.test.ts version-check test pass on every Windows unit run. The issue states the timeout was not reproduced locally. It also states that it does not e…
Provide evidence that the Windows unit job passes the main-update.test.ts version-check test on subsequent runs at or after 1ec7c34. Alternatively, provide evidence that the timeout cause was the PowerShell launch. Without either, the r…
Passed checks: 3 passed
Check name
Status
Explanation
Title check
The title names the change: test daemons no longer read ACLs through PowerShell on Windows. The changeset adds a FakeDirectoryAccessReader (directoryAccess option) to startDaemon calls in test files, …
Description check
The description is related to the changeset. It names issue #1913, states that startDaemon calls in tests under src/ and packages/ now pass a directoryAccess reader so they do not start PowerShell on …
Out of Scope Changes check
The changed files are test files under src/ and the test helpers they import. Each hunk adds a FakeDirectoryAccessReader with empty entries and a fixed user SID to a startDaemon call. The guard …
Full details: Title check
Explanation
The title names the change: test daemons no longer read ACLs through PowerShell on Windows. The changeset adds a FakeDirectoryAccessReader (directoryAccess option) to startDaemon calls in test files, which prevents PowerShell launches on Windows. The title is grammatically awkward ("daemons the tests start read no ACL"), but it refers to the main change and is specific enough for a reader scanning history.
Full details: Description check
Explanation
The description is related to the changeset. It names issue #1913, states that startDaemon calls in tests under src/ and packages/ now pass a directoryAccess reader so they do not start PowerShell on Windows, and says 24 files were changed. It also notes the placement choice for five calls in main-host-load.test.ts. The description is detailed, though it contains workflow metadata that is not needed for the review.
Full details: Out of Scope Changes check
Explanation
The changed files are test files under src/ and the test helpers they import. Each hunk adds a FakeDirectoryAccessReader with empty entries and a fixed user SID to a startDaemon call. The guard test test-daemons-host-load.test.ts also changes to check the directoryAccess option. The main-update.test.ts hunks sit in the file named by #1913. Other changes, such as the hostLoadProbe scan refactor and the test-main.ts gateway helper, support the same objective of keeping test daemons from launching PowerShell. No production code or unrelated test behavior is shown as changed. The summary lists no changed assertions. The PR's link to the root cause is a hypothesis, but the changes stay within the PR's stated scope.
Full details: Linked Issues check
Explanation
Issue #1913 requires that src/daemon/main-update.test.ts version-check test pass on every Windows unit run. The issue states the timeout was not reproduced locally. It also states that it does not establish the cause as PowerShell or ACL access. The PR changes 24 test files so that every test-started startDaemon call passes a FakeDirectoryAccessReader. The change is coding work and matches the PR's stated hypothesis. The summary shows main-update.test.ts gaining the reader in six setups. The guard test test-daemons-host-load.test.ts checks the option across files. The PR does not show that the timeout is caused by PowerShell. No CI run after the change at 1ec7c34 is in the evidence. Whether the flaky outcome is resolved cannot be established from the available evidence.
Resolution
Provide evidence that the Windows unit job passes the main-update.test.ts version-check test on subsequent runs at or after 1ec7c34. Alternatively, provide evidence that the timeout cause was the PowerShell launch. Without either, the requirement outcome remains unknown.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: QUIET
Plan: Advanced
Run ID: e57c00b5-3146-4c9b-a9ed-dddbb98c2dd6
Commits
Reviewing files that changed from the base of the PR and between 7efa617 and 1ec7c34.
Files selected for processing: 25
src/agent-device/local-profile.test.ts
src/agent-device/test-gateway.ts
src/agent-device/test-support.ts
src/daemon/device-rotate.e2e.test.ts
src/daemon/gateway-fleet.e2e.test.ts
src/daemon/gateway-modules.test.ts
src/daemon/input-lease.e2e.test.ts
src/daemon/lease-requires.e2e.test.ts
src/daemon/main-host-load.test.ts
src/daemon/main-leasing.test.ts
src/daemon/main-state-db.test.ts
src/daemon/main-stop.test.ts
src/daemon/main-update.test.ts
src/daemon/main.test.ts
src/daemon/optional-modules-start.test.ts
src/daemon/remote-client.e2e.test.ts
src/daemon/session-path.e2e.test.ts
src/daemon/stream-gateway.e2e.test.ts
src/daemon/test-daemons-host-load.test.ts
src/daemon/test-main.ts
src/daemon/test-optional-modules.ts
src/daemon/test-relay-support.ts
src/daemon/tunnel-cli.e2e.test.ts
src/daemon/tunnel-lease.e2e.test.ts
src/daemon/worker-capabilities.e2e.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
Not blocking, not verified. Each is one reviewer's claim.
code: src/daemon/test-daemons-host-load.test.ts — the new guard test calls files() again, so the walk and read of all of src and packages runs twice per unit run; on the 20 s Windows timeout this could flake. Build the file list once in a beforeAll or memoised helper. Also: FakeDirectoryAccessReader import out of alphabetical order in test-gateway.ts and test-optional-modules.ts.
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
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.
Closes #1913
Status
Implement: done (2/2 green) Review: round 1, 0 blocking Hardware: n/a Gate: not run
Done when:
startDaemoncall in a test undersrc/orpackages/passes adirectoryAccessreader, so none starts PowerShell on Windows (test:test-daemons-host-load.test.ts, "pass a directoryAccess reader…"; the hunks adddirectoryAccess: new FakeDirectoryAccessReader(…)to 24 files) — checked by the guard test passing at 1ec7c34, and review round 1 confirming it fails when the reader is removed from a helper.Assumptions
hostLoadProbeline (five inmain-host-load.test.ts)? — next to itsfilesystemoption.Review
Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 1 notes. Claims review: skipped.
Rounds: 1. Tokens: 2.1M.
Runs: 5. Cost USD: 1.0059. Agent seconds: 1121.
Assessment: complete
Written by an agent.