From 96acbd719b73dcc8b391f63662d52dac1fe593e9 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Tue, 28 Apr 2026 14:15:42 -0700 Subject: [PATCH] test: update test_peer_capabilities_format for fallback behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The previous assertion `'Silent Agent' not in result` was pinning the buggy behavior — peers without an agent_card were silently dropped from the prompt. With the fallback to DB name+role those peers are correctly visible. Flip the assertion so the test pins the new (correct) rendering and would catch a regression to the silent-drop behavior. --- workspace/tests/test_prompt.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/workspace/tests/test_prompt.py b/workspace/tests/test_prompt.py index 0fb4bd98..133a5d7e 100644 --- a/workspace/tests/test_prompt.py +++ b/workspace/tests/test_prompt.py @@ -203,8 +203,11 @@ def test_peer_capabilities_format(tmp_path): assert "**Echo Agent** (id: `peer-1`, status: online)" in result assert "Skills: echo, repeat" in result assert "delegate_to_workspace" in result - # peer-2 has no agent_card so it's skipped - assert "Silent Agent" not in result + # peer-2 has no agent_card but DOES have a DB name + status — must + # still render so coordinators can delegate to freshly-created peers + # whose A2A discovery hasn't populated a card yet (regression of the + # 2026-04-27 Design Director discovery bug). + assert "**Silent Agent** (id: `peer-2`, status: offline)" in result def test_peer_with_json_string_agent_card(tmp_path):