cert

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertifyDiff

func CertifyDiff(codeGraph *graph.CodeGraph, input core.DiffInput) core.CertificationReport

CertifyDiff maps a unified diff onto the indexed graph and emits a conservative report. It only certifies structural facts Grove can observe; unresolved or heuristic-only coverage is surfaced as manual review.

func CertifyDiffWithStaleness added in v0.6.0

func CertifyDiffWithStaleness(codeGraph *graph.CodeGraph, input core.DiffInput, fileSHA FileSHAFunc) core.CertificationReport

CertifyDiffWithStaleness is CertifyDiff plus an index-freshness gate: when fileSHA is provided, every changed file whose indexed blob SHA no longer matches the content on disk is reported as index_stale and escalated to manual review. Without this check a stale index would map hunk line numbers onto outdated symbol spans and silently certify the wrong symbols.

Types

type DiffFile

type DiffFile struct {
	Path    string
	Hunks   []DiffHunk
	Deleted bool
	Binary  bool
}

func ParseUnifiedDiff

func ParseUnifiedDiff(diff string) ([]DiffFile, error)

type DiffHunk

type DiffHunk struct {
	NewRange core.LineRange
}

type FileSHAFunc added in v0.6.0

type FileSHAFunc func(path string) (sha string, ok bool)

FileSHAFunc returns the current content SHA for a repo-relative path. ok=false means the file could not be read (missing, unreadable).

func RepoFileSHA added in v0.6.0

func RepoFileSHA(root string) FileSHAFunc

RepoFileSHA returns a FileSHAFunc that hashes repo-relative paths under root with the same content hash the indexer records per file.

Jump to

Keyboard shortcuts

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