Skip to content

feat(datatype): add DiameterIdentity.Valid - #137

Merged
gomaja merged 1 commit into
mainfrom
feat/i132-identity-check
Oct 16, 2026
Merged

gomaja merged 1 commit into
mainfrom
feat/i132-identity-check

Conversation

@gomaja

@gomaja gomaja commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

DiameterIdentity syntax is checked in two places: base message validation
in diam/internal/base, and peer discovery in dnsdiam, which as a nested
module cannot import an internal package. Export the check as
DiameterIdentity.Valid so that both can share it, and use it for base
messages.

Valid accepts one or more labels of ASCII letters, digits and interior
hyphens, separated by dots, with an optional final root dot. Each label is
1–63 octets and the name without the root dot at most 253. It checks
neither that the name is a host or realm nor IDNA validity: a label that
looks like an A-label is checked as plain ASCII. Base validation decides
exactly as before; a 55-case table and a fuzz target cover the rule.

Refs #132.


Summary by cubic

Exports DiameterIdentity syntax validation as DiameterIdentity.Valid and reuses it for base message validation, which decides exactly as before.

The exported method lets dnsdiam, a nested module that cannot import diam/internal/base, share the same check. Valid accepts ASCII labels of letters, digits, and interior hyphens with an optional root dot; it does not verify host/realm meaning or IDNA validity. A 55-case table test and a fuzz target cover the rule. Refs #132.

Written for commit 1c47710. Summary will update on new commits.

View guided diff Turn on auto-fix

DiameterIdentity syntax is checked in two places: base message validation
in diam/internal/base, and peer discovery in dnsdiam, which as a nested
module cannot import an internal package. Export the check as
DiameterIdentity.Valid so that both can share it, and use it for base
messages.

Valid accepts one or more labels of ASCII letters, digits and interior
hyphens, separated by dots, with an optional final root dot. Each label is
1–63 octets and the name without the root dot at most 253. It checks
neither that the name is a host or realm nor IDNA validity: a label that
looks like an A-label is checked as plain ASCII. Base validation decides
exactly as before; a 55-case table and a fuzz target cover the rule.

Refs #132.
Copilot AI balanced review requested due to automatic review settings October 16, 2026 05:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T05:51:29.480730Z 1c47710 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95960b1c-fdb6-4b3e-9227-113e0666f421
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@gomaja
gomaja merged commit 6d023fa into main Oct 16, 2026
2 checks passed
@gomaja
gomaja deleted the feat/i132-identity-check branch October 16, 2026 05:53
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.

2 participants