fix(windows): trust ScheduledTasks module during elevation - #1821
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe elevated PowerShell script derives and imports the trusted ChangesScheduled Task Resolution
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This is a localized Windows elevation change with the reported focused tests and checks passing; no actionable merge-blocking risk remains beyond normal review and validation. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
43dba8d to
fc82c92
Compare
|
Rebased onto current Exact-head validation passed: typecheck, privacy scan, diff check, and 62 focused Windows-elevation/port tests (208 assertions). Stable patch ID is unchanged. The previously failing macOS port test passes locally on Windows, but the PR remains Draft until a maintained macOS run is green and the exact-head review completes. Maintainer action requested: please approve the fork-gated Cross-platform CI run 32029800674 and React Doctor run 32029800408. |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Thanks @luvs01, merged. This is useful because the elevated Windows path no longer depends on ambient PowerShell command or module resolution at the exact point where we cross UAC. Pinning |
Summary
ScheduledTasksmodule from the absolute manifest beside the already trusted System32 Windows PowerShell executable.Register-ScheduledTaskcommand object and fail closed when the export is unavailable, instead of relying on inherited command/module lookup during elevation.Register-ScheduledTaskinvocation fails the focused regression test.Verification
tests/windows-elevation-spawn.test.ts+tests/ports.test.ts— 62 pass, 0 fail, 208 assertions.bun run typecheck,bun run privacy:scan, andgit diff --check— passed.3da4d08777d0e169590e0e093a70fa6cb17daa62.findAvailablePort retries the preferred port briefly before falling backtest. That exact test passes on this Windows exact head, but a clean maintained macOS job is still required before claiming cross-platform CI green.Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Bug Fixes
Tests