"""Synthetic delivery-order fixture; no provider calls or production payloads."""
EVENTS=[('evt-B','paid'),('evt-A','pending'),('evt-B','paid')]

def project(events):
    naive='pending'; robust='pending'; seen=set(); effects=set(); rows=[]
    naive_sends=0
    for identity,snapshot in events:
        if snapshot=='paid' and naive!='paid':naive_sends+=1
        naive=snapshot
        if identity in seen:
            action='duplicate delivery ignored'
        else:
            # The synthetic authoritative object remains paid for this fixture.
            current='paid'
            robust=current
            effects.add('booking-17:welcome:v1')
            seen.add(identity)
            action='current object projected; welcome identity retained'
        rows.append((identity,snapshot,naive,robust,naive_sends,len(effects),action))
    return rows

if __name__=='__main__':
    rows=project(EVENTS)
    assert rows[0][2:6]==('paid','paid',1,1)
    assert rows[1][2:6]==('pending','paid',1,1)
    assert rows[2][2:6]==('paid','paid',2,1)
    for row in rows:print(' | '.join(map(str,row)))
    print('3/3 transition assertions passed; no emails sent.')
