From 7510f1fd7c340dac96abf45c72f1dfb15027106c Mon Sep 17 00:00:00 2001 From: Copilot <223556219+Copilot@users.noreply.github.com> Date: Fri, 17 Jul 2026 15:47:03 -0700 Subject: [PATCH 1/2] Fix Round Robin target identity matching Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0162bbcb-1620-4d09-ac1c-7cfa9ae5046f --- frontend/src/App.test.tsx | 15 ++++ frontend/src/App.tsx | 8 +- .../src/components/Chat/ChatWindow.test.tsx | 72 +++++++++++++++ frontend/src/components/Chat/ChatWindow.tsx | 11 ++- frontend/src/types/index.ts | 1 + frontend/src/utils/targetIdentity.test.ts | 74 ++++++++++++++++ frontend/src/utils/targetIdentity.ts | 9 +- pyrit/backend/models/attacks.py | 2 + pyrit/backend/services/attack_service.py | 12 +-- tests/unit/backend/test_attack_service.py | 88 +++++++++++++++++++ tests/unit/backend/test_mappers.py | 43 +++++++-- 11 files changed, 311 insertions(+), 24 deletions(-) diff --git a/frontend/src/App.test.tsx b/frontend/src/App.test.tsx index 7663291a4d..9f5df1d3be 100644 --- a/frontend/src/App.test.tsx +++ b/frontend/src/App.test.tsx @@ -120,6 +120,7 @@ jest.mock("./components/Chat/ChatWindow", () => { attackResultId, conversationId, activeConversationId, + attackTarget, onConversationCreated, onSelectConversation, labels, @@ -129,6 +130,7 @@ jest.mock("./components/Chat/ChatWindow", () => { attackResultId: string | null; conversationId: string | null; activeConversationId: string | null; + attackTarget?: { identifier_hash?: string | null } | null; onConversationCreated: (attackResultId: string, conversationId: string) => void; onSelectConversation: (convId: string) => void; labels: Record; @@ -139,6 +141,7 @@ jest.mock("./components/Chat/ChatWindow", () => { {conversationId ?? "none"} {activeConversationId ?? "none"} {activeTarget ? "yes" : "no"} + {attackTarget?.identifier_hash ?? "none"} {labels.operator ?? ""} {JSON.stringify(labels)}