evidencecheck

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claim

type Claim struct {
	RawText        string
	Command        string
	Argv           []string
	ClaimedVerdict string // "PASS", "FAIL", "NOT_RUN", "BLOCK"
	Note           string
}

Claim represents one extracted evidence assertion.

func ParseClaims

func ParseClaims(text string) []Claim

ParseClaims extracts all evidence claims from markdown prose or mivia-report/v1 blocks.

type FailedClaim

type FailedClaim struct {
	Claim       Claim
	ActualExit  int
	ErrorOutput string
}

FailedClaim pairs a claimed PASS with the actual execution failure.

type ToolExecutionRecord

type ToolExecutionRecord struct {
	ToolName    string   `json:"tool_name"`
	Argv        []string `json:"argv"`
	CommandLine string   `json:"command_line,omitempty"`
	ExitCode    int      `json:"exit_code"`
	Output      string   `json:"output,omitempty"`
}

ToolExecutionRecord records one executed tool invocation in a turn or session.

type ValidationReport

type ValidationReport struct {
	Valid            bool
	TotalClaims      int
	VerifiedClaims   []Claim
	UnexecutedClaims []Claim
	FailedClaims     []FailedClaim
	Notices          []string
}

ValidationReport contains the outcome of cross-checking claims against tool execution records.

func Validate

func Validate(claims []Claim, history []ToolExecutionRecord) ValidationReport

Validate cross-checks extracted claims against recorded tool executions.

func ValidateText

func ValidateText(text string, history []ToolExecutionRecord) ValidationReport

ValidateText parses and validates claims directly from response text.

func (*ValidationReport) Error

func (r *ValidationReport) Error() error

Error returns an error if the report contains unexecuted or failed PASS claims.

func (*ValidationReport) SummaryNotice

func (r *ValidationReport) SummaryNotice() string

SummaryNotice returns a concise, human-readable summary of validation discrepancies.

Jump to

Keyboard shortcuts

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