Skip to content

test: enable clearMocks for shared Jest config#2591

Merged
justin808 merged 14 commits intomasterfrom
jg-codex/fix-2500-enable-clearmocks
Mar 13, 2026
Merged

test: enable clearMocks for shared Jest config#2591
justin808 merged 14 commits intomasterfrom
jg-codex/fix-2500-enable-clearmocks

Conversation

@justin808
Copy link
Copy Markdown
Member

@justin808 justin808 commented Mar 11, 2026

Summary

  • enable clearMocks: true in jest.config.base.js
  • apply consistent mock-state cleanup for packages inheriting the shared Jest config

Fixes #2500

Test Plan

  • pnpm run eslint jest.config.base.js
  • pnpm --filter react-on-rails test -- --runInBand
  • pnpm --filter react-on-rails-pro test:non-rsc -- --runInBand

Note

Low Risk
Low risk configuration change that only affects Jest test isolation by resetting mocks between tests; it may surface previously hidden test interdependencies.

Overview
Enables Jest clearMocks: true in jest.config.base.js, so packages inheriting the shared config automatically clear mock call history and implementations between tests for more consistent test isolation.

Written by Cursor Bugbot for commit ffe094c. Configure here.

Summary by CodeRabbit

  • Tests
    • Enabled automatic clearing of mock call histories between tests to improve isolation and reduce cross-test interference.
    • Added a test suite verifying that call histories are cleared while mock implementations (return values) persist, ensuring more reliable and predictable test runs.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 11, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Added clearMocks: true to the base Jest configuration and introduced a test that verifies mock call histories are cleared between tests while mock implementations persist.

Changes

Cohort / File(s) Summary
Jest base config
jest.config.base.js
Added clearMocks: true to the exported Jest config with a comment clarifying it clears mock call histories but does not reset mock implementations (resetMocks: true required for that).
Tests — react-on-rails
packages/react-on-rails/tests/clearMocksConfig.test.ts
New test suite using a shared Jest mock to assert call history is cleared between individual tests while return value persists within the suite.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I bound through tests with nimble paws,
Clearing footprints without a pause,
One test calls loud, the next is new,
No traces left — a meadow true,
Hooray for tidy mock applause!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: enabling clearMocks in the shared Jest configuration file.
Linked Issues check ✅ Passed The pull request enables clearMocks in jest.config.base.js, directly addressing issue #2500's objective to improve test hygiene by extending clearMocks to packages using the shared configuration.
Out of Scope Changes check ✅ Passed All changes are directly related to enabling clearMocks: jest.config.base.js configuration addition and a test file to verify the functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch jg-codex/fix-2500-enable-clearmocks

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Mar 11, 2026

Greptile Summary

This PR adds clearMocks: true to the shared jest.config.base.js, ensuring that mock call history (mock.calls, mock.instances, mock.results, mock.contexts) is automatically reset between tests for all packages that inherit this config (react-on-rails and react-on-rails-pro). The create-react-on-rails-app package maintains its own standalone config and is unaffected.

  • clearMocks: true added to jest.config.base.js with a comment
  • The comment slightly overstates the effect by saying "implementations" are cleared — clearMocks only wipes call history, not mock implementations (that requires resetMocks: true; create-react-on-rails-app already uses both)
  • The functional change itself is correct and harmless — no tests relied on mock call history persisting across tests

Confidence Score: 5/5

  • This PR is safe to merge — it adds a single, well-understood Jest option to the shared base config with no risk of breaking existing tests.
  • The change is a one-liner that enables automatic mock call history clearing, a standard Jest best practice. No tests depend on mock state persisting between tests (which would be a bug), and the option is already in use in the create-react-on-rails-app package. The only minor issue is a misleading comment.
  • No files require special attention.

Important Files Changed

