Skip to content

fix(agent-device): the worker test rig starts its daemons without the host's real directory-access reader - #1933

Merged
V3RON merged 2 commits into
mainfrom
bug/1912
Nov 28, 2026
Merged

V3RON merged 2 commits into
mainfrom
bug/1912

Conversation

@V3RON

@V3RON V3RON commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1912

Status

Implement: done (1/1 green) Review: round 1 passed, 0 blocking Hardware: n/a Gate: running
Next: merge gate

Assumptions

none

Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0 fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 1.9M.
Runs: 5. Cost USD: 0.8172. Agent seconds: 412.

Rejected:

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

The daemon test rig now uses a fake directory reader configured with a fixed SID and no entries. A new test checks that setUp, setUpWithPhone, and a daemon restart do not construct PowerShellDirectoryAccessReader.

Severity of issue fixed: Low

Merge Risk: Minimal · up to 7098c

This change makes the daemon test rig use a fake directory reader to avoid a flaky Windows startup delay. It touches only test support and a new test, so production behavior is unaffected and merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the worker test rig now starts its daemons without the host's real directory-access reader. The raw summary confirms the rig uses FakeDirectoryAccessReader and a new t…
Description check Passed The description links issue #1912, reports status and review results, and names the sibling rigs that still start the real PowerShell reader. These items relate to the changeset. The description does …
Linked Issues check Passed [#1912] The objective is that the edge-request-rules-devices.test.ts boot test passes on every run on the Windows unit job. The issue names no implementation. The timeout traces to test daemons waitin…
Out of Scope Changes check Passed The PR changes two files. src/agent-device/test-support.ts swaps the test daemon's directory-access reader for a fake, which implements #1912. src/agent-device/worker-rig-directory-access.test.ts is a…
Full details: Title check

Explanation

The title names the main change: the worker test rig now starts its daemons without the host's real directory-access reader. The raw summary confirms the rig uses FakeDirectoryAccessReader and a new test asserts no PowerShellDirectoryAccessReader construction. The title is specific and matches the changeset. It is 105 characters, which is longer than ideal but still readable.

Full details: Description check

Explanation

The description links issue #1912, reports status and review results, and names the sibling rigs that still start the real PowerShell reader. These items relate to the changeset. The description does not explain the fix in detail, but the lenient criterion for this check is met.

Full details: Linked Issues check

Explanation

[#1912] The objective is that the edge-request-rules-devices.test.ts boot test passes on every run on the Windows unit job. The issue names no implementation. The timeout traces to test daemons waiting on a real host reader during startup. At head, src/agent-device/test-support.ts setUp launches each daemon with directoryAccess: new FakeDirectoryAccessReader({ user: "S-1-5-21-1-2-3-1001", entries: [] }), with the comment that the real reader would start PowerShell for every test daemon. This matches the existing hostLoadProbe: null setting that the issue cites as the #1868/#1887 pattern. The new test src/agent-device/worker-rig-directory-access.test.ts counts PowerShellDirectoryAccessReader constructions and asserts zero after setUp, setUpWithPhone, and restart. Limits: the diff of test-support.ts could not be read as a text diff (changed blobs unavailable). Its head content was read directly and confirms the change. No CI run was available, so the per-run pass outcome is not verified here. Sibling rigs outside this PR are tracked in #1932 and are not required by #1912.

Full details: Out of Scope Changes check

Explanation

The PR changes two files. src/agent-device/test-support.ts swaps the test daemon's directory-access reader for a fake, which implements #1912. src/agent-device/worker-rig-directory-access.test.ts is a new test that guards that change, so it supports the objective. The PR does not change the sibling rigs named in the review ledger (src/agent-device/test-gateway.ts and src/agent-device/local-profile.test.ts). Those remain deferred to #1932 and are not part of this diff, so no out-of-scope change is present. The test-support.ts diff itself could not be read as a text diff; its head content was read directly and shows only the reader-related change described in the summary.

  • 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: 46ad1aee-c803-4a71-8cc2-fc2027075a17
Commits

Reviewing files that changed from the base of the PR and between 7efa617 and 7098ca1.

Files selected for processing: 2

  • src/agent-device/test-support.ts
  • src/agent-device/worker-rig-directory-access.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@V3RON

V3RON commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 7098ca1

Runs: 5. Cost USD: 0.8172. Agent seconds: 412.
Tokens input 82, output 16288, cache read 933109, cache write 155532.
- build implementer: claude-sonnet-5-5 82 s $0.1301
- audit implementer: claude-sonnet-5-5 17 s $0.086
- review 1 reviewer: claude-sonnet-5-5 193 s $0.1412
- review 1 spec: claude-sonnet-5-5 26 s $0.1158
- review 1 code behaviour: claude-opus-5-5 94 s $0.3441
Finding outcomes: {"duplicate":1,"nonblocking":1}. Classes: {"sibling rig lacks directoryAccess fake":2}.
{"findings":[{"id":"R1","role":"spec","class":"sibling rig lacks directoryAccess fake","outcome":"nonblocking","path":"src/agent-device/test-gateway.ts","round":"1"},{"id":"R2","role":"spec","class":"sibling rig lacks directoryAccess fake","outcome":"duplicate","canonicalId":"R1","path":"src/agent-device/local-profile.test.ts","round":"1"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 28, 2026 11:20
@V3RON
V3RON merged commit 6552987 into main Nov 28, 2026
70 checks passed
@V3RON
V3RON deleted the bug/1912 branch November 28, 2026 11:24
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: edge-request-rules-devices.test.ts boot test times out at 20 s on the Windows unit job

1 participant