Skip to content

Validate governance configuration at load time #19

Description

@vitormattos

Goal

Validate the complete caller-owned governance configuration before repository probing or reconciliation begins.

Current gap

loadGovernanceConfig checks that JSON parses to an object and then casts it to GovernanceConfig. Structural/type errors can therefore fail later during policy resolution with less useful diagnostics.

Requirements

Validate:

  • top-level keys and shapes;
  • named policy/ruleset structure;
  • enforcement/target values;
  • bypass actor types and modes;
  • ref include/exclude arrays;
  • supported rule types and parameters;
  • condition structure;
  • repository selections and overrides.

Safety

  • unknown/invalid configuration must fail closed before mutation;
  • diagnostics should identify the configuration path that is invalid;
  • validation must not silently discard unknown policy data.

Tests

Add malformed fixtures covering incorrect scalar types, missing nested values, unsupported rules and invalid actor definitions, plus a valid full caller configuration fixture.

This is a hardening follow-up and does not block the initial v0.1.0 release.

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions