mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-15 23:50:37 +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> |
||
|---|---|---|
| .. | ||
| entry | ||
| apps.test.ts | ||
| apps.ts | ||
| category.test.ts | ||
| category.ts | ||
| channel_access_control_attributes.ts | ||
| channel_bookmark.test.ts | ||
| channel_bookmark.ts | ||
| channel.test.ts | ||
| channel.ts | ||
| classification.test.ts | ||
| classification.ts | ||
| command.test.ts | ||
| command.ts | ||
| custom_emoji.test.ts | ||
| custom_emoji.ts | ||
| custom_profile.test.ts | ||
| custom_profile.ts | ||
| draft.test.ts | ||
| draft.ts | ||
| file.test.ts | ||
| file.ts | ||
| general.test.ts | ||
| general.ts | ||
| groups.test.ts | ||
| groups.ts | ||
| integrations.test.ts | ||
| integrations.ts | ||
| license.test.ts | ||
| license.ts | ||
| notifications.test.ts | ||
| notifications.ts | ||
| performance.test.ts | ||
| performance.ts | ||
| permalink.ts | ||
| post.auxiliary.test.ts | ||
| post.auxiliary.ts | ||
| post.test.ts | ||
| post.ts | ||
| preference.test.ts | ||
| preference.ts | ||
| reactions.test.ts | ||
| reactions.ts | ||
| refresh.test.ts | ||
| refresh.ts | ||
| restore_server.test.ts | ||
| restore_server.ts | ||
| retry.test.ts | ||
| retry.ts | ||
| role.ts | ||
| scheduled_post.test.ts | ||
| scheduled_post.ts | ||
| search.test.ts | ||
| search.ts | ||
| session.test.ts | ||
| session.ts | ||
| systems.test.ts | ||
| systems.ts | ||
| team.test.ts | ||
| team.ts | ||
| terms_of_service.test.ts | ||
| terms_of_service.ts | ||
| thread.test.ts | ||
| thread.ts | ||
| user.test.ts | ||
| user.ts | ||