ofw_check_freshness
Verify cached messages and folders against OurFamilyWizard with minimal requests. Checks folder counts and message existence to prevent stale assertions without a full sync.
Instructions
Cheaply confirm whether the local cache still matches OurFamilyWizard, WITHOUT running a full sync. Use this before asserting anything about current state — especially "draft X is still sitting unsent" — when a read returned serverConfirmed:false or freshness.staleness other than "fresh". Costs one OFW request for the folder check plus one per messageId. For each folder it returns the live server count next to the cached count; for each id, whether it still exists on OFW and whether its content matches the cache (compared by content revision, because OFW draft timestamps do NOT change when a draft is edited in the web app). Does not fetch bodies into the cache, does not touch attachments, and does not depend on sync state.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folders | No | Folders to compare cached vs live counts for. Defaults to all three when messageIds is not given. Must be non-empty if given. | |
| messageIds | No | Specific ids to verify against OFW (max 25). By default only ids present in the drafts cache are probed — see allowMarkRead. | |
| allowMarkRead | No | Default false. Probing an id that is NOT a cached draft requires fetching its detail, which marks an unread inbox message as READ on OurFamilyWizard — an irreversible change to the record. Such ids are skipped unless you set this to true. |