Filename Overview
jest.config.base.js Adds clearMocks: true to the shared base Jest config so all inheriting packages (react-on-rails, react-on-rails-pro) automatically get mock call history reset between tests. The only issue is the comment overstates the effect by mentioning "implementations," which clearMocks does not clear.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Base["jest.config.base.js\n(clearMocks: true ✅ NEW)"]
    ROR["packages/react-on-rails\njest.config.js\n(...rootConfig)"]
    RORPRO["packages/react-on-rails-pro\njest.config.js\n(...rootConfig)"]
    CRORA["packages/create-react-on-rails-app\njest.config.js\n(standalone — not affected)"]

    Base -->|inherits| ROR
    Base -->|inherits| RORPRO
    CRORA -.->|already has clearMocks + resetMocks| CRORA
Loading

Last reviewed commit: ffe094c

Comment thread jest.config.base.js Outdated
Comment thread jest.config.base.js Outdated
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 11, 2026

Good, low-risk improvement for test isolation. One thing to flag.

Inaccurate comment / PR description

The inline comment (line 42) and the PR description both say clearMocks clears "implementations", but that is not what it does:

  • clearMocks: true clears call history only (calls, instances, results). Does NOT reset implementations.
  • resetMocks: true clears call history AND resets implementations to jest.fn() with no implementation.
  • restoreMocks: true clears call history AND restores original (non-mocked) implementation.

clearMocks only zeros out .mock.calls, .mock.instances, .mock.contexts, and .mock.results before each test. Implementations set via .mockImplementation() or jest.mock() are untouched. I have left a suggestion on the comment line.

Is clearMocks the right level here?

Yes -- resetMocks would be too aggressive for this codebase. Both jest.setup.js files assign global.MessageChannel and global.console as jest.fn() mocks via setupFiles (which runs once per test file, not before each individual test). Resetting implementations with resetMocks would silently break those globals for every test after the first. clearMocks is the correct choice.

Consistency note

packages/create-react-on-rails-app/jest.config.js does not inherit from jest.config.base.js, so it is unaffected by this PR. It already has both clearMocks: true and resetMocks: true set independently -- no action needed there.

Summary

The change itself is correct and beneficial. The only fix needed is the comment text so it accurately reflects what clearMocks actually does.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Review: Enable clearMocks in shared Jest config

The change is small, focused, and well-justified. A few observations:

What's correct:

  • clearMocks: true resets .mock.calls, .mock.instances, .mock.results, and .mock.contexts between tests without touching mock implementations. The inline comment accurately describes this distinction.
  • All test files in the affected packages (react-on-rails, react-on-rails-pro) set up their mock implementations in beforeEach or via jest.mock() module factories that survive clearMocks, so no existing tests should break.
  • Tests that compare mock.calls.length (e.g. ClientRenderer.test.ts) do so with relative baselines captured within a single test, which is unaffected by inter-test clearing.

Worth noting:

  • packages/create-react-on-rails-app/jest.config.js uses its own standalone config (not inheriting from jest.config.base.js) and already enables both clearMocks: true and resetMocks: true. If test isolation issues arise for the packages inheriting the base config, resetMocks: true could be considered as a follow-up — but clearMocks alone is the safer starting point since it preserves implementations set outside beforeEach.

Overall this is a clean, low-risk improvement to test hygiene. LGTM.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Overall: LGTM with one minor suggestion. The change is clean, well-scoped, and low-risk. Adding clearMocks: true to the shared base config is the right conservative choice — it clears call history between tests without resetting mock implementations, so existing tests relying on persistent mockReturnValue or mockImplementation setups should not break. The comment accurately distinguishes clearMocks from resetMocks (a common source of confusion), and adding a regression test is a nice touch. One minor gap: the test only verifies that call history is cleared, but does not confirm that mock implementations are preserved — the key semantic difference between clearMocks and resetMocks. A third test asserting that a mockReturnValue set in one test still works in the next would make this a more complete spec. Not blocking — see inline comment for the specific suggestion.

Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 12, 2026

size-limit report 📦

Path Size
react-on-rails/client bundled (gzip) 62.63 KB (0%)
react-on-rails/client bundled (gzip) (time) 62.63 KB (0%)
react-on-rails/client bundled (brotli) 53.74 KB (0%)
react-on-rails/client bundled (brotli) (time) 53.74 KB (0%)
react-on-rails-pro/client bundled (gzip) 63.63 KB (0%)
react-on-rails-pro/client bundled (gzip) (time) 63.63 KB (0%)
react-on-rails-pro/client bundled (brotli) 54.62 KB (0%)
react-on-rails-pro/client bundled (brotli) (time) 54.62 KB (0%)
registerServerComponent/client bundled (gzip) 127.44 KB (0%)
registerServerComponent/client bundled (gzip) (time) 127.44 KB (0%)
registerServerComponent/client bundled (brotli) 61.6 KB (0%)
registerServerComponent/client bundled (brotli) (time) 61.6 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) 122.02 KB (0%)
wrapServerComponentRenderer/client bundled (gzip) (time) 122.02 KB (0%)
wrapServerComponentRenderer/client bundled (brotli) 56.77 KB (0%)
wrapServerComponentRenderer/client bundled (brotli) (time) 56.77 KB (0%)

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Overall: Good, focused change. Enabling clearMocks:true in the shared config prevents call-count and instance leakage between tests without risking breaks for tests that rely on mock return values.

Concern: clearMocks vs resetMocks

packages/create-react-on-rails-app/jest.config.js already ships with both clearMocks:true and resetMocks:true. resetMocks does everything clearMocks does, PLUS it resets mock implementations back to jest.fn() after each test.

The PR is intentionally conservative by stopping at clearMocks, but the consequence is that mock implementations (mockReturnValue, mockResolvedValue, etc.) can still bleed between tests - exactly what the third test in clearMocksConfig.test.ts demonstrates. If issue 2500 was caused by stale implementations rather than stale call counts, this fix may not be sufficient.

If the existing test suites pass with resetMocks:true added to the base config too, that would provide significantly stronger isolation and align with what create-react-on-rails-app already uses.

Minor nit on the test

The third test ("preserves mock implementations across tests") intentionally relies on mockReturnValue("first") being set by the first test. That order dependency is by design for this meta-test, but a short inline comment would help future readers understand this demonstrates a known limitation of clearMocks - in real test suites, implementation bleed is a footgun, not a feature.

Nothing blocking - the change is safe, well-documented, and the test clearly verifies the intended behaviour.

Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts Outdated
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Config change (jest.config.base.js): Adding clearMocks: true to the shared base config is a solid improvement. The inline comment correctly documents the distinction from resetMocks. This belongs in the shared base so all packages inherit it automatically.

Test file (clearMocksConfig.test.ts): Two issues worth addressing.

  1. Test 3 will break under randomised execution order. Jest 28+ supports --randomize which shuffles test order within a file. If test 3 runs before test 1, sharedMock() returns undefined (not "first"), causing the assertion to fail. The comment acknowledges the dependency but that does not make it safe.

  2. It normalises an antipattern. Future contributors reading this file will see the module-level jest.fn() and the "Intentional cross-test dependency" label and may treat this as a precedent for their own tests.

Suggestion: If keeping the test file, rewrite test 3 to set up its own implementation (a local mockReturnValue call or a beforeEach) so all three tests pass regardless of execution order. Alternatively, drop the test file and rely on the config comment plus Jest documentation.

Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts Outdated
Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Overall: Clean, low-risk improvement. Enabling clearMocks: true is a well-established Jest best practice for test isolation and the implementation is correct.

What is good

  • Correct semantics: clearMocks clears call history/instances/results between tests without resetting mock implementations. The inline comment distinguishing it from resetMocks is helpful.
  • Propagation is correct: Both packages/react-on-rails and packages/react-on-rails-pro spread the base config and inherit the setting automatically. create-react-on-rails-app has its own standalone config (clearMocks plus resetMocks) and is unaffected.
  • Test coverage: The test file correctly validates all three key behaviors -- call-history clearing, implementation persistence, and count reset.

Minor observations

  1. beforeAll is the right choice (not beforeEach) since clearMocks leaves implementations intact. If this were ever changed to resetMocks: true, the test would start failing -- which is the desired signal. Intentional and correct.

  2. Test name is slightly ambiguous (line 14): 'clears call history before the next test' describes a future event rather than asserting what happened before this test ran. A name like 'has cleared call history from the previous test' would be more precise -- cosmetic only.

  3. Test file placement: The file validates base config behavior that affects all packages but lives in packages/react-on-rails/tests/. Pragmatic, but coverage of the base config is coupled to one package's test run. Not a blocker.

No blocking issues. Safe to merge.

Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts Outdated
Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts Outdated
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Overall: Clean, well-scoped change.

Adding clearMocks: true to jest.config.base.js is the right call for improving test isolation. This is consistent with create-react-on-rails-app/jest.config.js, which already independently sets clearMocks: true (and resetMocks: true).

Positive aspects:

  • Comment in the config clearly differentiates clearMocks vs resetMocks behavior.
  • New test file correctly validates the exact semantics: call history cleared between tests, implementations persist.
  • Existing ClientRenderer.test.ts tests are unaffected: they compare call counts within a single it block, so between-test clearing does not change their semantics.

Observations:

  1. clearMocksConfig.test.ts tests are intentionally order-dependent. Acceptable for a config-verification test. If --randomize is ever adopted monorepo-wide, this file would need an explicit ordering annotation. Not a blocker.

  2. Meta-test pattern is unusual but valid. Testing Jest config behavior serves as a regression guard: if clearMocks: true is accidentally removed, these tests fail immediately rather than letting hidden mock-state bugs silently creep back in.

  3. create-react-on-rails-app is unaffected -- its jest.config.js is a standalone CJS config that does not extend the base.

No security or performance implications. No issues found with existing tests.

Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Review

The change is clean and well-scoped. A few observations:

jest.config.base.js
The comment accurately distinguishes clearMocks from resetMocks. One thing worth noting for future contributors: clearMocks: true clears call history/instances/results between tests but does NOT reset mock implementations. This means if a test sets mockReturnValue (or similar) inside the test body rather than in a setup hook, that implementation will persist into subsequent tests. This is the intentional, less-destructive choice vs resetMocks, but worth keeping in mind when writing new tests.

Scope of impact
create-react-on-rails-app has its own standalone config (uses module.exports, does not spread the base config) with both clearMocks: true AND resetMocks: true already, so this PR does not change behavior there. The two packages that inherit from the base (react-on-rails and react-on-rails-pro) will get the new behavior.

