Skip to content

Migrate remaining Python validators to Go #2623

Description

@devantler

🤖 Generated by the Daily AI Engineer

Objective

Migrate the remaining first-party Python validation scripts and tests to Go so repository automation follows the Bash-or-Go scripting standard introduced alongside #2622.

Details

The repository still tracks three Python validators, one Python test module, and a generated bytecode artifact:

  • scripts/validate-embedded-json.py
  • scripts/validate-homepage-bookmarks.py
  • scripts/validate-naming.py
  • scripts/tests/test_validate_homepage_bookmarks.py
  • scripts/tests/__pycache__/test_validate_homepage_bookmarks.cpython-311.pyc

CI and AGENTS.md also invoke or document the Python entry points. Keeping two implementation stacks increases maintenance cost, leaves generated bytecode in source control, and makes the repository scripting convention inconsistent.

Port one validator at a time to a small Go command under scripts/, using table-driven tests while preserving each validator's accepted inputs, diagnostics, exit behavior, and fail-closed rules. Update CI, path filters, and documentation with each migration, then remove the superseded Python sources and bytecode.

Checklist

  • All three validators have Go replacements with equivalent valid and invalid behavior.
  • Go tests cover representative success cases, malformed input, and each important validation failure.
  • CI, path filters, documentation, and local command examples invoke the Go replacements.
  • No first-party validator or validator test requires Python.
  • No tracked .py, .pyc, or __pycache__ validator artifacts remain under scripts/.
  • go test -race ./..., go vet ./..., and actionlint pass.
  • No existing validation rule is weakened.

Dependencies

Builds on the Go module and validator pattern introduced by #2622. The embedded-JSON validator originated in #2480.

Notes

Rough size: medium, likely two to three focused PRs with one validator migrated per increment.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions