fix(ci): ISO-assert discards stale WIM mount (was blocking ISO persist) #18

Merged
SilverLABS merged 1 commits from fix/iso-assert-stale-mount into main 2026-06-10 00:02:42 +00:00
Owner

Summary

The app-recipes build (run #101) built the ISO successfully (catalog + scripts baked, branding applied, 7 Pester + 36 unit tests green, SHA B570AAE9…) but the "Validate baked payload" step failed at Assert-IsoStructure.ps1:32:

Mount-WindowsImage: The user attempted to mount to a directory that is not empty. This is not supported.

The validator reused a fixed mount dir ($env:TEMP\sm-assert-wim); a prior aborted run left a WIM mounted there. Because that step failed (and the persist step isn't always()), "Persist build output to stable path" was skipped — so no ISO reached C:\silvermetal\out\ and the build couldn't be deployed.

Fix

  • Before mounting: Dismount-WindowsImage -Discard any stale mounts + Clear-WindowsCorruptMountPoint (mirrors build.ps1 Stage 0).
  • Use a unique per-run mount dir (sm-assert-wim-<guid>) and remove it in finally.
  • Bonus: assert apps/catalog.json baked into the WIM, so CI now guards the new app-recipes payload too.

No payload/build logic changed — the resulting ISO is the same content, this just unblocks validation + persist.

Test Plan

  • Assert-IsoStructure.ps1 parses clean
  • Merge build goes green and persists the ISO to the stable path (this PR's purpose)

🤖 Generated with Claude Code

## Summary The app-recipes build (run #101) **built the ISO successfully** (catalog + scripts baked, branding applied, 7 Pester + 36 unit tests green, SHA `B570AAE9…`) but the **"Validate baked payload"** step failed at `Assert-IsoStructure.ps1:32`: > Mount-WindowsImage: The user attempted to mount to a directory that is not empty. This is not supported. The validator reused a fixed mount dir (`$env:TEMP\sm-assert-wim`); a prior aborted run left a WIM mounted there. Because that step failed (and the persist step isn't `always()`), **"Persist build output to stable path" was skipped — so no ISO reached `C:\silvermetal\out\`** and the build couldn't be deployed. ## Fix - Before mounting: `Dismount-WindowsImage -Discard` any stale mounts + `Clear-WindowsCorruptMountPoint` (mirrors `build.ps1` Stage 0). - Use a **unique per-run mount dir** (`sm-assert-wim-<guid>`) and remove it in `finally`. - Bonus: assert `apps/catalog.json` baked into the WIM, so CI now guards the new app-recipes payload too. No payload/build logic changed — the resulting ISO is the same content, this just unblocks validation + persist. ## Test Plan - [x] `Assert-IsoStructure.ps1` parses clean - [ ] Merge build goes green and persists the ISO to the stable path (this PR's purpose) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
SilverLABS added 1 commit 2026-06-10 00:02:30 +00:00
fix(ci): ISO-assert discards stale WIM mount + asserts app catalog baked
All checks were successful
Build SilverMetal Enhanced - Windows ISO / build (pull_request) Successful in 5m55s
4268a337f3
Assert-IsoStructure.ps1 reused a fixed mount dir; a prior aborted run left a WIM
mounted there, so Mount-WindowsImage failed with 'directory is not empty' and the
persist-to-stable-path step was skipped (no ISO deployed). Now discards stale mounts
+ clears corrupt mount points + uses a unique per-run mount dir (mirrors build.ps1
Stage 0), and removes the dir after. Also asserts apps/catalog.json baked into the WIM.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
SilverLABS merged commit f6dac0fdfd into main 2026-06-10 00:02:42 +00:00
SilverLABS deleted branch fix/iso-assert-stale-mount 2026-06-10 00:02:42 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SilverLABS/SilverMetal#18