Skip to content

Install only declared frameworks, tolerate newer ones, and verify results - #3

Merged
Softhe merged 2 commits into
mainfrom
fix/framework-supersede-and-verify
Oct 29, 2026
Merged

Softhe merged 2 commits into
mainfrom
fix/framework-supersede-and-verify

Conversation

@Softhe

@Softhe Softhe commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Why

A VM test on Windows 10 IoT Enterprise LTSC 2024 (build 26100.9457, x64) using the published irm | iex command had these results:

  • Store, its companions, and winget worked. Store opened and winget ran after a reboot.
  • The run still exited with code 5. The Store service offered Microsoft.UI.Xaml.2.8 8.2501.31001.0 while 8.2511.26001.0 was already installed. Provisioning failed with Element not found, and current-user registration returned 0x80073D06.
  • 22 frameworks were installed. These included UI.Xaml 2.4, .NET Native 1.3/1.7, and every x86 variant, which no selected app declares.
  • Success was never checked. The installer trusted the deployment cmdlets. The summary showed only Failure count : 1, and multi-line errors broke the log layout.

Changes

  • Only declared frameworks. Online mode downloads the apps first, reads their manifest dependencies (for bundles, the best payload for this machine's architecture), and downloads only matching frameworks, including frameworks those frameworks need. Local and offline folders skip undeclared frameworks before installation.
  • Newer frameworks already present. The installer skips provisioning or registration when the same framework name, publisher, and architecture is already present at the same or a newer version. A provisioning rejection while a newer copy is installed is logged as a warning, and verification decides the result.
  • Verification after installation. The installer checks that each installed app is registered for the current user with status 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.
  • Logging. The summary lists each failure by name, multi-line deployment errors stay on one log line, and the expected -SkipLicense message is INFO for online runs.
  • README, docs/installer-reliability.md, and tests are updated. The new tests/Test-FrameworkSupersede.ps1 reproduces the VM's UI.Xaml case.

Validation

  • tests/Run-Tests.ps1 passes under Windows PowerShell 5.1 and pwsh 7.
  • Live -DownloadOnly run 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.
  • Install-phase selection on those real files. Selection kept all six frameworks and the dependency order resolved. The real manifests show that Store and StorePurchaseApp need Microsoft.UI.Xaml.2.8 8.2501.31001.0 or newer, so the VM's 8.2511 satisfies them.
  • The provisioned and installed lookups were checked read-only against real Get-AppxProvisionedPackage and Get-AppxPackage output.

Not yet validated

  • There is no real install run with this branch yet. Rerun the online command on the LTSC 2024 VM snapshot.
  • Whether that run exits with code 0 depends on whether UI.Xaml 2.8 8.2511 is provisioned on the VM. If it is only installed for one user, the run still exits with code 5, but the log now names the dependency new users would lack.
  • New-user sign-in, SYSTEM provisioning, LTSC 2021, and offline mode have not been tested.

🤖 Generated with Claude Code

…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]>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b8f011cc-3938-4ad7-a95e-e7e4c6eb50ca
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[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.

Fix All in CodexFindings

  1. P1 Nested frameworks go unchecked ▶
  2. P2 Damaged frameworks get skipped ▶
  3. P2 Verification reports conflicting results ▶
Fix with agent prompt
### Issue 1
install.ps1:492-495
`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.

### Issue 2
install.ps1:676-679
`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.

### Issue 3
install.ps1:501-502
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.

Summary

The PR downloads and installs only declared frameworks, tolerates newer installed copies, and checks deployment results.

  • The installer downloads and installs only frameworks selected apps declare.
  • The installer skips older frameworks when a suitable newer copy is already present.
  • The installer checks Windows’ results and reports each failure by name.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Download selected apps] --> B[Read declared dependencies]
  B --> C[Download required frameworks recursively]
  C --> D[Select and order frameworks]
  D --> E[Provision and register packages]
  E --> F{Framework provisioning failed?}
  F -->|Matching copy installed| G[Warn and defer to verification]
  F -->|No matching copy| H[Count failure]
  E --> I[Verify successful apps]
  G --> I
  H --> I
  I --> J[Check app registration and direct provisioned dependencies]
  J --> K[Choose exit code]
Loading

Reviews (1) · Last reviewed commit: "Install only declared frameworks, tolera..." · Reviewed by Greptile

Comment thread install.ps1 Outdated
Comment on lines +492 to +495
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 }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 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.

Fix in Codex Fix in Claude Code

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

Comment thread install.ps1
Comment on lines +676 to +679
$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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

Fix in Codex Fix in Claude Code

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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.

Comment thread install.ps1 Outdated
Comment on lines +501 to +502
if ($unmet -eq 0) {
Write-Log "Verified (new users): $(@($Applications).Count) app(s) provisioned with all dependencies"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 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.

Fix in Codex Fix in Claude Code

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

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]>
@Softhe
Softhe merged commit 6dd8625 into main Oct 29, 2026
5 checks passed
@Softhe
Softhe deleted the fix/framework-supersede-and-verify branch October 29, 2026 17:14
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