Skip to content

Normalize PowerShell casing across core APIs - #4281

Merged
thomhurst merged 2 commits into
mainfrom
issue-4233-powershell-casing
Aug 29, 2026
Merged

Normalize PowerShell casing across core APIs#4281
thomhurst merged 2 commits into
mainfrom
issue-4233-powershell-casing

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • rename core Powershell* option records and implementation to canonical PowerShell* casing
  • update DI, shell contracts, active docs, tests, and PublicAPI baselines
  • add missing PowerShell/Bash option docs and align coverage exclusions
  • document the predefined-installer interaction after its removal in Flatten the core installer API #4276

Validation

  • core Release build: 0 warnings, 0 errors
  • PowerShellApiSurfaceTests: 1/1 passed
  • PowerShellTests: 4/4 passed
  • scoped whitespace verification passed

Closes #4233

@thomhurst

Copy link
Copy Markdown
Owner Author

@claude review

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 4 minutes.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a66a079-9767-4ee9-98c7-af9ce221dbab

📥 Commits

Reviewing files that changed from the base of the PR and between 26af9b1 and de02223.

📒 Files selected for processing (16)
  • RELEASE_NOTES_V4.md
  • docs/docs/why.md
  • src/ModularPipelines/Context/Domains/Shell/IPowerShellContext.cs
  • src/ModularPipelines/Context/PowerShell.cs
  • src/ModularPipelines/DependencyInjection/DependencyInjectionSetup.cs
  • src/ModularPipelines/Options/BashFileOptions.cs
  • src/ModularPipelines/Options/PowerShellFileOptions.cs
  • src/ModularPipelines/Options/PowerShellOptions.cs
  • src/ModularPipelines/Options/PowerShellScriptOptions.cs
  • src/ModularPipelines/Options/PowershellScriptOptions.cs
  • src/ModularPipelines/PublicAPI.Shipped.txt
  • src/ModularPipelines/PublicAPI.Unshipped.txt
  • test/ModularPipelines.UnitTests/Api/PowerShellApiSurfaceTests.cs
  • test/ModularPipelines.UnitTests/Commands/CommandLoggerTests.cs
  • test/ModularPipelines.UnitTests/Helpers/CommandTests.cs
  • test/ModularPipelines.UnitTests/Helpers/PowerShellTests.cs

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T00:16:03.591192Z de02223 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Mechanical rename PR: Powershell*PowerShell* casing across the core options records (PowerShellOptions, PowerShellScriptOptions, PowerShellFileOptions), the internal PowerShell implementation class, IPowerShellContext signatures, DI registration, tests, docs, and PublicAPI.Shipped/Unshipped.txt baselines.

