mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-14 23:21:13 +00:00
Re-verification of the 11 Phase-4 review fixes surfaced 3 that were only partially closed: #2 (busy loop): drainOutbox skipped a mis-scoped teamId='' row with a bare `continue`, leaving it Pending-and-due. scheduleWork kept counting it as due work and re-armed a zero-delay drain that skipped it again — a CPU spin. Now the skip backs off next_attempt_at (via computeNextAttemptAt), so the row leaves the due set until its channel/membership may hydrate; a valid drain resets the count. #1 (torn-down DB write): the GET/reconcile path wrote the snapshot after the HTTP await with no post-HTTP guard — only the POST/DELETE workers had one. reconcileTeamDrafts now takes ReconcileOpts.shouldAbort and re-checks shouldAbortPostHttpWrite before every per-draft write, failing closed if the server was torn down mid-GET. #6 (observation fence too late): the in-flight observation ordinal was bumped only after reconcileTeamDrafts fully returned (after the whole apply loop), leaving a window where a concurrent POST ack cleared the outbox first. The bump now runs synchronously via ReconcileOpts.onSnapshot the moment the GET resolves, before any apply-loop await. Adds regression tests for each; all affected suites green (tsc + eslint clean). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| actions | ||
| client | ||
| components | ||
| constants | ||
| context | ||
| database | ||
| helpers | ||
| hooks | ||
| i18n | ||
| init | ||
| keyboard | ||
| managers | ||
| products | ||
| queries | ||
| routes | ||
| screens | ||
| store | ||
| utils | ||