$ErrorActionPreference = 'Stop' $projectRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) $scriptPath = Join-Path $projectRoot 'scripts\package-aug1-release.ps1' $devSetupPath = Join-Path $projectRoot 'docs\DEV_SETUP.md' $source = Get-Content -Raw -Encoding UTF8 -LiteralPath $scriptPath $requiredFragments = @( "output\aug1-rc\0.1.12-112-b9e08789-frozen", 'b9e08789265b73524e3ce2646abe2f2fc4565906', 'Runtime commit must be an ancestor of the operations commit', 'Frozen evidence is not release eligible', 'Frozen APK hash mismatch', 'Frozen backend JAR hash mismatch', 'Content candidate hash mismatch', "'operations/release-backend.sh'", "'operations/release-preflight.sh'", "'operations/verify-aug1-production-api-readonly.sh'", "'operations/capture-android-acceptance.ps1'", "'operations/go-no-go.md'", 'Release package already exists and will not be overwritten', 'Release package expected 14 files', 'ZIP entry hash mismatch', 'package_verified=true' ) foreach ($fragment in $requiredFragments) { if (-not $source.Contains($fragment)) { throw "August 1 packager is missing required fragment: $fragment" } } if ($source -match 'Compress-Archive') { throw 'August 1 packager must use sorted entries and a fixed timestamp, not Compress-Archive.' } if ($source -match '\[switch\]\$Force') { throw 'August 1 packager must not expose an overwrite switch.' } $devSetup = Get-Content -Raw -Encoding UTF8 -LiteralPath $devSetupPath if (-not $devSetup.Contains('.\scripts\package-aug1-release.ps1')) { throw 'DEV_SETUP is missing the August 1 release packaging command.' } Write-Output 'PASS: August 1 release packager freezes runtime and operations separately without overwriting prior packages'