test: implement parity fuzzing#26
Conversation
✅ Deploy Preview for react-native-boost ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdds a property-based fuzz test suite to the React Native Boost parity test harness using ChangesParity Fuzz Testing
Sequence Diagram(s)sequenceDiagram
participant fc as fast-check
participant gen as generator.ts
participant boost as captureBoost
participant wrapper as captureWrapper
participant diff as diff.ts
participant test as fuzz.test.ts
fc->>gen: sample elementSpecArb × platformArb
gen-->>test: { preamble, jsxBody, os }
test->>boost: captureBoost(os, jsxBody, preamble)
boost-->>test: BoostBailed | BoostOptimized { which, props }
test->>wrapper: captureWrapper(os, jsxBody, preamble)
wrapper-->>test: Capture { which, props }
test->>diff: divergingKeys(normalize(boostProps), normalize(wrapperProps))
diff-->>test: string[] of diverging keys
test-->>fc: skipped | match | divergence
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/react-native-boost/src/plugin/__tests__/parity/fuzz/fuzz.test.ts`:
- Around line 89-101: The parity test property in fc.asyncProperty is failing on
a known divergence case where iOS with numberOfLines set to -1 produces
different results (boost.numberOfLines = -1 vs wrapper.numberOfLines = 0).
Before throwing the error when result.status === 'divergence', add a conditional
check to detect if this is the known ios plus numberOfLines negative value case
by examining the os parameter and spec properties, and if matched, increment a
quarantine counter and return early instead of throwing the error. This will
temporarily suppress the known divergence until the runtime clamp parity fix is
implemented.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ea7292be-a952-45e0-babf-bc9166d7e3a1
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
packages/react-native-boost/package.jsonpackages/react-native-boost/src/plugin/__tests__/parity/boost.tspackages/react-native-boost/src/plugin/__tests__/parity/fuzz/diff.tspackages/react-native-boost/src/plugin/__tests__/parity/fuzz/fuzz.test.tspackages/react-native-boost/src/plugin/__tests__/parity/fuzz/generator.tspackages/react-native-boost/src/plugin/__tests__/parity/fuzz/vocabulary.tspackages/react-native-boost/src/plugin/__tests__/parity/generated.tspackages/react-native-boost/src/plugin/__tests__/parity/mocks/Platform.tspackages/react-native-boost/src/plugin/__tests__/parity/mocks/react-native.tspackages/react-native-boost/src/plugin/__tests__/parity/normalize.tspackages/react-native-boost/src/plugin/__tests__/parity/parity.test.tspackages/react-native-boost/src/plugin/__tests__/parity/vitest.config.parity.mtspackages/react-native-boost/src/plugin/__tests__/parity/wrapper.ts
Summary by CodeRabbit
Chores
Tests