drift

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package drift classifies (source, applied, destination) hash triples per the 9-case table in the agentsync design spec. Pure function, no IO.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafeForAutoApply

func SafeForAutoApply(c Class) bool

SafeForAutoApply returns true for cases apply can resolve without prompting.

Types

type Class

type Class int
const (
	Clean Class = iota
	Pending
	Drift
	Converged
	Conflict
	New
	ForeignCollision
	Orphan
	OrphanDrifted
)

func Classify

func Classify(hsrc, happlied, hdest string) Class

Classify returns the case for one tracked item. Empty string means "absent." hsrc=src hash now; happlied=last-applied hash; hdest=on-disk hash now.

func (Class) String

func (c Class) String() string

Jump to

Keyboard shortcuts

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