Skip to content

Commit 7e19e64

Browse files
authored
Merge pull request #83 from cardmagic/docs/agent-discoverability
docs: name Solid Objects a virtual actor library
2 parents 51692a6 + 9f11cdf commit 7e19e64

17 files changed

Lines changed: 1306 additions & 14 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ jobs:
1818
- run: bundle exec rake
1919
- run: bundle exec rake at_least_once
2020

21+
quickstart:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 15
24+
steps:
25+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
26+
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
27+
with:
28+
ruby-version: "3.3"
29+
bundler-cache: true
30+
- run: bundle exec rake quickstart
31+
2132
javascript:
2233
runs-on: ubuntu-latest
2334
timeout-minutes: 15
@@ -148,6 +159,7 @@ jobs:
148159
if: startsWith(github.ref, 'refs/tags/v')
149160
needs:
150161
- sqlite
162+
- quickstart
151163
- postgresql
152164
- mysql
153165
- static

‎AGENTS.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ git push origin v0.5.0
5353

5454
CI validates the tag and publishes through RubyGems trusted publishing.
5555

56+
Before you tag, read `docs/virtual-actors.md` and `docs/agents.md` against the
57+
release and correct any requirement, compatibility, or guarantee statement that
58+
changed. After the tag publishes, refresh the solidobjects.dev documentation
59+
snapshot from the tag and redeploy the site; its `check:release` step refuses a
60+
snapshot that is not the latest published tag. Then trigger a Context7 refresh
61+
for this repository.
62+
5663
## Security & Configuration
5764

5865
Preserve deny-by-default authorization. Never treat actor IDs, stream names, or signed tokens as authorization, and never commit secrets or unsafe deserialization paths.

‎CHANGELOG.md‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## 0.17.1 - 2026-10-08
4+
5+
- Name the category in the gem metadata and the README: Solid Objects is a
6+
SQL-backed virtual actor library for Ruby on Rails. The gem homepage now
7+
links to `https://solidobjects.dev/ruby` instead of the site root, which
8+
redirects to the Node page.
9+
- Add `docs/virtual-actors.md`, a category guide with the definition, a small
10+
example, fit and poor-fit criteria, comparisons, and an Orleans concept map.
11+
- Add `docs/agents.md`, a consumer guide for coding agents with setup,
12+
authorization, effect idempotency, verification, and troubleshooting steps.
13+
Both guides ship in the gem.
14+
- Add `context7.json` so that Context7 indexes the consumer documentation and
15+
skips maintainer files.
16+
- Add a Rails quickstart in `examples/quickstart/` and a `rake quickstart`
17+
check that runs it against the built gem. The check builds the gem, creates
18+
a new SQLite Rails application, installs the gem from `vendor/cache` with
19+
`bundle install --local`, and confirms by checksum and load path that the
20+
application loads the built gem. It runs the install generator, the
21+
migrations, and the doctor, and grants only the message and query policies.
22+
It sends eight concurrent holds from separate processes to the README's
23+
`TicketSale` actor and confirms that exactly one hold commits. It stops the
24+
runtime, waits until a reminder is past due, confirms that the reminder did
25+
not run, restarts the runtime, and confirms that the reminder released the
26+
hold once. The check also fails when a `TicketSale` sample in the README or
27+
in `docs/` differs from the actor that it runs. A new `quickstart` CI job runs
28+
the check, and the release job waits for it.
29+
- Correct the `json` 3.x note in `docs/operations.md`. The `json` gem 3.x works
30+
only with Active Support 8.1.4 or newer. Active Support 7.1, 7.2, and 8.0
31+
raise `unknown keyword: quirks_mode`, and Active Support 8.1.3.1 and earlier
32+
8.1 releases fail to decode. Upgrade Rails to 8.1.4 or newer, or pin `json`
33+
to 2.x. The compatibility CI matrix now pins `json` 2.x for Rails 7.1, 7.2,
34+
and 8.0, the configuration that the guide prescribes.
35+
336
## 0.17.0 - 2026-10-03
437

538
- Publish RBS types for portable events, metric samples, actor diagnostics, and

‎Gemfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ if rails_version
1010
%w[actioncable actionpack actionview activerecord activesupport railties].each do |library|
1111
gem library, constraint
1212
end
13+
gem "json", "~> 2" if Gem::Version.new(rails_version) < Gem::Version.new("8.1")
1314
end
1415

1516
group :development, :test do

