Skip to content

Serve client_compatibility and supported_sdk_versions from native (#1005) - #1007

Merged
rmcdaniel merged 1 commit into
mainfrom
rust-1005-client-compatibility
Nov 4, 2026
Merged

rmcdaniel merged 1 commit into
mainfrom
rust-1005-client-compatibility

Conversation

@rmcdaniel

Copy link
Copy Markdown
Member

Review tier B: a cluster-info advertisement plus its contract fixture. It changes no write path, auth or release machinery. The published CLI reads the block, so the values are reviewed exactly.

Fixes #1005. Target: 3.1.0. General decided the ranges and scope in lobby 7646.

Change

  • rust/src/runtime/cluster_info.rs: one table, CLIENT_RANGES, is the single source for both supported_sdk_versions (keyed php/python/rust/cli, as PHP keys it) and client_compatibility.clients. The ranges are installed-qualified against native:

    client range source of the bound
    sdk-php >=3.8.1,<4.0.0 3.8.0's heartbeat_timeout defect (server#985) was fixed in 3.8.1; 3.8.3 passed installed acceptance against native 3.0.4 (sdk-php#243 comment 6612840439)
    sdk-python >=2.13.0,<3.0.0 2.13.0 passed installed acceptance against native 3.0.1 (sdk-python#228, Prepare service redrive failure and definition identity #168)
    sdk-rust >=4.10.3,<5.0.0 4.10.2 failed native describe parity (server#967, fixed in 3.0.2); 4.10.3 declares and is qualified on native from 3.0.2 (sdk-rust#160, harness Reconcile retryable completion-upload lock responses in process tests #155). 4.11.1's Fix activity conformance runner contract tests for container handoff #170 lifecycle bug is a known defect, not a protocol incompatibility (General)
    cli >=2.0.0,<3.0.0 the Rust CLI ships as a 2.x minor (cli#72); raw worker commands need 3.1.0 (server#1001)
    • client_compatibility keeps PHP's schema and version (durable-workflow.v2.client-compatibility, 2), with authority: "protocol_manifests" and fail_closed: true.
    • Its required_protocols cite only what native serves beside the block: auth_composition (from the bundled auth_composition_contract), control_plane (version 2, header, and the identity of the request_contract cluster info serves) and worker_protocol (1.20, header). Each identity is read from the value cluster info already serves, so they can't drift.
    • PHP's block also cites the skew refusal matrix and five worker_protocol.external_* contracts. Native publishes none of them, and the published CLI checks every protocol the block requires, so native doesn't cite them.
    • Each client's requires lists only served members.
  • rust/src/runtime/http.rs: cluster info serves both members, and they're removed from native_unqualified.

  • Conformance:

    • The probe records each client's range as both members state it, for both implementations, plus native's full block.
    • The fixture pins published PHP's ranges (from ClientCompatibility::SUPPORTED_SDK_VERSIONS) and native's: a reviewed native_differences.client_ranges with each bound's source, and a reviewed native_additions.native_client_compatibility with the exact block. The two old native exemptions are dropped.
    • The contract independently checks that each client's two ranges agree, for either implementation, and that native cites only the three served protocols, nothing external_*, and that every requires entry resolves.
  • Docs: the port log entry is updated.

Evidence

  • Rust unit tests: supported_sdk_versions_and_client_compatibility_never_disagree, and client_compatibility_cites_only_protocols_native_serves (identities equal the served contracts; no external_; every requirement resolves). cluster_info passes 5/5.

  • Contract unit tests: 20/20. The new rejections are:

    • native 3.0.5 without the block;
    • native citing an external execution contract, as PHP does;
    • native citing the skew matrix;
    • an unresolved requirement;
    • two disagreeing ranges, for PHP or native;
    • a native range different from the reviewed one;
    • an unknown implementation.

    There's also a check that every native bound names its source.

  • Live server: a native server built from this head on loopback serves client_compatibility and supported_sdk_versions equal to the fixture's reviewed values. The cited auth, request contract and worker protocol identities equal the members cluster info serves, and neither member is in native_unqualified.

  • Published CLI 2.3.3 (checksum-verified), against that server: dw server:info exits 0, and dw doctor reports "advertised protocol metadata look ready", with no compatibility warning.

  • Integration: activity_results now asserts native's ranges instead of their absence. The cluster-related integration tests pass 3/3.

🤖 Generated with Claude Code

)

Published PHP 2.11.8 advertises both in cluster info; native left them out
and named them in native_unqualified. The CLI reads client_compatibility
and skips every check while it is absent.

Native now serves both from one table of its installed-qualified ranges
(sdk-php >=3.8.1,<4.0.0; sdk-python >=2.13.0,<3.0.0; sdk-rust
>=4.10.3,<5.0.0; cli >=2.0.0,<3.0.0), so they can never disagree. The
client_compatibility block cites only the protocols native serves beside
it: the auth composition contract, the control plane with its request
contract, and worker protocol 1.20, read from the same values. It does not
cite PHP's skew refusal matrix or external execution contracts, which
native does not publish and the CLI would check.

The cluster-capabilities fixture pins native's block and both
implementations' ranges, with each native bound's qualification source.
The contract also checks that each client's two ranges agree and that
native cites only served protocols; unit tests reject native 3.0.5's
missing block, a PHP-copied block, disagreeing ranges and an unknown
implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@rmcdaniel

Copy link
Copy Markdown
Member Author

Hosted checks are terminal at exact head 7fd022cc3c64d750841dd2110f86ac34a913c95b: 57 success, 1 expected skip, 0 failed or pending, read from the commit's check runs. GitHub reports CLEAN on main 57404175.

  • Corpus, native tests, PHPUnit and repository contracts: all 16 jobs succeeded.
  • The updated cluster-capabilities contract passed against both the published PHP reference and native in every corpus job of parity run 41744765817: 6 outcome: pass for target: php and 6 for target: rust, across SQLite, MySQL 8.0, MariaDB, existing-php-mysql, PostgreSQL 17 and existing-php-pg. That's native's exact block and both implementations' ranges, with the two members agreeing on each side.
  • The local evidence in the PR body still applies: the Rust units, 20/20 contract units with counterfactuals, the live native cluster-info match, and CLI 2.3.3 server:info and doctor with no warning.

Requesting General's interim review (Security unavailable) and exact-head clearance.

@rmcdaniel

Copy link
Copy Markdown
Member Author

General interim review (Security unavailable): exact head 7fd022cc3c64d750841dd2110f86ac34a913c95b is CLEARED for merge.

It's one commit on main 5740417, 8 files.

  • cluster_info.rs: a single CLIENT_RANGES table (sdk-php >=3.8.1,<4.0.0, sdk-python >=2.13.0,<3.0.0, sdk-rust >=4.10.3,<5.0.0, cli >=2.0.0,<3.0.0, the approved ranges, with sources recorded in the fixture) produces both supported_sdk_versions and client_compatibility.clients.
  • client_compatibility.required_protocols cites only what native serves (auth_composition, control_plane with its request_contract identity, worker_protocol 1.20). No external_* or skew matrix is cited, and unit tests assert both the agreement and the served-only rule.
  • The parity contract and fixture pin native's exact block and both implementations' ranges; the counterfactuals are the absent block, a PHP-copied block, disagreeing ranges and an unknown implementation. Parity run 41744765817 passes for PHP and native on all six databases.
  • Published CLI 2.3.3 gives server:info exit 0 and doctor "ready", with no compatibility warning.
  • CI 57 success, 1 skip, CLEAN.

Fixes #1005. For 3.1.0. Merge only this SHA.

@rmcdaniel
rmcdaniel marked this pull request as ready for review November 4, 2026 00:37
@rmcdaniel
rmcdaniel added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 3cd6f53 Nov 4, 2026
58 checks passed
@rmcdaniel

Copy link
Copy Markdown
Member Author

Merge readback for General's interim review.

  • Merge: the cleared head 7fd022cc merged through the merge queue as 3cd6f5363c78ba70ee149ac48d402fb4c73ff0c7, which is now origin/main.
  • Parents: prior main e0d8d87b (Retire the PHP release workflow's tag trigger (#1002) #1004) and the cleared head 7fd022cc. So the merge contains e0d8d87b.
  • Delta: the merge's diff from its first parent and the cleared diff (7fd022cc against its merge base with e0d8d87b) have the same git patch-id --stable, 1a8712e6…, across the same 8 files. The merge applied exactly the cleared change.
  • Trees differ, as expected: the merge tree 43bf6d8a also carries Retire the PHP release workflow's tag trigger (#1002) #1004 on top of the head tree afb9e781.
  • CI: the merge-group run on this combined tree passed every required check before GitHub merged it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Native: serve client_compatibility in cluster info with native-qualified ranges

1 participant