parser: adopt structured duplicate-name validation errors for inline skills and sub-agents#54715
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
PR Triage
|
There was a problem hiding this comment.
Pull request overview
Introduces actionable duplicate-name validation for inline skills and sub-agents.
Changes:
- Adds structured parser validation errors.
- Updates duplicate-name extraction paths and tests.
Show a summary per file
| File | Description |
|---|---|
pkg/parser/validation_error.go |
Adds parser validation-error types. |
pkg/parser/inline_skill_extractor.go |
Returns actionable duplicate-skill errors. |
pkg/parser/inline_skill_extractor_test.go |
Verifies skill error details. |
pkg/parser/sub_agent_extractor.go |
Returns actionable duplicate-agent errors. |
pkg/parser/sub_agent_extractor_test.go |
Verifies agent error details. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Balanced
| // ValidationError represents an input validation error in parser package checks. | ||
| type ValidationError struct { |
|
@copilot this PR still needs forward progress before maintainer review.
Run: https://github.com/github/gh-aw/actions/runs/32563890634
|
…25-b696-fff45a9c1bd7
…errors Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Investigated both failures:
Validations rerun locally on the latest commit:
|
|
@copilot
|
Status check on this pass:
|
|
@copilot please refresh the branch if needed and continue with the pr-finisher skill
|
Branch is already up to date with |
|
@copilot this PR still needs forward progress before maintainer review.
Failed checks listed on the current head:
Run: https://github.com/github/gh-aw/actions/runs/32568456526
|
… errors Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Resolved in f866ce5: extracted a shared, dependency-neutral Validations rerun on this head: |
PR TriageCategory: Structured duplicate-name validation errors for parser. Reviewer commented only, no CI data. Automated triage — run 32572524009
|
|
@copilot this PR still needs forward progress before maintainer review.
Run: https://github.com/github/gh-aw/actions/runs/32573431024
|
…25-b696-fff45a9c1bd7 Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Branch refreshed: merged Validations rerun on the current head: |
pkg/parserreturned plain duplicate-name errors for inline skills/sub-agents, which lacked field context and remediation guidance. This change introduces structured validation output at those sites so duplicate definitions report reason + actionable suggestion consistently.Structured duplicate-name errors in parser extraction paths
fmt.Errorf(...)returns in:inline_skill_extractor.gosub_agent_extractor.goNewValidationError(field, value, reason, suggestion)with:field:skills/sub-agentsvalue: duplicate namereason:duplicate name already definedsuggestion: rename or remove one duplicate definition.Parser-local validation error helper
pkg/parser/validation_error.gowith parser-scopedValidationError+NewValidationError(...).Duplicate-name test coverage updated
inline_skill_extractor_test.gosub_agent_extractor_test.goRun: https://github.com/github/gh-aw/actions/runs/32563890634> Generated by 👨🍳 PR Sous Chef · gpt54 · 19.3 AIC · ⌖ 8.31 AIC · ⊞ 9.5K · ◷
run https://github.com/github/gh-aw/actions/runs/32565294954> Generated by 👨🍳 PR Sous Chef · gpt54 · 11.9 AIC · ⌖ 8.18 AIC · ⊞ 9.5K · ◷