fix(kiosk): WESL class-level calls — first-boot reboot loop found in VM e2e #7
Reference in New Issue
Block a user
Delete Branch "fix/kiosk-wesl-classlevel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
VM e2e on VM 102 caught a first-boot reboot loop (the "Why did my PC restart?" OOBE screen), root-caused from the VM's own disk logs (
silvermetal-firstboot.log+silvermetal-kiosk.log).Root cause
Configure-Kiosk.ps1configured Shell Launcher withInvoke-CimMethod -InputObject $weslforSetDefaultShell/SetCustomShell. ButWESL_UserSettingexposes static methods on the class —Get-CimInstancereturns no instance, so$weslisnulland those calls threw "Cannot bind argument to parameter 'InputObject' because it is null." Meanwhile the class-levelSetEnabled($true)had already succeeded.Net result: Shell Launcher enabled with no shell configured → every logon, including OOBE's
defaultuser0, gets a broken shell → reboot loop.Fix
SetEnabled/SetDefaultShell/SetCustomShellall class-level (-Namespace/-ClassName). Setting the default shell toexplorer.exeis what keeps OOBE and normal logons alive; onlysm-bootstrapgets the kiosk launcher.GetCustomShellverification + a fail-open rollback: on any failure,SetEnabled($false)and drop aRunOncelaunch of the Welcome app — so a WMI hiccup can never brick the box again (it degrades to a normal logon that still runs onboarding).BootstrapService.RevertKioskAsync(itsRemoveCustomShellwas also instance-based and silently no-op'd).Verification
Configure-Kiosk.ps1parses; welcome solution builds, 29/29 tests pass.🤖 Generated with Claude Code