Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
eda7b3b
Select prepared retry dispositions from one engine time sample
rmcdaniel Nov 5, 2026
d18d92a
Retain explicit prepared retry authority and refuse legacy downgrade
rmcdaniel Nov 5, 2026
752442b
Merge remote-tracking branch 'origin/main' into workflow/219-prepared…
rmcdaniel Nov 5, 2026
2730aba
Bound prepared retry timestamps and preserve legacy replay delays
rmcdaniel Nov 6, 2026
96dfda4
Exercise legacy zero-tail fixture through the embedded executor
rmcdaniel Nov 6, 2026
564f792
Record guarded prepared retry decisions under the original authority
rmcdaniel Nov 6, 2026
618a5c6
Bind retry preparation to stored v2 decisions and original deadlines
rmcdaniel Nov 6, 2026
97fc037
Refuse legacy internal execution of prepared retry v2 rows
rmcdaniel Nov 6, 2026
30f99eb
Isolate retained projection state for the new replay corpus case
rmcdaniel Nov 6, 2026
f9ac83a
Validate retained retry receipt selections before replay
rmcdaniel Nov 6, 2026
ac531e0
Add guarded retry-v2 supervisor and heartbeat source entries
rmcdaniel Nov 6, 2026
bc5dbf8
Use the closed heartbeat progress shape in supervisor controls
rmcdaniel Nov 6, 2026
f03d5fc
Refactor prepared retry selection around immutable timestamp bounds
rmcdaniel Nov 6, 2026
11ef5a8
Preserve engine interruption decisions through prepared retry recovery
rmcdaniel Nov 6, 2026
e612b52
Bind retry preparation to retained versioned recovery authority
rmcdaniel Nov 6, 2026
eb3056e
Declare the unbound prepared retry bridge contract
rmcdaniel Nov 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/pr-test-selection.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
"tests/Unit/V2/LaravelDependencySecurityPolicyTest.php",
"tests/Unit/V2/PlatformProtocolSpecsTest.php",
"tests/Unit/V2/PreparedLocalActivityReportTest.php",
"tests/Unit/V2/PreparedLocalActivityRetryTaskBridgeTest.php",
"tests/Unit/V2/PreparedLocalRetryDecisionTest.php",
"tests/Unit/V2/PreparedLocalRetryDescriptorTest.php",
"tests/Unit/V2/PreparedLocalRetryPolicyTest.php",
"tests/Unit/V2/PreparedLocalRetryTimestampTest.php",
"tests/Unit/V2/ReadmeBranchDestinationsTest.php",
"tests/Unit/V2/ScopedCancellationContextTest.php",
"tests/Unit/V2/SqliteTransactionTest.php",
Expand Down
74 changes: 74 additions & 0 deletions src/V2/Contracts/PreparedLocalActivityRetryTaskBridge.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?php

declare(strict_types=1);

namespace Workflow\V2\Contracts;

use Workflow\V2\Support\WorkerProtocolVersion;

/**
* @internal Optional prepared-local retry contract 2. This declaration binds
* no implementation. Consumers must inspect the actual bridge instance and
* retain original claim capability, contract 2 and snapshot 2 authority.
* The type alone grants neither local mode nor physical callback admission.
*/
interface PreparedLocalActivityRetryTaskBridge extends PreparedLocalActivityTaskBridge
{
/** @param array<string, mixed> $descriptor
* @return array<string, mixed>
*/
public function prepareLocalActivityWithRetryPolicy(
string $taskId,
string $leaseOwner,
int $workflowTaskAttempt,
int $sequence,
string $workerAttemptId,
array $descriptor,
string $protocolVersion = WorkerProtocolVersion::VERSION,
): array;

/** @param array<string, mixed> $report
* @return array<string, mixed>
*/
public function recordLocalActivityRetryOutcome(
string $attemptId,
string $leaseOwner,
int $workflowTaskAttempt,
array $report,
string $protocolVersion = WorkerProtocolVersion::VERSION,
): array;

/**
* @return array<string, mixed>
*/
public function controlLocalActivityWithRetryPolicy(
string $attemptId,
string $leaseOwner,
int $workflowTaskAttempt,
bool $renewLease = false,
string $protocolVersion = WorkerProtocolVersion::VERSION,
): array;

/** @param array<string, mixed> $progress
* @return array<string, mixed>
*/
public function heartbeatLocalActivityWithRetryPolicy(
string $attemptId,
string $leaseOwner,
int $workflowTaskAttempt,
array $progress = [],
string $protocolVersion = WorkerProtocolVersion::VERSION,
): array;

/** @param array<string, mixed> $descriptor
* @return array<string, mixed>
*/
public function recoverLocalActivityWithRetryPolicy(
string $taskId,
string $leaseOwner,
int $workflowTaskAttempt,
int $sequence,
array $descriptor,
string $protocolVersion = WorkerProtocolVersion::VERSION,
): array;
}
12 changes: 12 additions & 0 deletions src/V2/Exceptions/PreparedLocalActivityContractException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace Workflow\V2\Exceptions;

use RuntimeException;

/** @internal A prepared activity entered through a different contract. */
final class PreparedLocalActivityContractException extends RuntimeException
{
}
3 changes: 3 additions & 0 deletions src/V2/Support/HistoryEventPayloadContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ final class HistoryEventPayloadContract
],
'ActivityRetryScheduled' => [
'local_outcome',
'retry_disposition',
'local_recovery',
'activity_execution_id',
'activity_attempt_id',
Expand Down Expand Up @@ -266,6 +267,7 @@ final class HistoryEventPayloadContract
],
'ActivityFailed' => [
'local_outcome',
'retry_disposition',
'local_recovery',
'activity_execution_id',
'activity_attempt_id',
Expand Down Expand Up @@ -345,6 +347,7 @@ final class HistoryEventPayloadContract
],
'ActivityTimedOut' => [
'local_outcome',
'retry_disposition',
'local_recovery',
'activity_execution_id',
'activity_attempt_id',
Expand Down
Loading
Loading