@@ -305,7 +305,7 @@ public function testExplicitPreAdmittedCallStillDispatchesWhenIdempotencyKeyIsPr
305305 $ this ->assertCount (1 , $ fakeWorkflow ->starts );
306306 }
307307
308- public function testActivityBindingMarksCallStartedWithGeneratedActivityExecutionReference (): void
308+ public function testActivityBindingCommitsBindingResolutionAtAcceptanceWithoutFalselyMarkingStarted (): void
309309 {
310310 $ controlPlane = new DefaultServiceControlPlane (
311311 new FakeServiceWorkflowControlPlane (),
@@ -330,7 +330,10 @@ public function testActivityBindingMarksCallStartedWithGeneratedActivityExecutio
330330 ]);
331331
332332 $ this ->assertTrue ($ result ['accepted ' ]);
333- $ this ->assertSame (ServiceCallStatus::Started->value , $ result ['status ' ]);
333+ $ this ->assertSame (ServiceCallStatus::Accepted->value , $ result ['status ' ]);
334+ $ this ->assertSame (ServiceCallOutcome::Accepted->value , $ result ['outcome ' ]);
335+ $ this ->assertNotNull ($ result ['accepted_at ' ]);
336+ $ this ->assertNull ($ result ['started_at ' ]);
334337 $ this ->assertSame (ServiceCallBindingKind::ActivityExecution->value , $ result ['resolved_binding_kind ' ]);
335338 $ this ->assertNotNull ($ result ['resolved_target_reference ' ]);
336339 $ this ->assertSame ($ result ['resolved_target_reference ' ], $ result ['handler ' ]['activity_execution_id ' ]);
@@ -340,8 +343,10 @@ public function testActivityBindingMarksCallStartedWithGeneratedActivityExecutio
340343
341344 $ call = WorkflowServiceCall::query ()->firstOrFail ();
342345
343- $ this ->assertSame (ServiceCallStatus::Started ->value , $ call ->status );
346+ $ this ->assertSame (ServiceCallStatus::Accepted ->value , $ call ->status );
344347 $ this ->assertSame (ServiceCallOutcome::Accepted, $ call ->outcome );
348+ $ this ->assertNotNull ($ call ->accepted_at );
349+ $ this ->assertNull ($ call ->started_at );
345350 $ this ->assertSame ($ result ['resolved_target_reference ' ], $ call ->resolved_target_reference );
346351 $ this ->assertSame ($ result ['resolved_target_reference ' ], $ call ->metadata ['activity_execution_id ' ]);
347352 $ this ->assertSame ('App \\Activities \\IssueInvoice ' , $ call ->metadata ['activity_class ' ]);
@@ -373,7 +378,7 @@ public function testActivityBindingFailsWhenActivityClassAndReferenceMissing():
373378 $ this ->assertSame (ServiceCallOutcome::HandlerFailed->value , $ result ['outcome ' ]);
374379 }
375380
376- public function testInvocableCarrierBindingMarksCallStartedWithGeneratedCarrierRequestReference (): void
381+ public function testInvocableCarrierBindingCommitsBindingResolutionAtAcceptanceWithoutFalselyMarkingStarted (): void
377382 {
378383 $ controlPlane = new DefaultServiceControlPlane (
379384 new FakeServiceWorkflowControlPlane (),
@@ -398,7 +403,10 @@ public function testInvocableCarrierBindingMarksCallStartedWithGeneratedCarrierR
398403 ]);
399404
400405 $ this ->assertTrue ($ result ['accepted ' ]);
401- $ this ->assertSame (ServiceCallStatus::Started->value , $ result ['status ' ]);
406+ $ this ->assertSame (ServiceCallStatus::Accepted->value , $ result ['status ' ]);
407+ $ this ->assertSame (ServiceCallOutcome::Accepted->value , $ result ['outcome ' ]);
408+ $ this ->assertNotNull ($ result ['accepted_at ' ]);
409+ $ this ->assertNull ($ result ['started_at ' ]);
402410 $ this ->assertSame (ServiceCallBindingKind::InvocableCarrierRequest->value , $ result ['resolved_binding_kind ' ]);
403411 $ this ->assertNotNull ($ result ['resolved_target_reference ' ]);
404412 $ this ->assertSame ($ result ['resolved_target_reference ' ], $ result ['handler ' ]['carrier_request_id ' ]);
@@ -409,8 +417,10 @@ public function testInvocableCarrierBindingMarksCallStartedWithGeneratedCarrierR
409417
410418 $ call = WorkflowServiceCall::query ()->firstOrFail ();
411419
412- $ this ->assertSame (ServiceCallStatus::Started ->value , $ call ->status );
420+ $ this ->assertSame (ServiceCallStatus::Accepted ->value , $ call ->status );
413421 $ this ->assertSame (ServiceCallOutcome::Accepted, $ call ->outcome );
422+ $ this ->assertNotNull ($ call ->accepted_at );
423+ $ this ->assertNull ($ call ->started_at );
414424 $ this ->assertSame ($ result ['resolved_target_reference ' ], $ call ->metadata ['carrier_request_id ' ]);
415425 $ this ->assertSame ('https://carrier.billing.example/handle ' , $ call ->metadata ['carrier_endpoint ' ]);
416426 $ this ->assertSame ('billing.invoice.issue ' , $ call ->metadata ['carrier_handler ' ]);
0 commit comments