Skip to content

[deep-report] Split compiler_validators.go (465 lines) — extract validatePermissions per AGENTS.md #29145

@github-actions

Description

@github-actions

Description

The Repository Quality Improvement agent (discussion #29116) found that pkg/workflow/compiler_validators.go is 465 lines — 55% over the AGENTS.md hard limit of 300 lines. The file mixes multiple validation concerns, with validatePermissions alone spanning ~100 lines.

AGENTS.md specifies:

  • Hard limit: 300 lines per validation file
  • 30% comment coverage minimum
  • Each validator file should have a single responsibility

Currently oversized validation files (all violating the hard limit):

File Lines
pkg/workflow/compiler_validators.go 465
pkg/workflow/safe_outputs_validation_config.go 440
pkg/workflow/permissions_validation.go 359
pkg/cli/run_workflow_validation.go 350

Expected Fix

  1. Extract validatePermissions from compiler_validators.go into a new pkg/workflow/permissions_compiler_validator.go
  2. Verify that compiler_validators.go drops below 300 lines after extraction
  3. Ensure comment coverage meets the 30% minimum in extracted file

Expected Impact

AGENTS.md compliance, improved navigability and testability of the validator layer.

Suggested Agent

Copilot or Claude code agent — mechanical extraction with existing patterns in the codebase as guidance.

Estimated Effort

Quick (< 1 hour)

Data Source

DeepReport Intelligence Briefing — 2026-04-29 · Repository Quality discussion #29116 · Run §25117657405

Generated by DeepReport - Intelligence Gathering Agent · ● 654.3K ·

  • expires on May 1, 2026, 3:37 PM UTC

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions