Gleam PDS
subdermal docs protocol DISCREPANCIES.md
2.8 kB · 59 lines
Markdown
at main

Open protocol discrepancies #

NSID-001 — Separate authority-length limit #

Status: open; strict NSID fixture compatibility fails. Checked 2026-10-04.

The current NSID specification separately requires authority length <=253 and complete NSID length <=317. The pinned TypeScript validator at atproto revision a7c8604d876a200a1e4fa4aec83d4189ac4f1c12 checks total and segment lengths, but does not enforce the separate authority bound. The current online validator also omits it when rechecked. The reference regex in the specification does not encode that bound either; it needs a separate length check.

The unchanged valid fixture at interop revision 056e5741bb330757205d6b16db5266fffcae937b, syntax/nsid_syntax_valid.txt, line 4, is com.middle...middle.foo:

Property Fixture Specification limit
Authority length, including periods 283 253
Final name length (foo) 3 63
Complete identifier length 287 317

All segments are individually within their length bounds. Thus passing the total bound does not imply passing the authority bound. Our parse returns Error(AuthorityTooLong) while the upstream fixture expects acceptance.

Decision: enforce the specification's explicit authority bound, as required by the implementation plan. This is a deliberate, tested difference from the pinned fixture/reference behavior. No runtime compatibility exception is added. This source discrepancy has not been resolved by reorganizing the checks.

Reproduce from the project directory:

gleam test
gleam run -m pds/nsid_interop

The first command checks our normative parser/path contracts, all record-key fixtures, and all invalid NSID fixtures: 82 tests pass at the latest M2.2 checkpoint. Authority 253/254 and NSID 317/318 boundaries have explicit regression tests in test/pds/nsid_test.gleam and test/pds/nsid_authority_test.gleam.

The second command independently checks all 52 unchanged NSID fixture expectations: 51 pass, 1 fails, zero skipped; it exits nonzero. The adapter reports both valid and invalid groups before failing. Required validation runs both commands; a passing gleam test alone does not prove compatibility. M1.2's compatibility completion remains pending.

Resolution requires authoritative clarification or corrected source revisions that reconcile the separate limit and fixture expectation. Recheck this issue when updating the specification or pinned sources, then update the parser or fixtures only with that evidence and rerun both commands. A new mismatch must also fail the strict comparison. No upstream issue has been filed in this session.

Copied source files, exact embedded cases, license, revision and checksums remain in test/fixtures/interop/ and test/pds/fixtures/nsid_cases.gleam.