3 Commits

Author SHA1 Message Date
5e8ea74be3 Promote Adaptive Resource Monitor v0.6.2.2 to Beta 2026-11-26 20:23:14 -06:00
68bd5a0036 Link Jenkins folder in documentation
Replace the plain Jenkins folder path with a direct link to the Adaptive Resource Monitor folder.
2026-11-26 20:04:25 -06:00
363c29fcdc Allow signed updates to more mature release channels 2026-11-26 20:01:54 -06:00
11 changed files with 392 additions and 15 deletions

View File

@@ -1,10 +1,21 @@
# Changelog
## 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

View File

@@ -1,5 +1,177 @@
# Adaptive Resource Monitor implementation report
## 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 +182,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

View File

@@ -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

View File

@@ -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,

View File

@@ -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.

View File

@@ -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

View File

@@ -1 +1 @@
v0.6.2.1_alpha
v0.6.2.2_beta

View File

@@ -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)

View File

@@ -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

View File

@@ -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())

View File

@@ -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()