solid_objects 0.17.1 → 0.17.2
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 +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +2 -1
- data/docs/agents.md +20 -0
- data/examples/quickstart/README.md +3 -0
- data/lib/solid_objects/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e79dde8294572943d3d728fb8a6a5e4e334a15ee8645ccd46c0ab2914c538da
|
|
4
|
+
data.tar.gz: 82550704291588ebbdd3ea2ba0579f02807ecfa2835ce2c25202fcfdf9443cca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22f3ad5fe3c144a424cf74936780ab2196536b1d0c46ae71c47a14aef92f6815d842f43f791f398640f63651c0be5b473f715d3a008c00992a7995d78c7cfc5a
|
|
7
|
+
data.tar.gz: e678f2c1d603407b7f6d113d7a1c440f25e4481c300a2c040873883172979621823517cf341ec3128484a2ef7d683c485d69e6dcc550dffde62826aeb6a1d6cd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.2 - 2026-10-08
|
|
4
|
+
|
|
5
|
+
- The README names the agent guide at the start of Installation, and the agent
|
|
6
|
+
guide says that a reminder changes state only when it runs under
|
|
7
|
+
`solid_objects start`, so a query must not compute expiry from the clock.
|
|
8
|
+
- `docs/agents.md` now tells agents to install the current release instead of
|
|
9
|
+
a remembered version, says that step 5 is required before the first call,
|
|
10
|
+
shows the two arguments of `reject`, and lists four API mistakes from
|
|
11
|
+
agent-written code with the correct form. The gem description now states
|
|
12
|
+
the Ruby 3.3 and Rails 7.1 requirement, because agents in the discovery
|
|
13
|
+
evaluation claimed Rails 8.0.
|
|
14
|
+
- Claim the Context7 library: `context7.json` now carries the library `url` and
|
|
15
|
+
the maintainer `public_key`.
|
|
16
|
+
- Add the Context7 refresh workflow. A push to `main` that changes the README,
|
|
17
|
+
`context7.json`, `docs/`, or `examples/` asks Context7 to refresh the index.
|
|
18
|
+
It uses the `CONTEXT7_API_KEY` repository secret.
|
|
19
|
+
|
|
3
20
|
## 0.17.1 - 2026-10-08
|
|
4
21
|
|
|
5
22
|
- Name the category in the gem metadata and the README: Solid Objects is a
|
data/README.md
CHANGED
|
@@ -44,7 +44,8 @@ And so much more.
|
|
|
44
44
|
|
|
45
45
|
## Installation
|
|
46
46
|
|
|
47
|
-
Solid Objects requires Ruby 3.3 or newer and Rails 7.1 or newer.
|
|
47
|
+
Solid Objects requires Ruby 3.3 or newer and Rails 7.1 or newer. Coding agents
|
|
48
|
+
should follow the [agent guide](docs/agents.md), which gives each step in order.
|
|
48
49
|
|
|
49
50
|
```bash
|
|
50
51
|
bundle add solid_objects
|
data/docs/agents.md
CHANGED
|
@@ -64,6 +64,12 @@ bin/rails solid_objects:doctor
|
|
|
64
64
|
The generator adds an initializer and copies migrations into the application.
|
|
65
65
|
The doctor checks the configuration, the tables, and one real actor round trip.
|
|
66
66
|
|
|
67
|
+
Install the current release. `bundle add solid_objects` selects it. Do not pin
|
|
68
|
+
a version that you remember from earlier work; the API changed between
|
|
69
|
+
releases. The current version is on <https://rubygems.org/gems/solid_objects>.
|
|
70
|
+
|
|
71
|
+
The generated policies deny every call. Do step 5 before you call an actor.
|
|
72
|
+
|
|
67
73
|
The `json` gem 3.x works only with Active Support 8.1.4 or newer. On Rails
|
|
68
74
|
7.1, 7.2, 8.0, or 8.1 before 8.1.4, pin `gem "json", "~> 2"` in the
|
|
69
75
|
`Gemfile`. Without the pin, Active Support raises an `ArgumentError`, such as
|
|
@@ -153,11 +159,25 @@ Obey these rules in actor code:
|
|
|
153
159
|
- Use `schedule(at:, key:)` for delayed work. A reminder is one named alarm
|
|
154
160
|
for each actor and key. A new `schedule` with the same key moves the alarm.
|
|
155
161
|
- Use `reject(code, message)` for a business rule failure that must not retry.
|
|
162
|
+
It takes a code and a message, for example
|
|
163
|
+
`reject(:room_full, "The room is full")`.
|
|
156
164
|
- Do not write Active Record models directly in a handler. The runtime raises
|
|
157
165
|
`SolidObjects::ApplicationWriteForbidden`. Use `commit_action` for a short
|
|
158
166
|
write in the same database.
|
|
159
167
|
- Do not call an external API in a handler. Use `emit` and an effect handler.
|
|
160
168
|
- Write each handler so that it can run again. Delivery is at least once.
|
|
169
|
+
- A reminder changes state only when it runs, and it runs only while
|
|
170
|
+
`solid_objects start` runs. Do not compute expiry from the clock in a query;
|
|
171
|
+
read the state that the reminder committed.
|
|
172
|
+
|
|
173
|
+
Avoid these mistakes:
|
|
174
|
+
|
|
175
|
+
| Mistake | Correct form |
|
|
176
|
+
| --- | --- |
|
|
177
|
+
| `schedule(at: deadline)` with no operation after it | `schedule(at: deadline, key: buyer).expire(buyer:)`. `schedule` stages a reminder only when you call an operation on its result |
|
|
178
|
+
| `reject "room full"` | `reject(:room_full, "The room is full")` |
|
|
179
|
+
| `id` inside an actor | `actor_id`. An actor has no `id` method |
|
|
180
|
+
| `register_effect(:name) { \|context, arguments\| ... }` | `register_effect(:name) { \|arguments, context\| ... }`. The arguments come first |
|
|
161
181
|
|
|
162
182
|
[Reminders](reminders.md) and the [architecture guide](architecture.md) give
|
|
163
183
|
the full actor API.
|
|
@@ -46,6 +46,9 @@ bin/rails db:migrate
|
|
|
46
46
|
bin/rails solid_objects:doctor
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
`bundle add solid_objects` installs the current release. Do not pin an older
|
|
50
|
+
version from memory; the API changed between releases.
|
|
51
|
+
|
|
49
52
|
The generator writes `config/initializers/solid_objects.rb` and copies the
|
|
50
53
|
migrations. The migrations add the Solid Objects tables to the application's
|
|
51
54
|
existing database.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: solid_objects
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.17.
|
|
4
|
+
version: 0.17.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Lucas Carlson
|
|
@@ -280,7 +280,8 @@ description: 'Solid Objects is a SQL-backed virtual actor library for Ruby on Ra
|
|
|
280
280
|
with durable state, ordered operations, and automatic activation. It brings the
|
|
281
281
|
Cloudflare Durable Objects programming model to Rails: addressable objects with
|
|
282
282
|
ordered mailboxes, fenced activation, per-object reminders, transactional effects,
|
|
283
|
-
and reactive ERB. It runs on MySQL, PostgreSQL, and SQLite without Redis
|
|
283
|
+
and reactive ERB. It runs on MySQL, PostgreSQL, and SQLite without Redis, and requires
|
|
284
|
+
Ruby 3.3 or newer and Rails 7.1 or newer.'
|
|
284
285
|
email:
|
|
285
286
|
executables:
|
|
286
287
|
- solid_objects
|