Skip to content

Fix/ci headless and portable release - #26

Merged
manupawickramasinghe merged 2 commits into
masterfrom
fix/ci-headless-and-portable-release
Jul 31, 2026
Merged

Fix/ci headless and portable release#26
manupawickramasinghe merged 2 commits into
masterfrom
fix/ci-headless-and-portable-release

Conversation

@manupawickramasinghe

Copy link
Copy Markdown
Member

No description provided.

manupawickramasinghe and others added 2 commits July 31, 2026 21:45
Sort::Disk and format_rate were reachable only from the Task Manager
window, so every GUI-less feature combination saw them as dead code and
clippy's -D warnings turned that into a build failure:

    error: variant `Disk` is never constructed
    error: function `format_rate` is never used

The fix is parity rather than an allow(dead_code): `sensorview ps` is
meant to be the same data from a terminal, and it was the one view of a
process that could not show what a process is doing to the disk. It now
has a DISK column and `--sort disk`, which also exercises both items from
the headless build.

The new test says so explicitly, so the next person to see it fail knows
it is guarding the headless build rather than checking a cosmetic.

Verified with ci.yml's own matrix — all seven feature combinations,
including the bare `--no-default-features` one that broke.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The release workflow attached an installer, a .deb, an .AppImage and a
.dmg, but no portable build. Adding one turned out to need a code change
rather than a workflow line.

A lone sensorview.exe is not a portable app on Windows. Every sensor on
this platform comes from the LibreHardwareMonitor sidecar, and
default_source() falls back to LhmBridge::empty when it cannot find one
beside the binary — so a bare .exe opens reporting nothing at all. The new
`portable` feature compiles the sidecar into the binary and unpacks it to
%LOCALAPPDATA% on first run, keyed by version and payload size so an
upgrade never reuses the previous release's bridge. It writes to a private
name and renames into place, because a half-written 70 MB file that the
next run mistakes for complete is worse than not unpacking at all.

Unpacked there rather than beside the executable on purpose: a portable
binary is expected to run from a USB stick or a network share and must not
assume it can write next to itself.

The feature is off by default — it costs ~70 MB, which only this artifact
wants to pay — and is a no-op on macOS and Linux, which read their sensors
natively. build.rs fails loudly if the sidecar has not been published,
rather than emitting a portable build whose whole selling point silently
does not work. CI now builds it on Windows so it cannot rot between tags.

Separately, build.rs gated the requireAdministrator manifest on the
profile alone, so the *headless* release binary — the one offered for
servers and containers — also demanded admin, and a non-elevated parent
could not start it at all (CreateProcess, ERROR_ELEVATION_REQUIRED, with
no UAC prompt available to a service or container). Now gated on the `gui`
feature too: the GUI still elevates deliberately, the CLI degrades to
fewer sensors instead of refusing to launch.

The release job also checks that each platform actually produced its
artifacts. Publishing attaches whatever the globs match, so a format that
failed to build would otherwise surface as a release quietly missing a
platform.

Verified: the portable binary run alone in an empty directory unpacks its
bridge and reports real sensors, and the headless release binary now
starts unelevated, which it previously could not.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 31, 2026 16:17

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

@manupawickramasinghe
manupawickramasinghe merged commit 34003f2 into master Jul 31, 2026
5 checks passed
@manupawickramasinghe
manupawickramasinghe deleted the fix/ci-headless-and-portable-release branch July 31, 2026 16:18
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.

2 participants