Goal
Land PR #4551 ([Pro] Fix RSC payload prerender cache storing an empty payload) — the server half of shakacode/react_on_rails_rsc#187 (infinite RSC payload retry loop) — and cherry-pick it to release/17.0.0.
Locked decisions
- Implementation is approved as-is (CodeRabbit approved, CI green). No implementation changes — only the three open review threads, all test-level:
- Ihab: the request spec (
react_on_rails_pro/spec/dummy/spec/requests/rsc_payload_spec.rb) never reaches the cached response — the dummy generates a fresh CSP nonce per request, which changes the prerender cache key, so both calls render through Node. Make the second request actually hit the cache (pin/stub the nonce or use a cache key the test controls), and assert the cached path.
- Ihab: pin the
chunk.dup behavior directly in a helper spec (react_on_rails_pro_helper.rb) so the endpoint test still fails if the code regresses to chunk.delete("html").
- Greptile P2: cover the second cache hit in the destructive-consumer replay test (
stream_cache_spec.rb).
- Merge to
main via merge queue, then cherry-pick to release/17.0.0 (confirmed RC-line stabilizer: wrong-output bug — an empty payload gets cached and served).
Scope / collision set
Ruby only: react_on_rails_pro/lib/react_on_rails_pro/stream_cache.rb, react_on_rails_pro/app/helpers/react_on_rails_pro_helper.rb, specs, CHANGELOG.md (collides with every other item — rebase last-merged).
Acceptance criteria
Dependencies
None (fully parallel with the other items except the shared CHANGELOG.md line).
Goal
Land PR #4551 ([Pro] Fix RSC payload prerender cache storing an empty payload) — the server half of shakacode/react_on_rails_rsc#187 (infinite RSC payload retry loop) — and cherry-pick it to
release/17.0.0.Locked decisions
react_on_rails_pro/spec/dummy/spec/requests/rsc_payload_spec.rb) never reaches the cached response — the dummy generates a fresh CSP nonce per request, which changes the prerender cache key, so both calls render through Node. Make the second request actually hit the cache (pin/stub the nonce or use a cache key the test controls), and assert the cached path.chunk.dupbehavior directly in a helper spec (react_on_rails_pro_helper.rb) so the endpoint test still fails if the code regresses tochunk.delete("html").stream_cache_spec.rb).mainvia merge queue, then cherry-pick torelease/17.0.0(confirmed RC-line stabilizer: wrong-output bug — an empty payload gets cached and served).Scope / collision set
Ruby only:
react_on_rails_pro/lib/react_on_rails_pro/stream_cache.rb,react_on_rails_pro/app/helpers/react_on_rails_pro_helper.rb, specs,CHANGELOG.md(collides with every other item — rebase last-merged).Acceptance criteria
cd react_on_rails_pro && bundle exec rspec spec/react_on_rails_pro/stream_cache_spec.rband the dummy request spec green locally;bundle exec rubocopclean.main; cherry-pick commit onrelease/17.0.0.Dependencies
None (fully parallel with the other items except the shared CHANGELOG.md line).