• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ruby-grape / grape / 35590159799
98%
master: 99%

Build:
Build:
LAST BUILD BRANCH: translator-seam
DEFAULT BRANCH: master
Ran 21 Sep 2026 10:42AM UTC
Jobs 32
Files 171
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Sep 2026 10:42AM UTC coverage: 98.107% (-0.9%) from 99.027%
35590159799

Pull #2978

github

ericproulx
Add Ractor mode

A Grape API is defined and compiled in the main Ractor -- a non-main one
cannot write a class instance variable at all, and that is where the DSL
keeps everything -- so the only shape this can take is: define, compile,
freeze, then serve from as many Ractors as the application wants.

Grape.ractor! turns the mode on, before the API classes load, because it
decides how a route block becomes a method: Ruby refuses to call a method
defined from an unshareable Proc from another Ractor, so in this mode the
blocks are isolated as they are read, and one that captures something
unshareable says so as its class loads. It needs Ruby 4.0 or later, and
says so rather than leaving an API half-frozen: 3.3 and 3.4 cannot make a
Method shareable, and an API is full of them -- every endpoint holds its
route block as one, and dry-types builds its coercers out of them.

MyAPI.finalize! then compiles the API, makes the whole graph behind it
shareable, and settles the process-wide state a request reads: Grape's
own configuration (read once per setting first, or dry-configurable's
memoization would write to a frozen Hash), the tables and options Rack,
ActiveSupport, Builder and the json gem fill as they load, and a snapshot
of the grape translations, since I18n keeps its configuration in class
variables that a non-main Ractor may not read at all. Instrumentation is
skipped in this mode for the same reason.

What it gives up is in the README: instrumentation, per-request locale,
file uploads (Ruby's own Tempfile is a Delegator, whose methods cannot be
called from a non-main Ractor) and reloading.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2978: Add Ractor mode

1479 of 1561 branches covered (94.75%)

Branch coverage included in aggregate %.

45 of 76 new or added lines in 9 files covered. (59.21%)

4378 of 4409 relevant lines covered (99.3%)

28386.52 hits per line

Uncovered Changes

