basecradle 0.17.0 → 0.17.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0191ce23126da34557525a03c8c07cc0c6b0f680ac5e51c3c1b8e39a1e7ea069'
4
- data.tar.gz: d89747904daec8ecf15747eb5d97a957c14db3e5bbb459fd39b3d2868555a9a4
3
+ metadata.gz: ed712d18801dc382a1d6e7de8d46cb15b38d0a4f5919d088ff9f2f9a2b5ffd74
4
+ data.tar.gz: 48d2e6bb60b4bdd1bcecc25f8c408583099e33d695f6878496a7375619bedb71
5
5
  SHA512:
6
- metadata.gz: 2aab1b473c918bdb9a0be59cb806733d336a90d6a9ade234d036abf251c70d5604a1834117ad7b8cfb643ec4a892acd97983e6760c39b7ff50ec2e5804c35a50
7
- data.tar.gz: 21925cd267079f8fcc1812c29ca0e083b6b828ce895d47e307b9f9ebdda69fb9ce3171263caa5cb6822c6a990f56bc054a3c51836435ce93d8715ce0d966c50e
6
+ metadata.gz: b7de34f21883864800cdf9d7af5922e8d395abed103a59b540960ce3bffafbb7575cb48b7c704d65d0b308bfd0d21714037f86d0a77dac297a2cc42da45f8080
7
+ data.tar.gz: df8d41490def1a844806f0b605d5f05f48e0f7740ba872d67ace03381c359ba0ced89188cc2ba15d4ffaa307d084611a13cd9afcadaaebe6b00c12ca8c4ad4f5
data/CHANGELOG.md CHANGED
@@ -9,6 +9,29 @@ section**. The newest heading is always the version `lib/basecradle/version.rb`
9
9
  a release writes its entry and its version in the same PR — and `test/changelog_test.rb`
10
10
  fails CI if the two ever disagree.
11
11
 
12
+ ## [0.17.1] - 2026-11-21
13
+
14
+ A patch release that corrects what the SDK says about the user directory
15
+ ([#324](https://github.com/basecradle/basecradle-ruby/issues/324)). No code path changes:
16
+ no verb is added or removed, and no signature changes.
17
+
18
+ ### Fixed
19
+
20
+ - **The user directory reads A to Z by handle, and the SDK now says so.** 0.17.0 said
21
+ `bc.users` arrives newest first. That order was a short-lived regression in the API,
22
+ fixed on 2026-11-21: the directory is ordered by handle again, and a user created today
23
+ takes its place by name, not the top. It still pages to its end as you iterate, and
24
+ `bc.users.total_count` still counts it. You do not need `bc.users.sort_by(&:handle)`,
25
+ the workaround 0.17.0 suggested. The README, `UsersResource` and the pagination notes
26
+ say so, with what does not carry over from time-ordered lists: there is no high-water
27
+ mark to checkpoint against, and a user an admin renames while you iterate can be missed
28
+ or met twice.
29
+ - **A cursor is not always a record uuid.** In the directory it is a handle, and the SDK
30
+ passes it back exactly as received, never checking its shape (a test pages the
31
+ directory with a handle cursor). `InvalidCursorError` (`invalid_cursor`) is documented
32
+ as the API now defines it: a cursor no list could have returned, which is a malformed
33
+ uuid, or in the directory, something that is not a plain string.
34
+
12
35
  ## [0.17.0] - 2026-11-21
13
36
 
14
37
  A minor release that tracks two API changes of 2026-11-21: every list now reports its
@@ -34,6 +57,8 @@ if you relied on it.
34
57
  first (the most recently created user leads) instead of by handle. Iterating it still
35
58
  yields every user you can see; only the order is different. If you relied on
36
59
  alphabetical order, sort it yourself: `bc.users.sort_by(&:handle)`.
60
+ *Corrected in 0.17.1: the newest-first order was a regression in the API, since fixed.
61
+ The directory reads A to Z by handle.*
37
62
 
38
63
  ## [0.16.0] - 2026-11-20
39
64
 
@@ -1016,6 +1041,7 @@ the Python SDK's behavior in idiomatic Ruby. Zero runtime dependencies.
1016
1041
  - **Quality bars** — a README-as-tested-doc harness (every example runs against a mocked
1017
1042
  API) and a spec drift-guard (CI fails if the live API grows beyond the SDK).
1018
1043
 
1044
+ [0.17.1]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.17.1
1019
1045
  [0.17.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.17.0
1020
1046
  [0.16.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.16.0
1021
1047
  [0.15.0]: https://github.com/basecradle/basecradle-ruby/releases/tag/v0.15.0
data/README.md CHANGED
@@ -361,7 +361,7 @@ require "basecradle"
361
361
 
362
362
  bc = BaseCradle::Client.new
363
363
 
364
- bc.users.each do |user| # the directory — every peer you can see, newest first
364
+ bc.users.each do |user| # the directory — every peer you can see, A to Z by handle
365
365
  puts [user.handle, user.kind, user.trust.mutual].inspect
366
366
  end
367
367
  puts bc.users.total_count # how many peers you can see
@@ -382,7 +382,7 @@ timeline = bc.timelines.create(name: "Incident response")
382
382
  timeline.add_participant(nova)
383
383
  ```
384
384
 
385
- The directory is a list like every other: newest first (the most recently created user leads), paged through to its end as you iterate. It used to arrive in one response ordered by handle; iterating it still yields every user you can see, only the order has changed. If you relied on alphabetical order, sort it yourself: `bc.users.sort_by(&:handle)`.
385
+ The directory reads A to Z by handle: a user created today takes its place by name, not the top. It is the one list not ordered by time, and it pages like every other, through to its end as you iterate. A newcomer can land on any page, so to see who is new, read the directory again. A handle changes only when an admin renames a user, but a user renamed while you are iterating can be missed or met twice: if the number of distinct users you collected (by `uuid`) does not match `bc.users.total_count`, read it again.
386
386
 
387
387
  ## Contact messages & notes (admin-only)
388
388
 
@@ -134,7 +134,9 @@ module BaseCradle
134
134
  # The request was malformed (HTTP 400).
135
135
  class InvalidRequestError < Error; end
136
136
 
137
- # +invalid_cursor+ — the +before+ pagination cursor is not a valid record UUID.
137
+ # +invalid_cursor+ — the +before+ pagination cursor is not one a list could have returned:
138
+ # not a valid record UUID, or, in the user directory (whose cursor is a handle), not a
139
+ # plain string.
138
140
  class InvalidCursorError < InvalidRequestError; end
139
141
 
140
142
  # +invalid_filter+ — a list filter value is malformed.
@@ -3,10 +3,14 @@
3
3
  require_relative "serialization"
4
4
 
5
5
  module BaseCradle
6
- # The shared cursor-pagination engine. Every list endpoint paginates the same way:
7
- # newest first, up to 50 per page, +next_cursor+ in the response passed back as
8
- # +?before=+ for the next (older) page, a +null+ cursor meaning the end. Every page also
9
- # carries +total_count+: how many records the whole list holds under the filters passed.
6
+ # The shared cursor-pagination engine. Every list endpoint paginates the same way: up to
7
+ # 50 per page, +next_cursor+ in the response passed back as +?before=+ for the next page,
8
+ # a +null+ cursor meaning the end. Every list is newest first except the user directory,
9
+ # which reads A to Z by handle. Every page also carries +total_count+: how many records
10
+ # the whole list holds under the filters passed.
11
+ #
12
+ # The cursor is opaque: a record uuid in most lists, a handle in the directory. It is
13
+ # passed back exactly as received, and nothing here checks its shape.
10
14
  #
11
15
  # Lazy and +Enumerable+: the first page is fetched when iteration starts, and page N+1
12
16
  # only when iteration crosses the page boundary — so +first+/+take+/+find+ stop early
@@ -95,9 +95,10 @@ module BaseCradle
95
95
  end
96
96
  end
97
97
 
98
- # The directory of other users — you are never listed; hidden users are omitted. It is a
99
- # list like every other: newest first (the most recently created user leads),
100
- # auto-paginating to the end, with +total_count+ for how many users you can see.
98
+ # The directory of other users — you are never listed; hidden users are omitted. It reads
99
+ # A to Z by handle (a user created today takes its place by name, not the top), the one
100
+ # list not ordered by time. It auto-paginates to the end like every other, its cursor a
101
+ # handle rather than a uuid, with +total_count+ for how many users you can see.
101
102
  #
102
103
  # bc.users.each { |user| puts [user.handle, user.kind, user.trust.mutual].inspect }
103
104
  class UsersResource
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BaseCradle
4
- VERSION = "0.17.0"
4
+ VERSION = "0.17.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: basecradle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drawk Kwast