commandoracle

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArtifactKind  = "proofkit.command-oracle-execution.v1"
	CommandID     = "proofkit.command-oracle-execution"
	RecordPath    = "artifacts/proofkit/command-oracle-execution.json"
	SchemaVersion = 1
)
View Source
const (
	CounterfeitCorpusPath = "internal/tools/commandoracle/testdata/counterfeit-corpus.v1.json"
)

Variables

This section is empty.

Functions

func CandidateSetDigest

func CandidateSetDigest(candidates []app.CommandCoverageOracleCandidate) (string, error)

func DecisionID

func DecisionID(err error) string

func ExecutionCommandRefs

func ExecutionCommandRefs(evidence Evidence) []string

func InvalidateDiagnostic

func InvalidateDiagnostic(root string) error

func RecordNonClaims

func RecordNonClaims() []string

func ValidateCounterfeitCorpus

func ValidateCounterfeitCorpus(root string) (string, error)

func ValidateCurrent

func ValidateCurrent(ctx context.Context, root string, evidence Evidence) error

func WriteDiagnostic

func WriteDiagnostic(root string, evidence Evidence) error

Types

type DecisionError

type DecisionError struct {
	ID string
}

func (*DecisionError) Error

func (err *DecisionError) Error() string

type Evidence

type Evidence struct {
	Candidates   []app.CommandCoverageOracleCandidate
	Record       Record
	RecordBytes  []byte
	RecordDigest string
}

func EvidenceForRecord

func EvidenceForRecord(record Record) (Evidence, error)

func Execute

func Execute(ctx context.Context, liveRoot string) (Evidence, error)

func ReadDiagnostic

func ReadDiagnostic(root string) (Evidence, error)

type ExecutionCommand

type ExecutionCommand struct {
	Argv        []string `json:"argv"`
	PackagePath string   `json:"packagePath"`
}

func ExecutionCommandsForCandidates

func ExecutionCommandsForCandidates(candidates []app.CommandCoverageOracleCandidate) []ExecutionCommand

type JoinedEntry

type JoinedEntry struct {
	Candidate         app.CommandCoverageOracleCandidate `json:"candidate"`
	ExecutionState    string                             `json:"executionState"`
	PackageImportPath string                             `json:"packageImportPath"`
}

type Record

type Record struct {
	ArtifactKind            string             `json:"artifactKind"`
	CandidateSetDigest      string             `json:"candidateSetDigest"`
	CommandID               string             `json:"commandId"`
	CounterfeitCorpusDigest string             `json:"counterfeitCorpusDigest"`
	Entries                 []JoinedEntry      `json:"entries"`
	ExecutionCommands       []ExecutionCommand `json:"executionCommands"`
	GoVersion               string             `json:"goVersion"`
	NonClaims               []string           `json:"nonClaims"`
	Platform                string             `json:"platform"`
	SchemaVersion           int                `json:"schemaVersion"`
	SourceRevision          string             `json:"sourceRevision"`
	SourceSnapshotDigest    string             `json:"sourceSnapshotDigest"`
	State                   string             `json:"state"`
}

Jump to

Keyboard shortcuts

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