A fork of atproto-crates.
README.md

Vendored AT Protocol interop test vectors #

Known-answer vectors used as an external oracle for the encoding layers of this workspace.

Upstream https://github.com/bluesky-social/atproto-interop-tests
Pinned revision 056e5741bb330757205d6b16db5266fffcae937b (2026-07-01)
License Creative Commons Zero 1.0 Universal — see LICENSE-CC0

CC-0 permits direct copying into other projects without restriction or attribution. The vectors are vendored rather than added as a submodule so that a plain cargo test works from a fresh clone with no extra setup, and so the revision under test is visible in the diff when it is bumped.

mst/gen_keys.py is not vendored; it is a generator for mst/example_keys.txt, which is.

Why these exist #

Every encoding test in this workspace prior to these vectors was a round trip — encode, decode, compare. A round trip passes against a wrong encoding, because it only proves the code agrees with itself. These files are the only thing in the repository that proves the code agrees with the protocol.

Which harnesses consume which files #

Vectors Harness
mst/key_heights.json, mst/common_prefix.json, mst/example_keys.txt, firehose/commit-proof-fixtures.json crates/atproto-repo/tests/interop_mst.rs
data-model/data-model-fixtures.json, data-model/data-model-{valid,invalid}.json crates/atproto-dasl/tests/interop_data_model.rs
syntax/ (all 24 files) crates/atproto-lexicon/tests/interop_syntax.rs
crypto/ (all 3 files) crates/atproto-identity/tests/interop_crypto.rs
lexicon/ (all 9 files) crates/atproto-lexicon/tests/interop_lexicon.rs
actor_auth/ (both files) crates/atproto-xrpcs/tests/interop_actor_auth.rs

Every vendored file is consumed.

The table above is checked by an external conformance harness, which is how the three claims this section previously got wrong were found: data-model-{valid,invalid}.json were described as unconsumed after the harness that reads them landed, and mst/example_keys.txt appeared in neither list at all. Keep them accurate in the same change as the harness — a map that is right about most of the corpus is worse than no map, because a reader cannot tell which parts were maintained.

actor_auth/ is not vendored #

Everything above comes from the upstream corpus. actor_auth/ does not: it is the worked example from the actor-request token specification — two tokens signed by that specification's own implementation, the two private keys it publishes, and the exact 244 request bytes those tokens hash over. It lives here rather than beside the crate because it is the same kind of thing as the rest of this directory and is read the same way: an answer this workspace did not compute, used to check an encoding that would otherwise only ever be checked against itself.

Two consequences. It is not covered by the CC-0 above, and the rsync in "Bumping the pin" must not delete it — the command there excludes it.

putRecord-body.json is bytes, not JSON to be reformatted. Two-space indentation, LF line endings, no trailing newline, 244 bytes: reformat it and the digest in worked-example.json no longer describes it. The harness asserts the length and the line endings separately from the digest so that an editor that "fixed" the file reports itself as such.

Known failures #

Every harness carries a KNOWN_FAILURES table naming each vector this workspace does not yet satisfy, together with the gap-analysis finding that explains why. A listed vector is required to fail: if it starts passing, the harness fails and instructs you to delete the entry. That way the tables cannot silently rot, and the moment an encoding fix lands the gate tells you which finding it closed.

Do not add an entry to relax a genuine regression. An entry is a statement that a known, filed defect is still open.

Bumping the pin #

git clone --depth 1 https://github.com/bluesky-social/atproto-interop-tests /tmp/interop
rsync -a --delete --exclude .git --exclude .gitignore --exclude mst/gen_keys.py \
      --exclude actor_auth \
      /tmp/interop/ tests/interop/

Then restore this README, update the pinned revision above, and re-run cargo test --workspace. New vectors that fail are new findings, not licence to extend KNOWN_FAILURES.