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

ruby-grape / grape / 25909112239 / 34
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 15 May 2026 08:54AM UTC
Files 159
Run time 6s
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

15 May 2026 08:51AM UTC coverage: 62.407%. First build
25909112239.34

Pull #2720

github

ericproulx
Move declaration-coherence checks into ValidationsSpec

`check_incompatible_option_values` and `validate_value_coercion` were
private methods on `ParamsScope`, invoked from `#validates` right after
building the `ValidationsSpec`. Both are pure cross-field invariants
computed entirely from fields the spec already owns (`default`,
`values`, `except_values`, `coerce_type`).

`ValidationsSpec` already enforced one construction-time invariant (the
`:type` + `:types` mutual-exclusion `ArgumentError`), so concentrating
the rest there makes "you cannot construct an incoherent spec" true by
definition: the invariant no longer depends on a caller remembering to
run the checks after `.from(...)`. `ParamsScope#validates` shrinks to
build-spec → document → dispatch.

- Moved both methods into `ValidationsSpec` as private; a new private
  `validate!` runs them from `initialize`, before `freeze`.
- Removed both from `ParamsScope` and the two call sites in `#validates`.
- `check_coerce_with` deliberately stays in `ParamsScope#validate_coerce`:
  it is gated on the remountable-API skip (`return unless
  coerce_options[:type]`, because a base instance has no resolved type
  until the mounted instance replays) and is therefore not a pure
  construction-time invariant.

Spec fixture update: `params_documentation_spec` built a spec with
`default: 42, values: [1, 2, 3]` purely to exercise `document_params`;
that combination can no longer be constructed, so the fixture now uses a
coherent `default: 1`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2720: Move declaration-coherence checks into ValidationsSpec

371 of 1165 branches covered (31.85%)

Branch coverage included in aggregate %.

2569 of 3546 relevant lines covered (72.45%)

8.17 hits per line

Source Files on job run-4.0-gemfiles/hashie.gemfile - 25909112239.34
  • Tree
  • List 159
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 25909112239
  • 0a099e9c on github
  • Next Job for on refactor/validations-spec-self-validate (#25972918993.16)
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