Lines Coverage ∆ File
21
38.3
lib/grape/util/shareable.rb
6
65.96
-30.47% lib/grape/util/translation.rb
3
95.87
-3.26% lib/grape/api/instance.rb
1
95.59
-2.75% lib/grape.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.4-gemfiles/rails_8_0.gemfile - 35590159799.1 21 Sep 2026 10:42AM UTC 171
96.88
GitHub Action Run
2 run-4.0-gemfiles/rack_2_2.gemfile - 35590159799.2 21 Sep 2026 10:42AM UTC 170
96.85
GitHub Action Run
3 run-4.0-gemfiles/grape_entity.gemfile - 35590159799.3 21 Sep 2026 10:43AM UTC 169
48.3
GitHub Action Run
4 run-4.0-gemfiles/dry_validation.gemfile - 35590159799.4 21 Sep 2026 10:42AM UTC 169
55.37
GitHub Action Run
5 run-3.3-gemfiles/rack_3_2.gemfile - 35590159799.5 21 Sep 2026 10:42AM UTC 170
96.9
GitHub Action Run
6 run-4.0-gemfiles/multi_xml.gemfile - 35590159799.6 21 Sep 2026 10:43AM UTC 169
45.28
GitHub Action Run
7 run-3.3-gemfiles/rails_8_1.gemfile - 35590159799.7 21 Sep 2026 10:43AM UTC 171
96.92
GitHub Action Run
8 run-4.0-gemfiles/multi_xml_0_8.gemfile - 35590159799.8 21 Sep 2026 10:43AM UTC 169
45.32
GitHub Action Run
9 run-4.0-gemfiles/hashie.gemfile - 35590159799.9 21 Sep 2026 10:42AM UTC 169
59.35
GitHub Action Run
10 run-3.4-gemfiles/rack_3_0.gemfile - 35590159799.10 21 Sep 2026 10:42AM UTC 170
96.9
GitHub Action Run
11 run-3.3-Gemfile - 35590159799.11 21 Sep 2026 10:42AM UTC 170
96.9
GitHub Action Run
12 run-4.0-gemfiles/rack_3_2.gemfile - 35590159799.12 21 Sep 2026 10:42AM UTC 170
96.9
GitHub Action Run
13 run-4.0-gemfiles/rack_3_0.gemfile - 35590159799.13 21 Sep 2026 10:43AM UTC 170
96.9
GitHub Action Run
14 run-3.4-gemfiles/rack_3_2.gemfile - 35590159799.14 21 Sep 2026 10:42AM UTC 170
96.88
GitHub Action Run
15 run-4.0-gemfiles/multi_json.gemfile - 35590159799.15 21 Sep 2026 10:42AM UTC 169
45.55
GitHub Action Run
16 run-4.0-gemfiles/rails_7_2.gemfile - 35590159799.16 21 Sep 2026 10:42AM UTC 171
96.9
GitHub Action Run
17 run-3.3-gemfiles/rails_8_0.gemfile - 35590159799.17 21 Sep 2026 10:43AM UTC 171
96.92
GitHub Action Run
18 run-4.0-gemfiles/grape_swagger.gemfile - 35590159799.18 21 Sep 2026 10:42AM UTC 169
52.78
GitHub Action Run
19 run-3.4-gemfiles/rails_8_1.gemfile - 35590159799.19 21 Sep 2026 10:42AM UTC 171
96.88
GitHub Action Run
20 run-4.0-gemfiles/multi_json_1_20.gemfile - 35590159799.20 21 Sep 2026 10:43AM UTC 169
45.59
GitHub Action Run
21 run-4.0-gemfiles/rails_8_1.gemfile - 35590159799.21 21 Sep 2026 10:42AM UTC 171
96.88
GitHub Action Run
22 run-3.3-gemfiles/rails_7_2.gemfile - 35590159799.22 21 Sep 2026 10:42AM UTC 171
96.9
GitHub Action Run
23 run-4.0-gemfiles/rack_3_1.gemfile - 35590159799.23 21 Sep 2026 10:43AM UTC 170
96.88
GitHub Action Run
24 run-3.4-gemfiles/rack_3_1.gemfile - 35590159799.24 21 Sep 2026 10:42AM UTC 170
96.88
GitHub Action Run
25 run-4.0-gemfiles/rails_8_0.gemfile - 35590159799.25 21 Sep 2026 10:42AM UTC 171
96.9
GitHub Action Run
26 run-3.4-Gemfile - 35590159799.26 21 Sep 2026 10:43AM UTC 170
96.9
GitHub Action Run
27 run-3.3-gemfiles/rack_2_2.gemfile - 35590159799.27 21 Sep 2026 10:42AM UTC 170
96.86
GitHub Action Run
28 run-4.0-Gemfile - 35590159799.28 21 Sep 2026 10:42AM UTC 170
96.88
GitHub Action Run
29 run-3.4-gemfiles/rails_7_2.gemfile - 35590159799.29 21 Sep 2026 10:43AM UTC 171
96.88
GitHub Action Run
30 run-3.3-gemfiles/rack_3_0.gemfile - 35590159799.30 21 Sep 2026 10:43AM UTC 170
96.9
GitHub Action Run
31 run-3.3-gemfiles/rack_3_1.gemfile - 35590159799.31 21 Sep 2026 10:42AM UTC 170
96.9
GitHub Action Run
32 run-3.4-gemfiles/rack_2_2.gemfile - 35590159799.32 21 Sep 2026 10:42AM UTC 170
96.86
GitHub Action Run
Source Files on build 35590159799
  • Tree
  • List 171
  • Changed 7
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35590159799
  • Pull Request #2978
  • PR Base - master (#35537785984)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc