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

ruby-grape / grape / 29092270000
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix/recompile-settings-mutation-race
DEFAULT BRANCH: master
Ran 10 Jul 2026 12:21PM UTC
Jobs 32
Files 167
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

10 Jul 2026 12:20PM UTC coverage: 96.665% (+0.004%) from 96.661%
29092270000

Pull #2790

github

ericproulx
Don't mutate router maps at request time

Grape::Router built @map and @optimized_map as auto-vivifying hashes
(Hash.new { |h, k| h[k] = ... }). compile! only fills keys for HTTP
methods that have routes, but at request time #match? and #rotation look
the maps up by the request's method, so any method with no routes inserted
a key into the shared hashes. The router is frozen only shallowly, so the
inner hashes stayed mutable.

That is a data race on runtimes without a GVL (JRuby, TruffleRuby), where
concurrent Hash#[]= corrupts the hash, and unbounded growth everywhere:
each distinct method string becomes a permanent key, so a client sending
arbitrary methods grows the maps without limit.

Use plain hashes, create the array explicitly on append, freeze both maps
after compile!, and read missing keys without inserting (#match? via safe
navigation, #rotation via &.each). Requests with an unrouted method still
resolve to 404/405 exactly as before.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull Request #2790: Don't mutate router maps at request time

1131 of 1226 branches covered (92.25%)

Branch coverage included in aggregate %.

7 of 7 new or added lines in 1 file covered. (100.0%)

3593 of 3661 relevant lines covered (98.14%)

23310.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rails_8_0.gemfile - 29092270000.1 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
2 run-4.0-gemfiles/rack_3_1.gemfile - 29092270000.2 10 Jul 2026 12:23PM UTC 166
95.21
GitHub Action Run
3 run-3.4-Gemfile - 29092270000.3 10 Jul 2026 12:21PM UTC 166
95.21
GitHub Action Run
4 run-3.3-gemfiles/rack_3_1.gemfile - 29092270000.4 10 Jul 2026 12:21PM UTC 166
95.2
GitHub Action Run
5 run-3.3-gemfiles/rails_7_2.gemfile - 29092270000.5 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
6 run-3.4-gemfiles/rails_7_2.gemfile - 29092270000.6 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
7 run-4.0-gemfiles/grape_entity.gemfile - 29092270000.7 10 Jul 2026 12:22PM UTC 166
50.38
GitHub Action Run
8 run-3.3-gemfiles/rails_8_0.gemfile - 29092270000.8 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
9 run-4.0-gemfiles/multi_xml_0_8.gemfile - 29092270000.9 10 Jul 2026 12:22PM UTC 166
47.1
GitHub Action Run
10 run-3.3-gemfiles/rack_2_2.gemfile - 29092270000.10 10 Jul 2026 12:23PM UTC 166
95.16
GitHub Action Run
11 run-3.4-gemfiles/rails_8_1.gemfile - 29092270000.11 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
12 run-4.0-gemfiles/grape_swagger.gemfile - 29092270000.12 10 Jul 2026 12:22PM UTC 166
55.26
GitHub Action Run
13 run-4.0-gemfiles/rails_7_2.gemfile - 29092270000.13 10 Jul 2026 12:23PM UTC 167
95.21
GitHub Action Run
14 run-3.3-gemfiles/rack_3_0.gemfile - 29092270000.14 10 Jul 2026 12:22PM UTC 166
95.2
GitHub Action Run
15 run-4.0-gemfiles/rack_3_2.gemfile - 29092270000.15 10 Jul 2026 12:22PM UTC 166
95.21
GitHub Action Run
16 run-3.4-gemfiles/rack_3_1.gemfile - 29092270000.16 10 Jul 2026 12:21PM UTC 166
95.21
GitHub Action Run
17 run-4.0-gemfiles/dry_validation.gemfile - 29092270000.17 10 Jul 2026 12:21PM UTC 166
58.25
GitHub Action Run
18 run-4.0-gemfiles/rack_3_0.gemfile - 29092270000.18 10 Jul 2026 12:23PM UTC 166
95.21
GitHub Action Run
19 run-3.4-gemfiles/rails_8_0.gemfile - 29092270000.19 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
20 run-4.0-gemfiles/rails_8_1.gemfile - 29092270000.20 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
21 run-4.0-gemfiles/hashie.gemfile - 29092270000.21 10 Jul 2026 12:22PM UTC 166
62.38
GitHub Action Run
22 run-4.0-gemfiles/multi_json_1_20.gemfile - 29092270000.22 10 Jul 2026 12:22PM UTC 166
47.63
GitHub Action Run
23 run-4.0-gemfiles/multi_xml.gemfile - 29092270000.23 10 Jul 2026 12:22PM UTC 166
47.06
GitHub Action Run
24 run-3.3-gemfiles/rack_3_2.gemfile - 29092270000.24 10 Jul 2026 12:21PM UTC 166
95.2
GitHub Action Run
25 run-3.3-Gemfile - 29092270000.25 10 Jul 2026 12:21PM UTC 166
95.2
GitHub Action Run
26 run-4.0-gemfiles/rack_2_2.gemfile - 29092270000.26 10 Jul 2026 12:21PM UTC 166
95.16
GitHub Action Run
27 run-3.3-gemfiles/rails_8_1.gemfile - 29092270000.27 10 Jul 2026 12:22PM UTC 167
95.21
GitHub Action Run
28 run-3.4-gemfiles/rack_2_2.gemfile - 29092270000.28 10 Jul 2026 12:22PM UTC 166
95.16
GitHub Action Run
29 run-4.0-Gemfile - 29092270000.29 10 Jul 2026 12:22PM UTC 166
95.21
GitHub Action Run
30 run-3.4-gemfiles/rack_3_2.gemfile - 29092270000.30 10 Jul 2026 12:22PM UTC 166
95.21
GitHub Action Run
31 run-4.0-gemfiles/multi_json.gemfile - 29092270000.31 10 Jul 2026 12:22PM UTC 166
47.59
GitHub Action Run
32 run-3.4-gemfiles/rack_3_0.gemfile - 29092270000.32 10 Jul 2026 12:21PM UTC 166
95.21
GitHub Action Run
Source Files on build 29092270000
  • Tree
  • List 167
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29092270000
  • Pull Request #2790
  • PR Base - master (#28782563800)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc