Skip to content

Commit 562147c

Browse files
Present one coherent Durable Workflow 2.0 product train
1 parent f96ada8 commit 562147c

7 files changed

Lines changed: 75 additions & 30 deletions

File tree

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Pin an exact release for CI, conformance, or reproducible automation:
1818

1919
```bash
2020
# Linux and macOS
21-
curl -fsSL https://durable-workflow.com/install.sh | VERSION=0.1.80 sh
21+
curl -fsSL https://durable-workflow.com/install.sh | VERSION=2.0.0-beta.3 sh
2222
```
2323

2424
```powershell
@@ -28,7 +28,7 @@ irm https://durable-workflow.com/install.ps1 | iex
2828

2929
```powershell
3030
# Windows, exact release
31-
$env:VERSION = '0.1.80'
31+
$env:VERSION = '2.0.0-beta.3'
3232
irm https://durable-workflow.com/install.ps1 | iex
3333
```
3434

@@ -45,7 +45,7 @@ downloaded binary and `SHA256SUMS` before installation.
4545
Or download a native binary directly from the [releases
4646
page](https://github.com/durable-workflow/cli/releases). The current
4747
supported exact release in these examples is
48-
[`0.1.80`](https://github.com/durable-workflow/cli/releases/tag/0.1.80).
48+
[`2.0.0-beta.3`](https://github.com/durable-workflow/cli/releases/tag/2.0.0-beta.3).
4949
Available assets:
5050
`dw-linux-x86_64`, `dw-linux-aarch64`,
5151
`dw-macos-aarch64`, `dw-windows-x86_64.exe`.
@@ -129,25 +129,25 @@ asset, including `SHA256SUMS`, the installer scripts, and the generated
129129
Homebrew formula, so operators can verify both checksum integrity and GitHub
130130
Actions build provenance with `gh attestation verify` or the release-bundled
131131
`verify-release.sh --attest` helper. These attestations are the current
132-
machine-verifiable provenance mechanism for the 0.1.x line. The one-line
132+
machine-verifiable provenance mechanism for the 2.0 line. The one-line
133133
installers keep checksum verification as the baseline and add attestation
134134
verification when `DURABLE_WORKFLOW_INSTALL_VERIFY_ATTESTATIONS=1` is set.
135135

136136
Native binaries and PHARs are not currently code-signed or notarized. Treat the
137137
GitHub release tag, artifact attestations, and `SHA256SUMS` as the current
138138
provenance boundary. Signing and notarization are explicitly out of scope for
139-
the 0.1.x line; see [`docs/distribution.md`](docs/distribution.md) for the
139+
the 2.0 line; see [`docs/distribution.md`](docs/distribution.md) for the
140140
rationale and the conditions under which that decision would be revisited.
141141

142142
`dw` does not auto-update itself; the explicit `dw upgrade` command is the
143143
only update path for standalone binary installs, and it never runs
144144
unsolicited. The standalone installer and direct GitHub release assets are the
145145
public release channels for CI and conformance jobs that only need the `dw`
146146
binary. Composer package metadata is not a supported public CLI distribution
147-
channel for the 0.1.x line. The CLI also does not collect telemetry — there is
147+
channel for the 2.0 line. The CLI also does not collect telemetry — there is
148148
no background network traffic beyond commands that explicitly contact the
149149
configured Durable Workflow server. Telemetry is permanently out of scope for
150-
the 0.1.x line.
150+
the 2.0 line.
151151

152152
The PHAR is a reproducible build: given the same tag and the
153153
`SOURCE_DATE_EPOCH` recorded by the release workflow, locally rebuilding from
@@ -324,7 +324,8 @@ policy, worker status, search attribute type, and local dev database driver.
324324

325325
## Compatibility
326326

327-
CLI version 0.1.x is compatible with servers that advertise
327+
CLI version `2.0.0-beta.3` is the CLI member of the supported Durable Workflow
328+
`2.0.0-beta.3` product train. It is compatible with servers that advertise
328329
`control_plane.version: "2"`,
329330
`control_plane.request_contract.schema: durable-workflow.v2.control-plane-request.contract`
330331
version `1`, and a `client_compatibility.clients.cli.supported_versions`
@@ -341,7 +342,7 @@ names the CLI version, server version, compatibility window, and next step:
341342

342343
```bash
343344
$ dw workflow:list
344-
Server compatibility error: refusing before the requested operation because dw 0.1.73 cannot safely interoperate with server 0.2.221. Compatibility window: cli >=0.1,<1.0; control-plane version 2; worker protocol same-major <= 1.0. Next step: Upgrade dw, pin dw to a supported release, or connect to a compatible server. Detail: Server compatibility error: missing control_plane.request_contract; expected durable-workflow.v2.control-plane-request.contract v1.
345+
Server compatibility error: refusing before the requested operation because dw 2.0.0-beta.3 cannot safely interoperate with server 2.0.0-beta.3. Compatibility window: cli >=2.0.0-beta.3,<2.0.0-beta.4; control-plane version 2; worker protocol same-major <= 1.0. Next step: Upgrade dw, pin dw to a supported release, or connect to a compatible server. Detail: Server compatibility error: missing control_plane.request_contract; expected durable-workflow.v2.control-plane-request.contract v1.
345346
Next steps:
346347
- Upgrade dw, pin dw to a supported release, or connect to a compatible server.
347348
Try: dw doctor --output=json
@@ -354,9 +355,9 @@ object for automation:
354355
{
355356
"exit_code": 8,
356357
"compatibility": {
357-
"cli_version": "0.1.73",
358-
"server_version": "0.2.221",
359-
"compatibility_window": "cli >=0.1,<1.0; control-plane version 2; worker protocol same-major <= 1.0",
358+
"cli_version": "2.0.0-beta.3",
359+
"server_version": "2.0.0-beta.3",
360+
"compatibility_window": "cli >=2.0.0-beta.3,<2.0.0-beta.4; control-plane version 2; worker protocol same-major <= 1.0",
360361
"next_step": "Upgrade dw, pin dw to a supported release, or connect to a compatible server.",
361362
"detail": "Server compatibility error: missing control_plane.request_contract; expected durable-workflow.v2.control-plane-request.contract v1."
362363
}

docs/distribution.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This document describes how `dw` is distributed, how operators verify the
44
artifacts they install, and which optional distribution-hardening surfaces
5-
are deliberately out of scope for the 0.1.x line.
5+
are deliberately out of scope for the 2.0 line.
66

77
It is the canonical reference for security-conscious users who need to
88
answer "is this binary the one the project built?" and "what does this CLI
@@ -28,16 +28,16 @@ and refuse to proceed when the checksum does not match.
2828
For exact-version automation, set `VERSION` to the release tag:
2929

3030
```bash
31-
curl -fsSL https://durable-workflow.com/install.sh | VERSION=0.1.80 sh
31+
curl -fsSL https://durable-workflow.com/install.sh | VERSION=2.0.0-beta.3 sh
3232
```
3333

34-
Release `0.1.80` is available from the GitHub release page at
35-
<https://github.com/durable-workflow/cli/releases/tag/0.1.80>. Replace the
34+
Release `2.0.0-beta.3` is available from the GitHub release page at
35+
<https://github.com/durable-workflow/cli/releases/tag/2.0.0-beta.3>. Replace the
3636
tag when pinning a newer release.
3737

3838
## Provenance boundary
3939

40-
The provenance boundary for the 0.1.x line is:
40+
The provenance boundary for the 2.0 line is:
4141

4242
1. **The git tag** — every release is built from a tag pushed to
4343
`durable-workflow/cli`. The release workflow runs only on
@@ -73,7 +73,7 @@ is pinned to the same tag as the binaries it checks.
7373

7474
## Code signing and notarization
7575

76-
**Decision: explicitly out of scope for the 0.1.x line. GitHub artifact
76+
**Decision: explicitly out of scope for the 2.0 line. GitHub artifact
7777
attestations are the primary provenance mechanism.**
7878

7979
### Why
@@ -86,7 +86,7 @@ that pass Apple Notary Service review or carry an Authenticode signature
8686
trusted by SmartScreen. Acquiring those identities, holding the signing
8787
keys correctly, and integrating them into a hosted release workflow is a
8888
distinct piece of operational work that we have intentionally not taken
89-
on for the 0.1.x line — it would not strengthen the cryptographic
89+
on for the 2.0 line — it would not strengthen the cryptographic
9090
provenance of the binary, only its handling by the OS-level publisher
9191
trust UX.
9292

@@ -129,7 +129,7 @@ This decision is reviewable when one of the following becomes true:
129129
## Telemetry
130130

131131
**Decision: permanently out of scope. The CLI does not collect telemetry
132-
and will not gain a telemetry surface in the 0.1.x line.**
132+
and will not gain a telemetry surface in the 2.0 line.**
133133

134134
### Behavior contract
135135

@@ -162,7 +162,7 @@ assertion is to never ship a telemetry surface at all.
162162

163163
### What would change this
164164

165-
This decision is fixed for the 0.1.x line. Any future telemetry surface
165+
This decision is fixed for the 2.0 line. Any future telemetry surface
166166
would be opt-in by default, would be documented here before it shipped,
167167
and would be subject to the same provenance and verification expectations
168168
as the rest of the binary.
@@ -178,7 +178,7 @@ binary. Behavior:
178178
proceed if checksum verification fails, and refuses to overwrite
179179
Composer-managed PHAR installs and Homebrew-managed binaries because
180180
the package manager owns those install paths. Composer package metadata
181-
is not a supported public CLI distribution channel for the 0.1.x line;
181+
is not a supported public CLI distribution channel for the 2.0 line;
182182
use the exact-version installer or direct release assets for public,
183183
source-free automation.
184184
- Flags: `--version=<tag>` for a specific release, `--dry-run` to print
@@ -296,6 +296,8 @@ Before promoting `dw` into a production runbook:
296296

297297
## Change history
298298

299+
- 2.0.0-beta.3 — Joined the synchronized Durable Workflow 2.0 product
300+
train and retained the established distribution and verification policy.
299301
- 0.1.x — Initial distribution policy. Signing/notarization out of scope,
300302
telemetry permanently out of scope, reproducible-build contract
301303
established with `verify-reproducible-build.sh`.

scripts/generate-build-info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
$version = $normalizeVersion($env('GITHUB_REF_NAME'));
5252
}
5353
$version ??= $normalizeVersion($git('describe --tags --exact-match'));
54-
$version ??= '0.1.0-dev';
54+
$version ??= '2.0.0-beta.3-dev';
5555

