Fix location service startup type - #4972
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe PR changes the ChangesService startup metadata
Estimated code review effort: 1 (Trivial) | ~5 minutes 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 |
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 `@pester/configs.Tests.ps1`:
- Line 431: Add a focused regression assertion in the tests covering
WPFTweaksLocation.service[0].StartupType that explicitly verifies the lfsvc
service value is exactly Disabled, rather than relying only on the
allowed-service-startup-types allowlist. Apply the same exact-value assertion to
the related test at the other referenced location.
🪄 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: CHILL
Plan: Pro Plus
Run ID: 0312d278-8aec-49cb-bef1-643ccb52b127
📒 Files selected for processing (2)
config/tweaks.jsonpester/configs.Tests.ps1
Type of Change
Description
Use the canonical
Disabledstartup type for thelfsvclocation service.PowerShell accepts the unique
Disableenum prefix, but WinUtil also compares configured startup types withServiceController.StartTypeas strings. Since the service reportsDisabled, the previous value prevented WinUtil from recognizing the matching state and could trigger a redundantSet-Servicecall.This also validates configured
StartupTypeandOriginalTypevalues against the canonical service startup types so similar typos are caught by Pester.Microsoft documents
Disabledas the accepted startup type: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/set-service#-startuptypeTesting
./Compile.ps1Invoke-Pester -Path 'pester/configs.Tests.ps1' -Output Detailed -CI(21 passed)Disablebefore the fix and passes onDisabledIssue related to PR