Internal

internal/core/completion

Package completion evaluates the review authority that allows a task to close.

import "github.com/nilstate/scafld/v2/internal/core/completion"

Package completion evaluates the review authority that allows a task to close.

Functions

func CurrentReviewGate(ledger session.Session) Authority

Source: internal/core/completion/authority.go:86

CurrentReviewGate validates the latest review gate that can currently authorize completion. Later build, criterion, phase, approval, fail, cancel, baseline, or review-attempt evidence invalidates older reviews.

func TerminalAuthority(ledger session.Session) Authority

Source: internal/core/completion/authority.go:92

TerminalAuthority validates the review gate that authorized the latest complete event in an archived task ledger.

Types

type Authority

Source: internal/core/completion/authority.go:12

Authority describes the review evidence that authorizes completion.

type Authority struct {
	Found         bool
	Completed     bool
	Valid         bool
	HumanReviewed bool
	Reason        string
	Actual        string
	Evidence      []string
	ReviewEntry   session.Entry
	CompleteEntry session.Entry
	Dossier       corereview.Dossier
	HasDossier    bool
}
Fields
  • Found bool
  • Completed bool
  • Valid bool
  • HumanReviewed bool
  • Reason string
  • Actual string
  • Evidence []string
  • ReviewEntry session.Entry
  • CompleteEntry session.Entry
  • Dossier corereview.Dossier
  • HasDossier bool

func Kind() string

Source: internal/core/completion/authority.go:35

Kind returns a stable label for the completion authority.

func Provider() string

Source: internal/core/completion/authority.go:47

Provider returns the provider that produced the authorizing review.

func RefusalSuffix() string

Source: internal/core/completion/authority.go:66

RefusalSuffix summarizes terminal authority for commands that cannot operate on archived work.

func Status() string

Source: internal/core/completion/authority.go:27

Status returns valid or invalid for display surfaces.

func Summary() string

Source: internal/core/completion/authority.go:57

Summary returns the best available human-readable authority summary.

func Verdict() string

Source: internal/core/completion/authority.go:52

Verdict returns the authorizing review verdict.