Collapse handoff history before counting current backlog

Current-backlog analytics must not count every historical handoff whose issue is presently human-owned. Mutable issue state is repeated across historical assignment rows, so grouping by agent and issue can attribute one open issue to several past agents. First select the latest handoff per issue with a deterministic timestamp and ID tie-breaker, then attribute the current backlog item to that handoff’s owner. Keep total handoff events as a separate historical metric. This does not replace event-volume reporting or final resolution attribution.

Applies when: Operational analytics join mutable issue state onto append-only handoff or assignment history. Keywords: Postgres analytics handoff backlog latest event deduplication attribution audit