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

ruby-grape / grape / 30216011301

26 Jul 2026 07:01PM UTC coverage: 96.916% (+0.005%) from 96.911%
30216011301

Pull #2817

github

ericproulx
Add Layer-1 thread-safety invariant specs

Two deterministic tests that turn the validation layer's concurrency
invariants into permanent regression guards — no timing or thread
interleaving involved, so no flakiness:

- Frozen-graph canary: walks every object reachable from the compiled
  routes' validator lists (validators, iterators, scopes, coercers —
  including oneof variant validators reached through nesting) and
  asserts each contract-class instance is frozen. Catches classes that
  never adopted the FreezeOnNew contract, not just regressions in those
  that did. A census assertion proves the walk actually swept the whole
  taxonomy, and a self-test proves the walker reports unfrozen objects.

- Cache growth canary: snapshots every Grape::Util::Cache key set after
  definition + compile!, then fires first-ever requests (valid, invalid,
  wrong-shape, 404, OPTIONS, 405) and asserts no cache gained keys.
  Pins the "caches are written only at boot" property that makes their
  unsynchronized reads safe; would have caught the pre-#2817
  ArrayCoercer seeding DryTypes::ParamsCache on first request.

Test-only; no production changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pull Request #2817: Remove request-time mutable state from Array and custom-type coercers

1167 of 1258 branches covered (92.77%)

Branch coverage included in aggregate %.

3799 of 3866 relevant lines covered (98.27%)

25095.45 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.74
/lib/grape/validations/validators/base.rb


Build SHA Not Found

The commit SHA "18dc4a70c5f42b8b52700048430f46cf2cd82e6f" was not found in your repository, so the file cannot be loaded. This may be because you posted from a local development environment, or your CI created an ephemeral commit.

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