Skip to content

feat: add policyEvaluationsCount and policyViolationsCount to attestation predicate#2976

Merged
migmartri merged 1 commit into
chainloop-dev:mainfrom
migmartri:feat/policy-evaluation-counts
Apr 1, 2026
Merged

feat: add policyEvaluationsCount and policyViolationsCount to attestation predicate#2976
migmartri merged 1 commit into
chainloop-dev:mainfrom
migmartri:feat/policy-evaluation-counts

Conversation

@migmartri

Copy link
Copy Markdown
Member

Summary

  • Add policyEvaluationsCount and policyViolationsCount fields to the attestation predicate, alongside the existing policyHasViolations boolean
  • Expose the new counts through PolicyEvaluationStatus in the gRPC API response
  • Consolidate gated-violation detection into groupEvaluations, eliminating a redundant loop in predicate()

Closes #2975

…tion predicate

Add summary count fields to the attestation predicate so external consumers
can know the total number of policy evaluations and violations without
downloading the full policy evaluations bundle from CAS.

Also consolidates the gated-violation detection loop into groupEvaluations,
eliminating a redundant iteration over policy evaluations in predicate().

Closes chainloop-dev#2975

Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
@migmartri migmartri requested review from a team and jiparis April 1, 2026 07:51

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 13 files

Comment thread pkg/attestation/renderer/chainloop/v02.go
@migmartri migmartri merged commit 7a21421 into chainloop-dev:main Apr 1, 2026
15 checks passed
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.

feat: add policyEvaluationsCount and policyViolationsCount to attestation predicate

2 participants