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

ruby-grape / grape / 26784519840 / 2
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: perf/lazy-response-cookies
DEFAULT BRANCH: master
Ran 01 Jun 2026 09:59PM UTC
Files 165
Run time 7s
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 Jun 2026 09:57PM UTC coverage: 95.651%. First build
26784519840.2

Pull #2757

github

ericproulx
Skip response-cookie flush when no cookie was touched

`Grape::Endpoint#build_response_cookies` runs on every request and
delegates through `cookies` -> `request.cookies`, materializing the
`Grape::Cookies` jar (and its `-> { rack_cookies }` Proc) even when the
handler never read or wrote a cookie. The jar's `response_cookies` then
immediately no-ops because nothing was set.

Add `Grape::Request#cookies?`, true only once the jar has been
materialized, and gate `build_response_cookies` on it. A Set-Cookie is
only ever emitted after a `cookies[...] =` write, which always
materializes the jar first, so behaviour is unchanged; the cookie-free
request path now allocates zero cookie objects (~10 fewer allocations
per request, counting the transitive Forwardable/internal churn).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #2757: Skip response-cookie flush when no cookie was touched

1093 of 1207 branches covered (90.56%)

Branch coverage included in aggregate %.

3504 of 3599 relevant lines covered (97.36%)

966.4 hits per line

Source Files on job run-3.3-Gemfile - 26784519840.2
  • Tree
  • List 165
  • Changed 13
  • Source Changed 0
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 26784519840
  • a60c9958 on github
  • Next Job for on perf/lazy-response-cookies (#26784573617.19)
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