[No QA] Pin react-native-onyx to PR #792 head for retry-idempotency end-to-end testing#91626
Conversation
Bumps the react-native-onyx pin from 3.0.73 (npm) to callstack-internal/react-native-onyx#de62ae5e — the head of the elirangoshen/fix/retry-side-effects-idempotency branch on the fork. This companion App PR exists so PR Expensify#792 (Make retried Onyx writes idempotent on storage retry) can be exercised end-to-end against a running App session. It is not intended to merge into App main; the pin will be reverted once Expensify#792 lands and ships in a regular onyx release. Companion to: Expensify/react-native-onyx#792 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
no need. to check this its only for testing purposes |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4444f41c3f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "react-native-nitro-modules": "0.35.0", | ||
| "react-native-nitro-sqlite": "9.6.0", | ||
| "react-native-onyx": "3.0.73", | ||
| "react-native-onyx": "git+https://github.com/callstack-internal/react-native-onyx.git#de62ae5eae69a4aaf0b1b734e408ba5db2a9c79b", |
There was a problem hiding this comment.
Avoid pinning dependency to private GitHub repository
Pointing react-native-onyx to github.com/callstack-internal/... makes installs depend on access to that private repo, so npm install/npm ci will fail for contributors, forks, and CI jobs that do not have those credentials. This effectively blocks anyone outside the authorized org from reproducing the build or running tests, which is a release-blocking regression compared to consuming a public npm tag or public commit source.
Useful? React with 👍 / 👎.
Explanation of Change
Companion to Expensify/react-native-onyx#792 — Make retried Onyx writes idempotent on storage retry.
This PR is testing-only: it bumps the
react-native-onyxpin inpackage.json/package-lock.jsonfrom3.0.73(npm) to the head commit of the onyx-side branch (callstack-internal/react-native-onyx#de62ae5eae69a4aaf0b1b734e408ba5db2a9c79b) so the upstream fix can be exercised end-to-end against a real App session. It is not intended to merge into Appmain— the pin will be reverted once #792 lands and ships in a regular onyx release.The onyx PR fixes two pre-existing bugs in every Onyx write path that goes through
retryOperation(flagged on the #787 review and deferred to follow-up):mergeCollectionWithPatches/setCollectionWithRetry/partialSetCollection, brand-new keys were silently downgraded fromStorage.multiSettoStorage.multiMergebecause the existing/new key split got recomputed against a cache the first attempt had already mutated. Benign on IDB, crash-prone on storage backends that requiremultiSetfor missing keys.keysChanged/keyChangedfired again on every retry attempt, double-notifyingOnyx.connect({waitForCollectionCallback: true})subscribers (which re-fire on every call by contract).Fix shape on the onyx side: each retriable write splits into an outer orchestrator (cache + subscriber notify + storage prep, called once) and a file-private write helper (
Storage.multiSet/multiMerge+retryOperation+ dev-tools log).retryOperationre-enters the write helper, not the orchestrator. Full details in the onyx PR description.Fixed Issues
$ N/A — companion testing PR for Expensify/react-native-onyx#792. No App-side issue.
PROPOSAL: N/A
Tests
The four refactored onyx write paths (
mergeCollectionWithPatches,multiSetWithRetry,setCollectionWithRetry,partialSetCollection) are reached from the App via Pusher events, theOpenAppresponse, everyOnyx.updatebatch that contains aMERGE_COLLECTION/MULTI_SET/SET_COLLECTIONop, LHN refresh, Search filters, chat sends, mark-all-as-read, hold/unhold, workspace switching, etc.Setup
elirangoshen/fix/retry-side-effects-idempotency).npm installunder Node 20.20.0, thennpm run web.Functional smoke — no regression in the refactored paths
The fix preserves the cache-first invariant from #787, so all of these should look indistinguishable from
mainto the user:main. (exercisesmergeCollectionWithPatchesvia Pusher /OpenApp)reportActions_), confirms via Pusher, persists after reload. (mergeCollectionWithPatches)mergeCollectionWithPatches)mergeCollectionWithPatches+setCollectionWithRetry)mergeCollectionWithPatches)mergeCollectionWithPatches)mergeCollectionWithPatches)Storage-failure simulation — the core regression guard
This is the test that exercises the retry path the fix targets. With the fix in place, retries on storage failure should produce one subscriber notification per logical operation (not one per retry attempt), and brand-new keys should stay routed through
multiSeteven when an earliermultiMergeretry kicks in.OnyxDB).mergeCollection-driven action — switch workspaces, send a chat message, or apply a search filter.retryOperationkicks in. Console shows storage error logs and retry attempts (look forFailed to save to storage. Error: ... retryAttempt: N/5), but no white screen, no stale UI, no data loss within the session, and no duplicatewaitForCollectionCallbacksubscriber invocations.multiSet-driven action and asetCollection-driven action (Search filter result population) to cover the other refactored paths.3.0.73locally and re-run step 4. Without the fix you'll seeOnyx.connect({waitForCollectionCallback: true})callbacks firing twice in DevTools traces.Cold-cache merge — preserves the pre-warm fast path from #787
mainsession — the cache pre-warm path (existing inmergeCollectionWithPatches) is untouched by Add hotkey navigation of the chat history in desktop #792.Offline tests
This PR is a dependency-pin bump only; there is no offline behavior to test that isn't already covered by the existing Onyx offline-first invariants. The fix specifically protects subscribers from going stale when a storage write fails — the user-visible behavior offline is better with this pin (UI reflects the merge even if IDB writes back-pressure), not worse. Spot-check the existing offline path:
QA Steps
Same as Tests above. Title is prefixed
[No QA]because this PR will not be merged — it's a testing companion for the linked onyx PR.PR Author Checklist
Screenshots/Videos
Manual smoke + storage-failure simulation videos will be attached here once the platform runs are done.
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-05-26.at.14.41.29.mov
Screen.Recording.2026-05-26.at.14.42.06.mov
Screen.Recording.2026-05-26.at.14.42.27.mov
Screen.Recording.2026-05-26.at.14.43.07.mov
Screen.Recording.2026-05-26.at.14.44.17.mov
Screen.Recording.2026-05-26.at.14.44.48.mov
🤖 Generated with Claude Code