evalcorpus

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 17 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 evalcorpus prepares maintainer-owned reference packets. It does not run workers, grade prose, or enforce a model/operating-system boundary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Digest

func Digest(data []byte) string

func Export

func Export(ctx context.Context, repo, corpusDir, parent, name string, files []File) (string, error)

Export creates name under an existing disposable parent, after verifying all declared worker bytes. It refuses existing destinations and parent links. Controller material is not implicitly copied. os.Root confines file creation; this is packet preparation, not runtime isolation against a worker or model.

func Inspect

func Inspect(root *os.Root, files []File) error

Inspect checks exact contents and bytes, including rejecting extra files and links. It cannot prove OS permissions, Git-store denial, or model-tool closure.

func PacketDigest

func PacketDigest(files []File) string

PacketDigest hashes sorted "path NUL byte-digest LF" records. It includes TASK.md, ROLE.md and CONTEXT.md, and does not include filesystem metadata.

func ReadHistoricalFile

func ReadHistoricalFile(ctx context.Context, repo string, f File) ([]byte, error)

ReadHistoricalFile reuses the reference export's fixed Git/tree checks for a single digested historical blob. Local authored artifacts instead use the controller's anchored reader. It never fetches or executes artifact contents.

Types

type Case

type Case struct {
	ID             string    `json:"id"`
	Version        int       `json:"version"`
	Role           string    `json:"role"`
	Partition      string    `json:"partition"`
	Lineage        string    `json:"lineage"`
	Difficulty     string    `json:"difficulty"`
	Classification string    `json:"classification,omitempty"`
	SourceCommit   string    `json:"source_commit"`
	Upstream       []string  `json:"upstream"`
	Selection      string    `json:"selection"`
	Inputs         []File    `json:"inputs"`
	PacketSHA256   string    `json:"packet_sha256"`
	Key            File      `json:"key"`
	Probe          File      `json:"probe"`
	Command        []string  `json:"command"`
	CheckSeconds   int       `json:"check_seconds"`
	Alternative    string    `json:"alternative"`
	Controls       []Control `json:"controls"`
}

type Control

type Control struct {
	Name             string   `json:"name"`
	Purpose          string   `json:"purpose"`
	Files            []File   `json:"files"`
	Patch            *File    `json:"patch,omitempty"`
	ExpectedFailures []string `json:"expected_failures"`
}

type File

type File struct {
	Path   string `json:"path"`
	Source string `json:"source"`
	Commit string `json:"commit,omitempty"`
	SHA256 string `json:"sha256"`
}

File pins either a historical Git blob or a corpus-authored artifact. Commit is empty for artifacts relative to the corpus directory.

type Manifest

type Manifest struct {
	Version       int      `json:"version"`
	Author        string   `json:"author"`
	PreparedDate  string   `json:"prepared_date"`
	Prerequisites []string `json:"prerequisites"`
	Cases         []Case   `json:"cases"`
}

func Load

func Load(data []byte) (Manifest, error)

Load validates the versioned structure without consulting historical objects.

Jump to

Keyboard shortcuts

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