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

ruby-grape / grape / 30694720879 / 19
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: fix/adversarial-sweep-2026-08
DEFAULT BRANCH: master
Ran 01 Aug 2026 09:57AM UTC
Files 166
Run time 5s
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

01 Aug 2026 09:56AM UTC coverage: 95.556%. Remained the same
30694720879.19

Pull #2841

github

ericproulx
Give point-in-time copies their own stackable and rescue-handler stores

InheritableSetting#point_in_time_copy copied a scope's stackable store and
its rescue-handler maps shallowly, so the nested Arrays and Hashes stayed
shared with the source. A registration made after an endpoint was defined
therefore still reached that endpoint -- but only when the key already held a
registration at the time the copy was taken, since otherwise the writer
allocated a fresh store on the source alone.

That made the outcome depend on something the API never expressed:

    use Middleware1
    get('/x') { }
    use Middleware2      # applied to GET /x

    get('/x') { }
    use Middleware2      # did NOT apply to GET /x

and the same for rescue_from:

    rescue_from ArgumentError { }
    get('/x') { raise Boom }
    rescue_from Boom { }     # rescued GET /x

    get('/x') { raise Boom }
    rescue_from Boom { }     # did NOT rescue GET /x

Two APIs stating the same thing, behaving differently. Not a deliberate
"late registration" feature -- helpers defined after an endpoint already did
not leak, because they resolve down a different path.

Dup the nested stores as well as the Hash holding them. A copy is a point in
time: what the source registers afterwards must not reach it. Inheritance is
untouched -- it resolves by walking #parent, so a scope still sees values an
enclosing scope gains later, which is what the existing "decouples namespace
stackable values" spec actually exercised (its value lives on the parent, so
nothing was ever shared and it passed either way).

Boot cost is negligible: 300 endpoints under scopes carrying middleware,
helpers and filters allocate 1800 more objects (+0.4%) with no measurable
change in time, all at definition time.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2841: Give point-in-time copies their own stackable arrays

1168 of 1283 branches covered (91.04%)

Branch coverage included in aggregate %.

3756 of 3870 relevant lines covered (97.05%)

1118.26 hits per line

Source Files on job run-4.0-gemfiles/rack_2_2.gemfile - 30694720879.19
  • Tree
  • List 166
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 30694720879
  • 2599501f on github
  • Prev Job for on fix/stackable-copy-aliasing (#30542026971.25)
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