Execution reports are the authoritative record of what happened, and they are the only thing an automated system should trust. Optimistic local state that assumes an order worked is how positions silently diverge from reality.
Each report carries cumulative executed quantity, remaining quantity and average-fill-price, so a correctly written handler never has to add up fills itself or guess after a disconnect.
Example: for a 5,000-share buy you receive a new-order acknowledgement, then reports with cumulative quantity 1,200, 3,400 and 5,000, with average prices 50.02, 50.04 and 50.06. If the session drops after the second, reconnecting and requesting the order's state returns cumulative 5,000 — telling you the position is complete.
Related: fix-protocol, client-order-id, partial-fill, average-fill-price