Test file (clearMocksConfig.test.ts)
The test correctly validates the semantics and serves as living documentation. The three tests are intentionally order-dependent (test 2 asserts that test 1's calls were cleared), which is the right approach for testing this specific behavior. The leading comment covers the 'what' but could also note that the ordering of tests within the suite is significant - makes the intent clearer to future readers.

Overall this is a good, low-risk improvement to test isolation. LGTM.

Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
Comment thread jest.config.base.js
Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Code Review

This is a clean, well-scoped PR that improves test isolation across the monorepo. Adds clearMocks: true to the shared jest.config.base.js (resetting mock call history between tests without touching implementations) and a focused regression test to verify the semantics.

Config change: Minimal, well-commented, and correctly distinguishes clearMocks from resetMocks. Standard Jest best practice for a shared monorepo config.

Test file: The three-test sequence correctly validates: (1) calls are recorded, (2) call history is cleared between tests, (3) implementations persist. Module-level comment explaining the intentional shared state is a nice touch.

Potential downstream impact: clearMocks: true could surface previously hidden cross-test mock state dependencies in packages inheriting this config, which the PR description correctly frames as the intended benefit.

Overall a straightforward, low-risk improvement. LGTM.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Overall: A clean, low-risk improvement to test isolation. The config change is correct and the new test file effectively validates the behavior.

jest.config.base.js

The addition of clearMocks: true is sound:

  • Does not break setupFiles mocks. jest.setup.js creates global.MessageChannel, global.console, etc. as jest.fn(). With clearMocks: true, call histories are wiped between tests but mockImplementations survive, so MessageChannel still functions correctly.
  • create-react-on-rails-app is unaffected — its jest.config.js is standalone CommonJS (does not spread rootConfig) and already has both clearMocks: true and resetMocks: true.
  • Not adding restoreMocks: true is correct. Tests in StoreRegistry.test.js and ComponentRegistry.test.js already call consoleSpy.mockRestore() manually — adding restoreMocks to the base config would be redundant and could cause unexpected behavior where console is already a jest.fn().

clearMocksConfig.test.ts

Two inline comments posted — a robustness note about the intentional order-dependency and a suggestion to document the beforeAll vs beforeEach choice. Neither is a blocker.

Comment thread jest.config.base.js
Comment thread packages/react-on-rails/tests/clearMocksConfig.test.ts
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented Mar 12, 2026

Review: Enable clearMocks in shared Jest config

Overall: Looks good — clean, well-scoped change. Two minor comments below.

jest.config.base.js

Adding clearMocks: true to the base config is the right call for a monorepo. It prevents mock call-history leaking between tests without touching mock implementations, which is the least-surprising default for most test suites. The comment accurately explains the distinction vs resetMocks.

One suggestion: the comment could also mention restoreMocks: true so readers know the full ladder (clearMocks → resetMocks → restoreMocks) — see inline.

clearMocksConfig.test.ts

The three-test structure effectively documents what clearMocks does and doesn't do. One minor documentation issue: the header comment says the suite is "order-dependent by design," which conflicts with an earlier commit message ("Make clearMocks regression test order-independent") and is subtly inaccurate — the assertions hold in any Jest-execution order within the describe block. The real caveat is narrower: the not.toHaveBeenCalled() assertion only proves clearMocks fired when at least one prior test called the mock. See inline for a suggested rewording.

No correctness issues; the configuration change and its test coverage are solid.

@justin808 justin808 merged commit ff318ee into master Mar 13, 2026
51 checks passed
@justin808 justin808 deleted the jg-codex/fix-2500-enable-clearmocks branch March 13, 2026 03:13
justin808 added a commit that referenced this pull request Mar 13, 2026
…k cleanup (#2596)

## Summary
- Added missing changelog entries for PRs #2439, #2477, #2554
- Stamped version header for 16.4.0.rc.9 (collapsed rc.8 into rc.9)
- **Fixed rake task bug**: `collapse_prerelease_sections` removed
section headers but left behind orphaned compare links at the bottom of
CHANGELOG.md. Added `cleanup_collapsed_prerelease_links` to remove these
links and update `[unreleased]` to compare from the last stable version.

## Changes
1. **CHANGELOG.md**: New entries + rc.9 stamp + removed orphaned
`[16.4.0.rc.8]` link
2. **update_changelog.rake**: Added `cleanup_collapsed_prerelease_links`
function, called from `prepare_changelog_for_auto_version`
3. **update_changelog_rake_helpers_spec.rb**: 3 new tests covering link
cleanup (multi-prerelease chain, single prerelease, no prereleases)

## Skipped PRs (not user-visible)
- #2593 — test only (lock instrumentation)
- #2591 — test only (Jest clearMocks)
- #2588 — internal refactoring (Thor shell output)
- #2584 — docs restructuring
- #2587 — internal tooling (release script)
- #2589 — docs fix (JWT claim name)
- #2586 — docs/CI (dead link removal)

## Test plan
- [x] All 13 rake helper tests pass (3 new)
- [ ] CI passes
- [ ] After merge, run `rake release` to publish 16.4.0.rc.9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
  * Fixed bin/setup failing in pnpm workspace member directories.

* **New Features**
* Added host configuration option for the Node Renderer Fastify worker.

* **Improvements / Changed**
* Automatic installation of react_on_rails_pro enabled for --rsc/--pro
flags.
* Clarified Pro-installation signaling related to immediate hydration
warnings.
* Updated changelog to include RC9 entries and ensure Unreleased links
point to the correct base.

* **Documentation**
* Added startup warning and remediation guidance for unsafe compression
middleware callbacks.

* **Tests**
  * Added tests covering changelog prerelease-link cleanup behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
justin808 added a commit that referenced this pull request Mar 30, 2026
…k cleanup (#2596)

## Summary
- Added missing changelog entries for PRs #2439, #2477, #2554
- Stamped version header for 16.4.0.rc.9 (collapsed rc.8 into rc.9)
- **Fixed rake task bug**: `collapse_prerelease_sections` removed
section headers but left behind orphaned compare links at the bottom of
CHANGELOG.md. Added `cleanup_collapsed_prerelease_links` to remove these
links and update `[unreleased]` to compare from the last stable version.

## Changes
1. **CHANGELOG.md**: New entries + rc.9 stamp + removed orphaned
`[16.4.0.rc.8]` link
2. **update_changelog.rake**: Added `cleanup_collapsed_prerelease_links`
function, called from `prepare_changelog_for_auto_version`
3. **update_changelog_rake_helpers_spec.rb**: 3 new tests covering link
cleanup (multi-prerelease chain, single prerelease, no prereleases)

## Skipped PRs (not user-visible)
- #2593 — test only (lock instrumentation)
- #2591 — test only (Jest clearMocks)
- #2588 — internal refactoring (Thor shell output)
- #2584 — docs restructuring
- #2587 — internal tooling (release script)
- #2589 — docs fix (JWT claim name)
- #2586 — docs/CI (dead link removal)

## Test plan
- [x] All 13 rake helper tests pass (3 new)
- [ ] CI passes
- [ ] After merge, run `rake release` to publish 16.4.0.rc.9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
  * Fixed bin/setup failing in pnpm workspace member directories.

* **New Features**
* Added host configuration option for the Node Renderer Fastify worker.

* **Improvements / Changed**
* Automatic installation of react_on_rails_pro enabled for --rsc/--pro
flags.
* Clarified Pro-installation signaling related to immediate hydration
warnings.
* Updated changelog to include RC9 entries and ensure Unreleased links
point to the correct base.

* **Documentation**
* Added startup warning and remediation guidance for unsafe compression
middleware callbacks.

* **Tests**
  * Added tests covering changelog prerelease-link cleanup behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
justin808 added a commit that referenced this pull request Apr 6, 2026
…k cleanup (#2596)

## Summary
- Added missing changelog entries for PRs #2439, #2477, #2554
- Stamped version header for 16.4.0.rc.9 (collapsed rc.8 into rc.9)
- **Fixed rake task bug**: `collapse_prerelease_sections` removed
section headers but left behind orphaned compare links at the bottom of
CHANGELOG.md. Added `cleanup_collapsed_prerelease_links` to remove these
links and update `[unreleased]` to compare from the last stable version.

## Changes
1. **CHANGELOG.md**: New entries + rc.9 stamp + removed orphaned
`[16.4.0.rc.8]` link
2. **update_changelog.rake**: Added `cleanup_collapsed_prerelease_links`
function, called from `prepare_changelog_for_auto_version`
3. **update_changelog_rake_helpers_spec.rb**: 3 new tests covering link
cleanup (multi-prerelease chain, single prerelease, no prereleases)

## Skipped PRs (not user-visible)
- #2593 — test only (lock instrumentation)
- #2591 — test only (Jest clearMocks)
- #2588 — internal refactoring (Thor shell output)
- #2584 — docs restructuring
- #2587 — internal tooling (release script)
- #2589 — docs fix (JWT claim name)
- #2586 — docs/CI (dead link removal)

## Test plan
- [x] All 13 rake helper tests pass (3 new)
- [ ] CI passes
- [ ] After merge, run `rake release` to publish 16.4.0.rc.9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
  * Fixed bin/setup failing in pnpm workspace member directories.

* **New Features**
* Added host configuration option for the Node Renderer Fastify worker.

* **Improvements / Changed**
* Automatic installation of react_on_rails_pro enabled for --rsc/--pro
flags.
* Clarified Pro-installation signaling related to immediate hydration
warnings.
* Updated changelog to include RC9 entries and ensure Unreleased links
point to the correct base.

* **Documentation**
* Added startup warning and remediation guidance for unsafe compression
middleware callbacks.

* **Tests**
  * Added tests covering changelog prerelease-link cleanup behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable clearMocks in all packages

1 participant