flo-python 0.1.4__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. {flo_python-0.1.4 → flo_python-0.1.5}/.github/flo-ref.env +1 -1
  2. flo_python-0.1.5/CHANGELOG.md +267 -0
  3. {flo_python-0.1.4 → flo_python-0.1.5}/PKG-INFO +262 -110
  4. {flo_python-0.1.4 → flo_python-0.1.5}/README.md +261 -109
  5. {flo_python-0.1.4 → flo_python-0.1.5}/examples/basic.py +5 -1
  6. {flo_python-0.1.4 → flo_python-0.1.5}/examples/stream_worker.py +3 -2
  7. {flo_python-0.1.4 → flo_python-0.1.5}/examples/worker.py +3 -3
  8. {flo_python-0.1.4 → flo_python-0.1.5}/pyproject.toml +1 -1
  9. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/__init__.py +63 -13
  10. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/actions.py +78 -95
  11. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/client.py +56 -36
  12. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/exceptions.py +59 -10
  13. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/kv.py +31 -24
  14. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/kv_body.py +520 -81
  15. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/kv_txn.py +34 -34
  16. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/processing.py +57 -6
  17. flo_python-0.1.5/src/flo/queue.py +337 -0
  18. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/retry.py +37 -6
  19. flo_python-0.1.5/src/flo/streams.py +563 -0
  20. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/types.py +520 -124
  21. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/wire.py +198 -439
  22. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/worker.py +596 -315
  23. {flo_python-0.1.4 → flo_python-0.1.5}/src/flo/workflows.py +11 -3
  24. flo_python-0.1.5/tests/test_action_ops.py +549 -0
  25. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_action_status.py +19 -3
  26. flo_python-0.1.5/tests/test_actions_live.py +183 -0
  27. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_auto_touch.py +42 -29
  28. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_blocking_deadline.py +28 -17
  29. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_empty_poll_backoff.py +10 -19
  30. flo_python-0.1.5/tests/test_group_ops.py +701 -0
  31. flo_python-0.1.5/tests/test_groups_live.py +306 -0
  32. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_halts.py +25 -18
  33. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_kv_ops.py +48 -53
  34. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_kv_table.py +21 -14
  35. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_kv_ttl.py +1 -1
  36. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_list_paging.py +57 -11
  37. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_not_found_answers.py +3 -4
  38. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_ops_drift.py +14 -1
  39. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_poll_loops.py +1 -1
  40. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_processing_decode.py +52 -9
  41. flo_python-0.1.5/tests/test_processing_live.py +46 -0
  42. flo_python-0.1.5/tests/test_queue_live.py +91 -0
  43. flo_python-0.1.5/tests/test_queue_ops.py +362 -0
  44. flo_python-0.1.5/tests/test_reconnect_cancel.py +45 -0
  45. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_result_resend.py +115 -29
  46. flo_python-0.1.5/tests/test_retry.py +565 -0
  47. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_status_codes.py +106 -9
  48. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_stream_tier.py +7 -4
  49. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_stream_worker_ack.py +23 -10
  50. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_wire.py +16 -99
  51. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_worker_drain.py +137 -61
  52. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_workflow_runs_live.py +3 -3
  53. flo_python-0.1.4/CHANGELOG.md +0 -74
  54. flo_python-0.1.4/src/flo/queue.py +0 -300
  55. flo_python-0.1.4/src/flo/streams.py +0 -567
  56. flo_python-0.1.4/tests/test_retry.py +0 -290
  57. {flo_python-0.1.4 → flo_python-0.1.5}/.github/workflows/ci.yml +0 -0
  58. {flo_python-0.1.4 → flo_python-0.1.5}/.github/workflows/release.yml +0 -0
  59. {flo_python-0.1.4 → flo_python-0.1.5}/.gitignore +0 -0
  60. {flo_python-0.1.4 → flo_python-0.1.5}/LICENSE +0 -0
  61. {flo_python-0.1.4 → flo_python-0.1.5}/examples/test_decorator.py +0 -0
  62. {flo_python-0.1.4 → flo_python-0.1.5}/tests/__init__.py +0 -0
  63. {flo_python-0.1.4 → flo_python-0.1.5}/tests/conftest.py +0 -0
  64. {flo_python-0.1.4 → flo_python-0.1.5}/tests/order-workflow.yaml +0 -0
  65. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_block_ms.py +0 -0
  66. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_kv_live.py +0 -0
  67. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_list_paging_live.py +0 -0
  68. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_missing_answers_live.py +0 -0
  69. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_op_codes.py +0 -0
  70. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_protocol_version.py +0 -0
  71. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_stream_delete.py +0 -0
  72. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_stream_delete_live.py +0 -0
  73. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_stream_trim.py +0 -0
  74. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_worker_info.py +0 -0
  75. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_worker_info_live.py +0 -0
  76. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_worker_list.py +0 -0
  77. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_worker_live.py +0 -0
  78. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_worker_liveness.py +0 -0
  79. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_workflow_list_runs.py +0 -0
  80. {flo_python-0.1.4 → flo_python-0.1.5}/tests/test_workflows.py +0 -0
