Skip to content

Commit 4dda5a2

Browse files
Conformance blocker: complete Python SDK parity coverage beyond smoke (#183)
1 parent 97c31b6 commit 4dda5a2

5 files changed

Lines changed: 46 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
`NamespaceDescription.deleted`.
3131

3232
### Fixed
33+
- `durable-workflow-python-conformance --compose` now accepts actual CLI
34+
terminal-result evidence from `workflow:start --wait`, `workflow:describe`,
35+
and `workflow:show-run --follow` instead of only generic result aliases.
3336
- `durable-workflow-replay-conformance` now declares `outcome: pass` when
3437
every required Python replay shard scenario passes, so full replay evidence
3538
is no longer reported as non-passing.

CONFORMANCE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ accepted as input to the composer; they are normalized into the canonical
7777
result fields before evaluation. Scenario and capability IDs may use the
7878
canonical snake_case names or the runbook-style hyphenated names such as
7979
`server-up`, `python-worker-connects`, and `result-returned`.
80+
For CLI result-path evidence, host runners should use the actual published
81+
CLI surfaces that return terminal workflow output: `workflow:start --wait`,
82+
`workflow:describe`, or `workflow:show-run --follow`.
8083

8184
The result gate requires one result for every scenario below, all marked
8285
`pass`, before the Python SDK conformance property can pass:

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,9 @@ observations to `--compose`; omitted parity cells become explicit
282282
`not_covered` entries so the gate reports the remaining scenario or capability
283283
instead of accepting a smoke-only result. The composer accepts canonical
284284
snake_case IDs and runbook-style hyphenated IDs such as `server-up` and
285-
`result-returned`.
285+
`result-returned`. CLI result-path evidence should come from the actual
286+
published commands that return terminal workflow output: `workflow:start --wait`,
287+
`workflow:describe`, or `workflow:show-run --follow`.
286288

287289
## External payload storage
288290

src/durable_workflow/python_conformance.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,32 @@ def _cli_result_fields() -> tuple[str, ...]:
13061306
"readResult",
13071307
"result_output",
13081308
"resultOutput",
1309+
"workflow_describe",
1310+
"workflowDescribe",
1311+
"describe_command",
1312+
"describeCommand",
1313+
"describe_output",
1314+
"describeOutput",
1315+
"workflow_show_run",
1316+
"workflowShowRun",
1317+
"show_run",
1318+
"showRun",
1319+
"show_run_command",
1320+
"showRunCommand",
1321+
"show_run_output",
1322+
"showRunOutput",
1323+
"workflow_start_wait",
1324+
"workflowStartWait",
1325+
"start_wait",
1326+
"startWait",
1327+
"start_wait_command",
1328+
"startWaitCommand",
1329+
"start_wait_output",
1330+
"startWaitOutput",
1331+
"terminal_describe",
1332+
"terminalDescribe",
1333+
"terminal_output",
1334+
"terminalOutput",
13091335
)
13101336

13111337

tests/test_python_conformance.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ def complete_result() -> dict[str, Any]:
4848
{
4949
"cli_install": {"command": "curl -fsSL https://durable-workflow.com/install.sh | sh"},
5050
"cli_start": {"command": "dw workflow:start --json"},
51-
"cli_result": {"command": "dw workflow:result --json"},
51+
"cli_result": {"command": "dw workflow:describe py-parity --json"},
5252
"cli_evidence": {
5353
"install_command": "curl -fsSL https://durable-workflow.com/install.sh | sh",
5454
"start_command": "dw workflow:start --json",
55-
"result_command": "dw workflow:result --json",
55+
"describe_command": "dw workflow:describe py-parity --json",
5656
"json_outputs": [{"workflow_id": "py-parity"}],
5757
},
5858
}
@@ -250,7 +250,7 @@ def test_compose_result_accepts_runner_native_host_evidence_aliases() -> None:
250250
"officialCli": {
251251
"install": {"command": "curl -fsSL https://durable-workflow.com/install.sh | sh"},
252252
"workflowStart": {"command": "dw workflow:start --json"},
253-
"workflowResult": {"command": "dw workflow:result --json"},
253+
"workflowDescribe": {"command": "dw workflow:describe py-parity --json"},
254254
"outputs": [{"workflow_id": "py-parity", "status": "completed"}],
255255
},
256256
"firstUserFlow": {
@@ -302,6 +302,9 @@ def test_compose_result_accepts_runner_native_host_evidence_aliases() -> None:
302302
assert composed["scenario_results"]["official_cli_install_start_result_path"]["cli_install"] == {
303303
"command": "curl -fsSL https://durable-workflow.com/install.sh | sh"
304304
}
305+
assert composed["scenario_results"]["official_cli_install_start_result_path"]["cli_result"] == {
306+
"command": "dw workflow:describe py-parity --json"
307+
}
305308
assert composed["scenario_results"]["cold_first_user_setup"]["fresh_state"] is True
306309
assert composed["scenario_results"]["php_assumption_audit"]["server_cli_audit"] == {"status": "pass"}
307310
assert evaluation["status"] == "pass"
@@ -345,7 +348,7 @@ def capability_alias(capability: str) -> str:
345348
"officialCli": {
346349
"installCommand": "curl -fsSL https://durable-workflow.com/install.sh | sh",
347350
"startCommand": "dw workflow:start --json",
348-
"resultCommand": "dw workflow:result --json",
351+
"showRunCommand": "dw workflow:show-run py-parity 01JTEST --follow --json",
349352
"jsonOutputs": [{"workflow_id": "py-parity", "status": "completed"}],
350353
},
351354
"firstUserFlow": {
@@ -387,6 +390,10 @@ def capability_alias(capability: str) -> str:
387390

388391
assert composed["outcome"] == "pass"
389392
assert composed["scenario_results"]["worker_restart_activity_and_signal_state"]["status"] == "pass"
393+
assert (
394+
composed["scenario_results"]["official_cli_install_start_result_path"]["cli_result"]
395+
== "dw workflow:show-run py-parity 01JTEST --follow --json"
396+
)
390397
assert composed["scenario_results"]["protocol_trace_capture"]["worker_protocol_traces"] == [evidence["traces"][1]]
391398
assert {entry["id"] for entry in composed["capability_table"]} == set(REQUIRED_CAPABILITIES)
392399
assert evaluation["status"] == "pass"

0 commit comments

Comments
 (0)