docs: Correct claims the PR reviews found wrong - #195
Merged
Conversation
Six independent reviews of #186, #187, #188, #190, #192, and #194 turned up documentation that describes behavior the code does not have. Each correction below is a claim a consumer could act on and be wrong. The private key claim was the serious one. build.properties.ps1, the Get-PSBuildCertificate docstring, and the changelog all said a private key is required in every case. It is not. SkipValidation gates the entire validation block for the EnvVar and PfxFile sources, and the private key check is the first thing inside it, so a certificate exported without its key is accepted and fails later in Set-AuthenticodeSignature with a far worse message. The reviewer demonstrated it with a public-only .cer rather than inferring it. The same edit had also dropped "private key" from the list of checks those two sources skip, which the docstring it replaced had correctly included. The guarantee is real only for Store and Thumbprint, where the private key is part of how the certificate is selected rather than a check layered on afterwards. The README described SkipCertificateValidation as applying only to EnvVar and PfxFile. That was accurate until #194 extended it to the store-backed sources as a fallback, and stale the moment #194 merged. Two reviewers flagged that neither pull request owned the reconciliation. Get-PSBuildHelpLocale was described as resolving the locale used for help generation. It returns the docs subdirectories that are help locales -- plural, and a classification rather than a resolution. An agent reading the old wording would come here to change the default locale, which is $PSBPreference.Help.DefaultLocale and lives elsewhere. The instructions said the shared CI workflow lints and then runs the tests. The lint and test jobs have no needs relationship and run in parallel, and cspell runs with strict disabled, so lint cannot gate anything. Someone debugging a red run would look at the wrong job. build.properties.ps1 still said Test.OutputFile is relative to the Pester test directory while shipping an absolute default -- the same contradiction #186 corrected in the README, left behind in the source. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U1Jhu7fgTRJq7LK5MuKteE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Corrections from the six independent reviews of #186, #187, #188, #190, #192, and #194. Every item is a documented claim that the code does not actually honour — the kind a consumer acts on and is wrong.
1. The private-key guarantee was false (the serious one)
build.properties.ps1, theGet-PSBuildCertificatedocstring, andCHANGELOG.mdall said a private key is required in every case. It is not:-not $SkipValidationgates the whole block, private-key check included. The reviewer proved it rather than inferring it: a public-only.cerfed through theEnvVarsource with-SkipValidationcame back withHasPrivateKey = False.The same edit had also dropped "private key" from the list of checks those two sources skip — a list the docstring it replaced had correctly included. So it overclaimed the guarantee and under-reported what gets skipped.
Failure scenario: a consumer exports the public certificate instead of the PFX into a CI secret, has
SkipCertificateValidation = $true, reads that a private key is always required, and expectsGet-PSBuildCertificateto catch it. It does not —Set-AuthenticodeSignaturefails later with a much worse message.The guarantee is real only for
StoreandThumbprint, where the private key is part of how the certificate is selected rather than a check layered on afterwards. All three files now say that, and the README gained a paragraph making theEnvVar/PfxFilebehavior explicit.2. The README documented pre-#194 behavior
The
SkipCertificateValidationrow said the setting applies only toEnvVarandPfxFile— accurate until #194 extended it to the store-backed sources as a fallback, stale the moment #194 merged. Two reviewers independently flagged that neither PR owned the reconciliation. The row and theStore/Thumbprintbullets now describe the fallback.Column alignment preserved: every settings row still measures 61/45/174.
3.
Get-PSBuildHelpLocalewas mis-describedIt returns the docs subdirectories that are help locales — plural, and a classification rather than a resolution. Its own synopsis: "Return the directories under a docs path that are help locales." An agent reading the old wording would come here to change the default locale, which is
$PSBPreference.Help.DefaultLocaleand lives somewhere else entirely. Corrected in both places it appeared — the reviewer caught the helper list, and the test table row had the same error.4. CI is not sequential
The instructions said the shared workflow lints "then runs" the tests. The reviewer fetched the live
ModuleCI.ymlfrompsake/.githuband found noneeds:relationship between the lint and test jobs, with cspell running atstrict: falseso it cannot gate anything. Someone debugging a red run would go looking at the wrong job.5. The contradiction #186 fixed in the README was still in the source
Now states the default is absolute and that a relative value resolves against the test directory, because
Test-PSBuildPester.ps1:92pushes into it.CodeCoverage.OutputFilewas checked for the same problem and does not have it.Verification
Analyzeclean.awk— 61/45/174 on every row.\r\r\n.Not fixed here
Two items from the reviews are filed separately rather than folded in — both need a decision or verification beyond correcting a sentence.
Sign.TimestampServeris documented as RFC 3161, butSet-AuthenticodeSignature -TimestampServermay use the legacy Authenticode protocol instead. Inherited wording, and settling it needs a signing experiment rather than a reading of this repository.-Skip:(-not $IsWindows)skips theStore/Thumbprinttests on Windows PowerShell 5.1, because$IsWindowsdoes not exist there. So fix: Make Sign.SkipCertificateValidation actually skip validation #194's fix is never CI-tested on the engine where store-based signing is most common. It is the existing convention across the whole file, and un-skipping may surface mock failures on 5.1, so it wants its own change.🤖 Generated with Claude Code
https://claude.ai/code/session_01U1Jhu7fgTRJq7LK5MuKteE