Skip to content

M0: Freeze v2 config schema and replace ad hoc YAML parsing #2

@dbrosio3

Description

@dbrosio3

Goal

Freeze the v2 .pushgate.yml config schema and replace the current grep/awk-based config reader with a reliable parser and validator.

User value

Users get predictable behavior, useful validation errors, and support for real YAML structures without fragile formatting constraints.

Implementation notes

  • Turn the schema decisions left open by the v2 product contract into a versioned .pushgate.yml schema: top-level sections, defaults, deterministic command shape, AI mode fields, and AI provider selection/extension points.
  • Validate .pushgate.yml against that versioned schema.
  • Keep .push-review.yml compatibility in the migration layer, not as the primary parser or v2 vocabulary.
  • Report unknown keys, invalid enum values, missing required fields, and unsafe command shapes.
  • Produce typed internal config objects that the deterministic runner and local AI layer can consume without parsing YAML again.

Risks / tradeoffs

  • A real parser may introduce a runtime or packaging dependency.
  • Schema decisions made here constrain the runner, command-check, and provider tasks that follow.
  • Staying pure Bash keeps installation simple but would keep YAML support brittle.

Suggested priority

P0

Milestone

M0: Foundation

TBD considerations

  • Runtime/distribution choice: zero-runtime Bash, standalone binary, npm package, Homebrew formula, or hybrid.
  • Final deterministic command syntax and provider config shape before runner implementation depends on them.

Acceptance criteria

  • The v2 .pushgate.yml schema is versioned and documents the config surface needed by deterministic checks and local AI provider selection.
  • Valid v2 config loads consistently into typed internal config.
  • Invalid config exits with clear actionable errors.
  • Tests cover multiline lists, nested objects, missing keys, invalid enums, comments, unsafe command shapes, and provider-selection validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    M0Milestone M0: foundationP0Priority P0: foundation or required for v2enhancementNew feature or requestv2ai-pushgate v2 roadmap

    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