@@ -110,7 +110,6 @@ func TestResolveRecoveredFrom_HitStampsSourceResult(t *testing.T) {
110110 runClient , c := newGateTestClient (t )
111111 runClient .EXPECT ().LookupAction (mock .Anything , mock .Anything ).
112112 Return (lookupResponse (& workflow.LookupActionResponse {
113- Found : true ,
114113 Phase : common .ActionPhase_ACTION_PHASE_SUCCEEDED ,
115114 Attempts : 2 ,
116115 CacheStatus : core .CatalogCacheStatus_CACHE_HIT ,
@@ -141,7 +140,6 @@ func TestResolveRecoveredFrom_SignalledConditionIsAHit(t *testing.T) {
141140 }
142141 runClient .EXPECT ().LookupAction (mock .Anything , mock .Anything ).
143142 Return (lookupResponse (& workflow.LookupActionResponse {
144- Found : true ,
145143 Phase : common .ActionPhase_ACTION_PHASE_SUCCEEDED ,
146144 Output : signal ,
147145 }), nil ).Once ()
@@ -163,7 +161,6 @@ func TestResolveRecoveredFrom_RecoveredSourceIsAHit(t *testing.T) {
163161 runClient , c := newGateTestClient (t )
164162 runClient .EXPECT ().LookupAction (mock .Anything , mock .Anything ).
165163 Return (lookupResponse (& workflow.LookupActionResponse {
166- Found : true ,
167164 Phase : common .ActionPhase_ACTION_PHASE_RECOVERED ,
168165 OutputUri : "s3://bucket/r0/a1/1/outputs.pb" ,
169166 }), nil ).Once ()
@@ -175,20 +172,32 @@ func TestResolveRecoveredFrom_RecoveredSourceIsAHit(t *testing.T) {
175172 assert .Equal (t , "s3://bucket/r0/a1/1/outputs.pb" , got .OutputUri )
176173}
177174
178- func TestResolveRecoveredFrom_MissAndUnusableSourcesRunFresh (t * testing.T ) {
175+ // A source run that never had this action reports NOT_FOUND. That is an ordinary recovery
176+ // outcome, not a lookup failure, so it runs fresh without touching the failure counter —
177+ // the distinction TestResolveRecoveredFrom_LookupFailureRunsFresh covers from the other side.
178+ func TestResolveRecoveredFrom_MissingActionRunsFresh (t * testing.T ) {
179+ runClient , c := newGateTestClient (t )
180+ runClient .EXPECT ().LookupAction (mock .Anything , mock .Anything ).
181+ Return (nil , connect .NewError (connect .CodeNotFound , assert .AnError )).Once ()
182+
183+ got := c .resolveRecoveredFrom (context .Background (),
184+ taskActionWith (recoveryContextFor ("r1" )), childAction ("a1" ), false )
185+ assert .Nil (t , got )
186+ }
187+
188+ func TestResolveRecoveredFrom_UnusableSourcesRunFresh (t * testing.T ) {
179189 for _ , tc := range []struct {
180190 name string
181191 resp * workflow.LookupActionResponse
182192 }{
183- {"missing" , & workflow.LookupActionResponse {Found : false }},
184193 {"failed" , & workflow.LookupActionResponse {
185- Found : true , Phase : common .ActionPhase_ACTION_PHASE_FAILED , OutputUri : "s3://x" ,
194+ Phase : common .ActionPhase_ACTION_PHASE_FAILED , OutputUri : "s3://x" ,
186195 }},
187196 {"aborted" , & workflow.LookupActionResponse {
188- Found : true , Phase : common .ActionPhase_ACTION_PHASE_ABORTED , OutputUri : "s3://x" ,
197+ Phase : common .ActionPhase_ACTION_PHASE_ABORTED , OutputUri : "s3://x" ,
189198 }},
190199 {"succeeded without outputs" , & workflow.LookupActionResponse {
191- Found : true , Phase : common .ActionPhase_ACTION_PHASE_SUCCEEDED ,
200+ Phase : common .ActionPhase_ACTION_PHASE_SUCCEEDED ,
192201 }},
193202 } {
194203 t .Run (tc .name , func (t * testing.T ) {
0 commit comments