Commit 303386c
worker: accept compatible-MINOR worker_protocol versions instead of strict-equal
Previously the SDK rejected any worker_protocol.version that did not
exactly match the SDK's own constant (1.1). When the server bumped to
worker_protocol 1.2 (additive — new optional fields, new non-terminal
command types per workflow:v2's WorkerProtocolVersion contract), every
sdk-python worker started failing registration with "Server compatibility
error: unsupported worker_protocol.version '1.2'; sdk-python requires '1.1'".
Replace the strict equality with a major-equal + server-minor>=sdk-minor
check. The SDK can talk to a newer server happily — it just won't exercise
the new optional shapes. Major bumps still hard-reject as before.
Add a positive test that a higher compatible MINOR is accepted, and rename
the existing major-mismatch test for clarity.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 4bf469c commit 303386c
2 files changed
Lines changed: 54 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
167 | 199 | | |
168 | 200 | | |
169 | 201 | | |
| |||
206 | 238 | | |
207 | 239 | | |
208 | 240 | | |
209 | | - | |
| 241 | + | |
210 | 242 | | |
211 | | - | |
212 | | - | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
213 | 246 | | |
214 | 247 | | |
215 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
| 335 | + | |
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
| 340 | + | |
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
344 | 359 | | |
345 | 360 | | |
346 | 361 | | |
| |||
349 | 364 | | |
350 | 365 | | |
351 | 366 | | |
352 | | - | |
| 367 | + | |
353 | 368 | | |
354 | 369 | | |
355 | 370 | | |
| |||
0 commit comments