The count of a list envelope now reads the named field before Casdoor's
untyped second slot: total, then data2, then the rows themselves. ONE
helper (envelopeTotal in lib/api/client.ts) owns the order; getList,
iamList, makeIamClient and AuditApi.list all go through it, so the data2
fallback lives in exactly one place and dies with the legacy emitters.
e2e fixtures still emit data2 on purpose — they pin today's live wire
and flip only when the fallback is deleted.
Co-authored-by: Hanzo Dev <dev@hanzo.ai>