rcrewai-rails 0.8.0 → 0.8.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 +4 -4
- data/CHANGELOG.md +34 -1
- data/README.md +5 -0
- data/app/jobs/rcrewai/rails/crew_execution_job.rb +25 -1
- data/lib/rcrewai/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89c254df462d78758a78ea3ac3e54c2aef26cc0126f3c0db941ae2c0ad23b607
|
|
4
|
+
data.tar.gz: '029aab1519fbb10ac847dc043cdaa1dcaed493cce784a3186ef439ad3b9206bd'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c69a4a28cf7927140a04724cf9e2e66e05cf777c12e7e259c5cb4d5e36b3e3ed68b31d2702cb337d2be009f1789408d1e7c91047f3e77252c7f77313943a18f0
|
|
7
|
+
data.tar.gz: 7cd18030c6621e9fbad921f4f3bd3d96680796a73238b907f7cc5bd877ae1e8e53d8eacdb6b9151de7c2000d3b27ea7e068b146ca6b300742d65275076f30907
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.8.1] - 2026-09-10
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Enabling checkpointing without running the 0.8 migration failed mid-run.**
|
|
14
|
+
`CrewExecutionJob` built the default `ActiveRecordCheckpointStore` without
|
|
15
|
+
checking that its table existed, so the run raised
|
|
16
|
+
`ActiveRecord::StatementInvalid: Could not find table 'rcrewai_checkpoints'`
|
|
17
|
+
partway through — after tasks had already executed and been paid for, and
|
|
18
|
+
with nothing in the message naming the cause. The job now fails up front with
|
|
19
|
+
`CheckpointTableMissing`, whose message names the migration command to run.
|
|
20
|
+
It is `discard_on`'d rather than retried, since retrying cannot fix a missing
|
|
21
|
+
table. Configuring a custom `checkpoint_store` skips the check, and nothing
|
|
22
|
+
changes when checkpointing is off (the default).
|
|
23
|
+
- **The test suite was order-dependent.** `real_migrate_spec` and
|
|
24
|
+
`upgrade_migrate_spec` called `ActiveRecord::Base.establish_connection` to get
|
|
25
|
+
a scratch database for migrating. The test database is sqlite3 `":memory:"`,
|
|
26
|
+
so that discarded the pool holding Combustion's schema, and reconnecting gave
|
|
27
|
+
an empty database — every later example lost its tables. The suite passed only
|
|
28
|
+
because those specs happened to run last: under `--order random` it failed
|
|
29
|
+
~128 of 258 examples. Migrations now run against an isolated connection via
|
|
30
|
+
`ActiveRecord::Tasks::DatabaseTasks.migration_class`, leaving the suite's own
|
|
31
|
+
connection untouched.
|
|
32
|
+
- **`rails_logger_tool_spec` leaked a fake `Rails.logger`** into every example
|
|
33
|
+
that ran after it. The fake accepts exactly one argument, so unrelated specs
|
|
34
|
+
logging through the real logger raised `ArgumentError: wrong number of
|
|
35
|
+
arguments`. It is now restored after each example.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
- Specs run in random order by default (`config.order = :random`), so an example
|
|
39
|
+
that leaks global state fails immediately instead of silently depending on
|
|
40
|
+
file order. Seeds are reproducible: `bundle exec rspec --seed 1234`.
|
|
41
|
+
|
|
10
42
|
## [0.8.0] - 2026-09-10
|
|
11
43
|
|
|
12
44
|
Tracks **rcrewai 0.8.0**, which is backward compatible for this engine — the
|
|
@@ -242,7 +274,8 @@ existing agents, tasks, and crews build unchanged.
|
|
|
242
274
|
### Changed
|
|
243
275
|
- Rename generators from `rcrew_a_i` to `rcrewai` namespacing.
|
|
244
276
|
|
|
245
|
-
[Unreleased]: https://github.com/gkosmo/rcrewai-rails/compare/v0.8.
|
|
277
|
+
[Unreleased]: https://github.com/gkosmo/rcrewai-rails/compare/v0.8.1...HEAD
|
|
278
|
+
[0.8.1]: https://github.com/gkosmo/rcrewai-rails/compare/v0.8.0...v0.8.1
|
|
246
279
|
[0.8.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.7.1...v0.8.0
|
|
247
280
|
[0.7.1]: https://github.com/gkosmo/rcrewai-rails/compare/v0.7.0...v0.7.1
|
|
248
281
|
[0.7.0]: https://github.com/gkosmo/rcrewai-rails/compare/v0.6.1...v0.7.0
|
data/README.md
CHANGED
|
@@ -313,6 +313,11 @@ RCrewAI::Checkpoint.lineage(store, resumed.run_id)
|
|
|
313
313
|
Any object responding to `save`/`load`/`list`/`delete` can replace the store via
|
|
314
314
|
`config.checkpoint_store`.
|
|
315
315
|
|
|
316
|
+
Checkpointing needs the `rcrewai_checkpoints` table, so run the migration when
|
|
317
|
+
you enable it (see [Upgrading an existing install](#upgrading-an-existing-install)).
|
|
318
|
+
If the table is missing, the job raises `CheckpointTableMissing` up front rather
|
|
319
|
+
than failing partway through a run.
|
|
320
|
+
|
|
316
321
|
### LLM interceptors
|
|
317
322
|
|
|
318
323
|
Hooks that run around every LLM request the engine's agents make — useful for
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
module RcrewAI
|
|
2
2
|
module Rails
|
|
3
3
|
class CrewExecutionJob < ActiveJob::Base
|
|
4
|
+
# Raised when checkpointing is enabled but its table is missing, which
|
|
5
|
+
# means the 0.8 migration has not been run.
|
|
6
|
+
class CheckpointTableMissing < StandardError; end
|
|
7
|
+
|
|
4
8
|
queue_as { RcrewAI::Rails.config.job_queue_name }
|
|
5
9
|
|
|
6
10
|
retry_on StandardError, wait: :exponentially_longer, attempts: 3
|
|
11
|
+
# A missing table is a configuration problem: retrying cannot fix it and
|
|
12
|
+
# only delays the error the operator needs to see.
|
|
13
|
+
discard_on CheckpointTableMissing
|
|
7
14
|
|
|
8
15
|
def perform(crew, inputs = {}, batch_id: nil, resume_run_id: nil)
|
|
9
16
|
execution = crew.executions.create!(
|
|
@@ -69,7 +76,24 @@ module RcrewAI
|
|
|
69
76
|
end
|
|
70
77
|
return nil unless enabled
|
|
71
78
|
|
|
72
|
-
RcrewAI::Rails.config.checkpoint_store
|
|
79
|
+
store = RcrewAI::Rails.config.checkpoint_store
|
|
80
|
+
return store if store
|
|
81
|
+
|
|
82
|
+
ensure_checkpoint_table!
|
|
83
|
+
ActiveRecordCheckpointStore.new
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Checkpointing was turned on but the 0.8 migration has not been run, so
|
|
87
|
+
# the default store has no table to write to. Failing here with the fix
|
|
88
|
+
# in the message beats an ActiveRecord::StatementInvalid raised partway
|
|
89
|
+
# through the run, once tasks have already been executed and paid for.
|
|
90
|
+
def ensure_checkpoint_table!
|
|
91
|
+
return if Checkpoint.table_exists?
|
|
92
|
+
|
|
93
|
+
raise CheckpointTableMissing,
|
|
94
|
+
"checkpointing is enabled but the #{Checkpoint.table_name} table does not exist. " \
|
|
95
|
+
"Run `rails rcrew_ai_rails:install:migrations && rails db:migrate` to add it, " \
|
|
96
|
+
"or set config.checkpoint_enabled = false."
|
|
73
97
|
end
|
|
74
98
|
|
|
75
99
|
# Translates rcrewai events into the span tree. Returns nil when
|