verify

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package verify provides comprehensive repository verification and rebuild.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Kind    IssueKind
	RID     libfossil.FslID
	UUID    string
	Table   string
	Message string
}

Issue represents a single verification problem found in the repository.

type IssueKind

type IssueKind int

IssueKind categorizes the type of verification issue found.

const (
	IssueHashMismatch IssueKind = iota
	IssueBlobCorrupt
	IssueDeltaDangling
	IssuePhantomOrphan
	IssueEventMissing
	IssueEventMismatch
	IssueMlinkMissing
	IssuePlinkMissing
	IssueTagxrefMissing
	IssueFilenameMissing
	IssueLeafIncorrect
	IssueMissingReference
)

type Report

type Report struct {
	Issues        []Issue
	BlobsChecked  int
	BlobsOK       int
	BlobsFailed   int
	BlobsSkipped  int
	MissingRefs   int
	TablesRebuilt []string
	Duration      time.Duration
}

Report contains the results of a repository verification pass.

func Rebuild

func Rebuild(r *repo.Repo) (*Report, error)

Rebuild reconstructs all derived tables from raw blob content. It first verifies blob integrity (read-only), then drops and rebuilds event/mlink/plink/tagxref/filename/leaf/unclustered/unsent in a single transaction.

func Verify

func Verify(r *repo.Repo) (*Report, error)

Verify performs comprehensive repository verification. It checks blob integrity, delta chains, phantom records, and derived tables. Returns a report of all issues found. Never stops early - reports all problems.

func (*Report) OK

func (r *Report) OK() bool

OK returns true if no issues were found during verification.

Jump to

Keyboard shortcuts

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