Skip to content

[squad-plan] Fix error message compliance: validation_helpers.go, utc_offset.go, templatables.go, safe_outputs_validation.go, model_costs_pri [Content truncated due to length] #52171

Description

@github-actions

Objective

Bring the error messages in these 5 files up to the repo's error-message style guide.

Context

Issue #52163 asks to repair error messages in batches of 5 files max. The lint-error-messages workflow (see run https://github.com/github/gh-aw/actions/runs/31510578209/job/93862987189) flagged these files as low-compliance:

  • pkg/workflow/validation_helpers.go: 1/5 compliant (20%)
  • pkg/workflow/utc_offset.go: 2/6 compliant (33%)
  • pkg/workflow/templatables.go: 8/12 compliant (66%)
  • pkg/workflow/safe_outputs_validation.go: 1/5 compliant (20%)
  • pkg/workflow/model_costs_pricing_validation.go: 0/4 compliant (0%)

Implementation Guidance

  1. Read .github/skills/error-messages/SKILL.md for the style guide before editing.
  2. For each fmt.Errorf / NewValidationError call flagged non-compliant, rewrite the message using the template: [what's wrong]. [what's expected]. [example of correct usage].
  3. Avoid standalone negative wording (invalid, cannot, must, failed) without pairing it with expected behavior and a concrete fix.
  4. Use NewValidationError(field, value, reason, suggestion) for *_validation.go files where applicable; use fmt.Errorf with %w wrapping for operational errors, adding recovery guidance.
  5. Keep changes surgical — do not alter error-handling logic or control flow, only message text.

Acceptance Criteria

  • Running the lint-error-messages check locally (or via gh aw tooling used by that workflow) shows improved/100% compliance for these 5 files.
  • make fmt run after changes.
  • make test-unit (or targeted package tests for pkg/workflow) passes.
  • No behavior change — only error message text updated.

Dependency Notes

Independent of other batches; can be worked in parallel with the other 7 sub-issues from this plan.

Generated by 🧑‍🤝‍🧑 Squad Plan · auto · 73.9 AIC · ⌖ 8.23 AIC · ⊞ 9.3K ·
Comment /squad-plan to run again

Metadata

Metadata

Labels

cookieIssue Monster Loves Cookies!

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions