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.
Goal
Validate the complete caller-owned governance configuration before repository probing or reconciliation begins.
Current gap
loadGovernanceConfigchecks that JSON parses to an object and then casts it toGovernanceConfig. Structural/type errors can therefore fail later during policy resolution with less useful diagnostics.Requirements
Validate:
Safety
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.0release.