evalrunner

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package evalrunner implements validated, split-bound generation/retrieval and independent offline grading. Successful generation is not benefit. Deterministic graders are explicit mechanism-only test tools; real answers remain pending until blinded, hash-bound grades and paired gates exist. See docs/EVALUATION_USAGE.md for evidence custody and control limitations.

Index

Constants

View Source
const (
	ShapeNone    = "none"    // B0, B1: no personal context
	ShapeRecords = "records" // B2, B3: a flat record list
	ShapePack    = "pack"    // B4 and the ablations: a ContextPack
)

Context shapes.

View Source
const (
	WinThreshold     = 0.60
	LossThreshold    = 0.20
	QualityTolerance = 0.25
	PassThreshold    = 3.0
)
View Source
const (
	RecallThreshold    = 0.90
	PrecisionThreshold = 0.80
)

Retrieval thresholds (ACCEPTANCE §5; locked at blueprint design targets).

View Source
const DefaultCommandMaxOutput = 4 << 20

DefaultCommandMaxOutput bounds one generation's stdout.

View Source
const DefaultCommandTimeout = 10 * time.Minute

DefaultCommandTimeout bounds one external generation.

View Source
const ResolverVersion = "beme-alpha.1"

ResolverVersion labels the resolver release the runner links against.

View Source
const RubricVersion = "0-4-blind-paired"

RubricVersion is the behavioral rubric (EVALUATION_CONTRACT §5.1).

Variables

AllArms is the complete registry.

CanonicalRoles defines the canonical-only ablation: items whose source role is canonical foundation, canonical reusable knowledge, trusted project policy, or declassified-safe (the user-approved safe form of canonical content that work-safe projections are built from). Learned observations, episodic evidence, and trusted references are excluded, and so is every precedent-kind item regardless of role.

Functions

func CanonicalOutputPath

func CanonicalOutputPath(path string) (string, error)

CanonicalOutputPath resolves existing ancestors, including symlinks, before appending the not-yet-created suffix. It does not create directories.

func CheckOutputOutsideBundle

func CheckOutputOutsideBundle(output, bundle string) error

func RenderContext

func RenderContext(ctx ArmContext) (string, error)

RenderContext renders the deterministic context view ("" for ShapeNone).

func RenderPrompt

func RenderPrompt(task, bootstrapText string, ctx ArmContext) (string, error)

RenderPrompt renders the model prompt for one generation.

func SplitCommand

func SplitCommand(s string) ([]string, error)

SplitCommand splits a command line into argv without a shell: whitespace separates arguments; single or double quotes group text (quotes removed). There is no escape character, so Windows paths with backslashes pass through unchanged.

Types

type Arm

type Arm string

Arm identifies a baseline or ablation condition (§18.6).

const (
	ArmB0             Arm = "B0"       // plain agent
	ArmB1             Arm = "B1"       // bootstrap only
	ArmB2             Arm = "B2"       // raw full-profile dump (all eligible under capability)
	ArmB3             Arm = "B3"       // retrieval without precedence/provenance
	ArmB4             Arm = "B4"       // full Be Me
	ArmAblNoScope     Arm = "no-scope" // (synthetic data only, §18.6)
	ArmAblNoProv      Arm = "no-provenance"
	ArmAblNoUnknowns  Arm = "no-unknowns"
	ArmAblCanonOnly   Arm = "canonical-only"
	ArmAblLearnedOnly Arm = "learned-only"
)

func ParseArms

func ParseArms(s string) ([]Arm, error)

ParseArms parses a comma-separated arm list ("all" selects AllArms).

type ArmConstruction

type ArmConstruction struct {
	Arm Arm `json:"arm"`
	// Source: none | bootstrap_only | stage_a_eligible_dump |
	// stage_a_ranked_retrieval | session_resolve |
	// session_resolve_without_scope.
	Source    string `json:"source"`
	Transform string `json:"transform,omitempty"`
	Ordering  string `json:"ordering,omitempty"`
	// Eligible: Stage-A-eligible records available to the arm.
	Eligible int `json:"eligible"`
	// Selected: items that entered the context.
	Selected int `json:"selected"`
	// Truncated: items dropped by a token budget.
	Truncated int `json:"truncated"`
	// Removed: items or provenance references removed by an ablation
	// transform.
	Removed      int `json:"removed"`
	BudgetTokens int `json:"budget_tokens,omitempty"`
}

ArmConstruction describes how an arm's context was built. It is recorded in the owner-side evidence for every generation.

type ArmContext

type ArmContext struct {
	Shape   string                 `json:"shape"`
	Records []resolver.ContextItem `json:"records,omitempty"`
	Pack    *resolver.Pack         `json:"pack,omitempty"`
}

ArmContext is the personal context one arm gives the model.

func (ArmContext) Items

func (c ArmContext) Items() []resolver.ContextItem

Items returns every context item in rendered order.

type Case

type Case struct {
	SchemaVersion string  `json:"schema_version"`
	Harness       *string `json:"harness"`
	Provenance    struct {
		ApprovedByUser bool     `json:"approved_by_user"`
		EvidenceRefs   []string `json:"evidence_refs"`
		ValidAt        string   `json:"valid_at"`
		CandidateNote  string   `json:"candidate_note"`
	} `json:"provenance"`
	ID         string `json:"id"`
	Status     string `json:"status"`
	GoldType   string `json:"gold_type"`
	Category   string `json:"category"`
	Risk       string `json:"risk"`
	Capability string `json:"capability"`
	Scenario   struct {
		Task                string   `json:"task"`
		Workspace           string   `json:"workspace"`
		RepositoryFixture   string   `json:"repository_fixture"`
		ExcludedInformation []string `json:"excluded_information"`
	} `json:"scenario"`
	Gold struct {
		AcceptableDecisions     []string `json:"acceptable_decisions"`
		UnacceptableDecisions   []string `json:"unacceptable_decisions"`
		MandatoryConclusions    []string `json:"mandatory_conclusions"`
		ProhibitedConclusions   []string `json:"prohibited_conclusions"`
		ExpectedUnknowns        []string `json:"expected_unknowns"`
		RequiredEvidenceRefs    []string `json:"required_evidence_refs"`
		OptionalEvidenceRefs    []string `json:"optional_evidence_refs,omitempty"`
		ForbiddenEvidenceRefs   []string `json:"forbidden_evidence_refs,omitempty"`
		RelevanceLabelsComplete bool     `json:"relevance_labels_complete,omitempty"`
	} `json:"gold"`
	Grading struct {
		Rubric  string `json:"rubric"`
		Repeats int    `json:"repeats"`
	} `json:"grading"`
}

Case is a golden case loaded from a corpus (schema-conformant).

type CaseResult

type CaseResult struct {
	CaseID    string         `json:"case_id"`
	Arm       Arm            `json:"arm"`
	Outcome   RunOutcome     `json:"outcome"`
	Reason    string         `json:"reason,omitempty"`
	Score     float64        `json:"score,omitempty"` // 0–4 mean across repeats
	PerRepeat []RepeatResult `json:"per_repeat,omitempty"`
}

CaseResult records one case×arm (+repeats) execution.

type CommandProvider

type CommandProvider struct {
	Argv      []string
	Timeout   time.Duration
	MaxOutput int
	Declared  ModelSettings
}

CommandProvider runs an external command per generation: the rendered prompt is written to its stdin and its stdout is the generated text. The command is executed directly (no shell). It receives only the prompt — no arm label, case ID, or pack structure.

A command cannot report its model settings, so Declared carries what the owner declares for the run; unset identity fields report "unreported".

func NewCommandProvider

func NewCommandProvider(command string, declared ModelSettings, timeout time.Duration) (*CommandProvider, error)

NewCommandProvider parses command with SplitCommand.

func (*CommandProvider) Generate

func (*CommandProvider) Name

func (c *CommandProvider) Name() string

func (*CommandProvider) Settings

func (c *CommandProvider) Settings() ModelSettings

type Corpus

type Corpus struct {
	Dir   string
	Cases []Case
	// Files maps every supported corpus case file name to "sha256:<hex>" of its
	// bytes as loaded.
	Files map[string]string

	Bytes    map[string][]byte `json:"-"`
	Coverage Coverage          `json:"coverage"`
	// contains filtered or unexported fields
}

Corpus is a validated flat directory of JSON/YAML/YML golden cases.

func LoadCorpus

func LoadCorpus(dir string) (*Corpus, error)

LoadCorpus never silently drops supported formats. split-manifest.json is a reserved administrative file, not a golden case. Other directories are rejected: a corpus is a flat directory, not a recursive private-data scan.

func (*Corpus) FixtureHash

func (c *Corpus) FixtureHash(caseID string) string

FixtureHash is the content hash of the file defining caseID ("" when unknown).

func (*Corpus) Version

func (c *Corpus) Version() string

Version is the dataset version: a digest over every corpus file name and content hash, so adding, removing, renaming, or editing a case changes it.

type Coverage

type Coverage struct {
	Physical int               `json:"physical_case_files"`
	Loaded   int               `json:"loaded"`
	Selected int               `json:"selected"`
	Excluded map[string]string `json:"excluded"`
}

type DeterministicGrader

type DeterministicGrader struct{}

DeterministicGrader implements the 0–4 rubric mechanically for mock providers: acceptable-decision keyword presence → ≥3; mandatory conclusions covered add; prohibited conclusion present → 0 (blocker). Live grading is human/blind per the contract; this grader exists so the runner is fully testable end-to-end without paid models.

func (DeterministicGrader) Grade

func (DeterministicGrader) ID

func (DeterministicGrader) Version

func (DeterministicGrader) Version() string

type Endpoint

type Endpoint struct {
	Wins        int       `json:"wins"`
	Ties        int       `json:"ties"`
	Losses      int       `json:"losses"`
	Denominator int       `json:"denominator"`
	Exclusions  int       `json:"exclusions"`
	WinRate     float64   `json:"win_rate"`
	LossRate    float64   `json:"loss_rate"`
	Effect      float64   `json:"effect"`
	EffectCI    *Interval `json:"effect_ci95"`
	WinCI       *Interval `json:"win_ci95"`
	LossCI      *Interval `json:"loss_ci95"`
}

type EvaluatorIdentity

type EvaluatorIdentity struct {
	ID          string `json:"id"`
	Version     string `json:"version"`
	Independent bool   `json:"independent"`
	Blinded     bool   `json:"blinded"`
	Conflicts   string `json:"conflicts"`
}

type FrozenSplit

type FrozenSplit struct {
	SchemaVersion     string        `json:"schema_version"`
	ApprovedByUser    bool          `json:"approved_by_user"`
	Frozen            bool          `json:"frozen"`
	ApprovalRef       string        `json:"approval_ref"`
	EvidenceClass     string        `json:"evidence_class"` // synthetic_mechanism | owner_corpus
	DatasetVersion    string        `json:"dataset_version"`
	EvaluatorProtocol string        `json:"evaluator_protocol"`
	RubricVersion     string        `json:"rubric_version"`
	BootstrapSeed     int64         `json:"bootstrap_seed"`
	BootstrapSamples  int           `json:"bootstrap_samples"`
	Members           []SplitMember `json:"members"`
}

FrozenSplit is owner-authored before inspecting outcomes. The executable checks the binding, not the truth of the approval attestation. No command automatically approves gold or freezes a private corpus.

type Gate

type Gate struct {
	Name    string     `json:"name"`
	Outcome RunOutcome `json:"outcome"`
	Reason  string     `json:"reason,omitempty"`
}

type GenerationRequest

type GenerationRequest struct {
	RunID  string
	CaseID string
	// Arm is for in-process bookkeeping only. It never appears in Prompt,
	// and the command provider never passes it to the external command.
	Arm    Arm
	Repeat int
	// Task is the case task text.
	Task string
	// Bootstrap is the real managed bootstrap text ("" for B0).
	Bootstrap string
	// Context is this arm's personal context, deep-copied per request.
	Context ArmContext
	// Prompt is the deterministic rendering of Task + Bootstrap + Context
	// (RenderPrompt) — the exact text a model is given.
	Prompt string
}

GenerationRequest is what a provider sees for one case run.

type GenerationResult

type GenerationResult struct {
	Text       string            `json:"text"`
	TokensUsed int               `json:"tokens_used"`
	Meta       map[string]string `json:"meta,omitempty"`
}

GenerationResult is the raw model output for grading.

type GradeDocument

type GradeDocument struct {
	SchemaVersion string            `json:"schema_version"`
	RunID         string            `json:"run_id"`
	BundleSHA     string            `json:"bundle_sha256"`
	Evaluator     EvaluatorIdentity `json:"evaluator"`
	// review, or adjudication with exact original review document hashes.
	Kind     string        `json:"kind"`
	Resolves []string      `json:"resolves"`
	Records  []GradeRecord `json:"records"`
}

func GradeTemplate

func GradeTemplate(bundle, evaluator string) (GradeDocument, error)

GradeTemplate contains no prefilled judgments or independence attestations. Owner-side API; share ExportReviewerPacket, never the blinded/ directory.

type GradeRecord

type GradeRecord struct {
	SampleID    string          `json:"sample_id"`
	AnswerSHA   string          `json:"answer_sha256"`
	ContextSHA  string          `json:"context_sha256"`
	ArtifactSHA string          `json:"artifact_sha256"`
	ManifestSHA string          `json:"manifest_sha256"`
	Decision    *float64        `json:"decision"`
	Reasoning   *float64        `json:"reasoning"`
	Quality     *float64        `json:"quality"`
	Safety      *SafetyBlockers `json:"safety"`
	Rationale   string          `json:"rationale"`
}

type GradeReport

type GradeReport struct {
	Thresholds            map[string]float64 `json:"thresholds"`
	AnalysisExecutableSHA string             `json:"analysis_executable_sha256"`
	SchemaVersion         string             `json:"schema_version"`
	RunID                 string             `json:"run_id"`
	BundleSHA             string             `json:"bundle_sha256"`
	Outcome               RunOutcome         `json:"outcome"`
	Benefit               RunOutcome         `json:"benefit"`
	EvidenceClass         string             `json:"evidence_class"`
	Scope                 string             `json:"scope"`
	Artifacts             string             `json:"artifacts,omitempty"`
	ReviewHashes          []string           `json:"review_sha256"`
	AdjudicationSHA       string             `json:"adjudication_sha256,omitempty"`
	Gates                 []Gate             `json:"gates"`
	Blockers              []string           `json:"blockers"`
	Decision              Endpoint           `json:"decision"`
	Reasoning             Endpoint           `json:"reasoning"`
	QualityDelta          float64            `json:"quality_delta"`
	QualityDenominator    int                `json:"quality_case_denominator"`
	QualityCI             *Interval          `json:"quality_delta_ci95"`
	HighRiskTransitions   int                `json:"high_risk_pass_to_fail"`
	HighRiskPairs         int                `json:"high_risk_pair_denominator"`
	Families              int                `json:"families"`
	BootstrapSeed         int64              `json:"bootstrap_seed"`
	BootstrapSamples      int                `json:"bootstrap_samples"`
	Cases                 []GradedCase       `json:"cases"`
}

func ImportGrades

func ImportGrades(bundle string, paths []string, adjudication, out string) (*GradeReport, error)

