validate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 1 module, 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 validate provides graph-wide mechanical checks and named lint profiles over immutable Graph IR.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Core contains only soundness and safety checks.
	Core = Profile{Name: "core"}
	// RealtimeAgent exposes design omissions that are usually important in an
	// interactive, deadline-sensitive agent without assuming an audio topology.
	RealtimeAgent = Profile{
		Name: "realtime-agent", RequireExportedBoundary: true,
		RequireTerminalOutcome: true, RequireInterruptDecision: true,
		RequireConsumedOutcomes: true, WarnLargeLosslessQueueDepth: 128,
	}
	// ConversationalVoice currently shares the general obligations; voice-
	// specific policy libraries can add named rules without changing Core.
	ConversationalVoice = Profile{
		Name: "conversational-voice", RequireExportedBoundary: true,
		RequireTerminalOutcome: true, RequireInterruptDecision: true,
		RequireConsumedOutcomes: true, WarnLargeLosslessQueueDepth: 64,
	}
	// ComputerUse keeps external-effect authority mandatory (a Core rule) and
	// applies the general realtime completeness checks.
	ComputerUse = Profile{
		Name: "computer-use", RequireExportedBoundary: true,
		RequireTerminalOutcome: true, RequireInterruptDecision: true,
		RequireConsumedOutcomes: true, WarnLargeLosslessQueueDepth: 64,
	}
)

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Severity Severity `json:"severity" yaml:"severity"`
	Code     string   `json:"code" yaml:"code"`
	Message  string   `json:"message" yaml:"message"`
	Node     string   `json:"node,omitempty" yaml:"node,omitempty"`
	Edge     string   `json:"edge,omitempty" yaml:"edge,omitempty"`
	Boundary string   `json:"boundary,omitempty" yaml:"boundary,omitempty"`
}

Finding is stable and addressable by node, edge, or boundary identity.

func Check

func Check(graph ir.Graph, profile Profile) []Finding

Check returns deterministic findings. An invalid IR value produces an E_IR error and no weaker follow-on guesses.

func Errors

func Errors(findings []Finding) []Finding

Errors returns only findings that prevent mounting.

type Profile

type Profile struct {
	Name                        string
	RequireExportedBoundary     bool
	RequireTerminalOutcome      bool
	RequireInterruptDecision    bool
	RequireConsumedOutcomes     bool
	WarnLargeLosslessQueueDepth int
}

Profile enables opinionated completeness checks independently of core type and safety errors.

type Severity

type Severity string
const (
	Error   Severity = "error"
	Warning Severity = "warning"
)

Jump to

Keyboard shortcuts

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