Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on:
pull_request:
push:
branches: [main]
branches: [main, 3.9.x]
workflow_dispatch:
inputs:
cooperative_qualification:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: SonarQube

on:
push:
branches: [main]
branches: [main, 3.9.x]
pull_request:
branches: [main]
branches: [main, 3.9.x]

permissions:
contents: read
Expand Down
60 changes: 30 additions & 30 deletions examples/laravel-http/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions regression-corpus-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,17 @@
"content_patterns": [
"function\\s+workflowTaskHistory\\s*\\("
]
},
{
"glob": "src/Worker/WorkflowPollGrant.php"
},
{
"glob": "src/Worker.php",
"content_patterns": [
"function\\s+confirmWorkflowPollGrant\\s*\\(",
"function\\s+observePoll\\s*\\(",
"function\\s+workerPayloadProgress\\s*\\("
]
}
]
}
Expand Down
19 changes: 18 additions & 1 deletion scripts/ci/run-replay-regression-fixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ final class ReplayRegressionTransport implements Transport
private ?array $activityCompletionBody = null;
private bool $activityCompleted = false;
private bool $workflowClaimRepaired = false;
private int $workflowRenewals = 0;

/**
* @param list<array<string, mixed>> $tasks
Expand Down Expand Up @@ -112,7 +113,13 @@ public function send(string $method, string $uri, array $headers, ?array $body =
$task['workflow_task_attempt'] = 2;
}

return ['task' => $task, 'poll_status' => 'leased'];
$reply = ['task' => $task, 'poll_status' => 'leased'];
if ($task['workflow_type'] === 'golden.workflow-fresh-grant') {
$reply['server_time'] = '2026-07-18T00:00:00.000000Z';
$reply['task']['lease_expires_at'] = '2026-07-18T00:00:30.000000Z';
}

return $reply;
}

$task = $this->taskFor($uri, 'history');
Expand All @@ -130,6 +137,7 @@ public function send(string $method, string $uri, array $headers, ?array $body =

$task = $this->taskFor($uri, 'heartbeat');
if ($task !== null) {
++$this->workflowRenewals;
if ($this->workflowLeaseRecovery && !$this->workflowClaimRepaired) {
$this->workflowClaimRepaired = true;
--$this->workflowPoll;
Expand Down Expand Up @@ -315,6 +323,11 @@ public function completedCommands(): array
return $this->completedCommands;
}

public function workflowRenewals(): int
{
return $this->workflowRenewals;
}

/** @return array<string, mixed>|null */
private function taskFor(string $uri, string $operation): ?array
{
Expand Down Expand Up @@ -609,6 +622,9 @@ private static function executeLayout(
}

$observed = ['command_sequence' => $commands];
if ($workflowType === 'golden.workflow-fresh-grant') {
$observed['initial_workflow_renewals'] = $transport->workflowRenewals();
}
if (count($commands) === 1) {
$observed = array_merge($observed, $commands[0]);
}
Expand Down Expand Up @@ -804,6 +820,7 @@ private static function workflow(string $workflowType): callable
return 'not-cancelled';
},
'golden.worker-update' => static fn (WorkflowContext $context): array => [],
'golden.workflow-fresh-grant' => static fn (WorkflowContext $context): string => 'fresh-grant',
'golden.workflow-stream' => static function (WorkflowContext $context): string {
$context->appendWorkflowStream('tokens', [
new WorkflowStreamAppendItem(['token' => 'hello']),
Expand Down
Loading
Loading