‎Gemfile.lock‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
solid_objects (0.17.0)
4+
solid_objects (0.17.1)
55
actioncable (>= 7.1)
66
actionpack (>= 7.1)
77
actionview (>= 7.1)
@@ -384,7 +384,7 @@ CHECKSUMS
384384
rubocop-rails-omakase (1.1.0) sha256=2af73ac8ee5852de2919abbd2618af9c15c19b512c4cfc1f9a5d3b6ef009109d
385385
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
386386
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
387-
solid_objects (0.17.0)
387+
solid_objects (0.17.1)
388388
sqlite3 (2.9.5-aarch64-linux-gnu) sha256=78075b6337d3d182c6d2b4691049ed45cd220826160c9ea18946bf6a1de200dc
389389
sqlite3 (2.9.5-aarch64-linux-musl) sha256=18c801185deb4adc01ddb281e8f672a39e3d1729979ca91e39439cd3eac0402d
390390
sqlite3 (2.9.5-arm-linux-gnu) sha256=1bdfca0c7d63998c60b0f4a8e3c8df2d33800ccc4abd2d612eddbbbc92a4c48b

‎README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
**Open Source Durable Objects in your Rails app.**
77

8+
Solid Objects is a SQL-backed virtual actor library for Ruby on Rails, with
9+
durable state, ordered operations, and automatic activation. Each actor has a
10+
stable identity, and its state lives in the SQL database that your app already
11+
uses. [Virtual actors in Ruby on Rails](docs/virtual-actors.md) explains the
12+
model and when to use it.
13+
814
In a shopping cart, paying twice at the same time is a big problem. The payment provider might time out, and your Rails site could be restarting before recovery finishes.
915

1016
To deal with this safely, you often need logic scattered between 7-10 files like database row locks, Redis locks, delayed jobs, retries, and cleanup code to keep that process straight. They are not all large, but they must agree about the same payment state and failure rules. That coordination is the difficult part.
@@ -160,6 +166,8 @@ Exactly once is not hiding in a more advanced configuration. Read the
160166
## Read more
161167

162168
- [Five-minute Rails guide](https://solidobjects.dev/5min/rails)
169+
- [Virtual actors in Ruby on Rails](docs/virtual-actors.md)
170+
- [Guide for coding agents](docs/agents.md)
163171
- [Choosing Solid Objects](docs/fit.md)
164172
- [Operations and recovery](docs/operations.md)
165173
- [Observability and diagnostics](docs/observability.md)

‎Rakefile‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ task :at_least_once do
3737
sh "bundle exec ruby examples/at_least_once/demo.rb"
3838
end
3939

40+
desc "Install the built gem into a new Rails app and prove ordering and restart recovery"
41+
task :quickstart do
42+
sh "bundle exec ruby examples/quickstart/smoke.rb"
43+
end
44+
4045
desc "Scan the Rails engine for security warnings"
4146
task :security do
4247
sh "bundle exec brakeman --force --no-pager -q ."

‎context7.json‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://context7.com/schema/context7.json",
3+
"projectTitle": "Solid Objects for Rails (solid_objects)",
4+
"description": "SQL-backed virtual actor library for Ruby on Rails. Actors have stable identities, durable JSON state in SQLite, PostgreSQL, or MySQL, ordered per-identity mailboxes, fenced activation, durable reminders, and transactional effects. Requires Ruby 3.3+ and Rails 7.1+.",
5+
"folders": [
6+
"docs",
7+
"examples"
8+
],
9+
"excludeFolders": [
10+
"./docs/adr",
11+
"./docs/research"
12+
],
13+
"excludeFiles": [
14+
"AGENTS.md",
15+
"CLAUDE.md",
16+
"CONTRIBUTING.md",
17+
"implementation-plan.md"
18+
],
19+
"rules": [
20+
"Solid Objects requires Rails 7.1 or newer and Ruby 3.3 or newer. It is a Rails engine, not a framework-independent Ruby library.",
21+
"Install with bundle add solid_objects, bin/rails generate solid_objects:install, bin/rails db:migrate, and bin/rails solid_objects:doctor.",
22+
"The json gem 3.x works only with Active Support 8.1.4 or newer. On Rails 7.1, 7.2, 8.0, or 8.1 before 8.1.4, pin gem \"json\", \"~> 2\".",
23+
"The generated authorization policies deny every operation. Production policies must bind the actor type and ID to the authenticated user or tenant, and callers pass authorization_context:.",
24+
"Run bundle exec solid_objects start for reminders, async calls, effects, and broadcasts. Direct synchronous calls do not need it.",
25+
"Delivery is at least once. Effect handlers registered with SolidObjects.register_effect must use context.id as the idempotency key.",
26+
"Actor handlers must not write Active Record models directly. Use commit_action for a short same-database write and emit for external I/O.",
27+
"There are no transactions across actor identities. One hot identity is sequential."
28+
]
29+
}

0 commit comments

Comments
 (0)