Repository navigation
Conversation
| ensure | ||
| reader&.close | ||
| writer&.close | ||
| end |
There was a problem hiding this comment.
Forked specs reuse parent DB connections
Medium Severity
Isolated examples are forked after the suite has already opened ActiveRecord’s SQLite connection, and the child never reconnects. SQLite (and the copied pool) is not safe to use across fork, so app-booting specs that query in the child can see locks, SQLITE_MISUSE, or stale pool stats.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 9f206f8. Configure here.
9f206f8 to
87d0926
Compare
68f76c2 to
4cd6fb1
Compare
4cd6fb1 to
480913e
Compare
480913e to
ff246d5
Compare
There was a problem hiding this comment.
once again, this is some claude generated verbiage that is almost impossible for me to follow. Why is it full of sends and klass stuff, does it really need to be this complicated for isolating rails. Please steer your agent to write readable code.
9375322 to
be29824
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit be29824. Configure here.
| $stdout.flush | ||
| $stderr.flush | ||
| exit!(0) | ||
| end |
There was a problem hiding this comment.
Child exceptions skip exit!
Medium Severity
The forked child only calls exit! after a successful write. If in_child, the example run, coverage capture, or Marshal.dump raises, the child dies via a normal exception instead. That runs inherited at_exit hooks, including SimpleCov, which can overwrite the parent's resultset and dump a coverage report into the spec output. exit! is used specifically to avoid that, but it is not in an ensure.
Reviewed by Cursor Bugbot for commit be29824. Configure here.


Every sentry-rails spec boots a fresh Rails app in the same process. Boot-time global state (load hooks, ActiveJob callbacks, singletons) piles up, which makes specs flaky and slower over the run.
Instead of resetting Rails internals, specs that boot an app now run in a forked child, so that state dies with the child:
isolate: trueruns each example in its own fork.isolate: :groupruns each top-level group in one fork. The ActiveJob specs use it because they boot once inbefore(:all).forkisn't available (JRuby), tagged specs run in-process, as today.On top of #3245 and #3247, the full run finishes in 8.6 min instead of about 12–15 min. The Rails 8.x cells drop from 417–599s to about 209s.