docs(mobile): add REVIEWING.md with mobile review principles (#9298)

Adds `mobile/REVIEWING.md`, the principles we review mobile PRs against,
and links it from the Reviewing section of `AGENTS.md` so any reviewer
(human or agent) applies them to mobile changes and to relay or
push-gateway behavior the app relies on.

The principles: land Pareto improvements (better somewhere, worse
nowhere), no hangs or stutters, use the network carefully, don't clog
the pipe, keep the app usable, and don't regress developer experience
(above all, no flaky tests). Each comes with past block/buzz PRs as
examples.

This tightens one existing rule rather than contradicting it. The
Reviewing section blocks only on concrete correctness, security or
contract defects with a realistic failure scenario. The new file treats
a performance, network, reliability, developer-experience or UI-clarity
regression as such a defect, as long as the finding names the mechanism
and its effect. It also asks authors to say in the PR description why
their change is a Pareto improvement.

### Validation

Documentation only. Checked that the links and anchors resolve.

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

---------

Signed-off-by: Tom Brow <tomb@squareup.com>
Co-authored-by: Tom Brow <tomb@squareup.com>
This commit is contained in:
Tom Brow
2026-11-16 18:26:07 -08:00
committed by GitHub
parent 3d97535120
commit c8a1b26345
2 changed files with 55 additions and 0 deletions

View File

@@ -61,6 +61,8 @@ confirmation, not app runs.
- Before reviewing, read [VISION.md](VISION.md), the `VISION_*.md` docs for the affected surface, and the PR's stated goal and linked
issue. Review the change against what it is trying to do.
- Check the change against the [Review-Proven Rules](#review-proven-rules): the defects reviewers and load tests here find most often.
- For mobile changes, and relay or push-gateway behavior the mobile app relies
on, also review against [mobile/REVIEWING.md](mobile/REVIEWING.md).
- Judge minimalism, elegance, and correctness, aiming for 9/10 on each. A score
below 9 names the concrete defect and the fix.
- Recommend blocking only for concrete correctness, security, or agreed-contract

53
mobile/REVIEWING.md Normal file
View File

@@ -0,0 +1,53 @@
# Reviewing mobile changes
Review mobile PRs, and relay or push-gateway changes the mobile app relies on,
against these principles, alongside the [Reviewing](../AGENTS.md#reviewing)
guidance and [Review-Proven Rules](../AGENTS.md#review-proven-rules). A
regression against them is a concrete defect: state the mechanism (code path,
input or state, and the wrong result) and its consequence for the user, as for
any blocking finding.
1. **Land Pareto improvements.** A change that's better somewhere and worse
nowhere should land. For a feature, its bugs must stay inside the feature,
and having it must beat not having it. It's not a Pareto improvement if it
regresses performance, reliability, codebase or architecture quality,
developer experience, or makes the UI harder to understand. Authors state
this case in the PR description: what gets better, and why nothing
existing gets worse, or which tradeoff they accept and why.
2. **No hangs or stutters.** Keep expensive work (decoding, crypto, parsing,
big sorts) off the UI isolate. Avoid needless rebuilds, especially during
animations and keyboard motion.
3. **Use the network carefully.** Don't poll for what live updates already
deliver; a slow, bounded backstop that reconciles missed or expired state
is fine. Fetch only what changed. Survive slow and flaky links.
4. **Don't clog the pipe.** Work the user isn't waiting for must never delay
work they are.
5. **Reliability means the app stays usable.** A rare crash with no data loss
beats getting stuck broken, laggy or spinning. Data loss is always a
blocker.
6. **Don't regress developer experience.** Never add a flaky test; that's the
biggest one. Tests stay fast and deterministic: wait on state, not fixed
sleeps, and leak no files, timers or callbacks into later tests. Builds,
codegen and CI stay reliable on a clean checkout and a rerun. No new manual
setup steps.
## Examples
- Decode off the UI isolate: PR #8669; native crypto: PRs #8654, #8657.
- Needless rebuilds: unchanged state published on a timer (PR #8695);
identity-unstable theme objects (PR #8928); work in `build()` (PR #8929);
covered pages rebuilding during keyboard motion (PR #8941); over-broad
watches (PR #8672).
- Network: polling replaced by live triggers (PR #8910); fetch from last seen,
not a fixed horizon (PRs #8901, #8903); hung connects need timeouts
(PR #8878).
- Clogged pipe: duplicate downloads (PR #8879); unneeded snapshot downloads
(PR #9093); batches too big for slow links (PR #8901); abort stalls, not
slow progress (PR #8881).
- Usability: keep loaded content visible while reconnecting (PRs #8864,
#9100); isolate subsystem failures (PR #8610).
- Developer experience: fixed sleeps and late callbacks failing tests
(PRs #8678, #8741); tests leaking temp files (PR #8748); flaky assertions
(PR #8440); codegen or build steps that fail on a clean checkout; heavy test
setup that slows `flutter test`; new local tools or secrets every developer
must install.