Commit 18f1825
feat: add runtime server version compatibility check at worker registration
Added automatic server version validation when workers start:
**Client (client.py):**
- New method: get_cluster_info() fetches server version from GET /api/cluster/info
- Returns server version, capabilities, and supported SDK versions
**Worker (worker.py):**
- _register() now checks server version before registering worker
- Validates server major version is 0 (prerelease) or 2+ (stable)
- SDK 0.1.x compatible with server 0.x and 2.x
- Raises clear error if incompatible: "Server version X is incompatible with sdk-python 0.1.x"
- Logs warning and continues if version check fails (non-fatal)
**README:**
- Added Compatibility section documenting server 0.x and 2.x support
- Notes automatic version checking at startup
Prevents cryptic protocol errors when SDK paired with incompatible server.
Workers now fail fast with actionable version mismatch messages.
Fixes #257
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 7008ab5 commit 18f1825
3 files changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
55 | 82 | | |
56 | 83 | | |
57 | 84 | | |
| |||
0 commit comments