Skip to content

[dotnet-port-api] Export skills ValidateName/ValidateDescription/ValidateCompatibility - #1347

Merged
Quim Muntal (qmuntal) merged 1 commit into
mainfrom
dotnet-port-api/skills-frontmatter-validators-7b25c444b0e0fcee
Nov 3, 2026
Merged

Quim Muntal (qmuntal) merged 1 commit into
mainfrom
dotnet-port-api/skills-frontmatter-validators-7b25c444b0e0fcee

Conversation

@microsoft-agent-framework-for-go

Copy link
Copy Markdown
Contributor

Summary

Exports the existing skill field validators in agent/skills as ValidateName, ValidateDescription and ValidateCompatibility, each taking a string and returning an error. They are the Go counterparts of the independent static validators on AgentSkillFrontmatter. Frontmatter.Validate now calls the exported functions, so its behavior is unchanged.

Ported .NET PRs

None specific. Pinned .NET SHA: 0c9944cc9f577d51277ac7c55dbc388b60a577af, from dotnet/src/Microsoft.Agents.AI/Skills/AgentSkillFrontmatter.cs. I did not check inventoried package versions.

Catalog leaves (namespace Microsoft.Agents.AI), all currently partial:

  • AgentSkillFrontmatter.ValidateName(string, out string) -> bool
  • AgentSkillFrontmatter.ValidateDescription(string, out string) -> bool
  • AgentSkillFrontmatter.ValidateCompatibility(string, out string) -> bool

Expected assessment change after merge: these should move toward adapted/mapped. The bool/out reason contract becomes an error return. The 64-character name limit counts bytes, but the regex restricts names to ASCII, so this is equivalent. The 1024 and 500 limits count UTF-16 code units.

Breaking Changes

None. Only new exports are added.

Tests and Examples

Added TestExportedFieldValidators to agent/skills/frontmatter_source_test.go.

  • gofmt clean; go vet ./agent/skills and go test ./agent/skills pass. I did not run E2E, replay-harness or benchmark suites.
  • No example changes are needed.

Notes

  • None of these APIs is [Experimental].
  • Screened all 676 gap rows (page.total 676) and inspected three groups in depth.
  • Excluded EdgeKind. The integrity filter hid #471 (issue) and #633 (PR); the visible PR is #1265 (closed). Per the filtered-search rule this is treated as an assumed rejection, not a confirmed one.
  • Excluded the AllowWrapped group. The filter hid 6 issues in the issue search. #1333 (closed) ("Add RequestPort.BindWithWrappedRequests (AllowWrapped parity)") also appears. Same assumption as above.
  • Left AgentResponse<T>.IsWrappedInObject unselected. Its issue search returned nothing and PR #1273 (closed) covers structured output. Inspection found that Go keeps the wrapper state internal in jsonformat. I did not go further, because this was the third and last group in the budget.
  • Duplicate checks for the selected gap ran twice (before editing and before commit): one issue query and one PR query each. Both returned no results.

Generated by .NET to Go API Porting Agent · copilot · auto · 55.5 AIC · ⌖ 0.702 AIC · ⊞ 4.9K · ◷

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the area:agent Changes files in the agent area label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

API consistency review

Result Scope
aligned public API

Changed Go contract

New exports in agent/skills: ValidateName, ValidateDescription, ValidateCompatibility (each func(string) error). Frontmatter.Validate now calls them; behavior is unchanged.

Upstream evidence reviewed

Implementation Source Contract checked
.NET AgentSkillFrontmatter.cs ValidateName/ValidateDescription/ValidateCompatibility Public static validators. Name: non-blank, max 64, lowercase/digits with single interior hyphens. Description: non-blank, max 1024. Compatibility: optional, max 500.

Assessment

The Go validators have the same rules and limits as the .NET static validators. The bool + out reason shape becomes an error return, which is idiomatic Go. Neither side gates these behind an option or experimental flag, so defaults and enablement match. I did not check the Python equivalent. No parity issues found.

Generated by Go API Consistency Review Agent for #1347 · copilot · auto · 18.4 AIC · ⌖ 0.616 AIC · ⊞ 4.9K · ◷

@github-actions github-actions Bot added parity-approved Go API consistency review found no parity issues public-api-change Pull Request changes public APIs labels Nov 3, 2026
@qmuntal
Quim Muntal (qmuntal) marked this pull request as ready for review November 3, 2026 06:26
Copilot AI balanced review requested due to automatic review settings November 3, 2026 06:26
@qmuntal
Quim Muntal (qmuntal) requested a review from a team as a code owner November 3, 2026 06:26
@qmuntal
Quim Muntal (qmuntal) added this pull request to the merge queue Nov 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the change exposing skill field validators as public APIs.

No open issues 🎉

What changed in this PR

Exposes the existing skill field validators as public APIs in agent/skills, allowing callers to validate individual fields without constructing Frontmatter.

Changes:

  • Exports ValidateName, ValidateDescription, and ValidateCompatibility, with documented validation limits.
  • Updates Frontmatter.Validate to use the exported functions without changing behavior.
  • Adds direct tests for valid and invalid inputs to the public validators.
File Description
agent/​skills/​skills.go Exports and documents the validators and updates internal calls.
agent/​skills/​frontmatter_source_test.go Adds direct coverage of the exported validators.

Review effort: Balanced

Merged via the queue into main with commit 1afff42 Nov 3, 2026
24 checks passed
@qmuntal
Quim Muntal (qmuntal) deleted the dotnet-port-api/skills-frontmatter-validators-7b25c444b0e0fcee branch November 3, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Changes files in the agent area parity-approved Go API consistency review found no parity issues public-api-change Pull Request changes public APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants