Handle fire-and-forget RSCRoute retry failures - #4378
Conversation
|
Warning Review limit reached
Next review available in: 10 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
+ci-status |
|
+ci-run-hosted |
CI StatusHead SHA: Only the required gate is active unless hosted CI is requested. |
Hosted CI RequestedTriggered 9 workflow(s) for View progress in the Actions tab. |
Greptile SummaryThis PR updates production retry handling for
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (1): Last reviewed commit: "Avoid unhandled RSCRoute retry rejection..." | Re-trigger Greptile |
size-limit report 📦
|
43b5735 to
a17d813
Compare
|
Rebased onto Post-rebase validation:
|
ReviewWhat this PR does: Fixes fire-and-forget Review findings: I traced this fix line-by-line, checked the removed/changed control flow against the previous behavior, and checked other call sites of
No blocking issues. Nice, narrowly-scoped fix with good test coverage. |
…cache-4317 * origin/main: Preserve streaming LoadError during dependency failures (#4388) Wire eslint-rules RuleTester suite into a runner, CI, and knip (#4409) (#4433) Handle fire-and-forget RSCRoute retry failures (#4378) Fix visible hydration cleanup for detached roots (#4374) Avoid full locale default obsolete scans (#4398) Document RSC public-page validation and sidecar patterns (#4387) # Conflicts: # CHANGELOG.md
…derer-shutdown-restart * origin/main: Preserve streaming LoadError during dependency failures (#4388) Wire eslint-rules RuleTester suite into a runner, CI, and knip (#4409) (#4433) Handle fire-and-forget RSCRoute retry failures (#4378) Fix visible hydration cleanup for detached roots (#4374) Avoid full locale default obsolete scans (#4398)
* origin/main: Preserve streaming LoadError during dependency failures (#4388) Wire eslint-rules RuleTester suite into a runner, CI, and knip (#4409) (#4433) Handle fire-and-forget RSCRoute retry failures (#4378) Fix visible hydration cleanup for detached roots (#4374) Avoid full locale default obsolete scans (#4398) Document RSC public-page validation and sidecar patterns (#4387) Remove dead methods; prune always-false Rails<5.0 spec branches (#4418) (#4431)
…-4364 * origin/main: (24 commits) Preserve streaming LoadError during dependency failures (#4388) Wire eslint-rules RuleTester suite into a runner, CI, and knip (#4409) (#4433) Handle fire-and-forget RSCRoute retry failures (#4378) Fix visible hydration cleanup for detached roots (#4374) Avoid full locale default obsolete scans (#4398) Document RSC public-page validation and sidecar patterns (#4387) Remove dead methods; prune always-false Rails<5.0 spec branches (#4418) (#4431) Drop deprecation-tombstone config options for 17.0.0 (#4419) (#4432) Add mechanical parity guards for Ruby↔TS protocol constants (#4412) (#4427) Move Node tsconfigs from @tsconfig/node14 to @tsconfig/node18 (#4410) (#4429) [Pro] Remove unused addressable and rainbow runtime deps from gemspec (#4416) (#4422) Delete finished #3313 Prism Gemfile-rewriter spike (#4421) Extract generator scan/tracking helpers (#4405) (#4430) Extract install_dependency_group helper in JsDependencyManager (#4403) (#4424) Remove obsolete Ruby<2.6 YAML-aliases capability shim (#4417) (#4428) Remove inert config.server_render_method option (#4415) (#4423) Prune stale knip ignores and enforce binaries in CI (#4408) (#4425) Extract shared redux_store kwargs validator (#4402) (#4420) Avoid caching async props prerender streams (#4376) Release incremental render context on setup failure (#4383) ... # Conflicts: # CHANGELOG.md
…370' into codex/batch-e-loadable-stats-retry-4371 * origin/codex/batch-e-rsc-parser-flush-4370: Add cached static RSC helper and diagnostics (#4386) Fix Pro tag revalidation retry after delete failures (#4375) Fix node renderer graceful shutdown restarts (#4400) Improve release-finish dry-run fetch handling (#4441) Flush RSC payloads before incomplete HTML tails (#4379) Handle sync RSC route failures as fetch errors (#4393) Delete never-wired RenderRequest/JsCodeBuilder/RenderingStrategy layer (#4414) (#4437) Delegate deprecated base/ shims to capabilities/ instead of cloning (#4413) (#4436) Remove pre-monorepo node-renderer devDep baggage; consolidate test multipart builders (#4435) Preserve streaming LoadError during dependency failures (#4388) Wire eslint-rules RuleTester suite into a runner, CI, and knip (#4409) (#4433) Handle fire-and-forget RSCRoute retry failures (#4378)
) ## Summary Adds user-visible `[Unreleased]` changelog entries for merged PRs since `v17.0.0.rc.6` that prior passes missed, and fills in one missing PR attribution. No version header is stamped (mainline `/update-changelog`, no mode). ## Changes **Attribution fix** - `#### Changed` — the existing "`create-react-on-rails-app` now defaults to Pro" entry had no PR link; attributed to [PR 4217](#4217). **New entries** - `#### Changed` — **[Pro]** Missing renderer password error now leads with the local-development fix (`export RAILS_ENV=development NODE_ENV=development`). [PR 4211](#4211), fixes #4201. - `#### Fixed` — `hydrate_on: visible` no longer leaks a detached root or blocks re-hydrating a same-id replacement node. [PR 4374](#4374), fixes #4328. - `#### Fixed` — **[Pro]** RSCRoute error recovery now covers synchronous route failures and fire-and-forget retries. [PR 4378](#4378) + [PR 4393](#4393), fixes #4330 and #4372. - `#### Removed` (new section) — **[Pro]** Removed the `react-on-rails-pro/rscPayloadNode` export and `createRscPayloadNode` helper; `RSCRoute` is the canonical integration. [PR 4440](#4440), fixes #4439. ## Classification notes (reviewer trim points) I swept every merged PR in `v17.0.0.rc.6..origin/main` (173 commits) and cross-referenced each against the changelog. The overwhelming majority were correctly omitted in prior passes (docs, CI, release-tooling, benchmark harnesses, internal refactors, dev-dependency/Dependabot bumps such as Shakapacker 10.2.0/10.3.0 and the npm-security group). The five entries above are the ones I judged genuinely user-visible. Three of them (#4211, #4374, #4378/#4393) were merged with a `not_user_visible` ledger classification; I re-added them per the changelog rubric (runtime bug fix / observable error-boundary behavior / user-facing diagnostics). If you prefer to keep any of those out, they're easy to drop. ## Verification - `pnpm exec prettier --check CHANGELOG.md` → clean - pre-commit hooks (trailing-newlines, markdown-links, prettier) → passed - File ends with a trailing newline <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated release notes to clarify an improved error message for missing renderer passwords, including explicit environment setup guidance. * Noted the removal of an outdated Pro RSC client-router export and helper, with the newer routing approach identified as the standard. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
## Why The 17.0 release notes and Pro docs had drift around the async-props prerender-cache isolation fix and RC-only RSC payload helper removal. The release train needs public-safe security/changelog framing, refreshed Pro docs, regenerated LLM artifacts, and a recorded GHSA decision. Fixes #4494. Fixes #4495. ## What Changed - Promoted the async-props prerender-cache isolation note into the staged `17.0.0.rc.7` security section with prerelease/stable-tag framing; `Unreleased` remains empty while the rc.7 release section is being assembled before publication. - Recorded the GHSA/CVE decision in `internal/analysis/2026-07-07-async-props-prerender-cache-security-decision.md`. - Clarified Pro docs that `config.prerender_caching` skips async-props renders and that async-props pages should use explicit fragment keys only when safe. - Updated the older RC payload-helper changelog entry to point final users to the `RSCRoute` loader pattern. - Backfilled or corrected staged rc.7 changelog coverage for #4392, #4396, #4374, #4378, #4401, #4431, #4422, #4440, and #4447. - Regenerated `llms-full-pro.txt`; `llms-full.txt` was refreshed on `main` by #4509 and is no longer part of this branch after the rebase. - Review fix: restored the `#### Fixed` heading after the new Security section so unrelated fixes render under the correct heading. - Rebased onto `origin/main` at `5933f8011`, keeping `main`'s newer #4444/#4473 and #4422 changelog entries during conflict resolution. - Review fix: folded the duplicate lower `#### Removed` changelog block into the existing Unreleased Removed section so MD024 heading uniqueness stays clean. ## Live Evidence - `git tag --contains cdcba54` returned no tags. - Visible GitHub releases still top out at `v17.0.0.rc.6`; `cdcba5438` is on `origin/main` but not in that RC. - Visible repository security advisories returned `[]` for all visible and open states with the current token. - The async-props feature commit appears only in prerelease tags `v16.7.0.rc.0` through `v16.7.0.rc.3` and `v17.0.0.rc.0` through `v17.0.0.rc.6`; it is not in stable `v16.6.0`. ## Validation Current head: `d1a37aa6b4e4d186ecbced35304ba150afdc2330`. - `.agents/bin/agent-workflow-seam-doctor` -> pass - `node script/generate-llms-full.mjs` -> regenerated outputs - `bash script/generate-llms-full-test.bash` -> 7 tests passed - `node script/generate-llms-full.mjs --check` -> pass; `llms-full.txt` 1573 KiB, `llms-full-pro.txt` 579 KiB, 74 docs URLs and 8 sidebar top-level sections validated - `node script/generate-llms-full.mjs --validate` -> pass - `pnpm exec prettier --check CHANGELOG.md docs/pro/fragment-caching.md docs/pro/installation.md docs/pro/streaming-ssr.md internal/analysis/2026-07-07-async-props-prerender-cache-security-decision.md` -> pass - `script/check-docs-sidebar` -> pass - `git diff --check` -> pass after rebase - `pnpm start format.listDifferent` -> pass after rebase and duplicate-heading fix - `pnpm exec markdownlint-cli2 CHANGELOG.md` -> unavailable locally (`Command "markdownlint-cli2" not found`); duplicate `#### Removed` heading removed by direct changelog inspection - Review-fix pass: `codex review --base origin/main` -> no discrete correctness issues found ## Review Gate - Worker review and coordinator review: `codex review --base origin/main` -> no discrete correctness issues found. - Review threads for the changelog heading and generated-doc source-drift comments were replied to and resolved. ## CI / Release Gate Notes - Changelog classification: `changelog_present`. - Workflow change audit: not applicable; this PR does not modify `.github/workflows/**` or `.github/actions/**`. - Local pre-commit/pre-push hook note: `branch-lint`, Prettier, docs/sidebar, and llms checks passed where applicable, but local `markdown-links` could not run because installed `lychee` v0.24.2 cannot parse the repo `.lychee.toml` `include_fragments = false` value. Hosted docs/link checks are requested for remote confirmation. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Breaking Changes** * Removed undocumented Pro RSC helper methods and the RC-only `rscPayloadNode` export; client-router loaders should return plain route data and rendering should use `RSCRoute`. * **Bug Fixes** * Render helpers no longer mutate caller-provided options; refined streaming retry diagnostics and improved behavior for detached-root cleanup and fire-and-forget RSC retries. * **Security** * Clarified async-props prerender-cache isolation for specific prerelease ranges. * **Documentation** * Updated streaming SSR, fragment caching, and installation guidance: `config.prerender_caching` is skipped for async-props streaming renders. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Fixes #4330.
Production
RSCRouterecover-on-error retries preserve the previous route content, but a fire-and-forget caller could still leave the returned retry promise unhandled after the route recorded the recoverable error. This keeps the caller-visible promise rejected while attaching an internal no-op rejection handler in production recover-on-error mode.Changes
refetch/retryrejected promise contract for callers that await or catch it.unhandledRejectionis emitted.Validation
pnpm --filter react-on-rails-pro exec jest tests/imperativeRefetch.client.test.tsx --runInBandpnpm --filter react-on-rails-pro run type-checkpnpm exec prettier --check packages/react-on-rails-pro/src/RSCRoute.tsx packages/react-on-rails-pro/tests/imperativeRefetch.client.test.tsxpnpm exec eslint packages/react-on-rails-pro/src/RSCRoute.tsx packages/react-on-rails-pro/tests/imperativeRefetch.client.test.tsx --no-warn-ignoredscript/check-pro-license-headersgit diff --check origin/main...HEADcodex review --base origin/mainNo changelog entry: internal Pro client robustness fix with no public API change.