Skip to content

fix(CSS): guard the processConfig trailing assert with NDEBUG - #10918

Open
YogendraShelke wants to merge 1 commit into
software-mansion:mainfrom
YogendraShelke:fix/css-platform-transition-assert-ndebug-guard
Open

YogendraShelke wants to merge 1 commit into
software-mansion:mainfrom
YogendraShelke:fix/css-platform-transition-assert-ndebug-guard

Conversation

@YogendraShelke

Copy link
Copy Markdown

Summary

In CSSPlatformTransitionProxy::processConfig, matchedValues is declared and incremented only inside two #ifndef NDEBUG blocks:

#ifndef NDEBUG
  size_t matchedValues = 0;
#endif // NDEBUG
  ...
#ifndef NDEBUG
    if (hasValue) {
      ++matchedValues;
    }
#endif // NDEBUG

but the assert reading it right after the loop was not wrapped the same way:

  react_native_assert(
      matchedValues == config.changedProperties.size() && "[Reanimated] CSS transition value diff without settings");

This is inconsistent with the guard pattern already used twice earlier in the same function. This PR wraps the assert in the same #ifndef NDEBUG guard for consistency.

Test plan

Mechanical, one-line change matching an existing pattern in the same function — no behavior change in debug builds (the assert still runs); in builds where NDEBUG is defined, matchedValues is no longer referenced outside its declaration.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4778450b-0d03-462d-a585-afbffff5cb04
Commits

Reviewing files that changed from the base of the PR and between 5b332cf and e0060dd.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6fb3b7f6-ff48-464a-a7cd-f19d35e85716
📥 Commits

Reviewing files that changed from the base of the PR and between 1d2b213 and 5b332cf.

📒 Files selected for processing: 1
  • packages/react-native-reanimated/Common/cpp/reanimated/CSS/core/transition/CSSPlatformTransitionProxy.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The changed-value and transition-settings consistency assertion now runs in debug builds. Release builds omit the assertion.

Priority: Low

Change: Bug fix

Merge Risk: Minimal · up to 5b332

This change preserves the debug consistency check and avoids referencing its debug-only counter in release builds. No merge-blocking risk is identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: guarding the trailing processConfig assertion with NDEBUG.
Description check Passed The description directly explains the assertion guard change, its debug and release behavior, and the test plan.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

matchedValues is only declared and incremented inside #ifndef NDEBUG
blocks, but the assert reading it right after the loop was not wrapped
the same way. Wrap it to match the existing guard pattern used twice
earlier in the same function.
@YogendraShelke
YogendraShelke force-pushed the fix/css-platform-transition-assert-ndebug-guard branch from 5b332cf to e0060dd Compare October 25, 2026 14:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant