@@ -127,7 +127,7 @@ const BoundedJson = Schema.toCodecJson(OrchestrationV2ThreadBoundedSnapshot);
127127const idTableBody = ( ) => {
128128 const decodeBoundedJson = Schema . decodeSync ( BoundedJson ) ;
129129
130- const snapshot = decodeBoundedJson ( boundedBody ( true ) ) ;
130+ const snapshot = decodeBoundedJson ( { ... boundedBody ( true ) , storageGeneration : "durable" } ) ;
131131 const encodeBoundedJson = Schema . encodeSync ( BoundedJson ) ;
132132
133133 return encodeBoundedJson ( { ...snapshot , idTable : true } ) ;
@@ -185,10 +185,14 @@ describe("boundedThreadSnapshotLoader", () => {
185185 ) ;
186186
187187 it . effect . each ( [
188- [ "an older server that ignores the opt-in" , ( ) => boundedBody ( false ) ] ,
189- [ "a server that sends compact turnItems" , ( ) => boundedBody ( true ) ] ,
190- [ "a server that also sends an ID table" , idTableBody ] ,
191- ] as const ) ( "requests compact turnItems and loads %s" , ( [ , body ] ) => {
188+ [ "an older server that ignores the opt-in" , ( ) => boundedBody ( false ) , undefined ] ,
189+ [
190+ "a server that sends compact turnItems" ,
191+ ( ) => ( { ...boundedBody ( true ) , storageGeneration : "durable" } ) ,
192+ "durable" ,
193+ ] ,
194+ [ "a server that also sends an ID table" , idTableBody , "durable" ] ,
195+ ] as const ) ( "requests compact turnItems and loads %s" , ( [ , body , storageGeneration ] ) => {
192196 const urls : string [ ] = [ ] ;
193197 const fetchFn = ( ( input : RequestInfo | URL ) => {
194198 urls . push ( String ( input ) ) ;
@@ -202,6 +206,7 @@ describe("boundedThreadSnapshotLoader", () => {
202206 expect ( new URL ( urls [ 0 ] ! ) . searchParams . get ( "compactIds" ) ) . toBe ( "1" ) ;
203207 expect ( result . _tag ) . toBe ( "present" ) ;
204208 if ( result . _tag !== "present" ) return ;
209+ expect ( result . snapshot . storageGeneration ) . toBe ( storageGeneration ) ;
205210 expect ( result . snapshot . projection . turnItems . map ( ( item ) => String ( item . id ) ) ) . toEqual ( [
206211 "local-1" ,
207212 "local-2" ,
0 commit comments