Skip to content

Update atenet component to use actor *name* instead of *id*.#421

Merged
Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
juli4n:api_alignment_atenet
Jul 10, 2026
Merged

Update atenet component to use actor *name* instead of *id*.#421
Haven Xia (HavenXia) merged 1 commit into
agent-substrate:mainfrom
juli4n:api_alignment_atenet

Conversation

@juli4n

Copy link
Copy Markdown
Collaborator

This is part of #149. Change atenet to not mention actor id any longer.

// proto request field with structured field-path errors, use
// ValidateResourceName. Empty is not a valid name.
func IsValidResourceName(name string) bool {
return len(content.IsDNS1123Label(name)) == 0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we use ResourceNameRegexPattern.MatchString(name) that you refactored in actors.go?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We used to use the same regexp for validating and for building the DNS configuration, but that changed some time ago when we started using IsDNS1123Label. Considering that ValidateResourceName uses IsDNS1123Label I think we should be consistent.

That being said, it's a bit unfortunate that the validation logic and the regexp don't have a single SoT, but it looks like that's already the case.

@bowei

Copy link
Copy Markdown
Collaborator

atenet changes lgtm

@HavenXia Haven Xia (HavenXia) merged commit c1ab095 into agent-substrate:main Jul 10, 2026
11 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.

3 participants