Answer product-owner round 2: 0 🔴, 1 🟡 (0 misread); name the clone in self-update's two refusals too, and move the note for a clone on 0.17.0 last in Update

This commit is contained in:
2026-12-04 00:27:38 +01:00
parent bbbf3767cc
commit a73ad34695
4 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ usage: self-update
Run it by its path in a clone of a release, as in <clone>/bin/self-update. It fetches origin's
tags and checks out the newest v* tag, detached, so the clone holds only what a release holds.
Development happens in another clone, such as ~/code/claude-config. It prints the version it moved
Development happens in another clone, such as ~/code/claude-config. It prints the clone and the version it moved
from and to, then CHANGELOG.md's section for each version since, so you can do what each asks, such
as a new step under Install. Where the move changed settings.json, it asks you to pick the model
again with /model, since git's clean filter keeps the model out of every commit.
+2 -2
View File
@@ -14,7 +14,7 @@ def moved_to_newest(clone: str) -> str | Failure:
if isinstance(tag, Failure):
return tag
if tag is None:
return Failure("origin has no v* tag to move to")
return Failure(f"{clone}'s origin has no v* tag to move to")
# Re-reads each file through the clean filter, so a model pick alone leaves settings.json unchanged.
if isinstance(refreshed := git("update-index", "-q", "--refresh", cwd=clone), Failure):
return refreshed
@@ -33,7 +33,7 @@ def moved_to_newest(clone: str) -> str | Failure:
if not isinstance(at_tag, Failure) and at_tag.strip() == tag:
return f"{clone} is already on {tag}, the newest release."
if isinstance(git("merge-base", "--is-ancestor", "HEAD", tag, cwd=clone), Failure):
return Failure(f"{tag} doesn't hold the clone's commit, so the move would drop work no release holds: cut a release that holds it first")
return Failure(f"{tag} doesn't hold {clone}'s commit, so the move would drop work no release holds: cut a release that holds it first")
settings_changed = isinstance(git("diff", "--quiet", "HEAD", tag, "--", "settings.json", cwd=clone), Failure)
# The tag holds each uncommitted change, so undoing them doesn't lose anything, and lets the move below take the tag's copy.
# A settings.json the clean filter shows unchanged may still differ on disk, by a model pick or Claude Code's key order, which checkout refuses to overwrite; the pick is asked for again below.
+1 -1
View File
@@ -130,7 +130,7 @@ class SelfUpdate(unittest.TestCase):
self.git(self.target, "pull", "-q", "--ff-only")
ran = self.update()
self.assertEqual(ran.returncode, 1)
self.assertIn("v0.1.0 doesn't hold", ran.stderr)
self.assertIn(f"v0.1.0 doesn't hold {self.target}'s commit", ran.stderr)
self.assertEqual(self.git(self.target, "branch", "--show-current").strip(), "main")
def test_takes_a_model_picked_with_the_clean_filter_set_as_no_change(self):