Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 05 May 09:51
· 655 commits to main since this release
b2d3a16

[0.4.1] - 2026-05-05

The 0.4.x line's first stable release. 0.4.0rc1 (2026-05-05) was the soak preview; 0.4.1 is the same code path plus the polish that landed during smoke-test triage. Functionally a continuation of 0.4.0's stability + UX focus, all of it on the install / migrate path that fresh users actually exercise.

Highlights — agent never installs regression closed for good. kernalix7 spent ~3 days reproducing a fresh-install failure on openSUSE Tumbleweed where setup.log was missing entirely, C:\OEM\agent.ps1 was never copied, and qwinsta showed disconnected User sessions piling up — agent never came up, menu never populated. Three independent failure modes converged on the same symptom: (1) Windows Defender real-time scan locking files in C:\OEM\ during install.bat's first PowerShell engine load (deadlocking PS Expand-Archive on the rdprrap zip); (2) host-side migrate apply chain falling back to FreeRDP RemoteApp when the guest agent wasn't up yet, kicking install.bat's autologon session via Windows session-takeover; (3) a transient agent-respawn window after the apply chain that made the inline app refresh race on every smoke test. All three are fixed, with a layered defence so any single layer regressing doesn't bring back the deadlock.

Smoke-tested end-to-end on openSUSE Tumbleweed: install.bat completes cleanly, Password sync OK via agent transport (no ERRINFO_LOGOFF_BY_USER cascade), apply chain via agent transport, discovery completes inline (Discovered N app(s) with retry-on-respawn-race) — menu populated before install.sh exits. Upgrade from v0.3.0-RTM1 produces the same clean result: image-pin migration runs, apply chain succeeds via agent, interactive discovery prompt populates the menu inline.

Changed

  • Release trigger switched from *RTM* glob to a separate REL- marker tag. "RTM" was the original release marker (v0.3.0-RTM1) but the project moved to PEP 440 / SemVer-hyphen versioning (0.4.0, 0.4.0rc1) and no longer ships any RTM-suffixed tag. Mixing the marker INTO the version (e.g., v0.4.0-REL) would have polluted the version scheme since that's not a valid PEP 440 version, so the new design splits the two: the version tag stays clean and a SECOND tag at the same commit (REL-v0.4.0, REL-v0.4.0rc1) acts purely as the release-trigger marker. release.yml now matches REL-* and strips the prefix when extracting the version, so the public Release page is titled v0.4.0 (not REL-v0.4.0) and the changelog lookup hits ## [0.4.0] correctly. Prerelease detection covers both PEP 440 (0.4.0rc1) and SemVer (0.4.0-rc1) forms. Workflow: git tag v0.4.1 && git tag REL-v0.4.1 && git push origin v0.4.1 REL-v0.4.1. Plain version tags still trigger the four packaging workflows (.deb / RPM / OBS / AUR) via their v*.*.* globs; the REL marker is opt-in for the GitHub Release page only. Existing v0.3.0-RTM1-era releases stay published; the trigger change only affects future tags.
  • Release notes now include unreleased intermediate sections automatically. v0.4.0rc1's release page initially missed all of @Mic92's contributions (PRs #62-#65) because they were credited under ## [0.3.1] — a CHANGELOG section that was written but never tagged and released, so the awk extractor (which matched exactly one ## [<ver>] and stopped at the next ## [) skipped it entirely. The workflow now finds the most recent CHANGELOG section that corresponds to a real git tag (= a published release) and emits everything from the current section down to but not including that previous-published one, so credits in unreleased intermediate sections automatically surface in the next release page. The v0.4.0rc1 release page itself was patched manually via gh release edit to backfill the missing credits.

Fixed

  • install.bat no longer hangs at PS Expand-Archive on first boot (the agent never installs root cause). Add-MpPreference -ExclusionPath C:\OEM,C:\winpodx -ExclusionProcess rdprrap-installer.exe is now the very first step of install.bat (before DNS / RDP / firewall etc.), so nothing under our staging dirs ever gets real-time scanned. PS Expand-Archive replaced with Windows-native tar -xf (System32\tar.exe, ships in Win10 1803+) — bypasses the PowerShell engine entirely (no module load, no .NET assembly resolution, no AMSI hookpoints), so the PS-script analysis layer can't intercept extraction even on machines with stricter security tools. _probe_password_sync now honors WINPODX_REQUIRE_AGENT=1 (set by install.sh around its post-install block) and skips the probe entirely when the agent is down — the one host-side FreeRDP path PR #104 missed. Diff against v0.3.0 (last known-working baseline): install.bat's pre-extract code is essentially unchanged and the rdprrap zip blob hash is identical; what changed was the OEM bundle growing from 6 files to 13+ alongside the dockur image pin to a Windows 11 build with stricter Defender real-time policy — combination triggered the deadlock. OEM bundle 22 → 23.
  • Fresh install no longer kicks install.bat's autologon session via host-side FreeRDP fallback. _apply_runtime_fixes_to_existing_guest now requires the agent's /health to respond before invoking the apply chain; if it doesn't, migrate prints "Agent not yet up — Skipping runtime apply" and skips entirely. The OEM bundle on freshly-created pods already applies the same registry / service state at first boot, so this is a no-op for fresh installs. discover_apps honors WINPODX_REQUIRE_AGENT=1 and raises DiscoveryError(kind="agent_unavailable") instead of falling back to FreeRDP. wait_for_windows_responsive bumps its agent /health budget from 60 s → 180 s — install.bat OEM v22+ regularly takes longer than 60 s to reach its agent-spawn step on first boot, and the previous cap was missing /health by 30-60 s every smoke test. Same regression PR #82 (release/0.3.1) introduced when it removed the inst_cmp < (0, 1, 9) <= cur_cmp gate around the apply chain — pre-0.3.1 the chain only ran on a 0.1.x → 0.1.9 boundary crossing, so most upgrades didn't fire FreeRDP at all and the race never surfaced.
  • install.bat no longer dies mid-script when rdprrap activates TermService. In dockur's autologon flow, the Sysprep first-logon User session is itself managed through TermService — net stop TermService /y at the end of rdprrap-activate.ps1 killed the autologon session and install.bat's cmd.exe died with it, silently, with no error. The cycle is now SKIPPED in rdprrap-activate.ps1's OEM mode; install.bat does the cycle as its LAST action after every other step has committed (launchers, HKCU\Run, agent spawn, setup_done.txt). When the cycle then kills install.bat's session, all the setup work is already on disk; autologon retry creates a fresh user session with the new TermService loaded (termwrap.dll), HKCU\Run fires, agent starts cleanly. OEM bundle 21 → 22.
  • app refresh and migrate's interactive discovery prompt now retry on agent-respawn race. _apply_vbs_launchers (part of the apply chain) ends by spawning agent-respawn.ps1 detached — the respawn waits ~3 s, kills the running agent, then starts a new one. If app refresh (or the user accepting the migrate Run app discovery now? prompt) hit the agent during that kill-then-restart window, /exec returned Remote end closed connection without response and discovery deferred to pending. Both call sites now retry up to 3 times with 10 s spacing; the menu populates before install.sh exits and migrate's interactive path completes inline.
  • install.sh waits for the agent to settle between migrate and app refresh. A curl /health poll between the two steps gives the agent up to 60 s to come back after migrate's _apply_multi_session cycles TermService. Combined with the 3-attempt retry above, the menu reliably populates before install.sh exits instead of needing a follow-up CLI / GUI launch to fire pending-resume.
  • setup.log no longer self-locks on Add-Content from inside redirected PowerShell blocks. The HKCU\Run reg-add and agent-spawn PowerShell blocks redirect stderr to setup.log via 2>>"%SETUP_LOG%", and used to also call Add-Content -LiteralPath '%SETUP_LOG%' from inside. Windows holds the redirection handle exclusively → Add-Content's second open raised a sharing violation → the .NET exception then logged via the same stderr redirect → into setup.log itself, in a loop. Replaced every inner Add-Content with Write-Output and switched cmd-level redirect from 2>> to >>"%SETUP_LOG%" 2>&1 so PS stdout is the single writer.
  • Info screen no longer flashes "Overall: FAIL" during fresh-install warm-up. probe_agent_health, probe_guest_exec, and probe_guest_summary returned FAIL when the agent's /health or /exec timed out. Right after install the agent is up but slow (Sysprep just finished, cold caches), and these probes regularly hit timeout for the first 30-60 s. Now timeout-shaped errors return WARN("agent warming up or busy: ..."), and run_all() does dependency-aware skipping: if agent_health isn't OK, downstream probes (auth_ready, guest_exec, guest_summary) are returned with status="skip" rather than each one re-running and reporting its own variation of "agent unreachable". Single warm-up signal instead of a fan-out of cascade FAILs.
  • AgentTransport selection respects host-side token availability. /health is intentionally unauthenticated (the host needs to know if the agent is up before it has a token). The agent transport's /exec path however requires the host token; if the token file isn't readable yet (race during first install.sh run), dispatch() would pick AgentTransport based on green /health and then fail on the first /exec with token-missing. AgentClient.auth_ready() now returns (bool, detail) for whether _token() resolves; AgentTransport.health() consults it after the /health call and reports available=False if the token isn't ready. Default dispatch then falls back to FreerdpTransport instead of selecting agent and exploding later. Token itself is never exposed (bool + detail string only).
  • OEM bind mount no longer copies to ~/.config/winpodx/oem/ when the bundle is already user-writable. PR #95 made _find_oem_dir() always copy the OEM tree to a user-owned path; on systems where the bundle is already user-owned (curl install, source checkout, Nix profile — the majority case), dockur's in-container cp then failed with Permission denied because ~/.config/winpodx/oem/ inherited a restrictive parent mode. Branch on os.access(bundle_oem, R_OK | W_OK): if the user owns the bundle, return it directly (no copy — Podman's :Z relabel works fine on user-owned paths). Otherwise fall back to the user-space copy with explicit chmod 0644 / 0755 so dockur can traverse + read regardless of host umask.
  • Defense-in-depth hardening sweep. Config TOML revalidates on load (Config.load() re-runs __post_init__() so a tampered winpodx.toml with out-of-range values gets clamped); _ensure_config() generates a password + UTC timestamp at create time (no empty-credential window during install.sh's first run); PasswordFilter redacts FreeRDP's /p:<password> switch in addition to key=value patterns; password rotation reorders generate_compose before cfg.save so a compose-generation failure leaves disk on the OLD password (no half-state). install.bat is now ASCII-only end-to-end (em-dash → hyphen across all comments) and uses absolute path "%SystemRoot%\System32\tar.exe" for tar (no PATH-hijack vector). New static checks under tests/test_oem_install_bat.py pin these invariants.

Added

  • Star History chart in README (light/dark variants via <picture>). Click goes to the interactive chart on star-history.com.

Contributors

Thanks to @Mic92 (Nix flake packaging, default-image switch, FreeRDP argv[0] match, Wayland XWayland gate — PRs #62-#65) and @pgarciaq (SELinux OEM bind mount fix — PR #95).