@@ -26,6 +26,7 @@ import { testing as slackRoutingTesting } from "./prepare-routing.js";
2626import { prepareSlackMessage } from "./prepare.js" ;
2727import {
2828 createInboundSlackTestContext ,
29+ createSlackStoredSessionEntry ,
2930 createSlackSessionStoreFixture ,
3031 createSlackTestAccount ,
3132} from "./prepare.test-helpers.js" ;
@@ -1733,7 +1734,11 @@ Second paragraph should still reach the agent after Slack's preview cutoff.`;
17331734 history . mockClear ( ) ;
17341735 await saveSessionStore (
17351736 storePath ,
1736- { [ prepared . ctxPayload . SessionKey ! ] : { updatedAt : Date . now ( ) } } ,
1737+ {
1738+ [ prepared . ctxPayload . SessionKey ! ] : createSlackStoredSessionEntry ( {
1739+ sessionId : "existing-dm-session" ,
1740+ } ) ,
1741+ } ,
17371742 { skipMaintenance : true } ,
17381743 ) ;
17391744 const existing = await prepareMessageWith (
@@ -1864,7 +1869,11 @@ Second paragraph should still reach the agent after Slack's preview cutoff.`;
18641869 } ) ;
18651870 await saveSessionStore (
18661871 storePath ,
1867- { [ threadKeys . sessionKey ] : { updatedAt : Date . now ( ) } } ,
1872+ {
1873+ [ threadKeys . sessionKey ] : createSlackStoredSessionEntry ( {
1874+ sessionId : "existing-thread-session" ,
1875+ } ) ,
1876+ } ,
18681877 { skipMaintenance : true } ,
18691878 ) ;
18701879
@@ -2069,8 +2078,12 @@ Second paragraph should still reach the agent after Slack's preview cutoff.`;
20692078 await saveSessionStore (
20702079 storePath ,
20712080 {
2072- "agent:main:main" : { updatedAt : Date . now ( ) } ,
2073- "agent:main:main:thread:650.000" : { updatedAt : Date . now ( ) } ,
2081+ "agent:main:main" : createSlackStoredSessionEntry ( {
2082+ sessionId : "existing-main-dm-session" ,
2083+ } ) ,
2084+ "agent:main:main:thread:650.000" : createSlackStoredSessionEntry ( {
2085+ sessionId : "existing-main-thread-session" ,
2086+ } ) ,
20742087 } ,
20752088 { skipMaintenance : true } ,
20762089 ) ;
0 commit comments