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
This commit is contained in:
copilot-swe-agent[bot]
2026-03-23 14:35:15 +00:00
committed by GitHub
parent 00117c5074
commit ab8c58ff23
2 changed files with 3 additions and 2 deletions

View File

@@ -2731,7 +2731,8 @@ def agent_switch(
) )
options["agent_switch_error"] = ( options["agent_switch_error"] = (
f"Switch to '{agent_id}' failed after teardown of " f"Switch to '{agent_id}' failed after teardown of "
f"'{current_agent}'. Restore manually." f"'{current_agent}'. Run 'specify init --here --agent "
f"{current_agent}' to restore."
) )
init_options_file.write_text( init_options_file.write_text(
json.dumps(options, indent=2), encoding="utf-8" json.dumps(options, indent=2), encoding="utf-8"

View File

@@ -344,7 +344,7 @@ class TestDefaultBootstrap:
data["command_registration"]["commands_dir"] = "" data["command_registration"]["commands_dir"] = ""
m = AgentManifest.from_dict(data) m = AgentManifest.from_dict(data)
b = DefaultBootstrap(m) b = DefaultBootstrap(m)
with pytest.raises(AgentPackError, match="empty commands_dir"): with pytest.raises(AgentPackError, match=f"Agent '{m.id}' has an empty commands_dir"):
b.agent_dir(tmp_path) b.agent_dir(tmp_path)