Checked:

  • Grepped the whole repo for leftover old-casing references (Powershell). The only remaining hits are correctly left alone: Azure's PowershellVersion and Chocolatey's UseSystemPowershell are auto-generated from the external CLI tools' actual flag names, not part of this internal type rename, and InterfaceVisibilityTests.cs's "IPowershell" entry is an unrelated, already-removed legacy interface name being asserted absent (not this rename's IPowerShellContext).
  • PublicAPI.Shipped.txt/PublicAPI.Unshipped.txt are updated consistently: old shipped members removed, new members added to Unshipped — the correct pattern for a breaking rename of already-shipped API, and it's documented as a breaking change in RELEASE_NOTES_V4.md.
  • New PowerShellApiSurfaceTests.cs asserts both that the new type names exist and that the old ones are gone from the assembly — a good regression guard against the casing drifting back or a partial rename slipping through.
  • [ExcludeFromCodeCoverage] + XML doc additions on the PowerShell*Options records now match the sibling Bash*Options records, so the "align coverage exclusions" part of the PR description checks out.
  • File renames (Powershell.csPowerShell.cs, PowershellTests.csPowerShellTests.cs) were done via git rename, preserving history.

No functional behavior changes, no missed call sites, no architectural concerns — this is a clean, well-scoped rename with good test coverage for the change itself.

@greptile-apps

greptile-apps Bot commented Aug 28, 2026

Copy link
Copy Markdown

Greptile Summary

The PR consistently normalizes the core PowerShell API and implementation names to canonical casing.

  • Renames the public option records, implementation class, interface signatures, and dependency-injection registration.
  • Updates API baselines, tests, documentation, and release notes to reflect the renamed surface.
  • Adds API-surface assertions ensuring the canonical names exist and the former spellings are absent.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/ModularPipelines/Context/Domains/Shell/IPowerShellContext.cs Updates option overloads to canonical type names and narrowly scopes the intentional overload warning suppression.
src/ModularPipelines/Context/PowerShell.cs Renames the internal implementation and consistently constructs and accepts the canonical option types.
src/ModularPipelines/DependencyInjection/DependencyInjectionSetup.cs Updates the PowerShell context registration to resolve the renamed implementation.
src/ModularPipelines/Options/PowerShellOptions.cs Introduces the canonically cased base PowerShell option record while preserving its command-line tool behavior.
src/ModularPipelines/Options/PowerShellScriptOptions.cs Replaces the former script option record with the canonically named equivalent and unchanged CLI mapping.
src/ModularPipelines/Options/PowerShellFileOptions.cs Renames the file option record while retaining its file argument and inheritance behavior.
src/ModularPipelines/PublicAPI.Shipped.txt Removes the former spellings from the shipped API baseline as part of the intentional v4 breaking rename.
src/ModularPipelines/PublicAPI.Unshipped.txt Records the complete canonical PowerShell API surface.
test/ModularPipelines.UnitTests/Api/PowerShellApiSurfaceTests.cs Verifies that canonical API identities are exposed and legacy spellings are absent.

Reviews (2): Last reviewed commit: "fix(api): scope PowerShell overload warn..." | Re-trigger Greptile

@thomhurst

Copy link
Copy Markdown
Owner Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Re-reviewed after the new commit (de022235) since the prior CLEAR review at 8d48d738. The only change in that window is in src/ModularPipelines/Context/Domains/Shell/IPowerShellContext.cs:

  • Adds #pragma warning disable RS0026 / restore around the four RunAsync/RunFileAsync overload pairs (string vs. options-record), suppressing the "ambiguous optional-parameter overload" analyzer warning for the intentionally-overlapping signatures.

Checked:

  • This mirrors an existing, established pattern in IModuleContext.cs (same rule, same disable/restore shape, same style of justification comment) for generic/non-generic delegate overloads that intentionally share an optional-cancellation-token shape — so this isn't a one-off suppression, it's consistent with how the codebase already handles this exact analyzer tradeoff.
  • Directory.Build.props only excludes RS0026 from WarningsAsErrors outside CI (EnableCiAnalyzers unset), meaning it is an error under CI, which explains why the explicit pragma is needed here rather than relying on the local dev exemption.
  • The disable/restore pair is scoped tightly to just the four overloads that are actually ambiguous (RunAsync(string, ...) / RunAsync(PowerShellScriptOptions, ...) and RunFileAsync(string, ...) / RunFileAsync(PowerShellFileOptions, ...)), not the whole file or a broader suppression — good scoping, avoids masking unrelated warnings in the same file.
  • No other files changed in this commit; the rest of the PR (the Powershell*PowerShell* rename) was already reviewed and is unchanged since the prior CLEAR verdict.

No functional or architectural concerns. Clean, well-scoped, consistent with existing conventions.

@thomhurst
thomhurst merged commit 0a095e5 into main Aug 29, 2026
21 of 22 checks passed
@thomhurst
thomhurst deleted the issue-4233-powershell-casing branch August 29, 2026 01:16
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.

v4: PowershellPowerShell casing across options, implementation class and predefined installer

1 participant