Compare commits
6 Commits
v0.6.2.1_a
...
v0.6.2.3_b
| Author | SHA1 | Date | |
|---|---|---|---|
| 31f0b430fb | |||
| 44fef12e75 | |||
| d40be62478 | |||
| 5e8ea74be3 | |||
| 68bd5a0036 | |||
| 363c29fcdc |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,10 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## v0.6.2.3_beta — 2026-11-26
|
||||
|
||||
- Show the installed version at the upper right of the hover monitor above its controls.
|
||||
- Restore the last size and position of the main monitor and its reusable dialogs. Keep restored windows within the current work area where their content fits.
|
||||
|
||||
## v0.6.2.2_beta — 2026-11-26
|
||||
|
||||
- Promote Adaptive Resource Monitor to Beta after verifying the production self-update, restoration of local and remote monitoring, and signed same-number Beta discovery.
|
||||
- The first Beta marks the completion of the original Windows monitoring scope. Beta development focuses on operational stability, monitoring accuracy, compatibility, and update reliability.
|
||||
|
||||
## v0.6.2.2_alpha — 2026-11-26
|
||||
|
||||
- Allow signed updates to the same or a more mature release channel, including Beta at the same numerical version as Alpha.
|
||||
- Report when a release is excluded because of its numerical version or channel.
|
||||
|
||||
## v0.6.2.1_alpha — 2026-11-26
|
||||
|
||||
- Show verified update availability and installation readiness in the hover monitor, main window, and tray menu. Windows notifications can be turned off and repeat checks do not repeat them.
|
||||
- Wait for ARM to finish saving settings and history and exit before replacing any application files. Show independent installation progress and report restart or recovery results.
|
||||
- Restore the prior tray-only or expanded presentation after an update and let users open the changelog from the success confirmation.
|
||||
- Published the signed Windows x64 installer and portable ZIP from Jenkins build #7.
|
||||
|
||||
## v0.6.1.1_alpha — 2026-11-26
|
||||
|
||||
|
||||
@@ -1,5 +1,272 @@
|
||||
# Adaptive Resource Monitor implementation report
|
||||
|
||||
## v0.6.2.3_beta — Hover monitor version and window placement
|
||||
|
||||
Production v0.6.2.2_beta was built from `5e8ea74be3fd94156bdc7a0810cfcc8eaac739f0`.
|
||||
The earlier hover label and expanded-window geometry corrections were
|
||||
committed afterward in `d40be62478eb45f572a1555ce22491e4a2cc5eb8`. The
|
||||
published Beta and its installed executable therefore lacked both changes.
|
||||
|
||||
This Bug-Fix increments only the last numerical counter. The hover monitor
|
||||
reads VERSION.md through the shared version module and renders it above the
|
||||
selectors and Pin and Details controls. A shared geometry handler preserves
|
||||
the existing main-window state file and remembers Settings, Remote Targets,
|
||||
Remote Machine and Application Details placement. The About layout remains
|
||||
the same as the previous release.
|
||||
|
||||
The 34 regressions passed. Native Windows checks exercised individual and
|
||||
All Systems, pinned and unpinned, and a popup anchored to a separate machine
|
||||
icon. Both themes were checked at effective 100% and 150% scaling using
|
||||
Qt's per-process scale factor on private Windows desktops. A native geometry
|
||||
check confirmed exact positioning on reopening and recovery of an off-screen
|
||||
About window on the current display.
|
||||
|
||||
## v0.6.2.2_beta — Beta promotion
|
||||
|
||||
Alpha production acceptance and the signed same-number compatibility
|
||||
check passed before the Beta build. The promotion kept the four numerical
|
||||
counters at `0.6.2.2`. All 34 regression tests and the isolated native
|
||||
Windows verification passed. Build and Archive #10 used commit
|
||||
`5e8ea74be3fd94156bdc7a0810cfcc8eaac739f0`. Publish Release #10 published
|
||||
its artifacts as a separate Gitea prerelease. The earlier Alpha releases
|
||||
remain public.
|
||||
[Build #10](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Build-and-Archive/10/)
|
||||
[Publication #10](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Publish-Release/10/)
|
||||
[Public Beta](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases/tag/v0.6.2.2_beta)
|
||||
|
||||
All seven Beta attachments matched anonymously by size and SHA-256. The
|
||||
Ed25519 signature, version, x64 PE metadata, portable package and build
|
||||
receipt verified. The installed corrective Alpha client verified this
|
||||
public Beta as eligible.
|
||||
|
||||
| Windows x64 package | Bytes | SHA-256 |
|
||||
| --- | ---: | --- |
|
||||
| Installer | 60,165,231 | `305cd316547245eaf0d77703f1b4be93404f7762fa4839b4b4a693c13d3bd78f` |
|
||||
| Portable ZIP | 74,682,861 | `e1ee75e4218594feb7c1735cf1853739f18e5560df37666e25b186216077657a` |
|
||||
|
||||
### Production Beta acceptance
|
||||
|
||||
The installed corrective Alpha displayed the signed Beta as available, then
|
||||
ready to install after the package download. ARM recorded one availability
|
||||
notification for the Beta. Install Later kept the same verified bytes and
|
||||
timestamp. Installation began through the installed application's controls.
|
||||
|
||||
Transaction `04ef6d0d8a3745bd8629d8945a6f2349` recorded the old process
|
||||
acknowledging shutdown and exiting at 8:34:40.683 PM CST with exit code 0.
|
||||
The installer log was created at 8:34:41.896 PM. The independent progress
|
||||
window was visible during installation. The same Windows user, session and
|
||||
non-elevated privilege level were retained. The automatic restart reported
|
||||
v0.6.2.2_beta, persisted its completion receipt and displayed the success
|
||||
confirmation. Windows registration and About reported Beta. The 298
|
||||
installed payload files matched build #10. The restarted process remained
|
||||
the sole ARM instance and the maintenance launcher exited.
|
||||
|
||||
The production settings and SSH host key files matched their pre-update
|
||||
hashes. All credential references remained accessible, and startup,
|
||||
Windows notification and automatic update-check preferences were preserved.
|
||||
Persistent recording was off before both updates. All Systems displayed
|
||||
four independent histories with fresh Local Machine, Rain, Phantom and
|
||||
LAMP samples and distinct network IN and OUT readings. All four sample
|
||||
timestamps advanced during a 20-second observation. Explorer returned a
|
||||
live tray icon with six distinct rendered frames. The installed About
|
||||
check verified Beta as current. The acceptance checks covered 169 seconds
|
||||
after the automatic Beta restart.
|
||||
|
||||
Both production self-updates passed. Adaptive Resource Monitor is publicly
|
||||
released and running in production as v0.6.2.2_beta. The production
|
||||
screenshots, shutdown acknowledgement, installer log and completion
|
||||
receipts are retained locally under `evidence/v0.6.2.2_alpha-production`
|
||||
and `evidence/v0.6.2.2_beta-production`.
|
||||
|
||||
### Separate window changes and cleanup
|
||||
|
||||
The local hover monitor shows the installed version on the status row below
|
||||
the controls. The expanded window keeps the existing About layout, fits
|
||||
inside the monitor's work area, and restores its saved size and position.
|
||||
Private native Windows checks verified the hover label at 300 and 500 pixels
|
||||
and verified exact geometry restoration, oversized window handling, and
|
||||
off-screen placement recovery. These are separate source changes after
|
||||
the pinned Beta commit.
|
||||
|
||||
Anonymous Beta readback removed 134,850,358 bytes of duplicate downloads.
|
||||
The two isolated window checks removed 6,220 bytes of temporary data.
|
||||
A final isolated GUI regression passed and removed 55,800 bytes of test
|
||||
data. A 719-byte incomplete capture was discarded. Jenkins cleared its build
|
||||
and publication workspaces. The verified local release archives, selected
|
||||
production screenshots and actual updater logs were retained.
|
||||
|
||||
## v0.6.2.2_alpha — Update channel correction
|
||||
|
||||
Windows Program Compatibility Assistant recorded the archived
|
||||
`release/v0.6.2.1_alpha/AdaptiveResourceMonitor-v0.6.2.1_alpha-windows-x64-setup.exe`
|
||||
launching at 7:44:03 PM CST on November 26. The installed uninstaller was
|
||||
written in the same second and its data was written at 7:44:12 PM. The
|
||||
new application started at 7:44:13 PM. Gitea published build #7 at 7:48:46
|
||||
PM. The installer was launched from the release archive, outside the
|
||||
disposable test paths and before the update was available publicly.
|
||||
A production updater transaction or receipt for this launch was absent.
|
||||
The available audit and session records do not identify the launcher.
|
||||
Jenkins build #7 compiled and archived the files, and publication #8
|
||||
handled Gitea publication. The recorded isolated installer tests used
|
||||
disposable targets. Production fingerprints now bracket development
|
||||
validation, and the release procedure requires the installed UI and a
|
||||
complete updater receipt for live acceptance.
|
||||
|
||||
The corrective version changes only the Bug-Fix counter. Discovery,
|
||||
download and installation now share a policy that allows the installed
|
||||
channel and more mature channels while rejecting lower numerical versions.
|
||||
The release index distinguishes channel and version exclusions from
|
||||
signature or metadata failures. There was no explicit channel preference
|
||||
in the existing settings. All 34 regression tests passed, including signed
|
||||
same-number Alpha-to-Beta discovery and the full channel matrix.
|
||||
|
||||
### Corrective Alpha release
|
||||
|
||||
The native Windows agent's Build and Archive #8 succeeded at commit
|
||||
`363c29fcdc3766c0e28558a0a0ede76308b7405f`. Publish Release #9 reused that
|
||||
archive. All seven public attachments passed independent anonymous size
|
||||
and SHA-256 verification, including a fresh signature, PE metadata and
|
||||
portable package check. The old Alpha releases remain public.
|
||||
[Build #8](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Build-and-Archive/8/)
|
||||
[Publication #9](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Publish-Release/9/)
|
||||
[Public corrective Alpha](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases/tag/v0.6.2.2_alpha)
|
||||
|
||||
| Windows x64 package | Bytes | SHA-256 |
|
||||
| --- | ---: | --- |
|
||||
| Installer | 60,156,586 | `266b7aeb525a963f05605152e5be0bb7d41ac86537d5dbdf18d9ae6e1e91efa6` |
|
||||
| Portable ZIP | 74,683,844 | `fc6074018fd04a60a7b8c9c5d671dcec991cec8cde5435c5774c2e04a29c57b2` |
|
||||
|
||||
The live v0.6.2.1_alpha executable, maintenance launcher, build receipt,
|
||||
settings, SSH host keys and process identity matched the recorded start
|
||||
of development. Existing update-check and startup preferences and all
|
||||
three credential references also matched. Persistent history was off.
|
||||
The installed executable's released update client verified the public
|
||||
v0.6.2.2_alpha as eligible. The corrective archive's frozen updater also
|
||||
selected the correctly signed v0.6.2.2_beta fixture with identical
|
||||
numerical counters. This test used a temporary fixture outside production.
|
||||
|
||||
### Corrective Alpha production self-update
|
||||
|
||||
The installed ARM controls discovered v0.6.2.2_alpha, displayed the
|
||||
available notice and downloaded the verified Windows x64 installer.
|
||||
The hover and tray menu notices were confirmed at the workstation and
|
||||
captured, along with About, the expanded banner and the ready state.
|
||||
Two checks kept a single Windows notification record for the release.
|
||||
Install Later preserved the verified package and its file timestamp.
|
||||
|
||||
Transaction `1cfe7ea68d16460198509fcb49ff4382` recorded the normal update
|
||||
controls handing off to the independent launcher. The main process
|
||||
acknowledged closure and exited successfully at 8:18:31.284 PM CST.
|
||||
The installer log was created at 8:18:32.712 PM. The independent progress
|
||||
window was visible during installation. The launcher restarted ARM in
|
||||
the same user session and at the same elevation. The restarted process
|
||||
wrote the v0.6.2.2_alpha completion receipt and the GUI displayed success.
|
||||
The maintenance processes exited. All 298 installed payload files
|
||||
matched the archived build.
|
||||
The operator confirmed a separate reopen after seeing the successful
|
||||
automatic restart. Explorer was the parent of that later launch. The
|
||||
automatic restart receipt and success capture were already present.
|
||||
|
||||
The settings and SSH key files were byte-identical after the update.
|
||||
Startup, automatic update checks and Windows notification preferences
|
||||
were preserved. All three credential entries were accessible. ARM
|
||||
reestablished SSH connections to Rain, Phantom and LAMP. The installed
|
||||
corrective Alpha also selected the correctly signed same-number Beta
|
||||
fixture in a read-only test of the shipped code.
|
||||
Explorer registered the Local Machine tray icon, and six passive samples
|
||||
showed six distinct live frames. The periodic check option remains under
|
||||
Settings → General with the production interval set to Off.
|
||||
|
||||
All Systems reported four connected machines with fresh Local Machine, Rain,
|
||||
Phantom and LAMP samples and separate network IN and OUT readings. The live
|
||||
Explorer hover window displayed the same independent histories. Production
|
||||
Alpha acceptance passed, including discovery of the signed same-number
|
||||
Beta fixture by the installed corrective updater.
|
||||
|
||||
Publication readback removed 134,842,388 bytes of duplicate downloads.
|
||||
The isolated frozen-client check removed 4,148,335 bytes, and the private
|
||||
Windows UI validation removed 59,841 bytes. Package verifiers and Jenkins
|
||||
removed their staging. The verified release archive and prepublication
|
||||
fingerprints are retained as evidence.
|
||||
|
||||
## v0.6.2.1_alpha publication and production assessment — 2026-11-26
|
||||
|
||||
### Publication and anonymous verification
|
||||
|
||||
Publish Release #8 succeeded using the seven artifacts from Build and
|
||||
Archive #7 at commit `035fb8ddc918337fdf6cf9743082aacae940b9db`. No build
|
||||
was run for publication. Gitea published the Alpha prerelease at 7:48:46 PM
|
||||
CST. Its version tag resolves to the pinned commit, and the public release
|
||||
notes match the tagged changelog and signed manifest.
|
||||
[Public release](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases/tag/v0.6.2.1_alpha)
|
||||
[Publish Release #8](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Publish-Release/8/)
|
||||
|
||||
Jenkins and an independent anonymous download verified all seven attachments
|
||||
against the archived bytes. The Ed25519 signature, Windows x64 architecture,
|
||||
package types, executable versions, package lengths, SHA-256 checksums and
|
||||
build identity passed. The earlier v0.6.1.1_alpha release is still public.
|
||||
|
||||
| Windows x64 package | Bytes | SHA-256 |
|
||||
| --- | ---: | --- |
|
||||
| Installer | 60,163,795 | `7d79e692b88819298c6ae00bf6041cdcea77c2171965a784f39fd2961179080a` |
|
||||
| Portable ZIP | 74,681,911 | `966edc69169ab607f810e67af0def5ac1ad86360bfcd3996e884104b4ae32b98` |
|
||||
|
||||
### Production Alpha acceptance
|
||||
|
||||
The first production inspection found v0.6.2.1_alpha already installed and
|
||||
running. ARM logged the earlier instance stopping at 7:43:48 PM CST and the
|
||||
new version starting at 7:44:15 PM, before the target release became public.
|
||||
The production profile had no staged updater download, transaction plan or
|
||||
completion receipt. The required production self-update from v0.6.1.1_alpha
|
||||
could not be performed or established from that starting state. Automatic
|
||||
shutdown, installation, restart and the success notification for that
|
||||
transition remain unverified. The working installation was preserved.
|
||||
|
||||
- Windows registration, the installed executable and the build receipt report
|
||||
v0.6.2.1_alpha from build #7. All 298 installed payload files matched the
|
||||
verified archive. One ARM process was running in the console session with
|
||||
no orphaned ARM installer or maintenance process observed.
|
||||
- Rain, Phantom and LAMP had established SSH connections owned by ARM, and
|
||||
Windows Credential Manager returned entries for all three saved references.
|
||||
The production settings and pinned host-key file stayed byte-identical
|
||||
during this assessment. A pre-upgrade data comparison for the earlier
|
||||
version change was unavailable. Persistent recording is disabled, and
|
||||
startup and periodic update checks remain disabled.
|
||||
- Explorer returned one registered tray icon for ARM. Six passive samples
|
||||
showed six different rendered frames. Foreground hover, tray-menu and
|
||||
All Systems interactions were outside this passive production check.
|
||||
- The frozen v0.6.1.1_alpha release client discovered and verified the
|
||||
published Alpha as an eligible upgrade. The frozen client from the production
|
||||
v0.6.2.1_alpha executable verified the same release as current. Both checks
|
||||
used the actual public endpoint and no Gitea authentication.
|
||||
|
||||
**Alpha production self-update acceptance did not pass.**
|
||||
|
||||
### Beta promotion blocked
|
||||
|
||||
The version comparison and discovery test used updater code read from the
|
||||
installed v0.6.2.1_alpha executable. Numeric counters sort before maturity,
|
||||
and the supported tags sort `alpha < beta < rc < stable`. Same-number Beta
|
||||
has a higher version key, but the shipped client only considers its current
|
||||
prerelease channel and eligible stable releases. It skipped the signed Beta
|
||||
fixture before requesting its manifest and selected the signed Alpha fixture
|
||||
as current. The fixture's Beta signature independently verified. The tests
|
||||
also confirmed same-version installation rejection, Beta-to-Alpha downgrade
|
||||
rejection, eligible numeric progression and malformed-version rejection.
|
||||
|
||||
Production remains on v0.6.2.1_alpha. VERSION.md and the numerical version
|
||||
counters are unchanged. No Beta build, tag, publication, production
|
||||
notification exercise or installation was performed. An updater
|
||||
compatibility change would require a separately authorized corrective release.
|
||||
|
||||
### Publication cleanup
|
||||
|
||||
Removed 138,981,356 measured bytes of temporary anonymous downloads and
|
||||
previous-updater test files. The verifier removed its temporary payload
|
||||
extractions, and Jenkins deleted its publication workspace. The published
|
||||
releases, their archived packages and the existing validation evidence
|
||||
were retained.
|
||||
|
||||
## v0.6.2.1_alpha — Update notifications and installation lifecycle
|
||||
|
||||
The Minor counter advanced. The hover monitor, expanded window and tray menu
|
||||
@@ -10,9 +277,76 @@ shutdown and process exit, shows independent installation progress and
|
||||
checks the restarted version before reporting success. The release uses
|
||||
the existing Jenkins build and authorized publication jobs.
|
||||
|
||||
Production self-update acceptance follows authorized publication using the
|
||||
installed v0.6.1.1_alpha updater. Its maintenance launcher handles the first
|
||||
upgrade. The newly installed application reads the legacy completion receipt.
|
||||
### Native Windows validation
|
||||
|
||||
- The 28-test regression suite passed. The private desktop suite passed on
|
||||
native Windows, including update availability, rejected signatures,
|
||||
downloading, install readiness, deferral and notification deduplication.
|
||||
Both Design Creations themes and the confirmation's View Changelog action
|
||||
passed. The notification also appeared in the separate remote tray menu
|
||||
and the pinned remote and All Systems popup. Live telemetry, individual
|
||||
tray sources and separate network IN and OUT remained operational.
|
||||
- Disposable installed and portable x64 copies updated to a signed local
|
||||
fixture. The installer exited with code 7 when its destination executable
|
||||
was running. The updater waited for the original process and its clean
|
||||
shutdown acknowledgement. An exit without acknowledgement left the
|
||||
payload untouched. The independent helper displayed progress while the
|
||||
installer installed the verified update.
|
||||
- The installed upgrade restored the expanded window and the portable
|
||||
upgrade restored tray-only mode. The restarted process ran as the same
|
||||
user in the same Windows session at the same elevation. A second launch
|
||||
exited without creating another instance. Settings, Windows Credential
|
||||
Manager references, saved fixture credentials, the SSH trust file and
|
||||
existing SQLite samples survived. Each lifecycle test exited with code 0.
|
||||
- A fixture with a signed commit mismatch exercised rollback after
|
||||
replacement. The previous portable executable was restored byte for byte
|
||||
and restarted. A separate interrupted replacement recovered from the
|
||||
persisted journal and cleared its RunOnce entry.
|
||||
- The previous v0.6.1.1_alpha frozen launcher applied the exact signed
|
||||
portable archive from Jenkins #7 on a private desktop. It restarted
|
||||
v0.6.2.1_alpha, the new application displayed confirmation from the legacy
|
||||
receipt and the fixture profile remained identical. The installed
|
||||
lifecycle tests used a disposable installer AppId.
|
||||
|
||||
### Jenkins release candidate
|
||||
|
||||
Build and Archive #7 completed on the native Windows agent after an SCM
|
||||
change. The pinned source
|
||||
commit is `035fb8ddc918337fdf6cf9743082aacae940b9db`. Jenkins validated PE
|
||||
metadata, installer and portable package identity, ZIP integrity and two
|
||||
portable launches. All seven archived files were retrieved and verified
|
||||
locally against the same commit and build. The ARM Ed25519 verification key,
|
||||
signature, package version, architecture, filenames, sizes and SHA-256
|
||||
hashes passed. The archive includes the checksums, signed manifest, public
|
||||
key, release notes and build receipt alongside the two packages.
|
||||
[Jenkins build record](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Build-and-Archive/7/)
|
||||
|
||||
| Windows x64 artifact | Bytes | SHA-256 |
|
||||
| --- | ---: | --- |
|
||||
| AdaptiveResourceMonitor-v0.6.2.1_alpha-windows-x64-setup.exe | 60,163,795 | `7d79e692b88819298c6ae00bf6041cdcea77c2171965a784f39fd2961179080a` |
|
||||
| AdaptiveResourceMonitor-v0.6.2.1_alpha-windows-x64-portable.zip | 74,681,911 | `966edc69169ab607f810e67af0def5ac1ad86360bfcd3996e884104b4ae32b98` |
|
||||
|
||||
The verified archive is in `release/v0.6.2.1_alpha`. Six captures of the
|
||||
hover, expanded window, tray menu, About tab, installation progress and
|
||||
successful update are in `evidence/v0.6.2.1_alpha`. The availability captures
|
||||
show the signed local fixture version.
|
||||
|
||||
### Production status before publication
|
||||
|
||||
At the end of prepublication validation, production and the public release
|
||||
index still reported v0.6.1.1_alpha. The executable, settings and pinned SSH
|
||||
host-key file matched the before-test hashes. The new progress window
|
||||
applies to updates started from v0.6.2.1_alpha onward.
|
||||
|
||||
### Validation cleanup
|
||||
|
||||
Removed the staged compiler, private test key, test-only builds, profiles,
|
||||
QA scripts, temporary extractions and two superseded captures. Manual
|
||||
cleanup removed 2,536,086,381 bytes by logical file size. The two local
|
||||
package builds automatically removed another 686,018,471 bytes of build
|
||||
staging. The disposable Windows apps and their recovery entries were
|
||||
cleared. Jenkins cleaned its build workspace. The verified #7 archive
|
||||
and six requested captures are retained as release and validation evidence.
|
||||
|
||||
## Initial public release and production upgrade — 2026-11-26
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Jenkins
|
||||
|
||||
The Phantom Jenkins controller's Applications view contains the
|
||||
Adaptive Resource Monitor folder at job/Adaptive-Resource-Monitor/.
|
||||
[Adaptive Resource Monitor folder](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/).
|
||||
Both jobs use the existing inkiron-windows native Windows x64 agent through
|
||||
its inkiron-windows-x64 label. The agent needs Windows Git, Python 3.12 x64,
|
||||
trusted HTTPS, workspace write access and permission to create a private
|
||||
|
||||
13
README.md
13
README.md
@@ -29,9 +29,20 @@ throughput scale per machine.
|
||||
Open the About tab from the monitor
|
||||
window or tray menu for build information, version history and support links.
|
||||
|
||||
Signed update discovery supports gaining release maturity from v0.6.2.2_alpha
|
||||
onward. Production acceptance and promotion status are recorded in the
|
||||
implementation report. [Public releases](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases)
|
||||
|
||||
The first Beta covers the original Windows monitoring scope, including
|
||||
remote Linux monitoring. Beta development prioritizes stability, performance,
|
||||
hardware and remote compatibility, security, and update and installer
|
||||
reliability.
|
||||
|
||||
The application version is defined in [VERSION.md](VERSION.md). Open **About →
|
||||
Check for Updates** to check the public ARM Releases page. Downloading and
|
||||
installing are separate actions. Settings can enable startup or periodic checks.
|
||||
installing are separate actions. Under **Settings → General**, enable
|
||||
**Check for updates at startup** or use **Check for updates periodically**
|
||||
to choose Off, every 4 hours, every 12 hours, daily, or weekly.
|
||||
Both Windows x64 distributions use signed update metadata. See
|
||||
[Update mechanism](UPDATE_MECHANISM.md) and [Release process](RELEASE_PROCESS.md).
|
||||
See [BUILD.md](BUILD.md) for Windows build and verification commands,
|
||||
|
||||
@@ -23,3 +23,18 @@ never include private configuration, credentials or signing keys.
|
||||
Existing version tags must point to the same commit. A public release for that
|
||||
version is accepted only if its attachments match the pinned archive. Use a
|
||||
new authorized application version for any change to its released bytes.
|
||||
|
||||
Before publishing a channel promotion, verify discovery and eligibility
|
||||
with the already-shipped updater. The v0.6.2.1_alpha updater requires an
|
||||
Alpha corrective release before it can discover Beta. Starting with
|
||||
v0.6.2.2_alpha, a release can progress to a more mature channel at identical
|
||||
numerical version counters. Production self-update acceptance and signed
|
||||
fixture discovery are required before the promoted release is published.
|
||||
|
||||
Record the production executable version, process and profile fingerprints
|
||||
before and after development validation. Run candidate launch tests from
|
||||
isolated folders and profiles. Validate an installer in a disposable
|
||||
environment that has no production installation with the same Windows
|
||||
application ID. A production self-update starts from the current installed
|
||||
application's update controls after publication. Retain its shutdown
|
||||
acknowledgement, transaction log and restart receipt as acceptance evidence.
|
||||
|
||||
@@ -28,8 +28,15 @@ JSON manifest and a base64 Ed25519 signature. Protocol 1 includes the
|
||||
application ID, Windows x64 architecture, exact VERSION.md value, Git commit,
|
||||
Jenkins build number and release notes. Its installed and portable package
|
||||
records carry the exact filename, byte count and SHA-256. The trusted public
|
||||
key is embedded in both executables. A client accepts its own release channel
|
||||
and eligible stable releases. A package for installation must be strictly newer.
|
||||
key is embedded in both executables.
|
||||
|
||||
Starting with v0.6.2.2_alpha, a client accepts its own release channel and more
|
||||
mature channels. Supported channels in order are Alpha, Beta, Release
|
||||
Candidate (`rc`) and Stable. The numerical version must be at least as high
|
||||
as the installed version. Maturity breaks ties at identical numerical
|
||||
versions. A verified identical release can confirm that ARM is current.
|
||||
Downloading and installing require a strictly newer version. About reports
|
||||
version and channel exclusions separately from verification failures.
|
||||
|
||||
## Installed and portable applications
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
v0.6.2.1_alpha
|
||||
v0.6.2.3_beta
|
||||
|
||||
@@ -21,6 +21,7 @@ from .branding import (
|
||||
)
|
||||
from .version import NAME, VERSION
|
||||
from .update_ui import UpdatePanel
|
||||
from .window_geometry import WindowGeometry
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
DOCS = {
|
||||
@@ -232,4 +233,5 @@ class AboutPage(QWidget):
|
||||
buttons.rejected.connect(dialog.reject)
|
||||
layout.addWidget(buttons)
|
||||
dialog.resize(620, dialog.sizeHint().height())
|
||||
dialog.window_geometry = WindowGeometry(dialog, self.data_root / "application-details-window.bin")
|
||||
dialog.exec()
|
||||
|
||||
@@ -29,6 +29,7 @@ from .tray import HoverMonitor
|
||||
from .tray_menu import TrayMenu
|
||||
from .version import NAME, VERSION
|
||||
from .views import METRIC_NAMES, Monitor
|
||||
from .window_geometry import WindowGeometry, fit_work_area
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
RUN_KEY = r"Software\Microsoft\Windows\CurrentVersion\Run"
|
||||
@@ -91,6 +92,7 @@ class Application(QObject):
|
||||
self.expanded = Monitor(self.dashboard, True, self.request_archive, self.open_expanded,
|
||||
self.set_pin, self.about_page)
|
||||
self.expanded.setWindowIcon(self.brand_icon)
|
||||
self.window_geometry = WindowGeometry(self.expanded, self.root / "monitor-window.bin")
|
||||
self.popup = Monitor(self.dashboard, False, self.request_archive, self.open_expanded, self.set_pin)
|
||||
for view in (self.popup, self.expanded):
|
||||
view.add_update_banner(self.open_update)
|
||||
@@ -121,6 +123,8 @@ class Application(QObject):
|
||||
self.brand_colors = DARK if scheme == Qt.ColorScheme.Dark else LIGHT
|
||||
self.about_page.theme(self.brand_colors)
|
||||
self.expanded.brand_tabs(self.brand_colors)
|
||||
self.popup.header.setStyleSheet(f"color: {self.brand_colors.text}")
|
||||
self.popup.version_label.setStyleSheet(f"color: {self.brand_colors.muted}")
|
||||
for view in (self.popup, self.expanded):
|
||||
view.update_banner.theme(self.brand_colors)
|
||||
for menu in self.menus.values():
|
||||
@@ -608,12 +612,13 @@ def main():
|
||||
state = presentation(transaction) if transaction else {}
|
||||
if state.get("expanded", not controller.settings.minimized):
|
||||
controller.open_expanded()
|
||||
if geometry := state.get("geometry"):
|
||||
if not controller.window_geometry.saved and (geometry := state.get("geometry")):
|
||||
rect = QRect(*geometry)
|
||||
if any(screen.availableGeometry().intersects(rect) for screen in app.screens()):
|
||||
controller.expanded.setGeometry(rect)
|
||||
if state.get("about"):
|
||||
controller.expanded.tabs.setCurrentWidget(controller.about_page)
|
||||
fit_work_area(controller.expanded)
|
||||
if transaction:
|
||||
controller.about_page.updates.follow_restart(transaction)
|
||||
signal_ready(root)
|
||||
|
||||
@@ -13,6 +13,7 @@ from PySide6.QtWidgets import (
|
||||
from .config import TRAY_MODES
|
||||
from .model import DISK_MODES, LOCAL, NETWORK, RANGES, RESOURCES, Connection
|
||||
from .views import fill, interval_choices, machine_choices, plain
|
||||
from .window_geometry import WindowGeometry
|
||||
|
||||
|
||||
def checkbox(value):
|
||||
@@ -122,6 +123,7 @@ class SettingsDialog(QDialog):
|
||||
self.timer.timeout.connect(self.update_diagnostics)
|
||||
self.timer.start()
|
||||
self.update_diagnostics()
|
||||
self.window_geometry = WindowGeometry(self, app.root / "settings-window.bin")
|
||||
|
||||
def section(self, title):
|
||||
page = QWidget()
|
||||
@@ -331,6 +333,7 @@ class TargetDialog(QDialog):
|
||||
self.os.currentIndexChanged.connect(update)
|
||||
self.auth.currentIndexChanged.connect(update)
|
||||
update()
|
||||
self.window_geometry = WindowGeometry(self, app.root / "remote-machine-window.bin")
|
||||
|
||||
def save(self):
|
||||
host, name, user = (field.text().strip() for field in (self.host, self.name, self.username))
|
||||
@@ -398,6 +401,7 @@ class ConnectionsDialog(QDialog):
|
||||
app.collectors.changed.connect(self.sync)
|
||||
app.collectors.test_finished.connect(self.test_finished)
|
||||
self.sync()
|
||||
self.window_geometry = WindowGeometry(self, app.root / "remote-targets-window.bin")
|
||||
|
||||
def selected(self):
|
||||
row = self.table.currentRow()
|
||||
|
||||
@@ -8,7 +8,9 @@ from urllib.error import HTTPError, URLError
|
||||
from urllib.parse import quote, urlsplit
|
||||
from urllib.request import HTTPRedirectHandler, Request, build_opener
|
||||
|
||||
from .update_release import MANIFEST, MAX_MANIFEST_SIZE, Release, UpdateError, eligible, source_config, verify_file, verify_manifest
|
||||
from .update_release import (
|
||||
MANIFEST, MAX_MANIFEST_SIZE, Release, UpdateError, eligible, exclusion_reason, source_config, verify_file, verify_manifest,
|
||||
)
|
||||
from .version import VERSION, version_key
|
||||
|
||||
MAX_INDEX_SIZE = 2 * 1024**2
|
||||
@@ -29,6 +31,7 @@ class Check:
|
||||
published: str | None
|
||||
release: Release | None
|
||||
issues: tuple[str, ...]
|
||||
exclusions: tuple[str, ...] = ()
|
||||
|
||||
|
||||
class ReleaseClient:
|
||||
@@ -88,8 +91,10 @@ class ReleaseClient:
|
||||
break
|
||||
ordered = sorted(rows, key=version_key, reverse=True)
|
||||
issues = []
|
||||
exclusions = []
|
||||
for version in ordered:
|
||||
if not eligible(version, installed):
|
||||
if reason := exclusion_reason(version, installed):
|
||||
exclusions.append(f"{version}: {reason}")
|
||||
continue
|
||||
try:
|
||||
if len(rows[version]) != 1:
|
||||
@@ -106,8 +111,8 @@ class ReleaseClient:
|
||||
except (UpdateError, HTTPError, KeyError, TypeError, AttributeError) as exc:
|
||||
issues.append(f"{version}: {exc.code if isinstance(exc, HTTPError) else exc}")
|
||||
continue
|
||||
return Check(ordered[0], release, tuple(issues))
|
||||
return Check(ordered[0] if ordered else None, None, tuple(issues))
|
||||
return Check(ordered[0], release, tuple(issues), tuple(exclusions))
|
||||
return Check(ordered[0] if ordered else None, None, tuple(issues), tuple(exclusions))
|
||||
|
||||
def download(self, release, kind, storage, progress, cancelled):
|
||||
signed = verify_manifest(release.envelope, self.source["public_key"], release.version)
|
||||
|
||||
@@ -10,7 +10,7 @@ from cryptography.exceptions import InvalidSignature
|
||||
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
|
||||
|
||||
from .branding import APP_MODEL_ID
|
||||
from .version import ROOT, version_key
|
||||
from .version import CHANNELS, ROOT, version_key
|
||||
|
||||
MANIFEST = "arm-update-windows-x64.json"
|
||||
ARCHITECTURE = "windows-x64"
|
||||
@@ -106,7 +106,16 @@ def verify_file(path, package):
|
||||
raise UpdateError("Package SHA-256 does not match the signed manifest")
|
||||
|
||||
|
||||
def eligible(version, installed):
|
||||
def exclusion_reason(version, installed):
|
||||
"""Return the policy reason a tag cannot be considered for this installation."""
|
||||
candidate = version_key(version)
|
||||
current = version_key(installed)
|
||||
return candidate >= current and candidate[-1] in (current[-1], 3)
|
||||
if candidate[:4] < current[:4]:
|
||||
return f"Numerical version is older than installed {installed}"
|
||||
if candidate[-1] < current[-1]:
|
||||
return f"{CHANNELS[candidate[-1]].capitalize()} releases are ineligible for a {CHANNELS[current[-1]]} installation"
|
||||
return None
|
||||
|
||||
|
||||
def eligible(version, installed):
|
||||
return exclusion_reason(version, installed) is None
|
||||
|
||||
@@ -247,6 +247,8 @@ class UpdatePanel(QGroupBox):
|
||||
self.status.setText("No eligible verified update is available.")
|
||||
if value.issues:
|
||||
self.status.setText(self.status.text() + " Rejected " + "; ".join(value.issues)[:380])
|
||||
if value.exclusions:
|
||||
self.status.setText(self.status.text() + " Excluded " + "; ".join(value.exclusions)[:380])
|
||||
if value.release or not value.issues:
|
||||
try:
|
||||
write_atomic(self.last_file, json.dumps(datetime.now().astimezone().isoformat()).encode())
|
||||
|
||||
22
arm/views.py
22
arm/views.py
@@ -9,6 +9,8 @@ from PySide6.QtWidgets import (
|
||||
|
||||
from .graphs import Plot, resource_series, selected_resource
|
||||
from .model import ALL, LOCAL, NETWORK, TOTAL, Connection, INTERVALS, RANGES, RESOURCES, format_value
|
||||
from .version import VERSION
|
||||
from .window_geometry import fit_work_area
|
||||
|
||||
METRIC_NAMES = {
|
||||
"cpu.util": "CPU utilization", "cpu.frequency": "Frequency", "cpu.temperature": "CPU temperature",
|
||||
@@ -233,6 +235,14 @@ class Monitor(QWidget):
|
||||
layout = QVBoxLayout(self.resource_page if expanded else self)
|
||||
layout.setContentsMargins(8, 7, 8, 7)
|
||||
layout.setSpacing(4)
|
||||
if not expanded:
|
||||
version = QLabel(VERSION, textFormat=Qt.TextFormat.PlainText)
|
||||
version.setAccessibleName(f"Installed version {VERSION}")
|
||||
font = version.font()
|
||||
font.setPointSize(8)
|
||||
version.setFont(font)
|
||||
layout.addWidget(version, alignment=Qt.AlignmentFlag.AlignRight)
|
||||
self.version_label = version
|
||||
layout.addLayout(top)
|
||||
layout.addWidget(self.header)
|
||||
self.single = QWidget()
|
||||
@@ -274,7 +284,10 @@ class Monitor(QWidget):
|
||||
|
||||
def show_page(self, about=False):
|
||||
self.tabs.setCurrentWidget(self.about_page if about else self.resource_page)
|
||||
self.ensurePolished()
|
||||
self.layout().activate()
|
||||
self.show()
|
||||
fit_work_area(self)
|
||||
self.raise_()
|
||||
self.activateWindow()
|
||||
|
||||
@@ -305,18 +318,19 @@ class Monitor(QWidget):
|
||||
|
||||
def popup_size(self):
|
||||
cfg = self.dashboard.settings
|
||||
banner = self.update_banner.sizeHint().height() + self.layout().spacing() if (
|
||||
extra = self.version_label.sizeHint().height() + self.layout().spacing()
|
||||
extra += self.update_banner.sizeHint().height() + self.layout().spacing() if (
|
||||
hasattr(self, "update_banner") and not self.update_banner.isHidden()) else 0
|
||||
if self.selected_machine != ALL:
|
||||
return QSize(cfg.popup_width, cfg.popup_height + banner)
|
||||
return QSize(cfg.popup_width, cfg.popup_height + extra)
|
||||
# Cap in HoverMonitor against the work area. The scroll area keeps
|
||||
# six columns together even on a narrow monitor.
|
||||
rows_height = sum(max(138, section.sizeHint().height()) for section in self.sections.values())
|
||||
return QSize(max(cfg.popup_width, 875), max(cfg.popup_height, rows_height + 72) + banner)
|
||||
return QSize(max(cfg.popup_width, 875), max(cfg.popup_height, rows_height + 72) + extra)
|
||||
|
||||
def add_update_banner(self, open_update):
|
||||
self.update_banner = UpdateBanner(open_update)
|
||||
self.layout().insertWidget(0 if self.expanded else 2, self.update_banner)
|
||||
self.layout().insertWidget(0 if self.expanded else self.layout().indexOf(self.header) + 1, self.update_banner)
|
||||
|
||||
def sync_devices(self):
|
||||
if not self.expanded:
|
||||
|
||||
69
arm/window_geometry.py
Normal file
69
arm/window_geometry.py
Normal file
@@ -0,0 +1,69 @@
|
||||
"""Keep user-facing windows within the work area and remember their placement."""
|
||||
import logging
|
||||
|
||||
from PySide6.QtCore import QByteArray, QEvent, QObject, QTimer
|
||||
from PySide6.QtGui import QGuiApplication
|
||||
|
||||
from .update_client import write_atomic
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def fit_work_area(window):
|
||||
if window.isMinimized() or window.isMaximized() or window.isFullScreen():
|
||||
return
|
||||
frame = window.frameGeometry()
|
||||
screen = QGuiApplication.screenAt(frame.center()) or window.screen()
|
||||
if screen is None:
|
||||
return
|
||||
area = screen.availableGeometry()
|
||||
if frame.width() > area.width() or frame.height() > area.height():
|
||||
window.resize(window.width() - max(0, frame.width() - area.width()),
|
||||
window.height() - max(0, frame.height() - area.height()))
|
||||
frame = window.frameGeometry()
|
||||
x = max(area.left(), min(frame.left(), area.right() - frame.width() + 1))
|
||||
y = max(area.top(), min(frame.top(), area.bottom() - frame.height() + 1))
|
||||
if (x, y) != (frame.left(), frame.top()):
|
||||
window.move(x, y)
|
||||
|
||||
|
||||
class WindowGeometry(QObject):
|
||||
def __init__(self, window, path):
|
||||
super().__init__(window)
|
||||
self.window, self.path = window, path
|
||||
self.saved = None
|
||||
try:
|
||||
geometry = path.read_bytes()
|
||||
if window.restoreGeometry(QByteArray(geometry)):
|
||||
self.saved = geometry
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
except OSError as exc:
|
||||
LOG.warning("Could not read %s: %s", path.name, exc)
|
||||
self.timer = QTimer(self, singleShot=True, interval=350)
|
||||
self.timer.timeout.connect(self.save)
|
||||
window.installEventFilter(self)
|
||||
|
||||
def eventFilter(self, watched, event):
|
||||
if event.type() == QEvent.Type.Show:
|
||||
fit_work_area(watched)
|
||||
if event.type() == QEvent.Type.Hide:
|
||||
self.timer.stop()
|
||||
self.save()
|
||||
elif watched.isVisible() and event.type() in (QEvent.Type.Show, QEvent.Type.Move, QEvent.Type.Resize,
|
||||
QEvent.Type.WindowStateChange):
|
||||
self.timer.start()
|
||||
return super().eventFilter(watched, event)
|
||||
|
||||
def save(self):
|
||||
if self.window.isMinimized():
|
||||
return
|
||||
if self.window.isVisible():
|
||||
fit_work_area(self.window)
|
||||
geometry = bytes(self.window.saveGeometry())
|
||||
if geometry != self.saved:
|
||||
try:
|
||||
write_atomic(self.path, geometry)
|
||||
self.saved = geometry
|
||||
except OSError as exc:
|
||||
LOG.warning("Could not save %s: %s", self.path.name, exc)
|
||||
@@ -105,6 +105,84 @@ class UpdateTests(unittest.TestCase):
|
||||
with patch.object(self.client, "read", side_effect=URLError("unavailable")), self.assertRaises(URLError):
|
||||
self.client.check(VERSION, "installed")
|
||||
|
||||
def test_signed_discovery_allows_the_same_or_a_more_mature_channel(self):
|
||||
channels = ("alpha", "beta", "rc", "stable")
|
||||
for index, installed_channel in enumerate(channels):
|
||||
installed = f"v0.6.2.2_{installed_channel}"
|
||||
for maturity, offered in enumerate(channels):
|
||||
newer = f"v0.6.2.3_{offered}"
|
||||
with self.subTest(installed=installed, candidate=newer):
|
||||
row, envelope = self.row(self.metadata(newer))
|
||||
with patch.object(self.client, "read", side_effect=[canonical([row]), envelope]) as read:
|
||||
found = self.client.check(installed, "installed")
|
||||
self.assertEqual(found.issues, ())
|
||||
if maturity >= index:
|
||||
self.assertEqual(found.release.version, newer)
|
||||
self.assertEqual(found.exclusions, ())
|
||||
else:
|
||||
self.assertIsNone(found.release)
|
||||
self.assertIn(f"ineligible for a {installed_channel} installation", found.exclusions[0])
|
||||
self.assertEqual(read.call_count, 1)
|
||||
|
||||
def test_same_number_beta_is_selected_over_signed_current_alpha(self):
|
||||
alpha, beta = "v0.6.2.2_alpha", "v0.6.2.2_beta"
|
||||
old, _ = self.row(self.metadata(alpha))
|
||||
current, signature = self.row(self.metadata(beta))
|
||||
with patch.object(self.client, "read", side_effect=[canonical([old, current]), signature]):
|
||||
found = self.client.check(alpha, "portable")
|
||||
self.assertEqual((found.published, found.release.version, found.exclusions), (beta, beta, ()))
|
||||
with patch.object(self.client, "read", return_value=canonical([old])) as read:
|
||||
rejected = self.client.check(beta, "portable")
|
||||
self.assertIsNone(rejected.release)
|
||||
self.assertIn("Alpha releases are ineligible", rejected.exclusions[0])
|
||||
self.assertEqual(read.call_count, 1)
|
||||
|
||||
def test_more_mature_channel_cannot_downgrade_the_numerical_version(self):
|
||||
row, _ = self.row(self.metadata("v0.6.2.1_stable"))
|
||||
with patch.object(self.client, "read", return_value=canonical([row])) as read:
|
||||
found = self.client.check("v0.6.2.2_alpha", "installed")
|
||||
self.assertIsNone(found.release)
|
||||
self.assertIn("Numerical version is older", found.exclusions[0])
|
||||
self.assertEqual(read.call_count, 1)
|
||||
|
||||
def test_identical_verified_release_cannot_be_downloaded_as_an_update(self):
|
||||
row, envelope = self.row(self.metadata(VERSION))
|
||||
with patch.object(self.client, "read", side_effect=[canonical([row]), envelope]):
|
||||
found = self.client.check(VERSION, "installed")
|
||||
self.assertEqual(found.release.version, VERSION)
|
||||
with self.assertRaisesRegex(UpdateError, "newer"):
|
||||
self.client.download(found.release, "installed", self.work, lambda *_: None, lambda: False)
|
||||
self.assertFalse(list(self.work.iterdir()))
|
||||
|
||||
def test_discovery_rejects_unsupported_and_malformed_tags(self):
|
||||
rows = [{"draft": False, "tag_name": tag} for tag in (
|
||||
"v0.6.2.2_preview", "v0.6.2_beta", "v00.6.2.2_beta", "v0.6.2.65536_alpha",
|
||||
)]
|
||||
with patch.object(self.client, "read", return_value=canonical(rows)) as read:
|
||||
found = self.client.check("v0.6.2.2_alpha", "installed")
|
||||
self.assertIsNone(found.published)
|
||||
self.assertIsNone(found.release)
|
||||
self.assertEqual(read.call_count, 1)
|
||||
|
||||
def test_discovery_preserves_signature_architecture_and_gitea_classification_checks(self):
|
||||
beta = self.metadata("v0.6.2.2_beta")
|
||||
stable = self.metadata("v0.6.2.2_stable")
|
||||
tampered = json.loads(self.sign(beta))
|
||||
tampered["manifest"]["notes"] = "Modified"
|
||||
for metadata, envelope, flag, expected in (
|
||||
(beta, canonical(tampered), True, "signature is invalid"),
|
||||
(beta | {"architecture": "windows-arm64"}, None, True, "metadata is invalid"),
|
||||
(beta, None, False, "classification disagrees"),
|
||||
(stable, None, True, "classification disagrees"),
|
||||
):
|
||||
with self.subTest(expected=expected, tag=metadata["version"]):
|
||||
row, signature = self.row(metadata, envelope)
|
||||
with patch.object(self.client, "read", side_effect=[canonical([row | {"prerelease": flag}]), signature]):
|
||||
found = self.client.check("v0.6.2.2_alpha", "installed")
|
||||
self.assertIsNone(found.release)
|
||||
self.assertEqual(found.exclusions, ())
|
||||
self.assertIn(expected, found.issues[0])
|
||||
|
||||
def test_download_cancel_and_resume(self):
|
||||
release = verify_manifest(self.sign(self.metadata()), self.public)
|
||||
cancel = Event()
|
||||
|
||||
@@ -511,6 +511,46 @@ def verify_update_notices(session, wait_for, results, captures):
|
||||
results["verified_shared_update_notices"] = "Verified, ready, rejected, deferred and duplicate notification states"
|
||||
|
||||
|
||||
def verify_hover_version(session, remote, results, captures):
|
||||
from arm.model import ALL, LOCAL
|
||||
from arm.version import VERSION
|
||||
|
||||
original = session.settings
|
||||
hover = session.popup
|
||||
scale = round(hover.devicePixelRatioF() * 100)
|
||||
modes = (
|
||||
("individual-unpinned", LOCAL, LOCAL, False),
|
||||
("individual-pinned", remote, remote, True),
|
||||
("all-systems-unpinned", ALL, LOCAL, False),
|
||||
("all-systems-pinned", ALL, remote, True),
|
||||
)
|
||||
try:
|
||||
for theme in ("Light", "Dark"):
|
||||
session.apply(replace(original, theme=theme))
|
||||
for name, selection, anchor, pinned in modes:
|
||||
session.hover.pin(False)
|
||||
session.select_machine(selection, anchor)
|
||||
session.hover.pin(pinned, anchor)
|
||||
session.qt.processEvents()
|
||||
label = hover.version_label
|
||||
rect = label.geometry()
|
||||
assert hover.isVisible() and hover.pinned == pinned
|
||||
assert hover.selected_machine == selection and session.hover.anchor == anchor
|
||||
assert label.isVisible() and label.text() == VERSION
|
||||
assert rect.bottom() < hover.machine.geometry().top()
|
||||
assert rect.right() == hover.width() - hover.layout().contentsMargins().right() - 1
|
||||
assert label.fontMetrics().horizontalAdvance(VERSION) <= rect.width()
|
||||
assert hover.rect().contains(rect)
|
||||
if captures and theme == ("Light" if scale > 100 else "Dark"):
|
||||
capture_native_window(int(hover.winId()), captures / f"hover-{name}-{scale}.png")
|
||||
finally:
|
||||
session.hover.pin(False)
|
||||
hover.hide()
|
||||
session.apply(original)
|
||||
results["hover_version"] = {"version": VERSION, "scale_percent": scale,
|
||||
"themes": ["Light", "Dark"], "views": [row[0] for row in modes]}
|
||||
|
||||
|
||||
def evaluate_app(work, results, short=False, captures=None):
|
||||
import psutil
|
||||
from PySide6.QtCore import QEventLoop, QTimer
|
||||
@@ -605,6 +645,7 @@ def evaluate_app(work, results, short=False, captures=None):
|
||||
assert release_check.wait(10)
|
||||
return Check(None, None, ())
|
||||
|
||||
wait_for(lambda: update.job is None)
|
||||
with patch.object(update.client, "check", side_effect=slow_check):
|
||||
try:
|
||||
sample = session.collectors.last[LOCAL]
|
||||
@@ -730,6 +771,7 @@ def evaluate_app(work, results, short=False, captures=None):
|
||||
session.popup.hide()
|
||||
session.apply(replace(session.settings, separate_tray_icons=True, persistent=True))
|
||||
assert set(session.icons) == {LOCAL, *(target.identifier for target in targets)}
|
||||
verify_hover_version(session, primary, results, captures)
|
||||
with patch("arm.application.tray_icon", wraps=tray_icon) as draw:
|
||||
session.render()
|
||||
assert {call.args[1] for call in draw.call_args_list} == {LOCAL, primary, other}
|
||||
|
||||
Reference in New Issue
Block a user