From f940a5578e83e8cdc4f11ea81831e53a437e5b91 Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:14:07 -0700 Subject: [PATCH 1/2] test(mentions): the owner mentioning their own never-connected agent gets the line (TASK-722) Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- .../unit/services/neverConnectedMentionService.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/__tests__/unit/services/neverConnectedMentionService.test.js b/backend/__tests__/unit/services/neverConnectedMentionService.test.js index ec7e7dbbbb..f0c927d023 100644 --- a/backend/__tests__/unit/services/neverConnectedMentionService.test.js +++ b/backend/__tests__/unit/services/neverConnectedMentionService.test.js @@ -73,6 +73,14 @@ it('posts one not-connected line when a person mentions a BYO agent that never p }); }); +it('posts the line when the agent's own owner is the one who mentions it (TASK-722)', async () => { + const posted = await noteNeverConnectedMention({ ...args, senderId: byoInstall.installedBy }); + + expect(posted).toBe(true); + expect(mockEmitNotConnected).toHaveBeenCalledTimes(1); + expect(mockEmitNotConnected.mock.calls[0][0]).toMatchObject({ agentKey: 'nova:default', messageId: '555' }); +}); + it('stays silent for a bot sender', async () => { mockFindUser.mockReturnValue(chain({ isBot: true })); expect(await noteNeverConnectedMention(args)).toBe(false); From c1b98b860091902618a9b981dcfb598e064715f6 Mon Sep 17 00:00:00 2001 From: Lily Shen <115414357+lilyshen0722@users.noreply.github.com> Date: Sat, 31 Oct 2026 16:14:15 -0700 Subject: [PATCH 2/2] test(mentions): fix quote in owner-mention test title (TASK-722) Co-Authored-By: Claude Sonnet 5.5 Co-authored-by: Ember Agent-Model: claude/claude-opus-5-5/medium --- .../unit/services/neverConnectedMentionService.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/__tests__/unit/services/neverConnectedMentionService.test.js b/backend/__tests__/unit/services/neverConnectedMentionService.test.js index f0c927d023..77d8cca0a7 100644 --- a/backend/__tests__/unit/services/neverConnectedMentionService.test.js +++ b/backend/__tests__/unit/services/neverConnectedMentionService.test.js @@ -73,7 +73,7 @@ it('posts one not-connected line when a person mentions a BYO agent that never p }); }); -it('posts the line when the agent's own owner is the one who mentions it (TASK-722)', async () => { +it('posts the line when the owner is the one who mentions it (TASK-722)', async () => { const posted = await noteNeverConnectedMention({ ...args, senderId: byoInstall.installedBy }); expect(posted).toBe(true);