feat: Add Uptime Kuma auto-update

Docker compose update via SSH to abraham.jeena.net. Review examples
include real v2.x patches as auto and the v1→v2 migration as manual,
plus a synthetic v2→v3 breaking change example.

Also fix test_classifier.py version derivation for x.0.0 releases
where patch decrement would produce the same version, causing the
model to see a nonsensical "upgrading from 2.0.0 to 2.0.0" prompt.
This commit is contained in:
Jeena 2026-04-14 01:54:25 +00:00
parent 7c2a7a98e7
commit e56ef34a32
7 changed files with 127 additions and 1 deletions

View file

@ -29,12 +29,20 @@ def guess_version_from_notes(notes: str) -> str:
def make_previous_version(version: str) -> str:
"""Decrement patch to simulate upgrading from the previous patch release."""
"""Decrement version to simulate upgrading from a previous release."""
parts = version.split(".")
if len(parts) == 3 and parts[2].isdigit():
patch = int(parts[2])
if patch > 0:
return f"{parts[0]}.{parts[1]}.{patch - 1}"
# x.y.0 → decrement minor
minor = int(parts[1])
if minor > 0:
return f"{parts[0]}.{minor - 1}.0"
# x.0.0 → decrement major
major = int(parts[0])
if major > 0:
return f"{major - 1}.0.0"
return version