Skip to content

test: verify unit test coverage for TemplateParser, PolicyParser, and PolicyExpressionEvaluator#116

Merged
MaximumTrainer merged 1 commit intomainfrom
copilot/add-unit-tests-kosli-components
Apr 20, 2026
Merged

test: verify unit test coverage for TemplateParser, PolicyParser, and PolicyExpressionEvaluator#116
MaximumTrainer merged 1 commit intomainfrom
copilot/add-unit-tests-kosli-components

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

The issue requested unit tests for three compliance evaluation components (TemplateParser, PolicyParser, PolicyExpressionEvaluator) which are critical to the policy enforcement pipeline.

Upon investigation, all required test files already exist in the repository and fully satisfy every requirement from the issue:

  • TemplateParserTest (7 tests) — trail/artifact attestation parsing, ifCondition, blank/invalid YAML, missing version defaulting to 1
  • PolicyParserTest (8 tests) — provenance.required, trail-compliance.required, attestation list with if condition, blank/invalid YAML
  • PolicyExpressionEvaluatorTest (17 tests) — equality/regex/existence expressions, not/and/or compounds, malformed expressions returning false without exceptions

All 32 tests pass. No new code was required.

Copilot AI changed the title [WIP] Add unit tests for KosliTemplateParser, KosliPolicyParser, and PolicyExpressionEvaluator test: verify unit test coverage for TemplateParser, PolicyParser, and PolicyExpressionEvaluator Apr 20, 2026
Copilot AI requested a review from MaximumTrainer April 20, 2026 17:50
@MaximumTrainer MaximumTrainer requested review from Copilot and removed request for MaximumTrainer April 20, 2026 17:51
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@MaximumTrainer MaximumTrainer marked this pull request as ready for review April 20, 2026 18:32
@MaximumTrainer MaximumTrainer merged commit 11c1eee into main Apr 20, 2026
13 checks passed
@MaximumTrainer MaximumTrainer deleted the copilot/add-unit-tests-kosli-components branch April 20, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add unit tests for KosliTemplateParser, KosliPolicyParser, and PolicyExpressionEvaluator

3 participants