evidence

package
v0.10.12 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaRelativePath = "scripts/benchmark/benchmark-evidence.schema.json"
	SchemaVersion      = "benchmark-evidence/v1"
)

Variables

This section is empty.

Functions

func StableRecordID

func StableRecordID(doc map[string]any) (string, error)

StableRecordID returns the deterministic content-derived record_id for a record that omits record_id.

Types

type AppendReport

type AppendReport struct {
	LedgerPath string
	Added      int
	Duplicates []string
}

AppendReport summarizes the effect of an append operation.

type DuplicateRecordsError

type DuplicateRecordsError struct {
	RecordIDs []string
}

DuplicateRecordsError reports duplicate evidence records that were skipped.

func (*DuplicateRecordsError) Error

func (e *DuplicateRecordsError) Error() string

type Validator

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

Validator loads and applies the benchmark evidence schema from a repo root.

func NewValidator

func NewValidator(repoRoot string) (*Validator, error)

NewValidator compiles the benchmark evidence schema from repoRoot.

func (*Validator) AppendLedger

func (v *Validator) AppendLedger(inputPath, ledgerPath string) (*AppendReport, error)

AppendLedger appends validated evidence records to a JSONL ledger.

func (*Validator) ValidateFile

func (v *Validator) ValidateFile(path string) ([]map[string]any, error)

ValidateFile validates one JSON or JSONL evidence file and returns the normalized records, including any generated record_id values.

Jump to

Keyboard shortcuts

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