Repository navigation
Install only declared frameworks, tolerate newer ones, and verify results - #3
Conversation
…ults
From the 2026-10-29 LTSC 2024 VM run (build 26100.9457, exit 5):
- Download apps first and fetch only the frameworks their manifests declare
(transitively). Local folders skip undeclared frameworks too. The live
service set drops from 26 packages to 10 on x64.
- Skip provisioning/registering a framework when the same name, publisher
and architecture is already present at the same or a newer version. A
provisioning rejection while a newer copy is installed ("Element not
found" for UI.Xaml 2.8 8.2501 vs installed 8.2511) is deferred to
verification instead of counted.
- Verify the result with Windows after installation: current-user
registration status, and for provisioning, every app and declared
dependency is provisioned for new users. Unregistered Store exits 6.
- List each failure by name in the summary, keep multi-line deployment
errors on one log line, and log the expected -SkipLicense message as
INFO for online runs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
[Medium impact] The changes affect Store installation and provisioning runs on supported Windows machines. Fix nested framework verification before merging so a successful run does not leave new users without required frameworks.
|
| foreach ($dep in $app.Identity.Dependencies) { | ||
| $expectedFamily = if ($dep.Publisher) { $dep.Name + '_' + (Get-PublisherId $dep.Publisher) } else { $null } | ||
| $match = @($provisioned | Where-Object { $_.Name -eq $dep.Name -and (-not $expectedFamily -or $_.Family -eq $expectedFamily) -and ($_.Arch -eq 'neutral' -or $_.Arch -eq $dep.Arch) -and $_.Version -ge $dep.MinVersion }) | ||
| if ($match.Count -gt 0) { continue } |
There was a problem hiding this comment.
Nested frameworks go unchecked
Test-InstallResult checks only apps’ direct dependencies. If an app needs framework A, and A needs framework B, B’s provisioning error can now become a warning because B is installed for an existing user. If A is provisioned, verification passes without checking B. The run can report success while new users lack B.
Pass the selected frameworks into verification and check their dependencies too.
Prompt To Fix With AI
This is a comment left during a code review.
Path: install.ps1
Line: 492-495
Comment:
**Nested frameworks go unchecked**
`Test-InstallResult` checks only apps’ direct dependencies. If an app needs framework A, and A needs framework B, B’s provisioning error can now become a warning because B is installed for an existing user. If A is provisioned, verification passes without checking B. The run can report success while new users lack B.
Pass the selected frameworks into verification and check their dependencies too.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 6b33a07. Test-InstallResult now takes the installed frameworks too and checks their declared dependencies against the provisioned set, so a missing nested framework counts as a failure. Covered by case 2c in tests/Test-FrameworkSupersede.ps1.
| $registered = @(if ($IsFramework) { Find-InstalledFramework -Identity $Package.Identity -Scope CurrentUser }) | ||
| if ($registered.Count -gt 0) { | ||
| Write-Log "Already registered (current user): $name (version $($registered[0].Version) present)" | ||
| return $ok |
There was a problem hiding this comment.
Damaged frameworks get skipped
Find-InstalledFramework does not check Status. If a matching framework needs repair, the new current-user shortcut still skips registration. Frameworks are also absent from the later status checks, so this skips a chance to repair the package without checking its health afterwards.
Require Status to be Ok before skipping current-user registration, and add a test with an unhealthy matching framework.
Prompt To Fix With AI
This is a comment left during a code review.
Path: install.ps1
Line: 676-679
Comment:
**Damaged frameworks get skipped**
`Find-InstalledFramework` does not check `Status`. If a matching framework needs repair, the new current-user shortcut still skips registration. Frameworks are also absent from the later status checks, so this skips a chance to repair the package without checking its health afterwards.
Require `Status` to be `Ok` before skipping current-user registration, and add a test with an unhealthy matching framework.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 6b33a07. The current-user lookup now requires Status -eq 'Ok', so a framework copy that needs repair is re-registered instead of skipped. Covered by case 6 in tests/Test-FrameworkSupersede.ps1.
| if ($unmet -eq 0) { | ||
| Write-Log "Verified (new users): $(@($Applications).Count) app(s) provisioned with all dependencies" |
There was a problem hiding this comment.
Verification reports conflicting results
When an app is not provisioned, verification records a failure and continues without increasing $unmet. If no direct dependency checks fail, this message still says every app is provisioned with all dependencies. That contradicts the failure logged above and makes failed runs harder to diagnose.
Include missing apps in the success condition too.
Prompt To Fix With AI
This is a comment left during a code review.
Path: install.ps1
Line: 501-502
Comment:
**Verification reports conflicting results**
When an app is not provisioned, verification records a failure and continues without increasing `$unmet`. If no direct dependency checks fail, this message still says every app is provisioned with all dependencies. That contradicts the failure logged above and makes failed runs harder to diagnose.
Include missing apps in the success condition too.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 6b33a07. An unprovisioned app now counts toward the problem total, so Verified (new users) is logged only when nothing failed. Covered by case 2d in tests/Test-FrameworkSupersede.ps1.
Address review feedback on #3: - Verification also checks dependencies declared by installed frameworks, so a missing nested framework is not hidden behind a provisioned parent. - An unprovisioned app now prevents the "Verified (new users)" message. - The current-user skip requires the registered framework to have status Ok, so a copy that needs repair is re-registered. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Why
A VM test on Windows 10 IoT Enterprise LTSC 2024 (build 26100.9457, x64) using the published
irm | iexcommand had these results:Microsoft.UI.Xaml.2.88.2501.31001.0 while 8.2511.26001.0 was already installed. Provisioning failed withElement not found, and current-user registration returned0x80073D06.Failure count : 1, and multi-line errors broke the log layout.Changes
Ok. When provisioning, it also checks that each app and each declared dependency is provisioned at the required version and architecture for new users. A Store that is not registered afterwards exits with code 6.-SkipLicensemessage is INFO for online runs.docs/installer-reliability.md, and tests are updated. The newtests/Test-FrameworkSupersede.ps1reproduces the VM's UI.Xaml case.Validation
tests/Run-Tests.ps1passes under Windows PowerShell 5.1 and pwsh 7.-DownloadOnlyrun against the Microsoft service (x64). Of 26 offered packages, it downloaded 10: four apps plus six x64 frameworks. It skipped 16 undeclared frameworks, verified hashes and signatures, and exited with code 0.Microsoft.UI.Xaml.2.88.2501.31001.0 or newer, so the VM's 8.2511 satisfies them.Get-AppxProvisionedPackageandGet-AppxPackageoutput.Not yet validated
🤖 Generated with Claude Code