Fix flaky test MoneyRequestReportTransactionRowWrites.perf-test.tsx
Maintainers usually reply within 1 day
@mountiny is already working on this.
Since Nov 5, 2026.
Assessment
This issue has not been assessed yet.
Description
(Vit's agent)
Problem
The Reassure validate-perf-tests job fails on about 1 in 5 PRs, including PRs that do not touch this code (example run). The failing step is "Validate output.json", which fails when the mean render count of any scenario goes up (COUNT_DEVIATION: 0).
On Nov 4, 46 of the 60 most recent failed runs failed on a [MoneyRequestReportTransactionRows] scenario from tests/perf-test/MoneyRequestReportTransactionRowWrites.perf-test.tsx. All 8 scenarios fail at random, in both the narrow and the wide layout. Example:
wide layout [MoneyRequestReportTransactionRows] should re-render when the policy is renamed [render]: 1677.5 ms → 1241.9 ms | 29 → 29.70 (+0.70, +2.4%) 🔴
##[error]Render count difference exceeded the allowed deviation of 0. Current difference: 0.6999999999999993
The baseline on main also has fractional mean render counts (29.10, 30.10, 20.20). This means the render count changes from run to run with no code change.
Daily failure rate of the Reassure workflow:
| Date | Runs | Failed |
|---|---|---|
| Oct 20 – 22 | ~300/day | 0 – 1% |
| Oct 26 – Nov 2 | ~280/day | 10 – 23% ([ReportActionsList] scenarios) |
| Nov 3 | 323 | 2% (after https://github.com/Expensify/App/pull/105470) |
| Nov 4 | 348 | 22% ([MoneyRequestReportTransactionRows] scenarios, after https://github.com/Expensify/App/pull/105016) |
Cause
MoneyRequestReportTransactionRowWrites.perf-test.tsx and MoneyRequestReportActionsList.perf-test.tsx do not mock fetch. MoneyRequestReportActionsList uses useMarkAsRead, which calls readNewestAction and sends a real API request. The response arrives at a random time and adds renders to some runs but not others.
The same failure hit ReportActionsListRowWrites.perf-test.tsx from Oct 26 to Nov 2. https://github.com/Expensify/App/pull/105470 fixed it with a fetch mock, and the failure rate dropped to 2% the next day. https://github.com/Expensify/App/pull/105016 then expanded MoneyRequestReportTransactionRowWrites to 16 scenarios without a fetch mock.
A local run of both files on main reproduces it: 7 of 22 scenarios have a render count that changes between the 10 runs, for example [37, 32, 30, 31, 30, 31, 30, 30, 30, 30].
Solution
Add global.fetch = TestHelper.getGlobalFetchMock(); to the beforeEach of both test files, the same as https://github.com/Expensify/App/pull/105470.
- Dominant language
- TypeScript
- Stars
- 5k
- Forks
- 4k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 594
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Expensify/App
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.OpenMonthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Expensify/App#106080 · 1 comment ·
Maintainers usually reply within 1 day
-
Monthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Expensify/App#106057 · 1 comment ·
Maintainers usually reply within 1 day
-
Reviewing Weekly
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Expensify/App#105383 · 1 comment ·
Maintainers usually reply within 1 day
-
Monthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Expensify/App#105341 · 2 comments ·
Maintainers usually reply within 1 day
-
Monthly Not a priority
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Expensify/App#105100 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 83/100
lingdojo/kana-dojo#33701 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
rookslog/zlibrary-mcp#408 ·
Maintainers usually reply within 1 day
-
mp4box.js — 20-byte `sgpd` box with large `entry_count` causes unbounded loop and heap OOM abortOpen
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
mastra-ai/mastra#29641 · 1 comment ·
Maintainers usually reply within 1 day