Mobile Offline Sync — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mobile Offline Sync (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Make the local store the source of truth the UI reads and writes, and treat the network as eventual replication. The hard part is never the happy path - it is reconciling divergent edits made while offline. The costly failure is an ad-hoc "retry the request later" queue that double-applies mutations, resurrects deleted rows, and silently destroys one user's edits with another's.
Collect per feature before designing:
Label unknowns as guesses and validate them against the server team before building.
Write to the local database synchronously and reflect it in the UI immediately (optimistic). Never block the UI on a network round-trip. Tag every row with a sync state - pending, syncing, synced, failed - so the UI can show subtle pending indicators and surface failures.
Record each offline change in a durable outbox table: operation (create/update/delete), entity id, changed fields, client timestamp, the base version the client last saw, and a client-generated UUID. Send the outbox in order, batched (up to about 50 mutations per request keeps payloads small and retries cheap). The server dedupes on the UUID so a retried request never double-applies.
There is no universal default. Apply this decision table per entity, top to bottom:
| Question | If yes | If no |
|---|---|---|
| Does the server enforce a business invariant on this entity (state machines, balances, assignments)? | Server-authoritative: client proposes, server decides, client rebases local state on the server's answer | Next question |
| Do multiple writers concurrently edit the same record in normal use? | Next question | Last-write-wins on server-assigned version or hybrid logical clock - never raw device clocks |
| Do concurrent edits usually touch different fields? | Field-level merge: per-field versions, merge disjoint field sets, LWW per field on true collisions | Next question |
| Is it collaborative text or a shared set/list needing convergence without a coordinator? | CRDT (text CRDT for documents, OR-Set for collections) - accept the metadata and complexity cost | Server-authoritative with an explicit user-facing conflict prompt |
Rules of thumb: server-authoritative is the simplest correct default when the server can decide. LWW is acceptable only for single-owner, whole-object data where losing an overwritten edit is tolerable. CRDTs are the last resort, not the default - they buy convergence at real complexity cost.
Pull incrementally with a server cursor or updated_since watermark - never full table scans. Detect a conflict by comparing the base version the client last saw against the server's current version. Apply the entity's resolution rule, write the reconciled result back locally, and clear the pending flag. Keep tombstones for deletes - retained at least as long as the maximum offline window from Step 1 - so a deletion is not resurrected by a stale upsert.
Retry with exponential backoff plus jitter: 2s base, doubling, capped at 10 minutes, with plus-or-minus 50 percent jitter; cap at roughly 8 attempts, then park the mutation as failed and surface it to the user. Schedule background sync with WorkManager (Android) or BGTaskScheduler (iOS) under OS constraints - the OS decides when it runs. Make every sync operation idempotent so a process kill mid-flight is safe to repeat.
| Entity | Writers | Edit shape | Rule chosen | Why |
|---|---|---|---|---|
| Job status (assigned -> en route -> done) | Technician + dispatcher | State transition | Server-authoritative | Server enforces the legal state machine; client rebases if its transition was stale |
| Technician visit notes | One technician | Append text | LWW on server version | Single owner; concurrent edits effectively impossible |
| Customer record (phone, address, gate code) | Technician + office staff | Different fields | Field-level merge | Office edits billing fields while tech edits access notes; merging disjoint fields loses nothing |
| Shared parts checklist on a job | Multiple technicians | Add/remove items | CRDT (OR-Set) | Concurrent adds/removes of the same list must converge without losing anyone's items |
| Invoice payment capture | Anyone | Money movement | Disabled offline | Strong consistency; show "reconnect to take payment" |
The artifact to keep: this table, one row per synced entity, committed alongside the schema.
Produce an offline-sync design containing: the entity list with a written conflict rule per entity (table above), the outbox schema (operation, entity id, changed fields, base version, client UUID, client timestamp), the pull watermark strategy, the backoff/retry parameters, tombstone retention matched to the offline window, and the list of operations deliberately disabled offline.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.