Answer stability round 1: 0 🔴, 5 🟡 (0 misread); share the scratch worktree, check a reused tag and main's merge-back, refuse GitHub, split the looped test

This commit is contained in:
Lilleman
2026-11-24 15:12:17 +01:00
parent ec497aa989
commit db32e4ef59
9 changed files with 249 additions and 124 deletions
+18
View File
@@ -236,6 +236,24 @@ class ChunkItem(unittest.TestCase):
self.assertIs(release_standing.project_plan(dataclasses.replace(config, commit_title="PAY-{id} - {summary}"), "main", repo).cut.reviewed, True)
self.assertIs(release_standing.project_plan(dataclasses.replace(config, pull_request_title="PAY-{id} - {summary}"), "main", repo).cut.reviewed, True)
def test_counts_no_release_review_of_the_patch_release_cut_beside_main_as_a_review_of_the_next(self):
repo = tempfile.mkdtemp()
self.addCleanup(subprocess.run, ["rm", "-rf", repo])
run = lambda *args: subprocess.run(["git", "-c", "user.name=t", "-c", "user.email=t@t", *args], capture_output=True, check=True, cwd=repo, env=isolated_env(), text=True)
run("init", "-q", "-b", "main")
run("commit", "-q", "--allow-empty", "-m", "Cut release 0.15.1")
run("tag", "v0.15.1")
run("commit", "-q", "--allow-empty", "-m", "Release review of 0.15.2")
run("switch", "-q", "--detach", "v0.15.1")
run("commit", "-q", "--allow-empty", "-m", "Cut release 0.15.2")
run("tag", "v0.15.2")
run("switch", "-q", "main")
run("merge", "-q", "--strategy", "ours", "--no-ff", "-m", "Merge release 0.15.2 into main", "v0.15.2")
# v0.15.2..main holds the review, which reviewed 0.15.2 itself, so 0.16.0 still waits for its own.
self.assertIs(release_standing.release_reviewed("v0.15.2", "main", repo, BARE), False)
run("commit", "-q", "--allow-empty", "-m", "Release review of 0.16.0")
self.assertIs(release_standing.release_reviewed("v0.15.2", "main", repo, BARE), True)
def test_counts_no_release_review_of_a_release_cut_under_a_dated_heading_on_a_branch_with_no_tag(self):
repo = tempfile.mkdtemp()
self.addCleanup(subprocess.run, ["rm", "-rf", repo])