Skip to content

fix(packaging): validate Windows portable taskbar lifecycle - #731

Closed
yg2224 wants to merge 8 commits into
vastsa:mainfrom
yg2224:fix/issue663-portable-taskbar-icon-v2
Closed

yg2224 wants to merge 8 commits into
vastsa:mainfrom
yg2224:fix/issue663-portable-taskbar-icon-v2

Conversation

@yg2224

@yg2224 yg2224 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 20, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Unresolved critical and moderate findings affect path safety, cleanup reliability, workflow coverage, and runner compatibility.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

This PR stabilizes the Windows portable extraction path and adds packaging, taskbar, relaunch, and concurrency smoke coverage.

Changes:

  • Configures and tests a fixed portable unpack directory.
  • Adds PowerShell lifecycle checks and a Windows Actions workflow.
  • Updates ADRs, runbooks, E2E plans, and documentation mirrors.
File Summary
scripts/​windows-portable-e2e.ps1 Adds lifecycle checks. Critical (2 votes): canonicalize the unpack path before containment validation. Moderate (2 votes): stop discovered PI-Desktop.exe children during cleanup. Moderate (1 vote): surface final cleanup failures. Moderate (1 vote): replace the fixed sleep with bounded readiness polling.
scripts/​README.md Documents the Windows portable smoke tooling.
docs/​zh-CN/​spec/​08-meta/​decisions-log.md Mirrors the D364 decision update.
docs/​zh-CN/​spec/​06-delivery/​06-release-runbook.md Mirrors portable release behavior.
docs/​zh-CN/​spec/​06-delivery/​04-e2e-test-plan.md Mirrors E2E-211 coverage.
docs/​spec/​08-meta/​decisions-log.md Updates the D364 decision record.
docs/​spec/​06-delivery/​06-release-runbook.md Documents portable runtime behavior.
docs/​spec/​06-delivery/​04-e2e-test-plan.md Expands E2E-211 coverage.
docs/​adr/​0197-windows-portable-exe.md Records portable lifecycle consequences.
apps/​desktop/​test/​auto-update.test.mjs Verifies the packaging configuration.
apps/​desktop/​package.json Sets the stable portable extraction directory.
.github/​workflows/​windows-portable-e2e.yml Critical (1 vote): hosted runners may lack an interactive taskbar session; use a capable runner or separate the assertion. Moderate (1 vote): assert the NSIS artifact and latest.yml as required by E2E-211.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +22 to +23
runs-on: windows-latest
timeout-minutes: 60
Comment thread scripts/windows-portable-e2e.ps1 Outdated
$portablePath
}
$tempRoot = (Resolve-Path -LiteralPath $env:TEMP).Path
$unpackRoot = Join-Path $tempRoot $UnpackDirName
Comment on lines +285 to +287
foreach ($run in $runs) {
Stop-Process -Id $run.Id -Force -ErrorAction SilentlyContinue
}
@yg2224

yg2224 commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

Updated in 05d178c:

  • Canonicalized %TEMP% and the joined unpack path before containment checks, so .. cannot escape the temp root.
  • Cleanup now discovers and stops all executable children under the unpack directory, retries removal, checks pin cleanup, and fails instead of reporting PASS when cleanup remains.
  • The hosted workflow no longer requires an interactive taskbar verb on every PR. It records TASKBAR_PIN_E2E=NOT_RUN when Explorer is unavailable; require_taskbar_pin=true is an opt-in qualification gate for a provisioned interactive Windows runner.
  • Added assertions and uploaded artifacts for the NSIS installer, portable exe, and latest.yml; smoke output is uploaded as a log.
  • Clarified that running-window grouping is owned by the app user model ID while the pin target uses the stable unpack path.

Validation:

  • Integrated local main commit 47007e477c02c40f194d6a06e766caf4cb05e73b: pnpm test:e2e => 23 passed, 2 skipped (live-model scenarios require PI_DESKTOP_TEST_API_KEY).
  • auto-update.test.mjs: 7/7 passed.
  • Docs: 78 locale pairs and 491 documentation pages verified.
  • The previous hosted Windows run proved portable extraction at %TEMP%\\PI-Desktop-Portable\\PI-Desktop.exe, but had no Pin to taskbar shell verb; that native taskbar qualification remains NOT_RUN until an interactive Windows runner is available.

@vastsa vastsa left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the Windows portable lifecycle work. The current Windows portable E2E is still a landing blocker: run 35524266283 fails with Portable app did not start at C:\Users\runneradmin\AppData\Local\Temp\PI-Desktop-Portable\PI-Desktop.exe. Please fix or classify that startup failure and rerun the workflow.

There is also a concurrency safety concern: the fixed unpack directory is shared by concurrent portable launches, so one run can clean or overwrite files used by another process. Please make the unpack directory ownership-safe (or serialize it with an explicit lock) and cover the concurrent case before merging.

@vastsa

vastsa commented Sep 21, 2026

Copy link
Copy Markdown
Owner

I verified that the taskbar/portable lifecycle problem in #663 is real, but the current PR head is not landing-safe. The required Windows job still fails in run 35524266283 with “Portable app did not start at C:\Users\runneradmin\AppData\Local\Temp\PI-Desktop-Portable\PI-Desktop.exe”. The current approach also still uses a shared fixed unpack directory, which can let concurrent runs clean up or overwrite one another.

Because the packaging/taskbar lifecycle is not proven by the required E2E and the root cause is not safely closed, I am closing this PR. Issue #663 remains open.

@vastsa vastsa closed this Sep 21, 2026
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.

3 participants