Skip to content

ci(deploy): add portable-ZIP smoke test before release upload#39

Merged
OpenSource-For-Freedom merged 2 commits into
mainfrom
ci/zip-smoke-test
Jun 7, 2026
Merged

ci(deploy): add portable-ZIP smoke test before release upload#39
OpenSource-For-Freedom merged 2 commits into
mainfrom
ci/zip-smoke-test

Conversation

@OpenSource-For-Freedom

@OpenSource-For-Freedom OpenSource-For-Freedom commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a pre-release smoke test that unpacks the produced portable ZIP and asserts the runtime payload is intact before softprops/action-gh-release uploads anything. Catches the class of regression that shipped v1.0.65-dev.87 without scanner/ — the pytest + dotnet test gates only exercise source code, so a broken staging step had nothing stopping it from reaching users.

What it checks

Required (job fails if missing):

  • WRAITH.exe
  • README.md
  • scanner/scanner.pyBootstrapService.ResolveBaseDir() entry point
  • automation/Register-WraithTimedScan.ps1 — tray "Auto scan"
  • automation/Register-WraithPersistenceListener.ps1 — tray "Persistence"

Forbidden (job fails if present):

Unpacks the actual produced ZIP (not ./release) so the check also catches anything Compress-Archive does differently from a raw filesystem copy.

Why both lists

Forbidden-list catches drift in the other direction: if a future PR re-introduces START.bat or stops excluding test_*.py, the release is blocked instead of silently bloating the archive. Symmetric guard.

Test plan

  • Merge → next main push produces a stable release whose ZIP has been verified end-to-end.
  • (manual sanity) introduce a typo in the staging step Copy-Item scanner line locally → workflow fails at the new step, no release published.

Adds a new step between "Create ZIP" and "Create GitHub Release" that
unpacks the produced ZIP into a temp dir and asserts:

  Required (job fails if missing):
    - WRAITH.exe
    - README.md
    - scanner/scanner.py
    - automation/Register-WraithTimedScan.ps1
    - automation/Register-WraithPersistenceListener.ps1

  Forbidden (job fails if present):
    - START.bat, quick-scan.ps1, wraith.env.json, LICENSE
    - scanner/test_heuristics.py, scanner/__pycache__

The check unpacks the ACTUAL produced ZIP (not ./release) so it also
catches anything Compress-Archive does differently from a raw filesystem
copy. The pytest + dotnet test gates test source-code behaviour; this
step is the only thing that catches workflow-level staging regressions
like the one that shipped v1.0.65-dev.87 without scanner/.

Forbidden-list catches drift in the other direction too: if a future PR
re-introduces START.bat or stops excluding test files, the release is
blocked instead of silently bloating the ZIP.
Copilot AI review requested due to automatic review settings June 7, 2026 16:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a release gate in the deployment workflow to validate the actual produced portable ZIP contents before publishing a GitHub Release, preventing broken or bloated archives from being uploaded.

Changes:

  • Unpacks the generated portable ZIP in CI and asserts required runtime payload files are present.
  • Fails the workflow if forbidden “repo junk” / test artefacts appear in the ZIP.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +445 to +463
$forbidden = @(
"START.bat", # PR #36 removed — must not come back
"quick-scan.ps1", # PR #36 removed
"wraith.env.json", # bootstrap creates fresh per install
"LICENSE", # repo metadata, not runtime
"scanner/test_heuristics.py",
"scanner/__pycache__"
)

$missing = @()
foreach ($f in $required) {
$p = Join-Path $unpack $f
if (-not (Test-Path $p)) { $missing += $f }
}
$leaked = @()
foreach ($f in $forbidden) {
$p = Join-Path $unpack $f
if (Test-Path $p) { $leaked += $f }
}
@OpenSource-For-Freedom OpenSource-For-Freedom merged commit 7971524 into main Jun 7, 2026
5 of 6 checks passed
@OpenSource-For-Freedom OpenSource-For-Freedom deleted the ci/zip-smoke-test branch June 7, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants