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

ruby-grape / grape / 34523953235
99%
master: 99%

Build:
Build:
LAST BUILD BRANCH: perf/static-route-matching
DEFAULT BRANCH: master
Ran 10 Sep 2026 08:02PM UTC
Jobs 32
Files 169
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 Sep 2026 08:02PM UTC coverage: 99.186% (+0.002%) from 99.184%
34523953235

Pull #2927

github

ericproulx
Validate required Hash params scopes without the attributes iterator

Most validators of most endpoints sit on the root `params` scope or a
required Hash scope under it, and for them `Validators::Base` ran the
generic machinery: `should_validate?`, which resolves the scope's params
and walks the parent chain, then an `AttributesIterator` pass that
resolves the params again, checks for arrays and the empty-optional
sentinel and yields once per attribute, then a block that re-checks the
scope's requiredness and dependency. For a root-scope validator that
plumbing took about 570 of its 840 ns; a nested one paid more.

When a scope and every one of its ancestors is required and depends on
nothing, `should_validate?` is true for every request and has no side
effects; `ParamsScope#always_validated?` answers that. If the scope also
does not iterate elements and its params resolve to a Hash, the iterator
path reduces to: for each attribute, `validate_param!(attr, params)` if
it is required or present. `#validate` skips `should_validate?` for such
a scope, and `#validate!` resolves the params once and runs that loop.
Array scopes, `given`, optional scopes and their descendants, and params
that resolve to something other than a Hash keep the existing path.
`DefaultValidator` and the multiple-params validators, which override
`#validate!`, only skip `should_validate?`.

The flag is set in `#initialize`, since validators are frozen once
built. A scope's parent, optionality, dependency and type are fixed
before its block declares anything, so it is final by then.

An Array group handed a Hash reporting only its own type error, without
its members being validated against the Hash, had no spec; routing that
case through the new path passed the whole suite. It now has one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2927: Validate required Hash params scopes without the attributes iterator

1314 of 1358 branches covered (96.76%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 2 files covered. (100.0%)

4050 of 4050 relevant lines covered (100.0%)

26911.37 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_xml.gemfile - 34523953235.1 10 Sep 2026 08:02PM UTC 167
46.82
GitHub Action Run
2 run-4.0-gemfiles/grape_entity.gemfile - 34523953235.2 10 Sep 2026 08:03PM UTC 167
50.11
GitHub Action Run
3 run-4.0-gemfiles/rack_3_1.gemfile - 34523953235.3 10 Sep 2026 08:03PM UTC 168
97.87
GitHub Action Run
4 run-3.3-gemfiles/rails_8_0.gemfile - 34523953235.4 10 Sep 2026 08:02PM UTC 169
97.91
GitHub Action Run
5 run-3.3-gemfiles/rack_3_0.gemfile - 34523953235.5 10 Sep 2026 08:02PM UTC 168
97.91
GitHub Action Run
6 run-3.4-gemfiles/rails_8_0.gemfile - 34523953235.6 10 Sep 2026 08:03PM UTC 169
97.89
GitHub Action Run
7 run-3.4-gemfiles/rack_3_2.gemfile - 34523953235.7 10 Sep 2026 08:03PM UTC 168
97.87
GitHub Action Run
8 run-4.0-Gemfile - 34523953235.8 10 Sep 2026 08:03PM UTC 168
97.87
GitHub Action Run
9 run-4.0-gemfiles/dry_validation.gemfile - 34523953235.9 10 Sep 2026 08:02PM UTC 167
57.24
GitHub Action Run
10 run-4.0-gemfiles/rack_3_2.gemfile - 34523953235.10 10 Sep 2026 08:02PM UTC 168
97.85
GitHub Action Run
11 run-4.0-gemfiles/multi_json_1_20.gemfile - 34523953235.11 10 Sep 2026 08:03PM UTC 167
47.25
GitHub Action Run
12 run-4.0-gemfiles/hashie.gemfile - 34523953235.12 10 Sep 2026 08:03PM UTC 167
61.46
GitHub Action Run
13 run-3.3-Gemfile - 34523953235.13 10 Sep 2026 08:02PM UTC 168
97.89
GitHub Action Run
14 run-3.4-gemfiles/rack_3_0.gemfile - 34523953235.14 10 Sep 2026 08:02PM UTC 168
97.87
GitHub Action Run
15 run-3.3-gemfiles/rack_3_2.gemfile - 34523953235.15 10 Sep 2026 08:02PM UTC 168
97.89
GitHub Action Run
16 run-4.0-gemfiles/rails_8_1.gemfile - 34523953235.16 10 Sep 2026 08:03PM UTC 169
97.87
GitHub Action Run
17 run-3.4-gemfiles/rails_7_2.gemfile - 34523953235.17 10 Sep 2026 08:02PM UTC 169
97.89
GitHub Action Run
18 run-3.4-gemfiles/rails_8_1.gemfile - 34523953235.18 10 Sep 2026 08:02PM UTC 169
97.87
GitHub Action Run
19 run-4.0-gemfiles/rails_8_0.gemfile - 34523953235.19 10 Sep 2026 08:02PM UTC 169
97.87
GitHub Action Run
20 run-4.0-gemfiles/grape_swagger.gemfile - 34523953235.20 10 Sep 2026 08:03PM UTC 167
54.48
GitHub Action Run
21 run-4.0-gemfiles/rack_2_2.gemfile - 34523953235.21 10 Sep 2026 08:03PM UTC 168
97.83
GitHub Action Run
22 run-4.0-gemfiles/rails_7_2.gemfile - 34523953235.22 10 Sep 2026 08:02PM UTC 169
97.87
GitHub Action Run
23 run-4.0-gemfiles/multi_json.gemfile - 34523953235.23 10 Sep 2026 08:02PM UTC 167
47.21
GitHub Action Run
24 run-3.3-gemfiles/rack_3_1.gemfile - 34523953235.24 10 Sep 2026 08:03PM UTC 168
97.91
GitHub Action Run
25 run-3.3-gemfiles/rack_2_2.gemfile - 34523953235.25 10 Sep 2026 08:03PM UTC 168
97.87
GitHub Action Run
26 run-4.0-gemfiles/rack_3_0.gemfile - 34523953235.26 10 Sep 2026 08:02PM UTC 168
97.89
GitHub Action Run
27 run-3.4-gemfiles/rack_2_2.gemfile - 34523953235.27 10 Sep 2026 08:02PM UTC 168
97.85
GitHub Action Run
28 run-3.3-gemfiles/rails_8_1.gemfile - 34523953235.28 10 Sep 2026 08:02PM UTC 169
97.91
GitHub Action Run
29 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34523953235.29 10 Sep 2026 08:02PM UTC 167
46.86
GitHub Action Run
30 run-3.3-gemfiles/rails_7_2.gemfile - 34523953235.30 10 Sep 2026 08:02PM UTC 169
97.89
GitHub Action Run
31 run-3.4-gemfiles/rack_3_1.gemfile - 34523953235.31 10 Sep 2026 08:02PM UTC 168
97.89
GitHub Action Run
32 run-3.4-Gemfile - 34523953235.32 10 Sep 2026 08:02PM UTC 168
97.87
GitHub Action Run
Source Files on build 34523953235
  • Tree
  • List 169
  • Changed 6
  • Source Changed 2
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34523953235
  • Pull Request #2927
  • PR Base - master (#34515497970)
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