Skip to content

fix(smoke): self-configuring verify-p8/p9 (derive keep/remove from baked script) + record P4/P8/P9#27

Merged
bilbospocketses merged 1 commit into
mainfrom
fix/smoke-self-configuring
May 31, 2026
Merged

fix(smoke): self-configuring verify-p8/p9 (derive keep/remove from baked script) + record P4/P8/P9#27
bilbospocketses merged 1 commit into
mainfrom
fix/smoke-self-configuring

Conversation

@bilbospocketses
Copy link
Copy Markdown
Owner

Makes the P8/P9 smoke tests self-configuring so the operator never re-declares what the build already decided. A forgotten -KeepEdge flag had produced a misleading FAIL on a kept-Edge build; the fix removes the flag entirely.

How it works

Both scripts read the build's OWN baked cleanup script (C:\Windows\Setup\Scripts\tiny11-cleanup.ps1) to learn what THIS image removed vs kept. The generator (New-Tiny11PostBootCleanupScript) emits an action only for apply-state (non-kept) items, so:

  • signature present in baked script ⇒ REMOVED ⇒ assert ABSENT
  • signature absent ⇒ KEPT ⇒ assert PRESENT

Same artifact verify-p9-static already trusts. Run bare on any keep profile and it adapts.

  • verify-p8.ps1 — drops -KeepEdge/-KeptPaths. All 4 arms derive expectation from the baked script (filesystem/takeown: kept⇒present, removed⇒absent; registry: assert when applied, SKIP when kept; scheduled-task: removed⇒absent, kept⇒present). Signatures matched as complete tokens (trailing-quote boundary) so ...\Edge...\EdgeUpdate, Microsoft EdgeMicrosoft Edge Update.
  • verify-p9.ps1 — drops hardcoded -KeptAppx/-KeptPaths/-KeptRegistryKeys. Derives the 52-appx partition + Edge paths + Edge uninstall reg keys from the baked script. Keeps the trigger-and-wait pre-step.

Verification (no VM needed)

Extracted the real P8 baked script from the ISO and ran the derivation offline — reproduces the exact partition: Edge/WebView KEPT, OneDrive REMOVED, 5 tweaks applied, 5 tasks removed, Kept={Clipchamp}, Removed=51. A synthetic test confirms the quote-boundary discrimination. Both scripts AST-parse clean.

Records (smoke matrix)

P4 PASS (8/8; Test 7 wait-for-completion), P8 PASS (4 arms), P9 PASS (kept present; 0/51 removed present after cleanup trigger). Only P5 remains.

P8/P9 should not require the operator to re-declare what the build already
decided -- a forgotten -KeepEdge flag produced a misleading FAIL on a kept-Edge
build. Both now self-configure: they read the build's OWN baked cleanup script
(C:\Windows\Setup\Scripts\tiny11-cleanup.ps1) and derive remove-vs-keep per
item. The generator emits an action only for apply-state (non-kept) items, so
signature-in-script => removed (assert ABSENT), absent => kept (assert PRESENT).
This is the same artifact P9-static trusts. No flags; run bare on any profile.

verify-p8.ps1 -- drops -KeepEdge/-KeptPaths. All four arms derive expectation
  from the baked script: filesystem + takeown paths (kept=>present,
  removed=>absent), registry tweaks (asserted when applied, SKIP when kept),
  scheduled tasks (removed=>absent, kept=>present). Signatures matched as
  complete tokens (trailing quote boundary) so '...\Edge' != '...\EdgeUpdate'
  and 'Microsoft Edge' != 'Microsoft Edge Update'.

verify-p9.ps1 -- drops the hardcoded -KeptAppx/-KeptPaths/-KeptRegistryKeys
  defaults. Derives the appx partition (kept vs removed) + Edge paths + Edge
  uninstall reg keys from the baked script. Keeps the trigger-and-wait pre-step.

Verified offline against the REAL P8 baked script (extracted from the ISO):
derivation reproduces the exact partition -- Edge/WebView KEPT, OneDrive
REMOVED, 5 tweaks applied, 5 tasks removed, Kept={Clipchamp}, Removed=51 -- and
a synthetic test confirms the quote-boundary discrimination.

docs (smoke matrix): record P4 PASS (8/8, wait-for-completion Test 7), P8 PASS
(4 arms), P9 PASS (kept present, 0/51 removed present after cleanup trigger);
update P8/P9 invocations to the bare self-configuring form. Only P5 remains.
@bilbospocketses bilbospocketses enabled auto-merge (squash) May 31, 2026 09:35
@bilbospocketses bilbospocketses merged commit 024fa0f into main May 31, 2026
6 checks passed
@bilbospocketses bilbospocketses deleted the fix/smoke-self-configuring branch May 31, 2026 10:04
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.

1 participant