Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CertifyDiff ¶
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
// Renamed marks a `rename from`/`rename to` entry. A similarity-100%
// move has NO hunks, so without this flag finish() discarded it and a
// file move — which breaks every importer — certified as `allow`.
Renamed bool
OldPath string
Binary bool
}
func ParseUnifiedDiff ¶
type FileSHAFunc ¶ added in v0.6.0
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.