ImportGrades never edits the generation bundle. Each validated import is stored in a new owner-only result directory with the original review bytes.

func (GradeReport) ExitCode

func (r GradeReport) ExitCode() int

type GradedCase

type GradedCase struct {
	CaseID    string     `json:"case_id"`
	Arm       Arm        `json:"arm"`
	Decision  ScoreStats `json:"decision"`
	Reasoning ScoreStats `json:"reasoning"`
	Quality   ScoreStats `json:"quality"`
}

type Grader

type Grader interface {
	Grade(cs Case, gen GenerationResult) (float64, string, error)
}

Grader scores a generation against gold, 0–4 (§18.7.1).

type Identified

type Identified interface {
	ID() string
	Version() string
}

Identified is implemented by graders that report an evaluator identity for manifests.

type InputsFn

type InputsFn func(profile contracts.Profile, task, workspaceHint string) (resolver.EvalInputs, error)

InputsFn computes one case's evaluation inputs from one serving session under the case's profile (app.Runtime.EvalInputs).

type Interval

type Interval struct {
	Lower float64 `json:"lower"`
	Upper float64 `json:"upper"`
}

type MockProvider

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

MockProvider is a fully deterministic model stand-in. It "answers" by composing text from the context items it receives under each arm, so:

  • B0/B1 (no context) can only echo the task → weak, often unacceptable.
  • B2/B4 (context present) surface acceptable decisions + mandatory conclusions from context items → strong answers.

This makes the whole pipeline (resolve → generate → grade → package) provable end-to-end with zero paid calls and identical outputs per input.

func NewMockProvider

func NewMockProvider(name string) MockProvider

func (MockProvider) Generate

func (MockProvider) Name

func (m MockProvider) Name() string

func (MockProvider) Settings

func (m MockProvider) Settings() ModelSettings

Settings reports the mock's actual behavior: no sampling (temperature 0, top_p 1), no seed consumed (0), no output cap (max_output_tokens 0), no reasoning budget.

type ModelSettings

type ModelSettings struct {
	Provider        string  `json:"model_provider"`
	ModelID         string  `json:"model_id"`
	ModelVersion    string  `json:"model_version"`
	Seed            int     `json:"seed"`
	Temperature     float64 `json:"temperature"`
	TopP            float64 `json:"top_p"`
	MaxOutputTokens int     `json:"max_output_tokens"`
	ReasoningBudget *int    `json:"reasoning_budget"`
}

ModelSettings are the provider-reported generation settings.

type Provider

type Provider interface {
	// Name identifies the provider.
	Name() string
	// Settings reports the model settings this provider generates with. The
	// runner records them verbatim in every run manifest (§18.7), so a
	// provider must report what it actually uses — never defaults it cannot
	// vouch for.
	Settings() ModelSettings
	// Generate produces the agent's answer for one case under one arm.
	Generate(req GenerationRequest) (GenerationResult, error)
}

Provider is a model backend. A deterministic mock implements the same interface as a live or command-backed provider, so the runner is proven without paid calls.

type RefsFn

type RefsFn func(profile contracts.Profile, recordID string) []string

RefsFn returns the identifiers a record answers to under a profile.

type RepeatResult

type RepeatResult struct {
	Repeat       int      `json:"repeat"`
	Score        *float64 `json:"mechanism_score,omitempty"`
	Text         string   `json:"text,omitempty"`
	PromptSHA256 string   `json:"prompt_sha256,omitempty"`
}

type RequestInputsFn

type RequestInputsFn func(profile contracts.Profile, req contracts.ResolutionRequest) (resolver.EvalInputs, error)

RequestInputsFn preserves the complete narrowed serving request. It never sets the process-bound capability; profile remains a separate input.

type RetrievalCase

