test(windows): await ACL probe teardown after timeout - #370
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Windows ACL probe now records timeout errors and rejects after child closure or a 2-second fallback. It preserves the first error, suppresses later errors, and settles once. Vitest fake-timer tests cover these behaviors. ChangesWindows ACL timeout handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Poem
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (2 errors)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
9939006 to
de855f3
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/windows-config-migration-acl.test.ts`:
- Around line 610-621: Update the test “defers a timed-out ACL probe rejection
until child closure is observed” to call markTimedOut with a second Error before
settleAfterClose, then assert the rejection is the original timeoutError by
identity using toBe rather than only collection equality. Preserve the existing
deferred settlement and idempotent second settleAfterClose assertions.
- Around line 104-122: Update the ChildProcess error-handling flow to preserve a
timeout recorded by createDeferredPowerShellProbeTimeout.markTimedOut when
child.kill() emits error, defer rejection until close via settleAfterClose(),
and retain immediate startup-error rejection when no timeout is pending. Add a
regression test covering timeout → error → close and asserting rejection with
the timeout error.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 1adede2c-10c6-40dd-aff2-fe71c73cb85d
📒 Files selected for processing (1)
tests/windows-config-migration-acl.test.ts
de855f3 to
3a80767
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/windows-config-migration-acl.test.ts`:
- Around line 104-129: Update the Windows ACL probe timeout flow around
createDeferredPowerShellProbeTimeout and the child kill/onTimeout handling:
record the timeout before invoking child.kill(), so synchronous kill errors
cannot reject first. Add a one-shot fallback to settle the deferred timeout when
the child never emits close, and adjust the regression to have kill() emit the
error synchronously.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 65a45252-3314-45a7-8c28-356e4d4c1955
📒 Files selected for processing (1)
tests/windows-config-migration-acl.test.ts
3a80767 to
2384619
Compare
Summary
close, preventing the next ACL integration test from overlapping teardownFailure evidence
The exact
developmentrun and the first PR head both failed Windows Node 22 in the functional descriptor probe immediately after the intentionally hanging probe. Windows Node 20/24 passed, and every later functional ACL probe on Node 22 completed in roughly 1–1.6 seconds.The timeout callback previously called
child.kill()and rejected immediately. The revised harness still kills at 5 seconds but does not advance the test untilcloseconfirms teardown.Local validation
npx vitest run tests/windows-config-migration-acl.test.tsnpm run lintnpm run typechecknpm test -- --no-file-parallelism— 145 files passed; 1,837 tests passed; 34 skippednpm run buildWindows Node 20/22/24 validation remains pending on the revised head.
Closes #352
Summary by CodeRabbit