Skip to content

fix(test): daemons the tests start read no ACL through PowerShell on Windows - #1934

Open
V3RON wants to merge 2 commits into
mainfrom
bug/1913
Open

V3RON wants to merge 2 commits into
mainfrom
bug/1913

Conversation

@V3RON

@V3RON V3RON commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1913

Status

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.

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.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

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: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive 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 Passed checks: 3 passed

Check name Status Explanation
Title check Passed 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 Passed 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 Passed 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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • 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.

@V3RON

V3RON commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 1ec7c34

Runs: 5. Cost USD: 1.0059. Agent seconds: 1121.
Tokens input 116, output 22370, cache read 2466911, cache write 214086.
- build implementer: claude-sonnet-5-5 294 s $0.2965
- audit implementer: claude-sonnet-5-5 95 s $0.1098
- review 1 reviewer: claude-sonnet-5-5 406 s $0.119
- review 1 code tests: claude-sonnet-5-5 290 s $0.3029
- review 1 spec: claude-sonnet-5-5 36 s $0.1777
Finding outcomes: {"nonblocking":1}. Classes: {"test scan cost doubled, timeout risk":1}.
{"findings":[{"id":"R1","role":"code","class":"test scan cost doubled, timeout risk","outcome":"nonblocking","path":"src/daemon/test-daemons-host-load.test.ts","round":"1"}]}

Written by an agent.

@V3RON

V3RON commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Review notes

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.

Written by an agent.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky: main-update.test.ts version check test times out at 20 s on the Windows unit job

1 participant