Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

Backend release: a patch runs from 1 to 99, then the next minor at .1 (#1496)

0xken15244021ee3b89
diff --git a/backend/scripts/release-be.sh b/backend/scripts/release-be.sh
index de8fdbec4..5ff9c97bc 100755
--- a/backend/scripts/release-be.sh
+++ b/backend/scripts/release-be.sh
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
# Cut a backend release: bump the version, tag HEAD `vX.Y.Z_backend`, push the tag.
#
-# ./scripts/release-be.sh # patch bump (v1.1.2_backend -> v1.1.3_backend)
-# ./scripts/release-be.sh minor # v1.1.2_backend -> v1.2.0_backend
-# ./scripts/release-be.sh major # v1.1.2_backend -> v2.0.0_backend
-# ./scripts/release-be.sh 1.4.1 # exact version -> v1.4.1_backend
+# ./scripts/release-be.sh # patch bump (v1.1.2_backend -> v1.1.3_backend, v1.1.99_backend -> v1.2.1_backend)
+# ./scripts/release-be.sh minor # v1.1.2_backend -> v1.2.1_backend
+# ./scripts/release-be.sh major # v1.1.2_backend -> v2.0.1_backend
+# ./scripts/release-be.sh 1.4.1 # exact version -> v1.4.1_backend (patch 1 to 99)
# ./scripts/release-be.sh --dry-run # print what it WOULD do, touch nothing
# ./scripts/release-be.sh --allow-older # a rollback: older code under a higher version
#
@@ -44,6 +44,10 @@ if [[ "$BUMP" == "exact" ]] &&
echo "ERROR exact version '$EXACT' is invalid; use SemVer X.Y.Z (for example 1.4.1)." >&2
exit 1
fi
+if [[ "$BUMP" == "exact" ]] && (( 10#${EXACT##*.} < 1 || 10#${EXACT##*.} > 99 )); then
+ echo "ERROR exact version '$EXACT' needs a patch from 1 to 99, like every other release." >&2
+ exit 1
+fi
# --- preflight: the tag names a commit, so that commit must be the right one and must be on origin.
git fetch --tags --quiet origin
@@ -97,10 +101,13 @@ REST="${LATEST#*.}"
MINOR="${REST%%.*}"
PATCH="${REST#*.}"
+# A patch runs from 1 to 99, then the next minor starts at .1: the convention Desktop and web already follow
+# (desktop/scripts/release-desktop.sh next_patch_version). The backend lacked it, and v1.2.100_backend was cut
+# on October 21, 2026; a patch past 99 also rolls over, so the release after it is v1.3.1_backend.
case "$BUMP" in
- patch) NEXT="$MAJOR.$MINOR.$((PATCH + 1))" ;;
- minor) NEXT="$MAJOR.$((MINOR + 1)).0" ;;
- major) NEXT="$((MAJOR + 1)).0.0" ;;
+ patch) if (( PATCH >= 99 )); then NEXT="$MAJOR.$((MINOR + 1)).1"; else NEXT="$MAJOR.$MINOR.$((PATCH + 1))"; fi ;;
+ minor) NEXT="$MAJOR.$((MINOR + 1)).1" ;;
+ major) NEXT="$((MAJOR + 1)).0.1" ;;
exact) NEXT="$EXACT" ;;
esac
diff --git a/scripts/tests/test_release_contains_last.py b/scripts/tests/test_release_contains_last.py
index 9dfd5ffdc..46e9281bf 100644
--- a/scripts/tests/test_release_contains_last.py
+++ b/scripts/tests/test_release_contains_last.py
@@ -133,6 +133,23 @@ class ReleaseContainsLastTests(unittest.TestCase):
result = self.release(kind, '--dry-run')
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
+ def test_a_backend_patch_stays_within_1_to_99(self):
+ # v1.2.100_backend was cut on October 21, 2026: the backend lacked the rollover Desktop already had.
+ for last, args, following in (('1.2.99', [], '1.3.1'), ('1.2.100', [], '1.3.1'), ('1.2.5', ['minor'], '1.3.1'),
+ ('1.2.5', ['major'], '2.0.1')):
+ with self.subTest(last=last, args=args):
+ self.tag('backend', last, self.newer)
+ result = self.release('backend', *args, '--dry-run')
+ self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
+ self.assertIn(f'new tag : v{following}_backend', result.stdout)
+ self.git('tag', '-d', f'v{last}_backend')
+ self.git('push', '-q', 'origin', f':refs/tags/v{last}_backend')
+ for exact in ('1.4.0', '1.4.100'):
+ with self.subTest(exact=exact):
+ result = self.release('backend', exact, '--dry-run')
+ self.assertNotEqual(result.returncode, 0, result.stdout + result.stderr)
+ self.assertIn('1 to 99', result.stderr)
+
def test_a_first_release_has_nothing_to_contain(self):
self.live(cli='0.0.0', desktop='0.0.0')
for kind in RELEASES: