Skip to content

[deep-report] Split mcp_config_validation.go (462 lines) to restore AGENTS.md 300-line compliance #25672

@github-actions

Description

@github-actions

The AGENTS.md file mandates a hard limit of 300 lines per validation file, yet 9 validation files currently exceed this limit. The biggest offender is pkg/workflow/mcp_config_validation.go at 462 lines (+162 over limit), which contains two clearly separable domains:

  1. Tools-section validation — validates the presence and structure of MCP tool entries
  2. MCP schema/requirements validation — validates MCP server configs against the declared schema

The [Repository Quality Improvement Report (2026-04-10)](audits discussion) already identified the split boundary. Other files in violation:

File Lines Excess
pkg/workflow/mcp_config_validation.go 462 +162
pkg/workflow/tools_validation.go 368 +68
pkg/workflow/dispatch_workflow_validation.go 363 +63

Expected Impact

Restores codebase compliance with AGENTS.md governance rules. Improves testability and cognitive overhead for validators. Sets a precedent for the remaining 6 oversize files.

Suggested Agent

Claude engine — Read mcp_config_validation.go, identify the clean split boundary between tools-section and MCP schema validation logic, create mcp_schema_validation.go for the split-out code, update the corresponding test file, and verify go build ./... passes.

Estimated Effort

Medium (1–4 hours) — involves careful refactoring with test coverage verification.

Data Source

[DeepReport Intelligence Briefing — April 10, 2026] | [repository-quality] Repository Quality Improvement Report – Validation File Size Governance (2026-04-10)

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

  • expires on Apr 12, 2026, 3:04 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