Skip to content

refactor(validation): port naming validator to Go #2674

Description

@devantler

🤖 Generated by the Daily AI Assistant

Part of #2623

Evidence

scripts/validate-naming.py is the oldest remaining first-party Python validator. CI invokes it directly and AGENTS.md documents that command, while Platform’s tooling constitution is Bash-or-Go. The validator has no focused regression suite today, so a mechanical rewrite without parity fixtures could silently weaken manifest naming enforcement.

Audience and impact

Platform maintainers and contributors need the naming gate to stay deterministic and fail closed without retaining a second scripting runtime. A parity-preserving Go port removes that runtime dependency while keeping every existing diagnostic and exemption stable.

Expected behavior

The Go command accepts the current zero-argument repository-root flow, also works from another current directory, reports the same grouped/sorted diagnostics and exit status, and preserves all Kubernetes, Flux, patch, CR-folder, vendored-bundle, and Talos naming rules.

Acceptance criteria

  • Add a focused Go package/command with red-first tests covering every current diagnostic group and exemption.
  • Preserve deterministic ordering, success/failure messages, exit codes, acronym-aware Kind conversion, pluralization, .enc.yaml, multi-document, and alternate-CWD behavior.
  • Delete scripts/validate-naming.py; add no Python file or Python invocation.
  • Update CI path filters/job commands and AGENTS.md to use the Go validator and its tests.
  • Pass race tests, vet/lint, actionlint, the real naming command, and both local/prod static Platform validations without starting a cluster.

Size

Medium — one isolated validator and its direct CI/documentation consumers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for Refactor.

    Projects

    Status
    📥 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions