# Estimated activity

`/worker-review` and task details calculate a rough, admin-only estimate from saved `inbox_observations`, joined to identified task deliveries. Reviewing a worker makes no Gmail/Cortex calls and writes no records. Older tasks with recorded message changes are supported immediately; no migration or backfill is required.

## Rule

For each action separately (marked read; Spam moved to Inbox), count different logical task messages:

- **Bulk activity:** at least **5 different messages** have that recorded change within any rolling **5-second** interval.
- **One by one:** relevant changes exist, but no such five-message group is found. This is a rough non-bulk estimate, not a guarantee that messages were handled individually. Small batches can receive this label.
- **—:** no relevant state changes were recorded during work. First found already-read emails alone do not establish an action.

The strongest group for each action is shown with its actual recorded time span and observation IDs. A zero-second span means the records share the same database second. Rolling intervals avoid arbitrary clock bucket boundaries. Distinct messages count once per action, using their earliest relevant change; repeated unread/read toggles, duplicate deliveries and resends cannot inflate the count. Read and Spam-to-Inbox changes on the same email are not combined into a larger group.

Only `message_state_changed` observations with a present message and usable before/after labels are included. First sightings, Trash, unrelated tasks, logical messages outside the frozen work list, changes before work starts, and changes after completion/deadline are excluded. API errors are not message actions. Actual state changes saved before a failed/partial check can still contribute to this rough estimate; the error itself cannot.

## Difference from the earlier scan-based estimator

The report no longer needs two successful short scans, small-change window counts, or scan-duration metadata. It does not reject history because of long gaps, a slow scan, or a later access failure. Previous `inbox_tasks.bulk_review` data and old audit events remain stored for history, but are not used to classify the report. The processor continues saving its normal message observations and no longer runs the old estimator or updates scan metadata. The hidden nullable column remains for compatibility.

## Limits and ownership

The timestamps are when the server observed a message change, not when the worker clicked. Slow checks, delayed synchronization, filters and other mail clients can make individual actions appear grouped. Conversely, small or slowly executed batches can look individual. Both labels are estimates requested for reference only and must not be treated as proof of human reading or misuse.

The review list fetches the displayed page's observations in one query. Task details use the same calculator. The report never changes completion, review decisions, payment status, workers' mail, campaign dispatch or OAuth permissions. Tests use SQLite and synthetic HTTP responses; no live mailbox activity is needed.
