docs: Document the $PSBPreference.Sign settings in the README - #190
Merged
Conversation
Test Results 4 files 764 suites 2m 10s ⏱️ Results for commit d5a8ab7. ♻️ This comment has been updated with latest results. |
This was referenced Aug 27, 2026
Base automatically changed from
docs/readme-alphabeticparamsorder-drift
to
main
August 27, 2026 22:26
Authenticode signing and catalog support shipped in 0.8.0 (#92), but none of the sixteen settings it added to build.properties.ps1 ever reached the README settings table. The only way to discover how to sign a module was to read build.properties.ps1 and psakeFile.ps1, which is not a reference a consumer should have to reconstruct for themselves on the way to 1.0.0. The defaults are read from build.properties.ps1 rather than from the function parameters, which is the mistake #186 was opened to correct in four existing rows. The descriptions are condensed from the inline documentation there, with two exceptions taken from the implementation instead: - Sign.SkipCertificateValidation is documented as applying to the EnvVar and PfxFile sources, because that is what Get-PSBuildCertificate does. Its inline comment claims Store and Thumbprint, where the query already filters on private key and expiry and there is nothing left to skip. - Sign.Catalog.FileName documents the computed <ModuleName>.cat fallback, which lives in the tasks rather than in the defaults. A short "Code signing" section covers the five CertificateSource modes. The choice between them is a setup decision about where a pipeline keeps its certificate, and the Auto fallback chain in particular cannot be explained in a table cell. Also adds what the table rows imply exist: the Sign, SignModule, BuildCatalog, and SignCatalog tasks, and the four $PSB{TaskName}Dependency variables the dependency table stopped short of. With the gap closed, the README drift guard now asserts both directions. The reverse assertion needs no allow-list: every leaf of the defaults is in the table, Build.ModuleOutDir included, which is documented with a note that it is for internal use rather than hidden from the readers the table exists for. Closes #189 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U1Jhu7fgTRJq7LK5MuKteE
tablackburn
force-pushed
the
docs/readme-sign-settings
branch
from
August 27, 2026 22:27
df6921d to
d5a8ab7
Compare
This was referenced Aug 28, 2026
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.
Summary
Closes #189.
$PSBPreference.Signrows (thirteenSign.*, threeSign.Catalog.*) to the README settings table, after thePublishblock,matching
build.properties.ps1section order and the table's existing61/45/174 column padding. No unrelated row is reflowed.
## Code signingprose section covering the fiveCertificateSourcemodes.Signto the Primary Tasks table, andSignModule,BuildCatalog, andSignCatalogto the Secondary Tasks table.$PSBSignModuleDependency,$PSBBuildCatalogDependency,$PSBSignCatalogDependency, and$PSBSignDependencyto the$PSB{TaskName}Dependencytable, which stopped at$PSBPublishDependency.Describe 'Settings documented in the README'to assert bothdirections, and replaces the comment that explained why it could not.
Where the defaults came from
Every default value in the new rows is read from
PowerShellBuild/build.properties.ps1, not from function parameter defaults —the confusion #186 exists to correct. Two descriptions could not be taken from
the inline comments there, because those comments disagree with the code:
Sign.SkipCertificateValidation. The inline comment says it applies "whentrue and using the Store or Thumbprint sources".
Get-PSBuildCertificatedoesthe opposite:
SkipValidationis only consulted forEnvVarandPfxFile(
if ($cert -and -not $SkipValidation -and ($resolvedSource -eq 'EnvVar' -or $resolvedSource -eq 'PfxFile'))), and theStore/Thumbprintbranches alreadyfilter on
HasPrivateKeyandNotAfterinside the query, so there is nothingthere for the switch to skip. The README documents the implemented behavior.
build.properties.ps1is left alone — whether the comment or the code is thebug is a maintainer call, not a docs change, and worth a follow-up issue either
way.
Sign.Catalog.FileName. Defaults to$null; the effective<ModuleName>.catfallback is computed in theBuildCatalogandSignCatalogtask bodies. The row states the fallback rather than just the literal
$null.Nothing else surprised: the other fourteen defaults match their inline
documentation exactly.
Why prose as well as rows
CertificateSourcehas five values whose differences are setup decisions —which environment variables a pipeline sets, whether a PFX is on disk, whether
the certificate store is even reachable — and the
Autofallback chain(
EnvVarwhenCertificateEnvVaris populated, elseStore) is the reason thedefault works for a project that builds both locally and in CI. That does not
fit in a table cell, and the README already carries narrative sections
alongside its tables. The section is prose and a five-item list only; no code
fence was added, because the existing Examples section already shows how to set
$PSBPreferencevalues under both runners.Reverse-direction allow-list: none
Get-PreferenceLeafPathwalks the defaults recursively and returns the dottedpath of every leaf; nested hashtables (
Test.ScriptAnalysis,Test.CodeCoverage,Sign.Catalog) are containers, not settings, so only theirleaves are compared. All 52 leaves are now in the table, so the new assertion
needs no exclusions.
Build.ModuleOutDir— the candidate exclusion — is already documented, with adescription that says it is for internal use and points at
$PSBPreference.Build.OutDirinstead. That is the pattern to follow foranything else that turns out to be internal; an allow-list entry would hide the
setting from the readers the table exists for. A comment in the test says so,
so the next person is not left guessing why there is no allow-list.
The forward direction keeps its existing four-entry allow-list
(
Build.CompileHeader,CompileFooter,CompileScriptHeader,CompileScriptFooter), unchanged from #186.Red before green
With
README.mdintact:Deleting one new row (
$PSBPreference.Sign.Catalog.FileName) and rerunning thenew assertion alone:
The row was restored and the suite reruns green.
Test Plan
./build.ps1 -Task Test— 485 passed, 0 failed, 3 skipped. Thebranch point (2aa6c97) is 484/0/3; the one added test is the new
reverse-direction assertion.
Analyze(PSScriptAnalyzer) clean.awkthat all rows in the settings table are 284 characters and all rowsin the dependency table are 129.
.markdownlint.jsonleaves MD013 on forprose, exempting only tables and code blocks); no trailing whitespace; the
README stays pure ASCII.
No CHANGELOG entry
The signing feature is already changelogged, under released
## [0.8.0]ratherthan
## Unreleased— see the#92entry listing the three public functions,the four tasks, and the
$PSBPreference.Signsection. This PR fills in theREADME side of that shipped feature after the fact; it changes no behavior of
the shipped module, so per
instructions/repository-specific.instructions.md("
CHANGELOG.mddocuments user-facing changes to the shipped module") there isnothing to add. Adding an entry now would also read as a competing claim
against the 0.8.0 one.
Breaking Changes
None.
🤖 Generated with Claude Code
https://claude.ai/code/session_01U1Jhu7fgTRJq7LK5MuKteE