Skip to content

[plan] Bring safe_outputs_validation.go under the 300-line hard limit #26439

Closed

Description

@github-actions

Context

From discussion #26431 (Repository Quality Improvement Report — Validator Complexity Compliance).

pkg/workflow/safe_outputs_validation.go is 358 lines (19% over the 300-line hard limit in AGENTS.md). The file already has a companion safe_outputs_validation_config.go. The validateSafeOutputsMax function (~93 lines) handles a distinct sub-domain (max value validation) that can be extracted independently.

Objective

Extract max-value validation functions into a dedicated file to bring safe_outputs_validation.go under the hard limit.

Steps

  1. Create pkg/workflow/safe_outputs_max_validation.go (same workflow package) and move these functions:
    • validateSafeOutputsMax
    • isInvalidMaxValue
    • Optionally also: validateSafeOutputsAllowWorkflows (if needed to get under 300 lines)
  2. Keep in safe_outputs_validation.go:
    • validateSafeOutputsAllowedDomains
    • validateSafeOutputsTarget
    • validateTargetValue
    • isGitHubExpression
  3. Verify safe_outputs_validation.go is under 300 lines
  4. Run make fmt && make lint && go test -run ".*SafeOutput.*|.*safeOutput.*" ./pkg/workflow/

Acceptance Criteria

  • pkg/workflow/safe_outputs_validation.go is under 300 lines after the refactor
  • New file pkg/workflow/safe_outputs_max_validation.go created with validateSafeOutputsMax and isInvalidMaxValue (at minimum)
  • No behaviour changes — pure file reorganization within the workflow package
  • make fmt and make lint pass
  • All existing tests pass (make test-unit)

Generated by Plan Command for issue #discussion #26431 · ● 150.7K · ◷

  • expires on Apr 17, 2026, 1:25 PM UTC

Activity

  1. added
    cookie
    on Apr 15, 2026
  2. github-actions commented on Apr 16, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster has assigned this to Copilot!

    I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot coding agent.

    The Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · ● 456.4K · ◷

  3. self-assigned this
    on Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ai-generatedcookieplan

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions