server-monitor-manager/deploy
Ochenstarik b897b0ea88 fix(bootstrap): compare release versions semantically against the installed one
The update guard compared the archive version with PROGRAM_VERSION using shell
string ordering. Both halves were wrong.

PROGRAM_VERSION is a constant describing the bootstrap source tree ("0.2.0-dev"),
never the deployed component, so it could not represent what is installed. The
cross-role compatibility check compared it with a manifest field such as
"v0.1.0-alpha.9"; those can never be equal, so update-control on a host that also
runs the agent always failed. The downgrade guard compared the same mismatched
pair and passed only by accident, because "v" sorts above "0" in ASCII.

String ordering is also wrong for the version scheme in use: "0.1.0-alpha.10"
sorts below "0.1.0-alpha.9", so the next release after the ninth would have been
rejected as a downgrade.

- record the installed version per role at install and update time, and compare
  against that instead of PROGRAM_VERSION;
- order versions with sort -V after stripping the leading "v", so prerelease
  numbering and tag prefixes compare correctly;
- treat an unknown peer version as a warning rather than a failure, because
  installations predating version recording have nothing to compare against;
- guard all of the above in the bootstrap contract test, including the six
  ordering cases and a check that the lexicographic comparison is not restored.

Verified by deliberately reintroducing each defect: lexicographic comparison,
sort without -V, and a missing version record are all caught by the contract test.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 01:05:22 +07:00
..
ochenstarik-server-monitor-manager.sh fix(bootstrap): compare release versions semantically against the installed one 2026-08-11 01:05:22 +07:00
ochenstarik-smm-agent.service Add standalone Linux bootstrap foundation (#5) 2026-07-30 21:18:39 +07:00
ochenstarik-smm-control.service fix(enrollment): repair node enrollment path (#24) 2026-08-09 22:32:53 +07:00
ochenstarik-smm-emergency feat(control): add background link reconciliation (#12) 2026-08-03 13:55:48 +07:00
ochenstarik-smm-firewall.service Add standalone Linux bootstrap foundation (#5) 2026-07-30 21:18:39 +07:00
ochenstarik-smm-policy-apply feat(control): reconcile links from factual state (#16) 2026-08-09 12:53:49 +07:00
ochenstarik-smm-provisioning-helper.service Execute confirmed timezone provisioning safely (#6) 2026-07-30 21:40:30 +07:00
smm-setup.sh [verified] Fix monitor snapshot contract and release compatibility 2026-08-10 17:24:07 +07:00