The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
test: enforce fail-closed project profile targeting
Teknium6927ff8e5c0e
diff --git a/tests/tui_gateway/test_projects_rpc.py b/tests/tui_gateway/test_projects_rpc.pyindex f2faa74262c..69671d9a627 100644--- a/tests/tui_gateway/test_projects_rpc.py+++ b/tests/tui_gateway/test_projects_rpc.py@@ -858,7 +858,7 @@ def test_record_repos_writes_to_the_requested_profiles_projects_db(monkeypatch,def test_projects_without_a_profile_stay_on_the_launch_home(monkeypatch, tmp_path):- """Omitted/blank/unknown profile is a no-op — the pre-scoping behavior."""+ """Only omitted/blank profiles use launch data; unknown targets fail closed."""launch_home = _profile_dir(tmp_path, "launch")coder_home = _profile_dir(tmp_path, "coder")repo = tmp_path / "repos" / "launch-only"@@ -873,11 +873,14 @@ def test_projects_without_a_profile_stay_on_the_launch_home(monkeypatch, tmp_patomitted = _call("projects.list")blank = _call("projects.list", {"profile": ""})- unknown = _call("projects.list", {"profile": "not-a-profile"})+ with pytest.raises(FileNotFoundError, match="not-a-profile"):+ _call("projects.list", {"profile": "not-a-profile"})+ with pytest.raises(FileNotFoundError, match="not-a-profile"):+ _call("projects.create", {"profile": "not-a-profile", "name": "Wrong target"})+ assert _call("projects.list") == omittedassert [p["name"] for p in omitted["projects"]] == ["Launch only"]assert blank == omitted- assert unknown == omittedassert omitted["active_id"] == created["id"]assert _cached_repo_labels(launch_home) == ["only"]