Summary
The trail-hash component in DID identifiers has inconsistent length across the spec examples and the validation module.
Details
Validation module (merged in #7): The regex pattern enforces exactly 16 hex characters for the trail-hash:
did:trail:(self|org|agent):z[a-km-zA-HJ-NP-Z1-9]+:[a-f0-9]{16}
Spec examples (Appendix A): Some examples use shorter hashes:
did:trail:agent:z6Mkf5rG...:e1f2a3b4 → 8 hex chars
did:trail:org:z6Mkq7rT...:a1b2c3d4e5f6 → 12 hex chars
Canonical examples (§5): Use 16 hex chars, matching the validator.
Proposed Fix
- Update Appendix A examples to use 16 hex characters consistently (matching §5 and the validator)
- Alternatively, if shorter hashes should be valid, update the spec to define a minimum length and adjust the validator regex accordingly
Context
This was identified during the code review of #7. The current validator works correctly against the canonical format — this is a spec documentation consistency issue, not a bug.
Labels
spec, documentation
Summary
The
trail-hashcomponent in DID identifiers has inconsistent length across the spec examples and the validation module.Details
Validation module (merged in #7): The regex pattern enforces exactly 16 hex characters for the trail-hash:
Spec examples (Appendix A): Some examples use shorter hashes:
did:trail:agent:z6Mkf5rG...:e1f2a3b4→ 8 hex charsdid:trail:org:z6Mkq7rT...:a1b2c3d4e5f6→ 12 hex charsCanonical examples (§5): Use 16 hex chars, matching the validator.
Proposed Fix
Context
This was identified during the code review of #7. The current validator works correctly against the canonical format — this is a spec documentation consistency issue, not a bug.
Labels
spec,documentation