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