replay

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultReplayMemoryV3 int64 = 256 << 20
	MaxReplayMemoryV3     int64 = 2 << 30
)

Variables

This section is empty.

Functions

func ParseReplayMemoryV3

func ParseReplayMemoryV3(value string) (int64, error)

Types

type FailureDifference

type FailureDifference string
const (
	DifferenceExitCode FailureDifference = "exit_code"
	DifferenceStderr   FailureDifference = "stderr"
)

func DiagnoseFailureDifferenceV3

func DiagnoseFailureDifferenceV3(
	outcome Outcome,
	originalExit int,
	originalStderr string,
	replayExit int,
	replayStderr []byte,
) FailureDifference

type Options

type Options struct {
	AllowArbitraryCommand bool
	DiagnoseDependencies  bool

	// MemoryBytes overrides the schema-v3 execution container
	// memory limit. Zero uses the default 256 MiB limit.
	MemoryBytes int64
}

type Outcome

type Outcome string
const (
	OutcomeReproduced   Outcome = "reproduced"
	OutcomeDifferent    Outcome = "different_failure"
	OutcomePassed       Outcome = "passed"
	OutcomeInconclusive Outcome = "inconclusive"
)

func CompareFailure

func CompareFailure(
	originalExit int,
	originalStderr string,
	originalTruncated bool,
	replayExit int,
	replayStderr []byte,
	replayTruncated bool,
) (Outcome, error)

type Result

type Result struct {
	OriginalExitCode int
	ReplayExitCode   int
	Outcome          Outcome
	Difference       FailureDifference

	// GoDependencies contains optional replay environment diagnostics.
	// It does not affect Outcome.
	GoDependencies *capsule.GoDependencyStatus
}

func Run

func Run(ctx context.Context, capsulePath string) (Result, error)

func RunV2WithOptions

func RunV2WithOptions(
	ctx context.Context,
	capsulePath string,
	options Options,
) (Result, error)

RunV2WithOptions replays a verified schema-v2 capsule.

Experimental: Docker bind-mount behavior has not been validated across all Linux and Docker configurations.

func RunV3WithOptions

func RunV3WithOptions(
	ctx context.Context,
	capsulePath string,
	options Options,
) (result Result, runErr error)

RunV3WithOptions replays a verified schema-v3 capsule with up to 128 selected Go modules, with at most 64 complete module ZIPs, without network access.

Experimental: uses Docker Exec, which is not equivalent to PID 1.

func RunWithOptions

func RunWithOptions(
	ctx context.Context,
	capsulePath string,
	options Options,
) (Result, error)

Jump to

Keyboard shortcuts

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