mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 10:35:51 +00:00
9d4f6ae923
The installer compares the agent binary it downloaded against the server that served it, stripping a leading "v" so "v6.0.4" and "6.0.4" match. It did not strip semver build metadata, so a server built from a working tree reporting "6.2.0-rc.8+git.46.g98a638e00.dirty" never matched the "v6.2.0-rc.8" agent it had just served, and the mismatch warning fired on every correct development install. This is the warning's whole job, so a false positive is expensive. It is the only client-side signal that a stale agent was downloaded, and because it always fired it read as background noise. That is exactly how a genuinely stale v6.0.5 agent was installed on a live host earlier today: the warning was there, above the install output, and looked like the one that always appears. Strip build metadata from both sides before comparing, keeping the prerelease suffix because 6.2.0-rc.8 and 6.2.0 are genuinely different releases. This is the same release-identity reduction the server applies when deciding whether a local agent artifact is fresh enough to serve; the contracts now state that one definition governs both ends rather than leaving each side to invent its own. Guarded by a test that pins both normalisation steps and exercises the comparison across the cases that matter: the dev-server shape that used to warn wrongly, the stale-download shape that must still warn, and a prerelease against its release. Verified to fail when either strip is removed.