Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions Header.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Modules/00-Initialization.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<a href="https://www.bestpractices.dev/projects/12921"><img alt="OpenSSF Best Practices" src="https://www.bestpractices.dev/projects/12921/badge"></a>
<a href="https://codecov.io/gh/TheAbider/RackStack"><img alt="codecov" src="https://codecov.io/gh/TheAbider/RackStack/branch/master/graph/badge.svg"></a>
<img alt="PSScriptAnalyzer 0 errors" src="https://img.shields.io/badge/PSScriptAnalyzer-0%20errors-brightgreen">
<img alt="5417 structural tests" src="https://img.shields.io/badge/structural%20tests-5417-brightgreen">
<img alt="5424 structural tests" src="https://img.shields.io/badge/structural%20tests-5424-brightgreen">
<img alt="Pester 312 tests" src="https://img.shields.io/badge/Pester-312%20tests-brightgreen">
<img alt="SLSA Level 3" src="https://slsa.dev/images/gh-badge-level3.svg">
</p>
Expand Down
2 changes: 1 addition & 1 deletion RackStack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions RackStack.psd1
Original file line number Diff line number Diff line change
@@ -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')

Expand Down
69 changes: 68 additions & 1 deletion Tests/Run-Tests.ps1
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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)
# ============================================================================
Expand All @@ -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 }) }
Expand Down