atproto utils for zig zat.dev
atproto sdk zig

fix DAG-CBOR decoder strict spec compliance, add 98 tests ported from atmos master

The decoder was silently accepting several classes of invalid DAG-CBOR: non-minimal integer encodings, unsorted/duplicate map keys, arbitrary CBOR tags, invalid UTF-8 in text strings, and had no nesting depth limit. Fixes: non-minimal encoding rejection, trailing bytes detection, tag 42 restriction, map key ordering + uniqueness validation, UTF-8 validation, max depth (128) guard, and early rejection of impossibly large allocation claims. Also fixes existing test data that used unsorted map keys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>


+1121 -29
4 changed files