@@ -57,7 +57,7 @@ describe('getWorkflowExecutionStatus queue projection', () => {
5757 } )
5858
5959 it ( 'uses the resume entry ID when the queued work is a resume attempt' , async ( ) => {
60- queueTableRows ( schemaMock . resumeQueue , [ { id : 'resume-entry-1' } ] )
60+ queueTableRows ( schemaMock . resumeQueue , [ { id : 'resume-entry-1' , status : 'claimed' } ] )
6161 mockGetJob . mockResolvedValueOnce ( {
6262 status : 'processing' ,
6363 createdAt : new Date ( '2026-08-05T12:00:00.000Z' ) ,
@@ -84,7 +84,7 @@ describe('getWorkflowExecutionStatus queue projection', () => {
8484 status : 'paused' ,
8585 } ,
8686 ] )
87- queueTableRows ( schemaMock . resumeQueue , [ { id : 'resume-entry-1' } ] )
87+ queueTableRows ( schemaMock . resumeQueue , [ { id : 'resume-entry-1' , status : 'claimed' } ] )
8888 mockGetJob . mockResolvedValueOnce ( {
8989 status : 'pending' ,
9090 createdAt : new Date ( '2026-08-05T12:00:00.000Z' ) ,
@@ -112,6 +112,7 @@ describe('getWorkflowExecutionStatus queue projection', () => {
112112 queueTableRows ( schemaMock . resumeQueue , [
113113 {
114114 id : 'resume-entry-1' ,
115+ status : 'claimed' ,
115116 queuedAt : new Date ( '2026-08-05T12:00:00.000Z' ) ,
116117 claimedAt : new Date ( '2026-08-05T12:00:01.000Z' ) ,
117118 } ,
@@ -129,6 +130,35 @@ describe('getWorkflowExecutionStatus queue projection', () => {
129130 } )
130131 } )
131132
133+ it ( 'projects a pending serialized resume as queued' , async ( ) => {
134+ queueTableRows ( schemaMock . workflowExecutionLogs , [
135+ {
136+ executionId : 'execution-1' ,
137+ workflowId : 'workflow-1' ,
138+ status : 'paused' ,
139+ trigger : 'api' ,
140+ } ,
141+ ] )
142+ queueTableRows ( schemaMock . resumeQueue , [
143+ {
144+ id : 'resume-entry-2' ,
145+ status : 'pending' ,
146+ queuedAt : new Date ( '2026-08-05T12:00:02.000Z' ) ,
147+ claimedAt : null ,
148+ } ,
149+ ] )
150+
151+ const status = await getWorkflowExecutionStatus ( input )
152+
153+ expect ( status ) . toMatchObject ( {
154+ executionId : 'execution-1' ,
155+ status : 'queued' ,
156+ startedAt : '2026-08-05T12:00:02.000Z' ,
157+ paused : null ,
158+ } )
159+ expect ( mockGetJob ) . not . toHaveBeenCalled ( )
160+ } )
161+
132162 it ( 'returns completed queue output when requested' , async ( ) => {
133163 mockGetJob . mockResolvedValueOnce ( {
134164 status : 'completed' ,
0 commit comments