Skip to content

fix(win): report MSIX health honestly when the probe cannot run#40

Merged
Wangnov merged 2 commits into
mainfrom
fix/msix-health-probe-honesty
Jun 9, 2026
Merged

fix(win): report MSIX health honestly when the probe cannot run#40
Wangnov merged 2 commits into
mainfrom
fix/msix-health-probe-honesty

Conversation

@Wangnov

@Wangnov Wangnov commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Re-opens the change from #35, which GitHub auto-closed when its stacked base branch (feat/win-msix-deployment-probe, #31) was deleted on merge. Same commit, already passed Codex review + the full CI matrix as #35.

Adds a distinct verified signal to MsixHealthReport so an unrunnable post-install probe reads as 'unverified' rather than asserting healthy=true — without changing the conservative keep-MSIX decision.

Wangnov added 2 commits June 9, 2026 21:34
…table

Existence checks (Add-AppxPackage cmdlet, AppXSvc, sideload policy) cannot catch machines where the MSIX deployment COM class is unregistered (0x80040154 REGDB_E_CLASSNOTREG / 没有注册类): the cmdlet, service and policy all look present yet sideloading dies. probe_capabilities now tries to activate the WinRT PackageManager; an activation failure marks a new msix_deployment capability Unavailable, feeding msix_blocked so the plan defaults to portable instead of a doomed MSIX attempt. Conservative: only a probe that ran-and-failed flips to Unavailable; an unrun probe stays Unknown. Cascade across capability.rs/plan.rs/sys.rs/types.ts/managerApi.ts. Tests: cargo test -p codex-win-engine 20 passed; tsc --noEmit clean. Addresses mirror issue #13.
Add a `verified` field to MsixHealthReport so callers/UI/notes can tell a
verified-healthy result apart from one kept conservatively because the
health probe could not run. The keep-MSIX decision (healthy = true in the
probe-failed branch) is intentional and unchanged; only the report's
honesty improves.

- verified = true only on the real Windows probe path that produced a
  verdict.
- verified = false in the probe-failed branch and the non-Windows stub,
  where healthy = true is a conservative default rather than an observed
  clean bill of health.
- Mirror the new field in the TS MsixHealthReport interface and the mock
  WinPerformReport.
@Wangnov Wangnov merged commit f53ea80 into main Jun 9, 2026
6 checks passed
@Wangnov Wangnov deleted the fix/msix-health-probe-honesty branch June 9, 2026 14:10
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