Compare commits

...

4 Commits

Author SHA1 Message Date
Daniel Milliner 39700a87aa fix(test): use valid session status in stale-origin fallback test
Session.status only allows 'active' | 'closed' — 'archived' is not a
valid value and breaks the TypeScript build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-08 13:22:49 +03:00
Daniel Milliner 90f36dc997 Merge branch 'main' into fix/a2a-test-type-error 2026-05-08 13:22:13 +03:00
Koshkoshinsk 537d507e56 style: apply Prettier formatting from pre-commit hook
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 22:18:58 +00:00
Koshkoshinsk c8757a5e32 fix(test): add missing in_reply_to to A2A test objects
The RoutableAgentMessage interface gained a required in_reply_to field
in #2267 but the test objects weren't updated, breaking the build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 22:18:48 +00:00
2 changed files with 10 additions and 6 deletions
+9 -5
View File
@@ -838,7 +838,6 @@ describe('agent-shared session resolution', () => {
const { session } = resolveSession('ag-1', null, null, 'agent-shared');
expect(session.messaging_group_id).toBeNull();
});
});
describe('agent-to-agent routing', () => {
@@ -885,7 +884,12 @@ describe('agent-to-agent routing', () => {
const { session: paSlackSession } = resolveSession('ag-pa', 'mg-slack', null, 'shared');
await routeAgentMessage(
{ id: 'out-a2a-1', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'research this' }) },
{
id: 'out-a2a-1',
platform_id: 'ag-researcher',
content: JSON.stringify({ text: 'research this' }),
in_reply_to: null,
},
paSlackSession,
);
@@ -928,7 +932,7 @@ describe('agent-to-agent routing', () => {
// PA sends from Slack
await routeAgentMessage(
{ id: 'out-fwd', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'research' }) },
{ id: 'out-fwd', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'research' }), in_reply_to: null },
paSlackSession,
);
@@ -937,7 +941,7 @@ describe('agent-to-agent routing', () => {
const researcherSession = getSessionsByAgentGroup('ag-researcher')[0];
await routeAgentMessage(
{ id: 'out-reply', platform_id: 'ag-pa', content: JSON.stringify({ text: 'found it' }) },
{ id: 'out-reply', platform_id: 'ag-pa', content: JSON.stringify({ text: 'found it' }), in_reply_to: null },
researcherSession,
);
@@ -961,7 +965,7 @@ describe('agent-to-agent routing', () => {
const { session: paSession } = resolveSession('ag-pa', 'mg-slack', null, 'shared');
await routeAgentMessage(
{ id: 'out-1', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'go' }) },
{ id: 'out-1', platform_id: 'ag-researcher', content: JSON.stringify({ text: 'go' }), in_reply_to: null },
paSession,
);
@@ -285,7 +285,7 @@ describe('routeAgentMessage return-path', () => {
const inboundId = bRows[0].id;
// Archive S1 — simulates session cleanup or channel disconnect.
updateSession(S1.id, { status: 'archived' });
updateSession(S1.id, { status: 'closed' });
// B replies. origin points to S1 (archived), should fall through to S2.
await routeAgentMessage(