evidence

package
v0.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package evidence renders CNCF AI Conformance evidence markdown from validation results. Evidence includes both structural validation and behavioral test outputs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckEntry

type CheckEntry struct {
	// Name is the check registry name (e.g., "accelerator-metrics").
	Name string

	// Status is the check outcome.
	Status validator.ValidationStatus

	// Reason is the check output/reason text.
	Reason string

	// Duration is how long the check took.
	Duration time.Duration

	// Artifacts contains diagnostic evidence captured during check execution.
	Artifacts []checks.Artifact
}

CheckEntry represents one check result within an evidence entry.

type EvidenceEntry

type EvidenceEntry struct {
	// RequirementID is the CNCF requirement identifier (e.g., "dra_support").
	RequirementID string

	// Title is the human-readable title for the evidence document.
	Title string

	// Description is a one-paragraph description of what this requirement demonstrates.
	Description string

	// Filename is the output filename (e.g., "dra-support.md").
	Filename string

	// Checks contains the individual check results contributing to this entry.
	Checks []CheckEntry

	// Status is the aggregate status: pass if all checks pass, fail if any fails.
	Status validator.ValidationStatus

	// GeneratedAt is the timestamp when evidence was generated.
	GeneratedAt time.Time
}

EvidenceEntry holds all data needed to render a single evidence document. Multiple checks can contribute to a single entry when they share an EvidenceFile.

type Option

type Option func(*Renderer)

Option configures a Renderer.

func WithOutputDir

func WithOutputDir(dir string) Option

WithOutputDir sets the output directory for evidence files.

type Renderer

type Renderer struct {
	// contains filtered or unexported fields
}

Renderer generates CNCF conformance evidence documents from validation results.

func New

func New(opts ...Option) *Renderer

New creates a new evidence Renderer with the given options.

func (*Renderer) Render

func (r *Renderer) Render(ctx context.Context, result *validator.ValidationResult) error

Render generates evidence markdown files from a validation result. Only checks with SubmissionRequirement=true produce evidence files. Checks with status "skipped" are excluded from evidence output.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL