diff --git a/Changelog.md b/Changelog.md index 9e60296..765ac8a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,16 @@ # Changelog +## v1.122.2 + +Packaging fix for the v1.122.1 release. + +- **The PowerShell Gallery module now publishes again.** `RackStack.psd1` was not in the version-sensitive file list, so its `ModuleVersion` stayed on 1.122.0 while everything else moved to 1.122.1. The publish step correctly refused to push a manifest whose version disagreed with the build, which also skipped the package-manager and retention steps behind it -- so v1.122.1 reached GitHub Releases but not the Gallery. The manifest is now bumped in step with the rest, and the test suite asserts that every version touchpoint agrees, so a mismatch fails CI on the pull request instead of part-way through a release. +- **The Gallery listing no longer advertises a stale action count** (it said 176; there are 201). The manifest is now covered by the documentation-freshness checks that already guard the README, help text, and package manifests. + +Contains everything in v1.122.1: the self-update integrity fix and the antivirus documentation. + +No module or CLI action changes (81 modules, 201 actions). + ## v1.122.1 Self-update integrity fix, plus guidance for antivirus false positives. diff --git a/Header.ps1 b/Header.ps1 index 09ac295..d761a88 100644 --- a/Header.ps1 +++ b/Header.ps1 @@ -30,9 +30,9 @@ 7h3 4b1d3r .VERSION - 1.122.1 + 1.122.2 .LAST UPDATED - 07/27/2026 + 07/28/2026 .CHANGELOG v1.21.1 ROBUSTNESS, UX, CACHE CONSISTENCY: diff --git a/Modules/00-Initialization.ps1 b/Modules/00-Initialization.ps1 index 3e2e4fe..295e19b 100644 --- a/Modules/00-Initialization.ps1 +++ b/Modules/00-Initialization.ps1 @@ -233,7 +233,7 @@ if (-not $PSCommandPath -and $script:ScriptPath) { if (-not $script:ModuleRoot -and $script:ScriptPath) { $script:ModuleRoot = [System.IO.Path]::GetDirectoryName($script:ScriptPath) } -$script:ScriptVersion = "1.122.1" +$script:ScriptVersion = "1.122.2" $script:ScriptStartTime = Get-Date # Post-update cleanup: UpdateSelf / Rollback leave a `.pending-delete` sibling next to RackStack.exe. diff --git a/README.md b/README.md index 4e23fc8..26d0313 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ OpenSSF Best Practices codecov PSScriptAnalyzer 0 errors - 5417 structural tests + 5424 structural tests Pester 312 tests SLSA Level 3

diff --git a/RackStack.ps1 b/RackStack.ps1 index adb2541..91e70eb 100644 --- a/RackStack.ps1 +++ b/RackStack.ps1 @@ -13,7 +13,7 @@ Environment-specific settings are configured via rackstack.config.json (a legacy defaults.json is still read). .VERSION - 1.122.1 + 1.122.2 .NOTES - Requires Windows Server 2012 R2 or later (or Windows 10/11 for testing) - Must be run as Administrator diff --git a/RackStack.psd1 b/RackStack.psd1 index 6ef28ce..f8664d3 100644 --- a/RackStack.psd1 +++ b/RackStack.psd1 @@ -1,11 +1,11 @@ @{ RootModule = 'RackStack.psm1' - ModuleVersion = '1.122.0' + ModuleVersion = '1.122.2' GUID = 'c19b8e71-4a35-4f2b-9d06-8a24f7bc0e91' Author = 'TheAbider' CompanyName = 'TheAbider' Copyright = '(c) TheAbider. All rights reserved.' - Description = 'PowerShell cmdlet wrappers around the RackStack.exe CLI. Invoke any of the 176 CLI actions (SelfTest, UpdateSelf, ExportLogs, Batch, every audit action, etc.) as structured cmdlets from scripts and pipelines. Auto-locates the installed EXE via the Programs-and-Features registry key, PATH, or the RACKSTACK_EXE environment variable. RackStack.exe is downloaded separately from https://github.com/TheAbider/RackStack/releases — the module itself is a thin wrapper, not the tool.' + Description = 'PowerShell cmdlet wrappers around the RackStack.exe CLI. Invoke any of the 201 CLI actions (SelfTest, UpdateSelf, ExportLogs, Batch, every audit action, etc.) as structured cmdlets from scripts and pipelines. Auto-locates the installed EXE via the Programs-and-Features registry key, PATH, or the RACKSTACK_EXE environment variable. RackStack.exe is downloaded separately from https://github.com/TheAbider/RackStack/releases — the module itself is a thin wrapper, not the tool.' PowerShellVersion = '5.1' CompatiblePSEditions = @('Desktop', 'Core') diff --git a/Tests/Run-Tests.ps1 b/Tests/Run-Tests.ps1 index e48ba3a..7bf5b81 100644 --- a/Tests/Run-Tests.ps1 +++ b/Tests/Run-Tests.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Automated Test Runner for RackStack v1.122.1 + Automated Test Runner for RackStack v1.122.2 .DESCRIPTION Comprehensive non-interactive test suite covering: @@ -10389,6 +10389,70 @@ catch { Write-TestResult "Self-Update Integrity Tests" $false $_.Exception.Message } +# ============================================================================ +# SECTION 205: RELEASE VERSION CONSISTENCY (all publish touchpoints agree) +# ============================================================================ +# The PowerShell Gallery publish step in ci.yml refuses to publish when +# RackStack.psd1's ModuleVersion disagrees with Header.ps1. That guard is correct, but +# it only fires in the RELEASE job — after the GitHub release has already been created, +# signed, and attested. v1.122.1 shipped that way: the release published fine and the +# Gallery publish then failed, leaving the two channels on different versions and +# skipping the winget/Chocolatey/retention steps behind it. +# +# The manifest was not in the version-sensitive file list, so nothing caught it earlier. +# These assertions move the check into PR CI, where a mismatch costs a red check instead +# of a broken release. +Write-SectionHeader "SECTION 205: RELEASE VERSION CONSISTENCY" + +try { + $verInit205 = $null + $initRaw205 = Get-Content "$modulesPath\00-Initialization.ps1" -Raw + if ($initRaw205 -match '\$script:ScriptVersion\s*=\s*"([^"]+)"') { $verInit205 = $Matches[1] } + Write-TestResult "Version: 00-Initialization declares a version" (-not [string]::IsNullOrWhiteSpace($verInit205)) "Found: '$verInit205'" + + # Header.ps1 .VERSION block + $verHeader205 = $null + $headerRaw205 = Get-Content (Join-Path $script:ModuleRoot "Header.ps1") -Raw + if ($headerRaw205 -match '(?m)^\s*\.VERSION\s*\r?\n\s*([0-9]+\.[0-9]+\.[0-9]+)') { $verHeader205 = $Matches[1] } + Write-TestResult "Version: Header.ps1 .VERSION matches 00-Initialization" ($verHeader205 -eq $verInit205) "Header: '$verHeader205' vs Init: '$verInit205'" + + # RackStack.ps1 loader .VERSION block + $verLoader205 = $null + $loaderRaw205 = Get-Content (Join-Path $script:ModuleRoot "RackStack.ps1") -Raw + if ($loaderRaw205 -match '(?m)^\s*\.VERSION\s*\r?\n\s*([0-9]+\.[0-9]+\.[0-9]+)') { $verLoader205 = $Matches[1] } + Write-TestResult "Version: RackStack.ps1 .VERSION matches" ($verLoader205 -eq $verInit205) "Loader: '$verLoader205' vs Init: '$verInit205'" + + # THE REGRESSION: the Gallery manifest must track the same version. + $psd1Path205 = Join-Path $script:ModuleRoot "RackStack.psd1" + if (Test-Path -LiteralPath $psd1Path205) { + $verPsd1205 = $null + $psd1Raw205 = Get-Content $psd1Path205 -Raw + if ($psd1Raw205 -match "ModuleVersion\s*=\s*'([^']+)'") { $verPsd1205 = $Matches[1] } + Write-TestResult "Version: RackStack.psd1 ModuleVersion matches (blocks PSGallery publish if not)" ` + ($verPsd1205 -eq $verInit205) "psd1: '$verPsd1205' vs Init: '$verInit205'" + # The CLI-action count in the manifest description is covered by Section 174's + # documentation-freshness guard, which derives the live count from the entry point. + } else { + Write-TestResult "Version: RackStack.psd1 present" -Skipped -Message "psd1 not in this layout (work mirror)" + } + + # Tests/Run-Tests.ps1 synopsis + $selfRaw205 = Get-Content $PSCommandPath -Raw -ErrorAction SilentlyContinue + if ($selfRaw205 -and $selfRaw205 -match 'Automated Test Runner for RackStack v([0-9]+\.[0-9]+\.[0-9]+)') { + Write-TestResult "Version: Run-Tests.ps1 synopsis matches" ($Matches[1] -eq $verInit205) "Synopsis: '$($Matches[1])' vs Init: '$verInit205'" + } + + # Changelog must carry an entry for the version being shipped. + $clPath205 = Join-Path $script:ModuleRoot "Changelog.md" + if (Test-Path -LiteralPath $clPath205) { + $clRaw205 = Get-Content $clPath205 -Raw + Write-TestResult "Version: Changelog has an entry for v$verInit205" ($clRaw205 -match "(?m)^##\s+v$([regex]::Escape($verInit205))\s*$") + } +} +catch { + Write-TestResult "Release Version Consistency Tests" $false $_.Exception.Message +} + # ============================================================================ # SECTION 174: DOCUMENTATION FRESHNESS (counts must match the codebase) # ============================================================================ @@ -10408,7 +10472,10 @@ try { Write-TestResult "DocFreshness: live action count resolved ($liveActionCount)" ($liveActionCount -gt 0) "Found $liveActionCount" # Doc files that quote a CLI-action count. (Wiki is a separate clone — not checked here.) + # RackStack.psd1 is included because its Description quotes a CLI-action count that + # ships to the PowerShell Gallery listing — it had drifted to 176 against a live 201. $docFiles = @('README.md', 'CONTRIBUTING.md', 'ROADMAP.md', 'Modules\34-Help.ps1', + 'RackStack.psd1', 'dist\chocolatey\rackstack.nuspec', 'dist\scoop\rackstack.json') $wingetDir = Join-Path $script:ModuleRoot 'dist\winget' if (Test-Path $wingetDir) { $docFiles += @(Get-ChildItem -Path $wingetDir -Recurse -Filter '*.yaml' -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName }) }