@@ -1,4 +1,4 @@
1
1
  # The flo commit the live tests run against: CI checks floruntime/flo out at
2
2
  # this commit, builds it and starts it. Bump it in the same commit as
3
3
  # TABLE_HASH, so the SDK and the server agree.
4
- FLO_REF=3614d952e56553b3a32d86e644f85c8dbc48f825
4
+ FLO_REF=fd771c1dcae467644a0c4e506ee2211f9bc05fee
@@ -0,0 +1,267 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Flo Python SDK will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ The op table hash moves with the server in this release: this SDK talks only
11
+ to the flo it pins, and the pin lands with the release.
12
+ The server's op table hash is now `0xc1f93eb0ed86a281` (`TABLE_HASH`).
13
+
14
+ ### Added
15
+
16
+ - `Reason.QUEUE_FULL` (36) and `GROUP_HELD_FULL` (37), both under status
17
+ overloaded. `QueueFullError` (an `OverloadedError`) is retried like any
18
+ overloaded refusal that didn't run: a full queue drains as messages are
19
+ completed. `GroupHeldFullError` (an `OverloadedError`) is never retried: a
20
+ group read takes nothing new until the group (whose dead records count, and
21
+ stay until it is deleted or the stream trimmed) or its shard has room. The
22
+ stream worker logs it once and backs off, as for a limit;
23
+ `retry.is_group_held_full` tells it apart
24
+ - `StreamGroupNackOptions.abandon` (`OptionTag.ABANDON`, 0x34) hands records
25
+ back unstarted: ready at once, the delivery counted, no failure. It takes
26
+ no `dead`, `delay_ms` or `error`, and never dead-letters
27
+ - A refusal reason or `ran` this SDK doesn't know decodes as `UNKNOWN_<n>`,
28
+ keeping the number and the server's message, instead of raising
29
+ `IncompleteResponseError`
30
+ - Consumer groups lease each record. `stream.group_read` returns a
31
+ `GroupReadResult` (the delivery's `term`, `index`, `expires_at_ms` and
32
+ `consumer`) of `GroupRecord`s, each with its `deliveries`.
33
+ `stream.group_ack`, `group_nack` and the new `group_touch` take that result
34
+ and optionally which of its records, and return what applied and the
35
+ `refused` rest (`GroupRefusal`: record id and `QueueRefusalReason`); a
36
+ stale report applies nothing to its records and still succeeds.
37
+ `StreamGroupNackOptions` gains `delay_ms`, `dead` and `error`
38
+ - `stream.group_create` (with `StreamGroupCreateOptions`: `ack_timeout_ms`,
39
+ 5 s to 12 h, and `max_deliver`, 1..255), `group_delete` and `group_info`
40
+ (`StreamGroupInfo`: ready, leased, dead, holders, trimmed_pending)
41
+ - `StreamWorker` options `ack_timeout_ms` and `max_deliver` (the worker
42
+ creates the group with them at start) and `auto_touch` (touch a read's
43
+ unacked records every sixth of the lease from its arrival, those waiting
44
+ for a handler slot included; transient refusals are tried again).
45
+ `StreamContext.deliveries`
46
+ - `LimitError` for the new status `LIMIT` (15), with reasons
47
+ `MEMORY_BUDGET` (32), `TOO_MANY_ACTIONS` (33),
48
+ `TOO_MANY_WORKFLOW_DEFINITIONS` (34) and `TOO_MANY_WORKFLOW_RUNS` (35).
49
+ It is never retried. For a worker, start() fails with the limit error; a
50
+ limit hit while running is logged and backed off, once per reason
51
+ - `OptionTag.DEAD` (0x32)
52
+
53
+ - `queue.complete`, `queue.fail` and `queue.touch` (`QUEUE_COMPLETE`,
54
+ `QUEUE_FAIL`, `QUEUE_TOUCH`, 0x182-0x184) report on a dequeue's messages:
55
+ pass the `DequeueResult`, and optionally which of its messages. Each
56
+ returns what applied and the `refused` rest (`QueueRefusal`: seq,
57
+ `QueueRefusalReason`, the server's words); for a complete, `GONE` means
58
+ done, and `QueueReportResult.lost` lists the others
59
+ - `DequeueOptions.consumer`, `lease_ms` (5000 to 43200000; the server's 30 s
60
+ when None) and `ack` (complete as taken); `DequeueResult` carries the
61
+ delivery's `term`, `index`, `expires_at_ms` and `consumer`, and each
62
+ `Message` its `deliveries`
63
+ - `EnqueueOptions.delay_ms`: how long before the message is ready, 0 to
64
+ 86400000 (a day); outside that it raises `ValidationError` before sending
65
+ - `queue.purge(queue, PurgeOptions)`: remove every message of a queue,
66
+ ready, leased and dead
67
+ - `StorageTier.DISK` (2): a record read back from the durable log. A tier
68
+ this SDK doesn't know reads as a pseudo-member `UNKNOWN_<n>`, not an error
69
+ - The ops.json drift test checks the storage tiers too
70
+
71
+ - `action.info(name)` (`ACTION_INFO`, 0x30F): an action's definition, its
72
+ runs by status and its completed runs' latency, as an `ActionInfo`
73
+ - `ActionRunStatus.outcome`: the outcome a completed run's worker named,
74
+ None for success
75
+ - `ActionListResult.actions`: each action's version, owner, timeout (its
76
+ lease), attempts and creation time, as `ActionListEntry`; `names` stays
77
+ - `StaleReportError`, a `ConflictError`, for reason `STALE_REPORT`: a
78
+ report for a delivery the run has moved on from
79
+ - `stream.group_list` and `stream.group_members` (0x15D, 0x15E): a
80
+ stream's groups and the consumers holding a group's records
81
+ - `processing.remove` (`PROCESSING_REMOVE`, 0x365): remove a job that no
82
+ longer runs; a running one raises `ConflictError` with
83
+ `Reason.JOB_RUNNING` (31)
84
+ - `ProcessingStatusResult.runtime` (this node's records in and out,
85
+ watermark, tick times, uptime) and `.yaml`; `ProcessingListEntry`
86
+ carries `batch_size` and `records_processed`
87
+ - `WorkflowDefinitionEntry.enabled`
88
+ - `WorkerAwaitOptions.request_key`: an await sent again with the same key
89
+ gets the task the first one took. The action worker keeps its key until an
90
+ await is answered, so a lost answer doesn't strand a task until its lease
91
+ runs out
92
+ - `OpCode.TS_INFO` (0x1A7)
93
+
94
+ - `NoNamespaceError` for status `NO_NAMESPACE` (14), its own error rather
95
+ than a `NotFoundError` (a missing key)
96
+ - `WorkflowListRunsOptions.search`: only runs whose id, workflow, step,
97
+ input or tags hold it, ignoring case
98
+ - `WorkflowListRunsResult` carries a run list's page (`runs` of
99
+ `WorkflowRunEntry`: `run_id`, `workflow`, `status`, `created_at`) with
100
+ `cursor` and `has_more`
101
+ - `Reason.ADMIN_ONLY` (30): the op is served only on a node's admin socket
102
+ - `ActionListOptions.cursor` and `ActionListResult.has_more`: `action.list`
103
+ pages
104
+ - `stream.delete` (`STREAM_DELETE`, 0x140) deletes a stream's records and
105
+ metadata; a missing stream succeeds, and one that still has records raises
106
+ `ConflictError` unless `StreamDeleteOptions(force=True)`
107
+
108
+ ### Changed
109
+
110
+ - A group nack carries its error in the body, at most 1024 bytes (was an
111
+ option of at most 255); over 1024 raises `ValidationError` before sending
112
+ - An ack, nack or touch to a group that isn't there raises `NotFoundError`,
113
+ not a result with every record `GONE`
114
+ - The stream worker hands back the records of its last batch it hasn't
115
+ started with abandon, on stop and when its task is cancelled, and so a
116
+ record whose handler is cancelled while the worker stops: they spend no
117
+ attempt (a plain nack spent one). A handler that raises while the worker
118
+ isn't stopping still nacks
119
+ - `LimitError` and the README say the limits are fixed in the server's
120
+ build, not raised by a setting; `TOO_MANY_ACTIONS` counts per shard
121
+ - Queues are at-least-once: a dequeue leases its messages until they're
122
+ completed, failed or expired, and one not completed within its lease is
123
+ delivered again with `deliveries` one higher; five failures or expiries
124
+ make it dead. `QUEUE_DEQUEUE` is 0x181, a typed op
125
+ - An enqueue past a queue's caps, or its shard's, raises `OverloadedError`
126
+ (ran `NO`), after the client's usual retries of about 350 ms
127
+ - The stream worker retries an unavailable group read (ran `NO`: records
128
+ still being read back from disk, or a leader not ready) with a backoff and
129
+ without logging an error. It leased nothing, so the same read is safe to
130
+ resend
131
+ - `retry.is_refused_unrun` excludes a halted shard's refusal (reason
132
+ `SHARD_HALTED`): that one waits for an operator, not a retry
133
+ - A stream read's `start` is documented as exclusive (the records after it),
134
+ as the server reads it; the README's stream read examples use the real
135
+ options
136
+ - `stale` docs: a shard blocked reading its next entry from disk answers
137
+ reads from before that entry too, as a halted one does
138
+ - The README says that while the worker is stopping, a handler's
139
+ cancellation abandons its run
140
+
141
+ - `queue.dlq_list` sends its page (`DlqListOptions.limit`, 1..100, and
142
+ `after`, the seq that ended the last page) in the request value, and
143
+ returns a `DlqPage`: the dead letters, oldest first, with `total`,
144
+ `has_more` and `last_seq`. It sent nothing, and parsed the answer as a
145
+ dequeue's
146
+ - `processing.status` and `processing.list` decode the server's whole
147
+ answer; status refused every answer, which now carries the job's runtime
148
+ and definition after the reason
149
+ - `workflow.list_definitions` reads each entry's `enabled` byte; it misread
150
+ every entry after the first
151
+ - A handler that raises, `asyncio.CancelledError` included, or runs past
152
+ `action_timeout` fails the run with retry, so its attempts run out; only
153
+ `NonRetryableError` fails it at once (a timeout failed it at once). A task
154
+ is handed back untried (`abandoned=True`) only when the worker is stopping
155
+ or the task running the handler is cancelled from outside. `stop()`
156
+ cancels no handler: they finish and their results are sent
157
+ - `auto_touch` touches every sixth of the task's own lease (`lease_ms`), at
158
+ least 100 ms apart, counted from when the task arrived; it touched every
159
+ third of the registered timeout from the handler's start. A hold ends 12 h
160
+ after its delivery whatever the touches
161
+ - `ActionRegisterOptions.timeout_ms` defaults to 0, which takes the server's
162
+ 300 s lease (it sent 30 s)
163
+ - The action worker resends an await refused without an answer (unavailable
164
+ with `ran` unknown, say) with the same `request_key`; a new key follows
165
+ only an answered await
166
+ - The KV transaction docs give the server's defaults, 64 ops and 256 KiB,
167
+ both operator settings; a condition, `cas_version` or `incr` inside a
168
+ transaction is decided at commit
169
+
170
+ - `action.list` returns the page's action names (`ActionListResult.names`)
171
+ and the next page's cursor; it returned an empty list whatever the server
172
+ answered
173
+ - A `kv.scan` cursor holds the shard and the last key returned, so it may be
174
+ up to 4098 bytes (was 64); its length prefix is a u16 in the request and
175
+ the answer
176
+ - `NAMESPACE_ENSURE` (0x016) is a known op code; shards send it to each
177
+ other, and no client API sends it
178
+
179
+ ### Breaking
180
+
181
+ - `PeekedMessage.attempts` and `DeadLetter.attempts` are now `deliveries`, as
182
+ the server names them
183
+ - `OptionTag.ERROR_TEXT` (0x33) is gone: a nack's error is in its body
184
+ - `stream.group_join`, `group_leave` and `group_claim` are gone, with
185
+ `StreamGroupJoinOptions`, `StreamClaimResult` and the op codes for join,
186
+ leave, claim and configure_sweeper: the server refuses them. A group read
187
+ takes expired and nacked records before new ones. `group_ack` and
188
+ `group_nack` take the read's `GroupReadResult`, not record ids, and
189
+ `StreamGroupAckOptions`/`StreamGroupNackOptions` lose `consumer` (the read
190
+ names it). The stream worker no longer joins, leaves or drains its pending
191
+ records on reconnect: `redeliver_pending_on_reconnect` and
192
+ `claim_min_idle_ms` are gone; held records come back when their lease runs
193
+ out. `group_pending` takes `namespace` in place of options
194
+ - KV `routing_key` is gone from every option type (`GetOptions`,
195
+ `PutOptions`, `DeleteOptions`, `HistoryOptions`, `KVIncrOptions`,
196
+ `KVExpireOptions`, `KVExistsOptions`, `KVJsonOptions`, `KVMGetOptions`): a
197
+ key routes by its `{tag}`, or the whole key when it has none.
198
+ `kv.begin(key)` pins the transaction to the key's `{tag}`; a key that
199
+ routes elsewhere is refused with `Reason.KEYS_NOT_COLOCATED` (18, was
200
+ `WRONG_ROUTING_KEY`). `mget` gathers keys across shards on the server
201
+ - The largest KV value is 257,916 bytes and the largest JSON document
202
+ 256,918
203
+
204
+ - `queue.ack` and `queue.nack` are gone: use `queue.complete` and
205
+ `queue.fail`, which take the `DequeueResult`. `AckOptions` and
206
+ `NackOptions` are gone (`QueueReportOptions`, `QueueFailOptions`), and
207
+ `Message.delivery_count` is now `deliveries`. A consumer that doesn't
208
+ complete its messages sees them again
209
+ - `queue.dlq_requeue` and `DlqRequeueOptions` are gone: the server refuses
210
+ every requeue
211
+ - `QUEUE_DEQUEUE`, `QUEUE_COMPLETE` and `QUEUE_FAIL` moved to 0x181-0x183
212
+ (0x171, 0x172 and 0x174 are retired), and `OptionTag.DELAY_MS` (0x11) is
213
+ new
214
+
215
+ - The action ops are the server's typed ops: `ACTION_AWAIT`,
216
+ `ACTION_COMPLETE`, `ACTION_FAIL` and `ACTION_TOUCH` are 0x30A to 0x30D
217
+ (0x306 to 0x309 are retired). A `TaskAssignment` is one delivery of a run:
218
+ `run`, `namespace`, `deliveries`, `term`, `index`, `action`,
219
+ `created_at_ms`, `attempt`, `lease_ms`, `input`, `caller_run`,
220
+ `caller_workflow`, and a `task_id` of `run:deliveries:term:index:action`.
221
+ `worker.complete`, `fail` and `touch` take the task, not an action name and
222
+ task id, and route by its run in its namespace. `touch` takes no extend
223
+ length (the lease is the action's) and returns the new expiry.
224
+ `WorkerFailOptions` gains `abandoned` and `delay_ms`;
225
+ `WorkerCompleteOptions.outcome` defaults to `""`, which is success.
226
+ `WorkerTouchOptions` is gone
227
+ - `ActionContext` carries its `task`; `task_id`, `run_id`, `action_name`,
228
+ `payload`, `attempt`, `created_at` and `namespace` read from it, and
229
+ `ctx.touch()` takes no argument
230
+ - `ActionRegisterOptions.max_retries` is now `max_attempts`, as the server
231
+ names it; `timeout_ms` is the lease, 5000 to 43200000 ms (0 is the
232
+ server's 300000)
233
+ - `queue.peek` calls `QUEUE_PEEK` (0x180; 0x17C is retired, and answered
234
+ empty) with a `limit` of 1..100 (default 20), and returns a `PeekResult`
235
+ of `PeekedMessage` (seq, priority, deliveries, enqueued time, size and up to
236
+ 4 KiB of payload) with `more`
237
+
238
+ - Listing workers in a namespace never created raises `NoNamespaceError`, so
239
+ a list right after starting a worker there can raise it until the worker
240
+ has registered (the write that creates the namespace).
241
+ - `workflow.history` of a missing run, and a
242
+ `NOT_FOUND` answer to `stream.append`, `read`, `info`, `group_read` or
243
+ `group_pending`, raise
244
+ `NotFoundError`; the refusal's body was parsed as the answer
245
+ (`workflow.history` of a missing run returned it as the history)
246
+ - The cluster op codes are the server's: `CLUSTER_PROMOTE` (0x032),
247
+ `CLUSTER_REMOVE` (0x033) and `CLUSTER_REPAIR_SKIP` (0x034, admin socket
248
+ only) replace `CLUSTER_JOIN`, `CLUSTER_LEAVE`, `CLUSTER_TRANSFER_LEADER`,
249
+ `CLUSTER_ADD_NODE` and `CLUSTER_REMOVE_NODE`, which the server never
250
+ served. No client API sends them
251
+ - `NAMESPACE_CONFIG_SET` and `NAMESPACE_CONFIG_GET` (0x014, 0x015) are gone:
252
+ the server retired them
253
+ - `processing.list` returns a `ProcessingListResult` (`jobs`, `cursor`,
254
+ `has_more`) in place of a bare list, so a caller can page past the first
255
+ page with `ProcessingListOptions.cursor`; it dropped the server's cursor
256
+ - `workflow.list_definitions` returns a `WorkflowListDefinitionsResult`
257
+ (`definitions` of `WorkflowDefinitionEntry`, `cursor`, `has_more`) in place of
258
+ the raw answer bytes
259
+ - `workflow.list_runs` returns a `WorkflowListRunsResult` in place of the raw
260
+ answer bytes, newest first, and refuses a malformed answer.
261
+ `WorkflowListRunsOptions.status_filter` is now `status`. A page can come
262
+ back short with more after it: page until `has_more` is False
263
+ - `stream.info` of a stream that doesn't exist raises `NotFoundError`; the
264
+ server answered it with zeros
265
+ - A read, list or scan in a namespace that was never created raises
266
+ `NoNamespaceError`; the server answered it as a missing key or an empty
267
+ page. A write still creates the namespace