type RetrievalCase struct {
	FalsePositives      int                 `json:"false_positives"`
	Forbidden           int                 `json:"forbidden"`
	NegativeControl     bool                `json:"negative_control"`
	RecallApplicable    bool                `json:"recall_applicable"`
	PrecisionApplicable bool                `json:"precision_applicable"`
	PrecisionMeaning    string              `json:"precision_meaning"`
	SelectedIDs         []string            `json:"selected_ids"`
	RefMappings         map[string][]string `json:"ref_mappings"`
	CaseID              string              `json:"case_id"`
	Outcome             RunOutcome          `json:"outcome"`
	Reason              string              `json:"reason,omitempty"`
	Required            int                 `json:"required"`
	Retrieved           int                 `json:"retrieved"`
	Selected            int                 `json:"selected"`
	Relevant            int                 `json:"relevant"`
	Recall              float64             `json:"recall"`
	Precision           float64             `json:"precision"`
}

RetrievalCase is the context precision/recall measurement for one case (contract dimension 8: the pack contains the right records). Precision is measured against the case's required_evidence_refs.

type RetrievalSummary

type RetrievalSummary struct {
	Cases              []RetrievalCase `json:"cases"`
	Measured           int             `json:"measured"`
	Excluded           int             `json:"excluded"`
	Required           int             `json:"required"`
	Retrieved          int             `json:"retrieved"`
	Selected           int             `json:"selected"`
	Relevant           int             `json:"relevant"`
	NegativeControls   int             `json:"negative_controls"`
	FalsePositiveCases int             `json:"false_positive_cases"`
	FalsePositiveRate  float64         `json:"false_positive_rate"`
	Recall             float64         `json:"recall"`
	Precision          float64         `json:"precision"`
	RecallThreshold    float64         `json:"recall_threshold"`
	PrecisionThreshold float64         `json:"precision_threshold"`
	ThresholdsMet      bool            `json:"thresholds_met"`
}

RetrievalSummary micro-averages retrieval over measured cases.

type ReviewerPacket

type ReviewerPacket struct {
	SchemaVersion string            `json:"schema_version"`
	Template      GradeDocument     `json:"template"`
	Samples       []json.RawMessage `json:"samples"`
}

ReviewerPacket is the ONLY shareable review surface. One content-only JSON file contains no per-sample filesystem metadata, owner paths or condition labels. The owner bundle (including blinded/) must not be shared. Answer wording can still suggest a condition; blinding is not an anonymity claim. Reviewers fill Template and return it as the existing hash-bound grades file.

func ExportReviewerPacket

func ExportReviewerPacket(bundle, evaluator string) (ReviewerPacket, error)

type RunConfig

type RunConfig struct {
	Arms           []Arm
	Repeats        int // override per-case repeats when >0 (max 5)
	OutputDir      string
	Harness        string // default "none"
	HarnessVersion string // default "unspecified"
	NetworkPolicy  string // disabled (default) | integration_only
	SplitManifest  string
	Split          string // calibration (default) | development | locked_holdout | privacy_red_team

	// Refs maps a selected record to the identifiers gold
	// required_evidence_refs may use (key, source record ID). When nil,
	// retrieval metrics are reported not_run.
	Refs RefsFn
	// SkipRetrieval omits retrieval measurement entirely (behavioral-only
	// runs), instead of reporting it not_run.
	SkipRetrieval bool
	// DryRun renders every prompt and writes manifests and evidence without
	// calling the provider; every unit is not_run.
	DryRun bool
}

RunConfig controls a run set.

type RunOutcome

type RunOutcome string

RunOutcome is the terminal state of one case×arm execution unit.

const (
	OutcomeGradingPending RunOutcome = "grading_pending"
	OutcomePassed         RunOutcome = "passed"
	OutcomeFailed         RunOutcome = "failed"
	OutcomeNotRun         RunOutcome = "not_run"
)

type SafetyBlockers

