Add delivery-level signing for bundled internals#179
Conversation
|
PR 179 Code Review - see inline for details |
|
PR 179 Full Code Review Overall this is a well-structured feature addition with good test coverage. A few issues worth addressing before merging. 1. Bug: ShouldRemoveInternalsExcludePath has a problematic hardcoded fallback File: The clause
No test covers this edge case. A test with |
|
2. ApplyDeliverySigningPreference is called twice
The second call is a no-op in practice — If the second call is intentional as a defensive measure for callers that invoke 3. Missing test for the no-certificate error path There is no test for A test asserting |
|
4. Schema default change is a silent bump File: The default value changed from 5. Minor: primary example now always shows -Sign File: Example 1 now includes Nits
Summary: The core logic is sound and the feature adds real value. The two main asks before merging are: (1) fix the |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 85fbac5fba
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| var include = BuildSigningIncludePatterns(signing); | ||
| var exclude = BuildSigningExcludeSubstrings(signing); |
There was a problem hiding this comment.
Pass delivery context into signing exclusion builder
SignBuiltModuleOutput still calls BuildSigningExcludeSubstrings(signing) without the delivery config, so the runtime exclusion list always falls back to Internals instead of the configured Delivery.InternalsPath. This means builds that enable module signing with IncludeInternals=false and a custom internals folder (for example Assets) will sign files that should remain excluded, despite the new custom-path logic added in this commit.
Useful? React with 👍 / 👎.
|
PR Review for delivery-level signing feature. Key findings: (1) Bug - duplicate null check dead code in SignBuiltModuleOutput in FormattingSigningDelivery.cs; the second if(signing is null) block is unreachable and should be removed. (2) Concern - fragile exception message string matching in RegisterCertificateCommand to distinguish missing signing commands; a dedicated exception type would be safer. (3) Minor - gitHubToken null-forgiving operator in InvokeProjectBuildCommand suppresses compiler warning without runtime guard. (4) Minor - IsInternalsPath hardcodes Internals regardless of configured delivery InternalsPath. (5) Minor - per-file PowerShell instance creation is not a regression but a future optimisation opportunity. Overall positives: clean removal of PS-script-backed signing in favor of typed C# services; good test coverage for delivery signing; correct fix for Microsoft.PowerShell.* inbox module resolution failures; schema bump to 1.4 paired with new Sign flag. |
Summary
New-ConfigurationDelivery -Signso delivery bundles can opt their internals into module signingInternalsPathStack
Details
DeliveryOptionsConfigurationnow carries aSignflag and uses schema1.4InternalsValidation
dotnet test .\PowerForge.Tests\PowerForge.Tests.csproj -c Release --filter "ModulePipelineDeliverySigningTests|SigningIncludePatternsTests|DeliveryCommandGeneratorTests|ModulePipelineDeliveryMergedTests|ModulePipelineRefreshManifestOnlyTests"pwsh .\Module\Build\Build-Module.ps1 -NoSign