Help us shape the future of Go! Take the 2026 Go Developer Survey

controlledcomparison

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 34 Imported by: 0

Documentation

Overview

Package controlledcomparison is the source-bound, offline-only producer for explicit release policies. Ordinary evaluation capabilities remain unchanged.

Index

Constants

View Source
const NativePolicyKind = "waza.release-native-policy"

Variables

This section is empty.

Functions

func AssessWithAssurance

func AssessWithAssurance(ctx context.Context, policyData, contractData []byte, directory string,
	baseline, candidate AssuranceSource) (releasepolicy.AssuredDecision, error)

AssessWithAssurance is an explicit additive decision, not an upgrade to the base reader. It consumes current evaluator inputs and recomputes all verdicts.

func Collect

func Collect(ctx context.Context, policyData []byte, baseline, candidate Source, directory string) error

Collect owns the admitted lifecycle. No arbitrary engine/callback can be supplied through this producer; every attempt has a fresh mock and workspace.

func CollectNative

func CollectNative(ctx context.Context, policyData []byte, baseline, candidate Source, directory string) error

CollectNative is the paid-capable, explicitly selected public producer. Ordinary Collect remains mock-only; no result/cache/resume adapter is accepted.

func CollectNativeWithOptions

func CollectNativeWithOptions(ctx context.Context, policyData []byte, baseline, candidate Source, directory string, options NativeCollectorOptions) error

func CollectWithAssurance

func CollectWithAssurance(ctx context.Context, policyData, contractData []byte, baseline, candidate AssuranceSource, directory string) error

func IsNativePolicy

func IsNativePolicy(raw []byte) bool

func Plan

func Plan(baseline, candidate Source, design releasepolicy.Design, requirements releasepolicy.Requirements, allowedFields []string) ([]byte, error)

Plan inspects sources without initializing engines or collecting outcomes. A design is mandatory; its independence declaration is never inferred from task names, retries, repeated trials, static readiness or mock labels.

func PlanAssurance

func PlanAssurance(ctx context.Context, policyData []byte, baseline, candidate AssuranceSource) ([]byte, error)

func PlanNative

func PlanNative(ctx context.Context, baseline, candidate Source, design releasepolicy.Design, requirements releasepolicy.Requirements, allowedFields []string) (_ []byte, err error)

func ReadDecisionRootContext

func ReadDecisionRootContext(ctx context.Context, root *os.Root) (decision releasepolicy.Decision, err error)

func ReadSelectedDecision

func ReadSelectedDecision(ctx context.Context, directory string, selected []byte) (decision releasepolicy.Decision, err error)

ReadSelectedDecision dispatches only an explicit raw selected policy. Native envelopes cannot be admitted by the legacy core-only reader.

Types

type AssuranceSource

type AssuranceSource struct {
	Source             Source
	ReferencesPath     string
	ReviewPath         string
	AcceptReviewSource string
}

Paths and current-source acceptance are caller-owned, never adopted from a contract or report. References remain outside the execution input workspace.

type NativeCollectorOptions

type NativeCollectorOptions struct {
	NewCopilotClient func(*copilot.ClientOptions) execution.CopilotClient
}

NativeCollectorOptions supports the same SDK client factory seam as the execution engine. A supplied client does not establish authenticated evidence.

type NativePolicy

type NativePolicy struct {
	Kind          string                `json:"kind"`
	Version       string                `json:"version"`
	Digest        models.EvidenceDigest `json:"digest"`
	Policy        json.RawMessage       `json:"policy"`
	Profile       json.RawMessage       `json:"profile"`
	CaptureDigest models.EvidenceDigest `json:"capture_digest"`
}

NativePolicy is a separately selected public collection contract. The core policy/method and historical release 1.0 documents retain their own versions.

func DecodeNativePolicy

func DecodeNativePolicy(raw []byte) (*NativePolicy, *releasepolicy.Policy, *nativetask.Profile, error)

type Source

type Source struct {
	EvalPath   string
	ContextDir string
}

Jump to

Keyboard shortcuts

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