@@ -574,6 +574,7 @@ projectionSnapshotLayer("ProjectionSnapshotQuery", (it) => {
574574 (${ ORCHESTRATION_PROJECTOR_NAMES . threadProposedPlans } , 4, '2026-04-06T00:00:07.000Z'),
575575 (${ ORCHESTRATION_PROJECTOR_NAMES . threadActivities } , 4, '2026-04-06T00:00:07.000Z'),
576576 (${ ORCHESTRATION_PROJECTOR_NAMES . threadSessions } , 4, '2026-04-06T00:00:07.000Z'),
577+ (${ ORCHESTRATION_PROJECTOR_NAMES . queuedTurns } , 4, '2026-04-06T00:00:07.000Z'),
577578 (${ ORCHESTRATION_PROJECTOR_NAMES . checkpoints } , 4, '2026-04-06T00:00:07.000Z')
578579 ` ;
579580
@@ -678,6 +679,7 @@ projectionSnapshotLayer("ProjectionSnapshotQuery", (it) => {
678679 (${ ORCHESTRATION_PROJECTOR_NAMES . threadProposedPlans } , 4, '2026-04-06T00:00:07.000Z'),
679680 (${ ORCHESTRATION_PROJECTOR_NAMES . threadActivities } , 4, '2026-04-06T00:00:07.000Z'),
680681 (${ ORCHESTRATION_PROJECTOR_NAMES . threadSessions } , 4, '2026-04-06T00:00:07.000Z'),
682+ (${ ORCHESTRATION_PROJECTOR_NAMES . queuedTurns } , 4, '2026-04-06T00:00:07.000Z'),
681683 (${ ORCHESTRATION_PROJECTOR_NAMES . checkpoints } , 4, '2026-04-06T00:00:07.000Z')
682684 ` ;
683685
@@ -1427,6 +1429,7 @@ projectionSnapshotLayer("ProjectionSnapshotQuery", (it) => {
14271429 (${ ORCHESTRATION_PROJECTOR_NAMES . threadProposedPlans } , 3, '2026-04-03T00:00:40.000Z'),
14281430 (${ ORCHESTRATION_PROJECTOR_NAMES . threadActivities } , 3, '2026-04-03T00:00:40.000Z'),
14291431 (${ ORCHESTRATION_PROJECTOR_NAMES . threadSessions } , 3, '2026-04-03T00:00:40.000Z'),
1432+ (${ ORCHESTRATION_PROJECTOR_NAMES . queuedTurns } , 3, '2026-04-03T00:00:40.000Z'),
14301433 (${ ORCHESTRATION_PROJECTOR_NAMES . checkpoints } , 3, '2026-04-03T00:00:40.000Z')
14311434 ` ;
14321435
@@ -2460,6 +2463,16 @@ projectionSnapshotLayer("ProjectionSnapshotQuery windowed thread detail", (it) =
24602463 '2026-08-16T12:01:00.000Z', 1, 'queued'
24612464 )
24622465 ` ;
2466+ for ( const projector of Object . values ( ORCHESTRATION_PROJECTOR_NAMES ) ) {
2467+ yield * sql `
2468+ INSERT INTO projection_state (projector, last_applied_sequence, updated_at)
2469+ VALUES (
2470+ ${ projector } ,
2471+ ${ projector === ORCHESTRATION_PROJECTOR_NAMES . queuedTurns ? 3 : 5 } ,
2472+ '2026-08-16T12:01:00.000Z'
2473+ )
2474+ ` ;
2475+ }
24632476
24642477 const commandRead = yield * snapshotQuery . getCommandReadModel ( ) ;
24652478 assert . deepEqual (
@@ -2469,6 +2482,7 @@ projectionSnapshotLayer("ProjectionSnapshotQuery windowed thread detail", (it) =
24692482 assert . equal ( commandRead . threads [ 0 ] ?. messages [ 0 ] ?. deliveryState , "queued" ) ;
24702483
24712484 const shellRead = yield * snapshotQuery . getShellSnapshot ( ) ;
2485+ assert . equal ( shellRead . snapshotSequence , 3 ) ;
24722486 assert . equal ( shellRead . threads [ 0 ] ?. hasQueuedTurns , true ) ;
24732487 } ) ,
24742488 ) ;
0 commit comments