Thanks for helping improve rack-proxy. It is a small, security-sensitive library,
so the bar is safe defaults, no surprises, and no regressions of the security
behavior documented in CLAUDE.md.
bundle install
bundle exec rake test # full suite, fully OFFLINE, ~2-3s
COVERAGE=1 bundle exec rake test # same, plus a SimpleCov report in coverage/
bundle exec standardrb # style check (CI-blocking); --fix to autofix
bundle exec bundler-audit check --update # dependency advisory auditCoverage has a ratcheted floor (line 96.5 / branch 84.5, enforced by the CI lint job) — raise it as coverage improves; never lower it to make a change pass.
The default suite never touches the network. To additionally run the real-internet smoke tests:
LIVE=1 bundle exec rake testTo run against a specific Rack major (CI runs both):
BUNDLE_GEMFILE=gemfiles/rack_3.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rack_2.gemfile bundle exec rake test- Read
CLAUDE.mdfirst. It lists the security invariants (each mapped to its guarding test) and the traps. - Tests must be offline. Use
with_webrick_proxy(intest/rack_proxy_test.rb) orProxyTestServer(intest/support/proxy_test_server.rb). Do not add live-host tests; put anything that genuinely needs the internet behindENV["LIVE"]intest/live_smoke_test.rb. - Do not add
webmockorvcr— tests must exercise realNet::HTTPtraffic; request-stubbing layers would make the streaming tests meaningless. - Do not "simplify" the Fiber plumbing in
HttpStreamingResponse. Themax_retries = 0, theStreamAbortedunwind class, and the forceddecode_content = falseare load-bearing (see the trap list inCLAUDE.md). The oldnet_http_hacked.rbmonkey-patch was deleted in 1.0 — do not reintroduce it. - Keep the test framework as
test-unit. - New behavior needs a regression test; bug fixes should add a test that fails before the fix.
- Fork and branch from
master. - Make the change with tests; keep
bundle exec rake testgreen on Rack 2 and 3, andbundle exec standardrbclean. - Add a
CHANGELOG.mdentry under[Unreleased]. - Open the PR describing the streaming/non-streaming paths affected and the backend scheme, if relevant.
From 1.0.0 on, this project follows SemVer strictly: breaking changes (including dropping a Ruby/Rack version or changing a security default) ship only in majors; deprecations get at least one minor with a runtime warning where practical.
To cut a release:
- Bump
lib/rack/proxy/version.rb. - Run
bundle installand commit the updatedGemfile.lockin the same commit. The gem is a path dependency in the lockfile, so a version bump leaves the lock stale; CI runsbundle installin frozen/deployment mode (bundler-cache: true) and hard-fails on the mismatch otherwise — including in the tag-triggered release workflow. - Move the
[Unreleased]CHANGELOG section under the new version and add its compare link at the bottom of the file. - Merge, then tag
vX.Y.Zand push the tag..github/workflows/release.ymlverifies the tag equalsRack::Proxy::VERSION, runs the suite, and publishes to rubygems.org via Trusted Publishing (OIDC, no long-lived credentials).
Please do not open a public issue. See SECURITY.md.