Skip to content

Commit ab8c58f

Browse files
Copilotmnriem
andauthored
fix: improve test match specificity and rollback error message per code review
Co-authored-by: mnriem <15701806+mnriem@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/spec-kit/sessions/40d5aec5-d8e9-4e3f-ae60-6cf67ff491f3
1 parent 00117c5 commit ab8c58f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2731,7 +2731,8 @@ def agent_switch(
27312731
)
27322732
options["agent_switch_error"] = (
27332733
f"Switch to '{agent_id}' failed after teardown of "
2734-
f"'{current_agent}'. Restore manually."
2734+
f"'{current_agent}'. Run 'specify init --here --agent "
2735+
f"{current_agent}' to restore."
27352736
)
27362737
init_options_file.write_text(
27372738
json.dumps(options, indent=2), encoding="utf-8"

tests/test_agent_pack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def test_agent_dir_raises_on_empty_commands_dir(self, tmp_path):
344344
data["command_registration"]["commands_dir"] = ""
345345
m = AgentManifest.from_dict(data)
346346
b = DefaultBootstrap(m)
347-
with pytest.raises(AgentPackError, match="empty commands_dir"):
347+
with pytest.raises(AgentPackError, match=f"Agent '{m.id}' has an empty commands_dir"):
348348
b.agent_dir(tmp_path)
349349

350350

0 commit comments

Comments
 (0)