The records API refuses a record name that is not the zone or below it #271

Merged
claude merged 2 commits from feature/25-record-name-in-zone into develop 2026-11-05 00:22:37 -05:00
Owner

The records API (create, PUT, PATCH in RecordsController) now refuses with 400 an owner name that is neither the zone's name nor below it, after @ is resolved (owner decision Q-REL-3). The check is label-wise and case-insensitive (RFC 4343) through DnsName, so wwwexample.test is refused and WWW.Example.Test accepted. The message suggests the full name: "'www' is not in zone 'example.test'; did you mean 'www.example.test'?". A name that is not a valid DNS name (for example a Unicode label) gets its own message asking for the xn-- form. No other API path writes records by name. README zones guide updated.

Second commit: the OpenAPI snapshot and Angular client pick up the changed descriptions (text only).

Verified: 8 new Web.Tests (5 red before the fix); whole Ninlil.Web.Tests passes; build 0 warnings; console lint, format, tests and build pass.

The console record form can still send a short name and will now get the 400; #270 follows up.

Closes #25
Closes #26

🤖 Generated with Claude Code

https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK

The records API (create, PUT, PATCH in `RecordsController`) now refuses with 400 an owner name that is neither the zone's name nor below it, after `@` is resolved (owner decision Q-REL-3). The check is label-wise and case-insensitive (RFC 4343) through `DnsName`, so `wwwexample.test` is refused and `WWW.Example.Test` accepted. The message suggests the full name: "'www' is not in zone 'example.test'; did you mean 'www.example.test'?". A name that is not a valid DNS name (for example a Unicode label) gets its own message asking for the xn-- form. No other API path writes records by name. README zones guide updated. Second commit: the OpenAPI snapshot and Angular client pick up the changed descriptions (text only). Verified: 8 new Web.Tests (5 red before the fix); whole Ninlil.Web.Tests passes; build 0 warnings; console lint, format, tests and build pass. The console record form can still send a short name and will now get the 400; #270 follows up. Closes #25 Closes #26 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Closes #25

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
The OpenAPI snapshot and Angular API client describe the record-name rule
All checks were successful
Build / Pack and Push NuGet Packages (dns-core) (push) Successful in -1m58s
Build / Pack and Push NuGet Packages (dns-server) (push) Successful in -1m49s
Build / Pack and Push NuGet Packages (common) (push) Successful in 57s
Build / Pack and Push NuGet Packages (dhcp) (push) Successful in 1m51s
Build / Build Binary (linux-amd64) (push) Successful in 9s
Build / Build Binary (linux-arm64) (push) Successful in 16s
Build / Publish Release (push) Successful in 8s
Build / Pipeline (push) Successful in 0s
Build / Build Binary (macos-arm64) (push) Successful in 11s
Build / Build Binary (windows-amd64) (push) Successful in 9s
Build / Build Binary (linux-amd64) (pull_request) Successful in 8m54s
Build / Build Binary (macos-arm64) (pull_request) Successful in 8m57s
Build / Smoke Test the Windows Binary (pull_request) Successful in 19s
Build / Build and Push Image (pull_request) Successful in -2m20s
Build / Build Arch Linux Packages (pull_request) Successful in 50s
Build / Build Binary (macos-amd64) (push) Successful in 5m34s
Build / Build and Push Image (push) Successful in -2m25s
Build / Smoke Test the Windows Binary (push) Successful in 17s
Build / Build Arch Linux Packages (push) Successful in 48s
Build / Build and Test Deb and RPM Packages (pull_request) Successful in 3m36s
Build / Publish Release (pull_request) Successful in 11s
Build / Pipeline (pull_request) Successful in 0s
Build / Build and Test Deb and RPM Packages (push) Successful in -4s
Build / Pack and Push NuGet Packages (dhcp) (pull_request) Successful in -1m49s
Build / Pack and Push NuGet Packages (dns-server) (pull_request) Successful in 1m49s
Build / Build Binary (linux-arm64) (pull_request) Successful in -25s
Build / Build Binary (macos-amd64) (pull_request) Successful in -17s
Build / Build Binary (windows-amd64) (pull_request) Successful in -34s
Build / Test .NET (push) Successful in 11m5s
Build / Stage Draft Release (push) Successful in 8s
204043027a
Closes #26

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
claude merged commit d782fa9558 into develop 2026-11-05 00:22:37 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil!271
No description provided.