type SafetyBlockers struct {
	PrivacyLeakage      bool `json:"privacy_leakage"`
	CapabilityElevation bool `json:"capability_elevation"`
	FabricatedAuthority bool `json:"fabricated_authority"`
	HardPolicyViolation bool `json:"hard_policy_violation"`
	InventedPreference  bool `json:"invented_preference"`
}

func (SafetyBlockers) Any

func (s SafetyBlockers) Any() bool

type SampleBinding

type SampleBinding struct {
	SampleID      string `json:"sample_id"`
	CaseID        string `json:"case_id"`
	Arm           Arm    `json:"arm"`
	Repeat        int    `json:"repeat"`
	AnswerSHA     string `json:"answer_sha256"`
	ContextSHA    string `json:"context_sha256"`
	ArtifactSHA   string `json:"artifact_sha256"`
	ManifestSHA   string `json:"manifest_sha256"`
	ArtifactPath  string `json:"artifact_path"`
	ContextSalt   string `json:"context_salt"`
	RawContextSHA string `json:"raw_context_sha256"`
}

type ScoreStats

type ScoreStats struct {
	Mean     float64 `json:"mean"`
	Variance float64 `json:"variance"`
	Worst    float64 `json:"worst"`
	N        int     `json:"n"`
}

type SplitBinding

type SplitBinding struct {
	Manifest FrozenSplit `json:"manifest"`
	SHA256   string      `json:"sha256"`
	Bytes    []byte      `json:"bytes"`
	Selected []string    `json:"selected_case_ids"`
}

type SplitMember

type SplitMember struct {
	CaseID   string `json:"case_id"`
	FileHash string `json:"file_sha256"`
	Family   string `json:"family"`
	Split    string `json:"split"`
}

type Summary

type Summary struct {
	RunID              string           `json:"run_id"`
	StartedAt          string           `json:"started_at"`
	EndedAt            string           `json:"ended_at"`
	Corpus             string           `json:"corpus"`
	Arms               []Arm            `json:"arms"`
	NetworkPolicy      string           `json:"network_policy"`
	DryRun             bool             `json:"dry_run"`
	Generations        int              `json:"generations"`
	PlannedGenerations int              `json:"planned_generations"`
	CaseResults        []CaseResult     `json:"case_results"`
	Blockers           []string         `json:"blockers"`
	ManifestPaths      []string         `json:"manifest_paths"`
	Retrieval          RetrievalSummary `json:"retrieval"`

	Coverage       Coverage     `json:"coverage"`
	SplitBinding   SplitBinding `json:"split_binding"`
	Benefit        RunOutcome   `json:"benefit"`
	MechanismOnly  bool         `json:"mechanism_only"`
	RepeatOverride int          `json:"repeat_override,omitempty"`
	// contains filtered or unexported fields
}

Summary aggregates a run set.

func Run

func Run(corpus *Corpus, cfg RunConfig, provider Provider, grader Grader, inputs InputsFn) (*Summary, error)

Run executes the requested arms against the corpus with the provider. Each selected case's inputs are computed once and every arm is built from them, so all arms of a case see the same capability, revocation state, and pack.

func RunRequest

func RunRequest(corpus *Corpus, cfg RunConfig, provider Provider, grader Grader, inputs RequestInputsFn) (*Summary, error)

RunRequest uses the full production request path. Legacy Run is task-only and its evidence deliberately does not claim risk/harness were forwarded.

func (*Summary) ExitCode

func (s *Summary) ExitCode() int

ExitCode applies the runner's exit contract: 1 when any evaluation unit or retrieval measurement failed or any blocker was recorded; 3 when nothing failed but at least one was not_run; 0 only when everything passed.

Directories

Path Synopsis
Package evalfixture builds the public synthetic deployment and golden case the evaluation runner's tests (and cmd/beme-eval's tests) use.
Package evalfixture builds the public synthetic deployment and golden case the evaluation runner's tests (and cmd/beme-eval's tests) use.

Jump to

Keyboard shortcuts

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