Documentation
¶
Overview ¶
Package syncengine is tk's sole push boundary: selection policy (auto-commit-only filter, unreachable/disabled/config-error reporting, participants grouped by git-root) and the per-root flow (preflight, lock order, snapshot, fetch/integrate, mid-rebase resume, sync-time integrity via integrity.RunBatches, push-if-ahead). Cobra-free; the composition root supplies ambient or all-registered inputs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNeedsAttention = errors.New("tk sync: one or more roots need attention (see the lines above)")
ErrNeedsAttention is the process-level failure class when roots need human follow-up.
Functions ¶
func FrontmatterHasMarkers ¶
FrontmatterHasMarkers reports whether path's YAML fence (or whole file if no fence) still carries git conflict markers. Shared by resume and CLI merge tests.
func FrontmatterHasStatusConflict ¶
FrontmatterHasStatusConflict reports whether path's frontmatter still lists status_conflict. Shared by resume and CLI merge tests.
func HasConflictMarker ¶
HasConflictMarker reports whether data contains a line starting with a git conflict marker. Shared by resume and CLI merge tests.
Types ¶
type AmbientScope ¶
AmbientScope is one successfully resolved ambient scope.
type Deps ¶
type Deps struct {
Ctx context.Context
Cue *cue.Context
StateDir string
Reg *registry.Registry
DB *index.DB
Rec *reconcile.Reconciler
}
Deps are machine-local services the sync engine needs.
type Input ¶
type Input struct {
// AllRegistered: every registered scope (from --all or ambient ErrNoScope).
AllRegistered bool
// Ambient is set when AllRegistered is false.
Ambient *AmbientScope
}
Input is either one ambient scope (already resolved at the composition root) or all-registered mode. The package does not read env, cwd, or Cobra.
type Participant ¶
Participant is one auto-commit scope under a git-root.
type Reporter ¶
Reporter receives progress and diagnostic lines (stdout-class Out, stderr-class Err).
type Result ¶
type Result struct {
// NeedsAttention is true when any root or selection line requires human follow-up.
NeedsAttention bool
}
Result is the exit-mapping outcome of a sync run. Progress lines stream on Reporter.
type Selection ¶
type Selection struct {
Targets []Target
Disabled []string
ConfigErrs []string
Unreachable []string
Candidates int
}
Selection is the structured outcome of sole-push-boundary target selection.
type Target ¶
type Target struct {
Root string
Participants []Participant
}
Target is one git-root with its auto-commit participants.