Skip to content

fix: update renamed store-suggestions function calls missed in refactor - #718

Closed
HetCreep wants to merge 1 commit into
Raphire:masterfrom
HetCreep:fix/store-suggestions-renamed-calls
Closed

fix: update renamed store-suggestions function calls missed in refactor#718
HetCreep wants to merge 1 commit into
Raphire:masterfrom
HetCreep:fix/store-suggestions-renamed-calls

Conversation

@HetCreep

@HetCreep HetCreep commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

The approved-verbs refactor (#708) renamed the store-suggestions all-users functions to Set-StoreSearchSuggestionsDisabledForAllUsers / Set-StoreSearchSuggestionsEnabledForAllUsers, but the two call sites in Invoke-Changes.ps1 (the Sysprep apply path and the all-users undo path) still call the OLD names -- so that path now dies with 'The term DisableStoreSearchSuggestionsForAllUsers is not recognized', exactly as reported in #717. Notably the Pester suite did not catch this because Tests/Invoke-Changes.Tests.ps1's BeforeAll stubs also defined the old names, which masked the dangling calls -- the suite passed while the production path was broken. This PR updates: the two call sites in Invoke-Changes.ps1, the test stubs/mocks/assertions to the new names (so the suite now exercises the real contract), and two stale .EXAMPLE doc lines in Set-StoreSearchSuggestions.ps1. Verification: parse-clean on all three files; grep confirms zero references to the old names remain anywhere in Scripts/ or Tests/. I could not run the Pester suite locally (in-box Pester 3.4; the suite needs v5 and I avoid installing tools on this machine) -- tests.yml should exercise it here. Fixes #717

Summary by CodeRabbit

  • Updated Store search-suggestions function references in apply and undo flows.
  • Updated related Pester mocks, stubs, and assertions.
  • Corrected stale documentation examples.
  • Restores all-users Store search-suggestions functionality during Windows 11 Sysprep operations.

The approved-verbs refactor renamed DisableStoreSearchSuggestionsForAllUsers / EnableStoreSearchSuggestionsForAllUsers to Set-StoreSearchSuggestionsDisabledForAllUsers / Set-StoreSearchSuggestionsEnabledForAllUsers, but the two call sites in Invoke-Changes.ps1 still used the old names, so applying or undoing DisableStoreSearchSuggestions on the all-users path failed with 'The term ... is not recognized'. The test suite did not catch this because its BeforeAll stubs also defined the OLD names, masking the dangling calls. Update the call sites, the test stubs/mocks/assertions to the new names, and the two stale .EXAMPLE doc lines. Fixes Raphire#717
@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 022e8d32-8583-4823-93b6-bcfd5054a15a

📥 Commits

Reviewing files that changed from the base of the PR and between 68cacfc and e43ee9e.

📒 Files selected for processing (3)
  • Scripts/Features/Invoke-Changes.ps1
  • Scripts/Features/Set-StoreSearchSuggestions.ps1
  • Tests/Invoke-Changes.Tests.ps1

📝 Walkthrough

Walkthrough

The Sysprep all-users Store search suggestions apply and undo paths now call renamed Set-StoreSearchSuggestions*ForAllUsers helpers. Documentation examples and Pester stubs, mocks, and assertions were updated accordingly.

Changes

Store search suggestion helper rename

Layer / File(s) Summary
Apply and undo wiring
Scripts/Features/Invoke-Changes.ps1
Sysprep feature apply and undo use the renamed all-users disable and enable helpers.
Documentation and test alignment
Scripts/Features/Set-StoreSearchSuggestions.ps1, Tests/Invoke-Changes.Tests.ps1
Examples, stubs, mocks, and expectations reference the renamed helpers.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: raphire

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Powershell Docstrings ⚠️ Warning The changed funcs are documented, but Set-StoreSearchSuggestions.ps1 still has stale .EXAMPLE calls to DisableStoreSearchSuggestions/EnableStoreSearchSuggestions, so the docs don’t fully match beha... Update the remaining .EXAMPLE lines to use Set-StoreSearchSuggestionsDisabled/Enabled, or add aliases if the पुराने names are meant to stay supported.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is relevant and clearly describes the rename-related fix, though it is longer than ideal.
Linked Issues check ✅ Passed The obsolete all-users store-suggestions calls were replaced with the new helper names in the affected paths, satisfying #717.
Out of Scope Changes check ✅ Passed The changes stay focused on the function rename plus matching test and example updates, with no unrelated scope added.

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

Comment @coderabbitai help to get the list of available commands.

@Raphire

Raphire commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Heya,

This was actually already fixed in #710, I just wasn't able to merge it in until now. Thanks for taking the time to fix it though.

@Raphire Raphire closed this Jul 25, 2026
@HetCreep
HetCreep deleted the fix/store-suggestions-renamed-calls branch July 25, 2026 18:12
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.

DisableStoreSearchSuggestionsForAllUsers is not recognized

2 participants