Rename loop-claude to build-release, with no alias
This commit is contained in:
@@ -62,7 +62,7 @@ def run_claude(args: list[str], cwd: str, prompt: str) -> subprocess.CompletedPr
|
||||
|
||||
|
||||
def project_rung(home: pathlib.Path, git: Git) -> Rung | Failure:
|
||||
"""The cheapest rung for the model loop-claude runs the project on. The routing ladder is that of the project the process runs in."""
|
||||
"""The cheapest rung for the model build-release runs the project on. The routing ladder is that of the project the process runs in."""
|
||||
common = git("rev-parse", "--path-format=absolute", "--git-common-dir")
|
||||
if isinstance(common, Failure):
|
||||
return common
|
||||
@@ -73,7 +73,7 @@ def project_rung(home: pathlib.Path, git: Git) -> Rung | Failure:
|
||||
if isinstance(models, Failure):
|
||||
return models
|
||||
if key not in models:
|
||||
return Failure(f"{saved} names no model for {key}: run loop-claude in the project once, which asks for it.")
|
||||
return Failure(f"{saved} names no model for {key}: run build-release in the project once, which asks for it.")
|
||||
ladder = project_ladder(None, home)
|
||||
if isinstance(ladder, Failure):
|
||||
return ladder
|
||||
|
||||
@@ -99,7 +99,7 @@ class GatherTest(unittest.TestCase):
|
||||
self.assertEqual(gather(self.env, self.home, self.claude)[0], "The gathering claude didn't say anything.")
|
||||
|
||||
def test_refuses_where_the_project_has_no_model_on_its_ladder(self):
|
||||
for saved, said in (({}, f"{self.models} names no model for calc: run loop-claude in the project once, which asks for it."), ({"calc": "claude-haiku-5-5"}, "calc runs on claude-haiku-5-5, which is not on its routing ladder.")):
|
||||
for saved, said in (({}, f"{self.models} names no model for calc: run build-release in the project once, which asks for it."), ({"calc": "claude-haiku-5-5"}, "calc runs on claude-haiku-5-5, which is not on its routing ladder.")):
|
||||
self.models.write_text(json.dumps(saved))
|
||||
found = gather(self.env, self.home, self.claude)
|
||||
self.assertEqual((found.reason if isinstance(found, Failure) else found, self.calls), (said, []))
|
||||
|
||||
Reference in New Issue
Block a user