Skip to content

docs: readability, verified reference links, and contract alignment#69

Merged
aguilar1x merged 1 commit into
devfrom
docs/did-spec-readability
Jun 24, 2026
Merged

docs: readability, verified reference links, and contract alignment#69
aguilar1x merged 1 commit into
devfrom
docs/did-spec-readability

Conversation

@aguilar1x

@aguilar1x aguilar1x commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #68 (which landed the §4.4 mutation-semantics rewrite). This PR adds the readability/onboarding layer, verified reference links, and brings the validation section in line with the contract. Docs-only — no contract code touched.

1. Onboarding / readability

  • Terminology expanded with plain-language entries (DID, DID Document, DID URL/fragment, verificationMethod, verification relationships, service, Multikey/multibase), each linked to its official W3C definition.
  • §2.3 — bytes ↔ base32 ↔ DID boundary box (on-chain = 16 bytes; off-chain = 26-char string).
  • §3.2 — purpose table for the three verification relationships.
  • §4 — DID lifecycle state diagram (mermaid).
  • §4.7 — client error-handling table (retry / regenerate / fix input / permanent).
  • §5.4 — gloss the z6Mk Multikey encoding.
  • §6.4 — worked proof-of-control signing/payload example.
  • Annex C — informative end-to-end walkthrough (register → resolve → issue → prove → rotate → transfer → deactivate).

2. Verified reference links

All new W3C/CID/RFC anchors checked against the live HTML (curl + anchor grep). Also fixed two pre-existing broken anchors:

  • did-1.1/#controller#x5-1-2-did-controller
  • cid-1.0/#multikey#x2-2-2-multikey

Added relative links from the spec into the contract sources (contract.rs, model.rs, errors.rs, README).

3. Contract alignment fixes (§3.3 was looser than the contract)

Reconciled the validation table with validate_record:

  • id_suffix: ^[a-z0-9-]+$^[a-z0-9][a-z0-9-]*[a-z0-9]$; reject leading/trailing hyphens; require uniqueness across services (DuplicateServiceId, 21).
  • service_type: state the non-empty requirement (ServiceTypeEmpty, 18).
  • metadata_hash requires metadata_uri (MetadataInconsistent, 20).

…ign §3.3 with contract

Readability / onboarding:
- Expand Terminology with plain-language entries for DID, DID Document,
  DID URL/fragment, verificationMethod, verification relationships, service,
  Multikey/multibase — each linked to its official W3C definition.
- Add a friendly one-line abstract opener.
- §2.3: add a bytes <-> base32 <-> DID boundary box (on-chain = 16 bytes,
  off-chain = 26-char string).
- §3.2: add a purpose table for the verification relationships.
- §4: add a DID lifecycle state diagram (mermaid).
- §4.7: new client error-handling table (retry / regenerate / fix / permanent).
- §5.4: gloss the Multikey z6Mk encoding instead of just naming it.
- §6.4: add a worked proof-of-control signing/payload example.
- Annex C: new informative end-to-end walkthrough (register -> resolve ->
  issue -> prove -> rotate -> transfer -> deactivate).

Links:
- All new W3C/CID/RFC anchors verified against the live HTML.
- Fix two pre-existing broken anchors: did-1.1/#controller ->
  #x5-1-2-did-controller and cid-1.0/#multikey -> #x2-2-2-multikey.
- Add relative links from the spec to contract.rs / model.rs / errors.rs / README.

Contract alignment (§3.3 was looser than the contract; now matches validate_record):
- id_suffix regex ^[a-z0-9-]+$ -> ^[a-z0-9][a-z0-9-]*[a-z0-9]$, reject
  leading/trailing hyphens, require uniqueness across services (DuplicateServiceId).
- service_type: state the non-empty requirement (ServiceTypeEmpty).
- metadata_hash requires metadata_uri (MetadataInconsistent).
@almanax-ai

almanax-ai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Plan expired

Your subscription has expired. Please renew your subscription to continue using CI/CD integration and other features.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@aguilar1x, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 26 minutes and 53 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 02291d9c-721a-4fb5-9020-69024427fa10

📥 Commits

Reviewing files that changed from the base of the PR and between c72188e and cef3116.

📒 Files selected for processing (1)
  • docs/did-spec/did-stellar-v0.1.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/did-spec-readability

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aguilar1x aguilar1x changed the title docs(did-spec): readability, verified reference links, and contract alignment docs: readability, verified reference links, and contract alignment Jun 24, 2026
@aguilar1x aguilar1x self-assigned this Jun 24, 2026
@aguilar1x aguilar1x merged commit 4d4f540 into dev Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant