Skip to content

[deep-report] Migrate 5 high-traffic pkg/workflow/*_validation.go files to NewValidationError #56104

Description

@github-actions

Description

53 of 82 *_validation.go files repo-wide (mostly in pkg/workflow) raise raw errors.New/fmt.Errorf for user-facing YAML/frontmatter validation instead of using the existing NewValidationError(field, value, reason, suggestion) helper (pkg/workflow/workflow_errors.go, pkg/parser/validation_error.go). These are the messages workflow authors see directly when gh aw compile rejects invalid frontmatter, so they matter more than generic internal errors.

Task

Migrate the 5 highest-traffic offenders to NewValidationError: pkg/workflow/secrets_validation.go, glob_validation.go, permissions_validation.go, docker_validation.go, engine_validation.go. Split each existing message into field / value / reason / suggestion (with a concrete valid example), following .github/skills/error-messages/SKILL.md. No behavioral change — message construction only.

Acceptance Criteria

  • All 5 files' validation errors converted to NewValidationError calls with concrete example suggestions
  • go test ./pkg/workflow/... -run Validation passes (update string-matching assertions as needed)
  • make lint-error-messages-report shows 0 violations for these 5 files
  • No behavioral change to validation logic

Expected Impact

Improves the clarity of the most user-visible error messages in the repo — those thrown at gh aw compile time when a workflow author's frontmatter is invalid.

Suggested Agent

Repository Quality Improvement Agent, or a general coding agent

Estimated Effort

Medium (1-4 hours)

Data Source

DeepReport analysis, 2026-08-26 cycle — Repository Quality Improvement Report, Error Message Actionability Debt (discussion #56045, Task 2)

Generated by 🔬 Deep Report · claude · agent · 151 AIC · ⌖ 9.14 AIC · ⊞ 12.4K · ◷

  • expires on Aug 28, 2026, 11:04 AM UTC-08:00

Activity

  1. github-actions commented on Aug 28, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-08-28T19:04:16.332Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions