invariants

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 14 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 invariants checks the invariants in AGENTS.md that can be read off the sources: deterministic workflow code (1), declared tool effects (3) and no secrets in the tree (6). The behavioural invariants (no double effects, resume) are checked by the crash tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientImports

func ClientImports(root string) ([]string, error)

ClientImports lists the non-test files of clientPackages under root that import internal/runtime.

func Commands

func Commands(root string) ([]string, error)

Commands reports, in the non-test Go files under root, every way to start a command outside the sandbox: exec.Command, exec.CommandContext or an exec.Cmd literal outside commandStarters, os.StartProcess anywhere, and sandbox.FullAccess outside fullAccessUsers.

func Secrets

func Secrets(roots ...string) ([]string, error)

Secrets reports files under the given roots that contain what looks like an API key.

func ToolEffects

func ToolEffects(dir string) ([]string, error)

ToolEffects reports every tools.Def literal under dir that does not set Effect explicitly. The zero value means Real, which is safe, but a tool's effect is a decision the author has to make and write down.

func Workflows

func Workflows(dir string) ([]string, error)

Workflows reports every place in the non-test Go files under dir (the workflow packages) that would make a workflow behave differently when it is replayed: imports outside the allow list, clock calls, goroutines, select, and ranging over a map (or over maps.Keys/Values/All) whose order Go randomises.

Types

This section is empty.

Jump to

Keyboard shortcuts

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