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

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

Build:
Build:
LAST BUILD BRANCH: fix/adversarial-sweep-2026-08
DEFAULT BRANCH: master
Ran 26 Jul 2026 07:58PM UTC
Jobs 32
Files 168
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

26 Jul 2026 07:57PM UTC coverage: 96.936% (+0.02%) from 96.916%
30217960603

Pull #2828

github

ericproulx
Compare InheritableSetting without serializing both chains

`InheritableSetting#to_hash` had no direct caller in `lib/`: it existed only
to back `#==`, which `Endpoint#==` calls from the duplicate-route check in
`DSL::Routing#route`. `Endpoint#==` compares `config` first, so distinct paths
short-circuit before settings are touched — but a namespace's prefix lives in
the settings, not in `config.path`, so every endpoint declaring the same
*relative* path (`get '/'`, `get '/:id'` under N namespaces) fell through to
two full `#to_hash` serializations. That is O(n²) over an API's endpoints:
800 routes across 200 namespaces produced 159,200 `#to_hash` calls.

Endpoint settings are forked as siblings of the scope they came from
(`point_in_time_copy` calls `inherit_from(parent)`), so both sides of these
comparisons hang off the same parent object and inherit the same values.
Comparing own state then decides the question without serializing either
chain. `InheritableValues` gets the `#==` it never had, which is what forced
the round-trip in the first place.

Resolved-equality semantics are preserved: stacks concatenate and `#stack`
never records an empty one, so matching own stacks means matching resolved
ones, while the rescue handler maps merge — a scope can restate an inherited
mapping — so those stay compared resolved. Settings whose parents differ fall
back to `#to_hash`, and a lazily-allocated store compares alike whether it is
nil or an emptied Hash.

800 routes across 200 namespaces: 159,200 `#to_hash` calls and 0.63s of
definition time become 0 and 0.29s. Duplicate detection is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2828: Compare InheritableSetting without serializing both chains

1183 of 1274 branches covered (92.86%)

Branch coverage included in aggregate %.

3815 of 3882 relevant lines covered (98.27%)

24989.54 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rack_2_2.gemfile - 30217960603.1 26 Jul 2026 07:58PM UTC 167
95.51
GitHub Action Run
2 run-4.0-gemfiles/rails_8_0.gemfile - 30217960603.2 26 Jul 2026 07:58PM UTC 168
95.56
GitHub Action Run
3 run-4.0-gemfiles/hashie.gemfile - 30217960603.3 26 Jul 2026 07:59PM UTC 167
62.29
GitHub Action Run
4 run-4.0-gemfiles/rack_3_0.gemfile - 30217960603.4 26 Jul 2026 07:58PM UTC 167
95.55
GitHub Action Run
5 run-3.3-Gemfile - 30217960603.5 26 Jul 2026 07:59PM UTC 167
95.55
GitHub Action Run
6 run-3.4-gemfiles/rack_3_2.gemfile - 30217960603.6 26 Jul 2026 07:58PM UTC 167
95.55
GitHub Action Run
7 run-4.0-gemfiles/rails_8_1.gemfile - 30217960603.7 26 Jul 2026 07:58PM UTC 168
95.56
GitHub Action Run
8 run-3.3-gemfiles/rails_8_1.gemfile - 30217960603.8 26 Jul 2026 07:59PM UTC 168
95.56
GitHub Action Run
9 run-4.0-gemfiles/grape_swagger.gemfile - 30217960603.9 26 Jul 2026 07:58PM UTC 167
55.67
GitHub Action Run
10 run-3.3-gemfiles/rails_8_0.gemfile - 30217960603.10 26 Jul 2026 07:59PM UTC 168
95.56
GitHub Action Run
11 run-3.4-gemfiles/rack_2_2.gemfile - 30217960603.11 26 Jul 2026 07:58PM UTC 167
95.51
GitHub Action Run
12 run-4.0-gemfiles/dry_validation.gemfile - 30217960603.12 26 Jul 2026 07:59PM UTC 167
58.35
GitHub Action Run
13 run-3.4-gemfiles/rails_8_1.gemfile - 30217960603.13 26 Jul 2026 07:59PM UTC 168
95.56
GitHub Action Run
14 run-3.4-Gemfile - 30217960603.14 26 Jul 2026 07:59PM UTC 167
95.55
GitHub Action Run
15 run-4.0-gemfiles/rack_3_2.gemfile - 30217960603.15 26 Jul 2026 07:59PM UTC 167
95.55
GitHub Action Run
16 run-3.3-gemfiles/rack_3_2.gemfile - 30217960603.16 26 Jul 2026 07:58PM UTC 167
95.55
GitHub Action Run
17 run-4.0-gemfiles/multi_json_1_20.gemfile - 30217960603.17 26 Jul 2026 07:58PM UTC 167
48.1
GitHub Action Run
18 run-4.0-gemfiles/multi_xml.gemfile - 30217960603.18 26 Jul 2026 07:59PM UTC 167
47.46
GitHub Action Run
19 run-3.3-gemfiles/rack_3_0.gemfile - 30217960603.19 26 Jul 2026 07:58PM UTC 167
95.55
GitHub Action Run
20 run-3.4-gemfiles/rack_3_1.gemfile - 30217960603.20 26 Jul 2026 07:58PM UTC 167
95.55
GitHub Action Run
21 run-4.0-gemfiles/multi_xml_0_8.gemfile - 30217960603.21 26 Jul 2026 07:59PM UTC 167
47.5
GitHub Action Run
22 run-3.3-gemfiles/rails_7_2.gemfile - 30217960603.22 26 Jul 2026 07:59PM UTC 168
95.56
GitHub Action Run
23 run-4.0-gemfiles/rack_2_2.gemfile - 30217960603.23 26 Jul 2026 07:59PM UTC 167
95.51
GitHub Action Run
24 run-3.4-gemfiles/rails_8_0.gemfile - 30217960603.24 26 Jul 2026 07:58PM UTC 168
95.56
GitHub Action Run
25 run-3.4-gemfiles/rack_3_0.gemfile - 30217960603.25 26 Jul 2026 07:59PM UTC 167
95.55
GitHub Action Run
26 run-4.0-gemfiles/multi_json.gemfile - 30217960603.26 26 Jul 2026 07:59PM UTC 167
48.06
GitHub Action Run
27 run-3.3-gemfiles/rack_3_1.gemfile - 30217960603.27 26 Jul 2026 07:59PM UTC 167
95.55
GitHub Action Run
28 run-4.0-gemfiles/rails_7_2.gemfile - 30217960603.28 26 Jul 2026 07:59PM UTC 168
95.56
GitHub Action Run
29 run-3.4-gemfiles/rails_7_2.gemfile - 30217960603.29 26 Jul 2026 07:58PM UTC 168
95.56
GitHub Action Run
30 run-4.0-gemfiles/rack_3_1.gemfile - 30217960603.30 26 Jul 2026 07:58PM UTC 167
95.55
GitHub Action Run
31 run-4.0-gemfiles/grape_entity.gemfile - 30217960603.31 26 Jul 2026 07:59PM UTC 167
50.76
GitHub Action Run
32 run-4.0-Gemfile - 30217960603.32 26 Jul 2026 07:59PM UTC 167
95.55
GitHub Action Run
Source Files on build 30217960603
  • Tree
  • List 168
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30217960603
  • Pull Request #2828
  • PR Base - master (#30216088388)
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