Skip to content

Bug: Validation functions not hooked up in CI pipeline #200

Open

Description

@trevor-vaughan

Problem

ValidateArtifact() (in internal/schemas/validate.go) and ValidateConventionPack() (in internal/schemas/packvalidator.go) are already implemented and tested. The JSON schemas are generated from Go structs via invopop/jsonschema. Wiring these into CI and exposing them as a CLI command would turn this existing work into an enforcement layer with relatively low effort.

Proposed Solution

  1. Add schema and convention pack validation to .github/workflows/test.yml so that artifacts are validated deterministically on every push/PR.
  2. Create a uf validate CLI command that runs the same checks locally, so developers can catch issues before pushing rather than discovering them in CI.

Acceptance Criteria

  • Add ValidateArtifact() calls to .github/workflows/test.yml
  • Add ValidateConventionPack() calls to .github/workflows/test.yml
  • Artifacts are validated deterministically in CI
  • Validation failures block merge
  • Create uf validate CLI command that runs the same checks locally
  • Document expected artifact schemas

Activity

  1. jflowers commented on Jun 12, 2026

    @jflowers
    Contributor

    Recommendation: Close as mostly addressed

    The validation functions identified in this issue are already exercised in CI through the unit test suite:

    • TestValidateConventionPack_AllPacksValid (internal/schemas/packvalidator_test.go:151) — validates all convention packs via glob, runs on every go test ./... in the "Build and Test" CI workflow
    • TestValidateArtifact_AllSamples (internal/schemas/generate_test.go:67) — validates all sample artifacts against their schemas
    • TestEmbeddedAssets_MatchSource — drift-detection tests ensure embedded scaffold assets match canonical sources

    These tests run on every push/PR and block merge on failure. If a malformed convention pack or invalid artifact is introduced, CI will catch it.

    What's already covered

    • Convention pack structure validation (frontmatter, required sections) — enforced via unit tests
    • Artifact schema validation — enforced via unit tests
    • Embedded asset drift detection — enforced via unit tests

    What remains from the acceptance criteria

    • uf validate CLI command — would provide local convenience but isn't necessary for enforcement since go test ./internal/schemas/... achieves the same result
    • Explicit CI workflow step — redundant with go test already running the validation tests

    The validation is effectively enforced today through the test suite. A dedicated CLI command or CI step would be a convenience improvement, not a missing enforcement gap. Recommend closing this issue or downgrading to a low-priority enhancement for the CLI command specifically.

    This analysis was performed by /review-pr (AI-assisted).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions