Answer stability round 1: 0 🔴, 8 🟡 (1 misread); count every named pass's rounds past the first again, name unreadable tags in larv-review, drop version_of, and test newest_tag, a failed index refresh, the judge cost a ruling archives, a ruling that cannot be archived, and a nested agents folder

This commit is contained in:
2026-11-04 23:48:18 +01:00
parent 9fea1d8286
commit 37a412b80e
9 changed files with 94 additions and 16 deletions
+38
View File
@@ -0,0 +1,38 @@
import pathlib
import subprocess
import sys
import tempfile
import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
from release import newest_tag, tagged
from test_env import isolated_env
class NewestTag(unittest.TestCase):
def setUp(self):
self.repo = tempfile.mkdtemp()
self.addCleanup(subprocess.run, ["rm", "-rf", self.repo])
self.git("init", "-q", "-b", "main")
def git(self, *args: str) -> None:
subprocess.run(["git", "-c", "user.name=t", "-c", "user.email=t@t", *args], capture_output=True, check=True, cwd=self.repo, env=isolated_env())
def tag_commit(self, tag: str) -> None:
self.git("commit", "-q", "--allow-empty", "-m", tag)
self.git("tag", tag)
def test_takes_the_highest_version_sorting_a_release_candidate_below_its_release_and_only_tags_merged_into_the_branch_where_one_is_named(self):
self.assertIsNone(newest_tag(self.repo))
for tag in ("v0.9.0", "v0.10.0", "v1.0.0-rc.1"):
self.tag_commit(tag)
self.assertEqual(newest_tag(self.repo), "v1.0.0-rc.1")
self.git("checkout", "-q", "-b", "side")
self.tag_commit("v1.0.0")
self.git("checkout", "-q", "main")
self.assertEqual(newest_tag(self.repo), "v1.0.0")
self.assertEqual(newest_tag(self.repo, merged_into="main"), "v1.0.0-rc.1")
def test_names_a_release_only_for_a_v_tag_of_a_version(self):
self.assertEqual((tagged("v1.2.3"), tagged("1.2.3"), tagged("v1.2.3-rc.1"), tagged(None)), ((1, 2, 3), None, None, None))