solid_objects 0.14.2 → 0.14.4

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: 68d50b21673b5b8339754b9a0003500ac57c253877f04b26d4677d2adc260c1d
4
- data.tar.gz: 16dda2e055602604f8b8158558fba9a41790a32ec5235ee04ae450ee02217c14
3
+ metadata.gz: 32207ee5017c24fa87258061048c532532bcf599d46357ce8da4deef8cb0c93e
4
+ data.tar.gz: d5594c50173f64f96303e91b0bc0b0659335d42b0d16b4df1e6f618ad98041fc
5
5
  SHA512:
6
- metadata.gz: 774ce46b5448030d6b51d449e7ab18f9c2e68d42a1ce47496b8bc5223bb5588ac7350d1f2c47894dac1ea3d3b9c19b2d8b87c7eb7832aba28c3e5a71dcb436fd
7
- data.tar.gz: 5ec7bcc03c1a9875962642b8fc80d912472c9f1a10e088685f276542959e86f6057670f20d9085e2e554f0a8a06763b7c75f1ad7937b7280ea532c862ec3f50d
6
+ metadata.gz: 6578fe32fed59a2c8fc6f4209244de1d33793561af20b258d96c8bd7c5cd78e7203fa08ebaea4a2c8315c89980bf4033852d00c3f4cadad3a6986c766dea7dad
7
+ data.tar.gz: ec2db7a0481f6075ef9e1565a47f972bc41f6d464b65a7700139b4209636e079a254454007857ce7988fb1d01b745277a71a737d8f3e49f340e768106b511c38
data/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.14.4 - 2026-08-30
4
+
5
+ - Reuse the encoding the after image already built. `State#to_h` copies the
6
+ state by encoding it and parsing the result, then threw the encoded string
7
+ away, and `complete` normalized and encoded the same hash a second time to
8
+ measure it. `to_h_with_byte_size` returns the copy with the size of the
9
+ encoding that produced it, so a committed turn now traverses the state twice
10
+ rather than three times and encodes it twice rather than three times.
11
+ Measured on SQLite against 0.14.3, committed throughput rises 5.3% at 13 KB
12
+ of state, 16.1% at 116 KB, and 12.0% at 1 MB. `docs/benchmarks.md` holds the
13
+ numbers. `solid-objects-js` already measured the string it commits; this
14
+ brings the gem to the same shape.
15
+ - Add `Serialization.deep_copy_with_byte_size`, which returns a deep copy
16
+ beside the size of its encoded form. `deep_copy` now calls it, so both
17
+ encode once.
18
+ - Enforce `max_state_bytes` against the size the after image reports rather
19
+ than by encoding the state again. The turn still fails with
20
+ `PayloadTooLarge` before it opens its commit transaction, which a test now
21
+ covers end to end.
22
+
23
+ ## 0.14.3 - 2026-08-29
24
+
25
+ - Cut one of the three full state copies a committed turn made. The executor
26
+ built the after image twice, once to answer whether the state changed and
27
+ once for the committed row, and a synchronous query built a third for the
28
+ mutation guard. One image now answers all three. Measured on SQLite,
29
+ committed throughput rises 4.8% at 13 KB of state, 3.1% at 116 KB, and 10.2%
30
+ at 1 MB. `benchmark/state_size.rb` is the scenario and `docs/benchmarks.md`
31
+ holds the numbers. The guard now compares the image taken after the
32
+ observables are read, so a query whose observable mutates state also fails
33
+ with `InvalidActor`.
34
+ - Stop building an encoded string that `Serialization.dump` discarded. The
35
+ method encoded every value to measure it, while most call sites pass no
36
+ `max_bytes`. It now encodes only when a limit applies. That encoding was also
37
+ the only check that a string held valid bytes, so `normalize` now checks the
38
+ encoding of every string and key it visits. A value it rejects raises
39
+ `InvalidPayload` at the call that staged it, as before, rather than a
40
+ `JSON::GeneratorError` from inside the commit transaction.
41
+ - Add `warn_state_bytes`, a soft threshold that defaults to 64 KB and must not
42
+ exceed `max_state_bytes`. A commit above it reports
43
+ `solid_objects.state.large` with the actor identity, the `byte_count`, and
44
+ the threshold. The event carries no application state, and it reports after
45
+ the commit. `max_state_bytes` keeps its 5 MB default, which measurement shows
46
+ is a limit rather than an operating point. The setting, the event, and its
47
+ payload match `warnStateBytes` in solid-objects-js, which defaults to 128 KB,
48
+ because the Node curve falls later than this one.
49
+ - Report a committed turn without letting a subscriber fail it. Every event
50
+ the executor emitted after its commit ran outside a rescue, so a subscriber
51
+ that raised turned a committed turn into a failed one: the runtime skipped
52
+ `message.completed`, tried to fail a message whose claim it had already
53
+ destroyed, and lost the worker pass. Those reports now go through
54
+ `instrument_after_commit`, which reports a raising subscriber as
55
+ `solid_objects.instrumentation.failed` and continues. This matches the
56
+ isolation `solid-objects-js` already applied to every event it emits.
57
+
58
+ - Align the use-case claims with solid-objects-js. "Is it worth installing
59
+ here?" listed long-lived workflows without a limit, while `docs/fit.md`
60
+ called a rate limiter an anti-pattern and the JS README sold per-key rate
61
+ limits. Both projects now say the same thing: a low-rate quota that a
62
+ reminder refills fits, because each check is one durable ordered message; a
63
+ limiter that every request touches does not; and a workflow fits when one
64
+ entity owns the mutable state and its mailbox holds the step order. A durable
65
+ execution engine that replays named steps from a step log remains a different
66
+ tool.
67
+ - Name Solid Objects Pro in `docs/fit.md` for the high-QPS cases the guide
68
+ rejects, and map its three capabilities onto them: grouped operations,
69
+ ephemeral operations, and reactive projections. The README already pointed
70
+ there; the fit guide stopped at "anti-pattern".
71
+ - Title the README "Solid Objects Ruby", matching "Solid Objects JS" in the
72
+ Node package, and give both the same two badges. The CI badge now pins
73
+ `?branch=main`, and a RubyGems version badge sits beside it. The gem name,
74
+ the module, and the published metadata do not change.
75
+
3
76
  ## 0.14.2 - 2026-08-25
4
77
 
5
78
  - Rewrite the first screen around the objection a reader actually has. The