changeimpact

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package changeimpact discovers the final local repository snapshot and the conservative Go package closure affected by it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis

type Analysis = verification.ChangeAnalysis

Analysis is the complete discovery result consumed by verification.

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer owns Git and Go discovery within one configured workspace.

func New

func New(ws *workspace.Workspace, runner *execution.Runner) (*Analyzer, error)

New constructs an analyzer from the shared containment and execution infrastructure.

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(ctx context.Context, options Options) (Analysis, error)

Analyze discovers one coherent final-worktree snapshot and its package impact. Protocol adapters should treat returned errors as request failures.

func (*Analyzer) MaterializeBase

func (a *Analyzer) MaterializeBase(ctx context.Context, repository verification.Repository, destination string) (string, error)

MaterializeBase extracts the resolved merge-base into a caller-owned cache directory without modifying the target worktree or persistent Git metadata.

type File

type File = verification.SourceFile

File is one source file passed from discovery into verification.

type Hunk

type Hunk struct {
	OldStart int
	OldCount int
	NewStart int
	NewCount int
}

Hunk is one unified-diff hunk. Counts are retained even when zero.

func ParseHunks

func ParseHunks(data []byte) ([]Hunk, error)

ParseHunks parses unified-diff hunk headers. It ignores file headers and rejects malformed hunk-looking lines rather than silently losing ranges.

type Options

type Options = verification.ChangeOptions

Options is the verification engine's change-discovery request.

type Package

type Package = verification.ExecutionTarget

Package is one executable unit passed from discovery into verification.

type RawChange

type RawChange struct {
	OldMode string
	NewMode string
	OldOID  string
	NewOID  string
	Path    string
	OldPath string
	Score   int
	Status  byte
}

RawChange is one record from git diff --raw -z --find-renames.

func ParseRawChanges

func ParseRawChanges(data []byte) ([]RawChange, error)

ParseRawChanges parses NUL-delimited raw diff records. The input may have either no trailing NUL or one trailing NUL, but never empty records.

Jump to

Keyboard shortcuts

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