5656
$commit = $env('DW_CLI_COMMIT') ?? $env('GITHUB_SHA') ?? $git('rev-parse HEAD') ?? 'unknown';
5757

src/BuildInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
final class BuildInfo
88
{
9-
private const FALLBACK_VERSION = '0.1.0-dev';
9+
private const FALLBACK_VERSION = '2.0.0-beta.3-dev';
1010

1111
public static function consoleVersion(): string
1212
{

src/Commands/UpgradeCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function configure(): void
5353
<comment>Examples:</comment>
5454
5555
<info>dw upgrade</info>
56-
<info>dw upgrade --tag=0.1.5</info>
56+
<info>dw upgrade --tag=2.0.0-beta.3</info>
5757
<info>dw upgrade --dry-run</info>
5858
<info>dw upgrade --output=json</info>
5959
HELP)
@@ -304,8 +304,8 @@ private function versionsMatch(string $current, string $target): bool
304304
{
305305
$normalize = static function (string $value): string {
306306
$value = trim($value);
307-
// BuildInfo::version() may return "0.1.5-dev" or "0.1.5" or fallback
308-
// "0.1.0-dev"; only compare the core semver head for the noop check.
307+
// BuildInfo::version() may include a development suffix; compare
308+
// only the core semver head for the noop check.
309309
if (preg_match('/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?/', ltrim($value, 'v'), $m)) {
310310
return $m[0];
311311
}

src/Support/CompatibilityDiagnostics.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ private static function matchesVersionConstraint(string $version, string $constr
434434

435435
$matches = true;
436436
foreach ($requirements as $requirement) {
437-
if (! self::matchesSingleRequirement($versionParts, $requirement)) {
437+
if (! self::matchesSingleRequirement($version, $versionParts, $requirement)) {
438438
$matches = false;
439439
break;
440440
}
@@ -451,7 +451,7 @@ private static function matchesVersionConstraint(string $version, string $constr
451451
/**
452452
* @param array{0: int, 1: int, 2: int} $versionParts
453453
*/
454-
private static function matchesSingleRequirement(array $versionParts, string $requirement): bool
454+
private static function matchesSingleRequirement(string $version, array $versionParts, string $requirement): bool
455455
{
456456
if ($requirement === '*' || $requirement === 'x') {
457457
return true;
@@ -466,7 +466,7 @@ private static function matchesSingleRequirement(array $versionParts, string $re
466466
return $versionParts[0] === (int) $matches[1];
467467
}
468468

469-
if (preg_match('/^(<=|>=|<|>|=)?\\s*v?(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?/', $requirement, $matches) !== 1) {
469+
if (preg_match('/^(<=|>=|<|>|=)?\\s*v?(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?((?:-[0-9A-Za-z][0-9A-Za-z.-]*)?)$/', $requirement, $matches) !== 1) {
470470
return false;
471471
}
472472

@@ -476,6 +476,13 @@ private static function matchesSingleRequirement(array $versionParts, string $re
476476
isset($matches[3]) && $matches[3] !== '' ? (int) $matches[3] : 0,
477477
isset($matches[4]) && $matches[4] !== '' ? (int) $matches[4] : 0,
478478
];
479+
$requiredVersion = implode('.', $requiredParts).($matches[5] ?? '');
480+
$normalizedVersion = ltrim(trim($version), 'v');
481+
482+
if (($matches[5] ?? '') !== '' || str_contains($normalizedVersion, '-')) {
483+
return version_compare($normalizedVersion, $requiredVersion, $operator);
484+
}
485+
479486
$comparison = self::compareVersionParts($versionParts, $requiredParts);
480487

481488
return match ($operator) {
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Tests\Support;
6+
7+
use DurableWorkflow\Cli\Support\CompatibilityDiagnostics;
8+
use PHPUnit\Framework\TestCase;
9+
10+
final class CompatibilityDiagnosticsProductTrainTest extends TestCase
11+
{
12+
/**
13+
* @return array<string, mixed>
14+
*/
15+
private function clusterInfo(string $constraint): array
16+
{
17+
return [
18+
'client_compatibility' => [
19+
'clients' => [
20+
'cli' => ['supported_versions' => $constraint],
21+
],
22+
],
23+
];
24+
}
25+
26+
public function testProductTrainPrereleaseFloorRejectsEarlierBeta(): void
27+
{
28+
$clusterInfo = $this->clusterInfo('>=2.0.0-beta.3,<2.0.0-beta.4');
29+
30+
self::assertFalse(CompatibilityDiagnostics::cliVersionIsSupported($clusterInfo, '2.0.0-beta.1'));
31+
self::assertTrue(CompatibilityDiagnostics::cliVersionIsSupported($clusterInfo, '2.0.0-beta.3'));
32+
self::assertFalse(CompatibilityDiagnostics::cliVersionIsSupported($clusterInfo, '2.0.0-beta.4'));
33+
self::assertFalse(CompatibilityDiagnostics::cliVersionIsSupported($clusterInfo, '2.0.0'));
34+
}
35+
}

0 commit comments

Comments
 (0)