Documentation
¶
Overview ¶
Package engine carries out dockhand v3's operations (docs/design-v3.md): it binds a person's request to the ports checkout, Git, and the store, and does the work. The command package parses and renders; the engine decides and acts.
Index ¶
- Constants
- Variables
- func Access(permission string) string
- func Ago(at time.Time) string
- func AheadWords(current, tag string) string
- func AlsoDefined(directory string, defined map[string][]string) []string
- func BaselineWorthy(evidence Evidence) (worthy, skipped []string)
- func BranchName(name string) string
- func CIFailureWords(failure model.CIFailure) string
- func CIPortWords(failures []model.CIFailure) string
- func CarriedLines(e Evidence) []string
- func Checkouts(ctx context.Context, options Options) ([]string, error)
- func ClosedWords(branch model.Branch, version string) string
- func CoverageWords(compared model.UpstreamComparison) string
- func DecideCommand(c model.Concern) string
- func DecisionWords(d model.Decision) string
- func EnvironmentHeading(environment model.Environment, all []model.Environment) string
- func EvidenceWords(evidence Evidence, target TargetEvidence, environment int, ...) string
- func FailureLines(evidence Evidence, target TargetEvidence, environment, n int) []string
- func ForgetWords(branch model.Branch) string
- func GitHubWontBuild(plan model.Plan) []string
- func GitVersion(ctx context.Context, options Options) (git.Version, error)
- func Here(ctx context.Context, tree, dir string, program git.Program) string
- func HistoryWords(pruned store.Pruned, assessments int, after time.Duration) string
- func HoldLines(concerns []model.Concern) []string
- func HoldRuleLines(concerns []model.Concern) []string
- func HoldRules() []string
- func IsCheckName(name string) bool
- func LeavesStableWords(port, from, to string) string
- func LogCleanupWords(done LogCleanup, after time.Duration) string
- func MaintainerWords(s MaintainerSuggestion, file string) string
- func NewTestsWords(ports []string) string
- func NothingCompared(compared model.UpstreamComparison) bool
- func OlderMacPorts(behind []MacPortsBehind, reads bool) []string
- func OnValues(environments []model.Environment) ([]string, bool)
- func OpenPortsTree(ctx context.Context, dir string, program git.Program) (*git.Repository, error)
- func OthersPortfiles(branch model.Branch) (string, bool)
- func PatchesApply(applied, rejected int) string
- func PrefixNote(environment model.Environment) string
- func ReleaseSource(release model.Release) string
- func ReleaseWords(port string, release model.Release) string
- func RemadeWords(target TargetEvidence) string
- func RemakeWords(release macos.Release, xcode bool) string
- func SeriesWords(newer, port string) string
- func SetAsideWords(aside []SetAside) string
- func Setup(ctx context.Context, options Options, named string) (*Engine, SetupReport, error)
- func SourceUnchanged(compared model.UpstreamComparison) bool
- func TakenWords(name, directory string) string
- func TreePaths(branch model.Branch, here string, args []string) []string
- func UnchangedWords(ports []string, of model.Run) string
- func UnderUpstream(change model.UpstreamChange) model.UpstreamChange
- func UntrackedInChanged(capture Capture, plan model.Plan) []string
- func VariantBuilds(declared []macports.Variant) []map[string]bool
- func VariantsNote(builds []VariantBuild, each bool) string
- func VariantsWords(builds []VariantBuild, each bool) string
- func WithRule(line, rule string) string
- type AcceptedFailure
- type AdoptRequest
- type Adoption
- type AheadRelease
- type AmbiguousError
- type ArchiveDiff
- type ArchiveFetcher
- type ArchivePlanner
- type ArchiveRequest
- type ArchiveVersionReader
- type Archived
- type Artifact
- type AssessmentState
- type Baseline
- type BaselineOffer
- type BaselineRequest
- type BaselineRow
- type BranchDiff
- type BranchStatus
- func (s BranchStatus) ChangedPorts() (ports []string, notes map[string]string)
- func (s BranchStatus) Check() branchstate.Check
- func (s BranchStatus) CheckStanding() branchstate.Standing
- func (s BranchStatus) Checking() *model.Run
- func (s BranchStatus) Cleaned() bool
- func (s BranchStatus) Facts() branchstate.Facts
- func (s BranchStatus) Failing() []string
- func (s BranchStatus) IncludedPorts() []string
- func (s BranchStatus) OnlyPort() (string, bool)
- func (s BranchStatus) Pushed() bool
- func (s BranchStatus) SomeoneElsePushed() bool
- func (s BranchStatus) Touches(port string) bool
- type BuilderHistory
- type Builds
- type Capture
- type CaptureMode
- type CaptureRequest
- type Cell
- type CellKind
- type CheckRequest
- type CheckSummary
- type ChecksumLeft
- type ChecksumsToWrite
- type CleanBranch
- type CleanKind
- type CleanStep
- type CleanupReason
- type CleanupReport
- type ComparisonLine
- type CreateRequest
- type Created
- type DecideRequest
- type Declaration
- type DependentReader
- type DescriptionSections
- type DetachedError
- type Engine
- func (e *Engine) ActiveCheck(ctx context.Context, session *coord.Session, branch model.Branch, ...) (*checks.ActiveRunError, []model.Run, error)
- func (e *Engine) Adopt(ctx context.Context, request AdoptRequest) (Adoption, error)
- func (e *Engine) AdoptPullRequest(ctx context.Context, number int, at model.ObjectID) (PullRequestAdoption, error)
- func (e *Engine) ApplyClean(ctx context.Context, plans []CleanBranch) ([]CleanBranch, error)
- func (e *Engine) ApplySubmit(ctx context.Context, plan SubmitPlan, answered model.Answered) (Submitted, error)
- func (e *Engine) ApplyTidy(ctx context.Context, plan TidyPlan) (TidyResult, error)
- func (e *Engine) Archive(ctx context.Context, branch model.Branch, undo bool) (model.Branch, error)
- func (e *Engine) ArchiveBranch(ctx context.Context, request ArchiveRequest) (Archived, error)
- func (e *Engine) ArchiveDiff(ctx context.Context, branch model.Branch, ports []string) ([]ArchiveDiff, error)
- func (e *Engine) ArchiveDirectory() string
- func (e *Engine) ArchivedKept(ctx context.Context) ([]model.Branch, error)
- func (e *Engine) Artifacts(ctx context.Context, run model.Run) ([]Artifact, error)
- func (e *Engine) BaselineCandidates(ctx context.Context, run model.Run) (BaselineOffer, error)
- func (e *Engine) BeforeBuilding(ctx context.Context, branch model.Branch, capture Capture, plan bool) ([]commitrules.Finding, error)
- func (e *Engine) Branch(ctx context.Context, id model.BranchID) (model.Branch, error)
- func (e *Engine) BranchLeftovers(ctx context.Context, branches ...model.BranchID) ([]Leftover, error)
- func (e *Engine) BranchPath(ctx context.Context, branch model.Branch) (string, error)
- func (e *Engine) BranchPort(ctx context.Context, branch model.Branch) (string, bool, error)
- func (e *Engine) BranchStatus(ctx context.Context, branch model.Branch) (BranchStatus, error)
- func (e *Engine) BranchStatusOf(ctx context.Context, id model.BranchID) (BranchStatus, error)
- func (e *Engine) BranchesChanging(ctx context.Context, port string) ([]model.Branch, error)
- func (e *Engine) BuildersBeside(ctx context.Context, run model.Run, ports []string) []string
- func (e *Engine) Candidates(ctx context.Context, session *coord.Session) ([]model.Run, error)
- func (e *Engine) Capture(ctx context.Context, request CaptureRequest) (Capture, error)
- func (e *Engine) Changes(ctx context.Context) []buildenv.Change
- func (e *Engine) ChangesHere(ctx context.Context, port string) (bool, error)
- func (e *Engine) CheckSummary(ctx context.Context, run model.Run) (CheckSummary, error)
- func (e *Engine) Cleanup(ctx context.Context, session *coord.Session, after time.Duration) (CleanupReport, error)
- func (e *Engine) CleanupDue(every time.Duration, minFree uint64) (bool, CleanupReason)
- func (e *Engine) CleanupIfDue(ctx context.Context, session *coord.Session, every time.Duration, ...) (report CleanupReport, ran bool, err error)
- func (e *Engine) Clone() string
- func (e *Engine) Close() error
- func (e *Engine) ClosedAt(ctx context.Context, port, version string) (model.Branch, bool, error)
- func (e *Engine) CommitsAhead(ctx context.Context, branch model.Branch) (int, error)
- func (e *Engine) Covered(ctx context.Context, branch model.BranchID, tree model.ObjectID, ...) (model.Run, bool, error)
- func (e *Engine) Create(ctx context.Context, request CreateRequest) (Created, error)
- func (e *Engine) Current(ctx context.Context) (model.Branch, error)
- func (e *Engine) Decide(ctx context.Context, request DecideRequest) (model.Decision, error)
- func (e *Engine) DefaultWorktrees() string
- func (e *Engine) Diff(ctx context.Context, branch model.Branch, paths []string) (BranchDiff, error)
- func (e *Engine) Drive(ctx context.Context, session *coord.Session, id model.RunID) (model.Run, error)
- func (e *Engine) Edit(ctx context.Context, branch model.Branch, port string) (string, error)
- func (e *Engine) Edited(ctx context.Context, branch model.Branch) ([]string, error)
- func (e *Engine) Enqueue(ctx context.Context, branch model.Branch, plan model.Plan, origin model.Origin) (model.Run, error)
- func (e *Engine) EnqueueBaseline(ctx context.Context, branch model.Branch, baseline Baseline, ...) (model.Run, error)
- func (e *Engine) Environments(ctx context.Context, on []string) ([]model.Environment, error)
- func (e *Engine) Events(ctx context.Context, after int64, level model.EventLevel) ([]model.Event, error)
- func (e *Engine) EvidenceFor(ctx context.Context, branch model.BranchID, tree model.ObjectID) (Evidence, bool, error)
- func (e *Engine) ExecutionNamed(ctx context.Context, name string) (model.GuestExecution, error)
- func (e *Engine) Forget(ctx context.Context, plan *ForgetPlan) (store.Pruned, error)
- func (e *Engine) Fork(ctx context.Context, remote string) (buildenv.Fork, error)
- func (e *Engine) ForkRefuses(ctx context.Context) error
- func (e *Engine) FreeName(ctx context.Context, port string) (string, error)
- func (e *Engine) GitHubAllowance(ctx context.Context) (github.Allowance, error)
- func (e *Engine) GitHubClient() *forgegithub.Client
- func (e *Engine) GitProgram() git.Program
- func (e *Engine) HoldsMajor(port, from, to string) bool
- func (e *Engine) Impact(ctx context.Context, branch model.Branch, ports []string) (Impact, error)
- func (e *Engine) InstallChanges(ctx context.Context, run model.Run, fetch bool) ([]InstallFinding, error)
- func (e *Engine) InstallEstimates(ctx context.Context, plan model.Plan, source model.Source, wait bool) []InstallEstimate
- func (e *Engine) JudgeStopped(ctx context.Context, session *coord.Session, statuses []BranchStatus) error
- func (e *Engine) KeepForSubmit(ctx context.Context, id model.BranchID, title string, note *string, ...) error
- func (e *Engine) KeepNote(ctx context.Context, plan SubmitPlan) error
- func (e *Engine) KeptClones(ctx context.Context) ([]Leftover, error)
- func (e *Engine) LastOutdatedLook(selection PortSelection) (OutdatedLook, bool)
- func (e *Engine) LatestCheck(ctx context.Context, branch model.BranchID) (run model.Run, ok bool, err error)
- func (e *Engine) LatestCheckpoint(ctx context.Context, branch model.Branch) (string, error)
- func (e *Engine) LatestEvent(ctx context.Context) (int64, error)
- func (e *Engine) LeadOf(ctx context.Context, session *coord.Session, id model.RunID) (checks.Lead, error)
- func (e *Engine) Leader(ctx context.Context, session *coord.Session) (*model.Session, error)
- func (e *Engine) LinkedPorts(ctx context.Context, branch model.Branch, port string, except []string) (LinkedPorts, error)
- func (e *Engine) LiveLog(ctx context.Context, id model.RunID, port string, only model.ExecutionID) (string, error)
- func (e *Engine) LoadTidyPlan(ctx context.Context, data []byte) (TidyPlan, error)
- func (e *Engine) LogDirectory() string
- func (e *Engine) Logs(ctx context.Context, id model.RunID) (RunLogs, error)
- func (e *Engine) LookForOthers(ctx context.Context, ports []string)
- func (e *Engine) MaintainerHint(ctx context.Context) string
- func (e *Engine) MasterReadings() string
- func (e *Engine) NameFor(ctx context.Context, port, what string) (string, error)
- func (e *Engine) NameTaken(ctx context.Context, name string) (directory string, base model.ObjectID, unchecked string, err error)
- func (e *Engine) Observe(ctx context.Context, id model.RunID) (model.Run, error)
- func (e *Engine) ObserveProject(ctx context.Context, address string) (Observed, error)
- func (e *Engine) Observing(ctx context.Context) (context.Context, *coord.Session, func(), error)
- func (e *Engine) OpenBranches(ctx context.Context) ([]model.Branch, error)
- func (e *Engine) OpenWork(ctx context.Context) (*OpenWork, error)
- func (e *Engine) OtherPullRequests(ctx context.Context, ports []string, except int) []forge.PullRequestSummary
- func (e *Engine) Outdated(ctx context.Context, request OutdatedRequest) (OutdatedReport, error)
- func (e *Engine) PassingBranches(ctx context.Context) (Passing, error)
- func (e *Engine) PastMerge(ctx context.Context, branch model.Branch, head string) ([]git.HistoryCommit, error)
- func (e *Engine) Path(ctx context.Context, selector string) (string, error)
- func (e *Engine) Plan(ctx context.Context, id model.PlanID) (model.Plan, error)
- func (e *Engine) PlanBaseline(ctx context.Context, request BaselineRequest) (Baseline, error)
- func (e *Engine) PlanCheck(ctx context.Context, request PlanRequest) (model.Plan, error)
- func (e *Engine) PlanClean(ctx context.Context, states ...model.BranchState) ([]CleanBranch, error)
- func (e *Engine) PlanCleanBranches(ctx context.Context, branches []model.Branch) ([]CleanBranch, error)
- func (e *Engine) PlanCreate(ctx context.Context, request CreateRequest) (PlannedCreate, error)
- func (e *Engine) PlanForget(ctx context.Context, branch model.Branch) (ForgetPlan, error)
- func (e *Engine) PlanLeftovers(ctx context.Context, session *coord.Session) ([]Leftover, error)
- func (e *Engine) PlanNotes(ctx context.Context, plan model.Plan) []string
- func (e *Engine) PlanOutdated(ctx context.Context, report OutdatedReport) (OutdatedPlan, error)
- func (e *Engine) PlanRebase(ctx context.Context, branch model.Branch) (Rebased, error)
- func (e *Engine) PlanSiblings(ctx context.Context, plan model.Plan) map[model.TargetID]bool
- func (e *Engine) PlanSubmit(ctx context.Context, request SubmitRequest) (SubmitPlan, error)
- func (e *Engine) PlanTidy(ctx context.Context, request TidyRequest) (TidyPlan, error)
- func (e *Engine) PortBranches(ctx context.Context, port string) ([]PortBranch, error)
- func (e *Engine) PortDirectory(ctx context.Context, name string) (string, bool)
- func (e *Engine) PortIndex() (portindex.Source, error)
- func (e *Engine) PostReview(ctx context.Context, report ReviewReport, body string, requestChanges bool) (string, error)
- func (e *Engine) PrepareOutdated(ctx context.Context, plan OutdatedPlan, options PrepareOptions) []PreparedUpdate
- func (e *Engine) PreviewBaseline(ctx context.Context, request BaselineRequest) (Baseline, error)
- func (e *Engine) Processes(ctx context.Context, session *coord.Session) ([]Process, error)
- func (e *Engine) Profile(name string) (Profile, error)
- func (e *Engine) ProposeCheck(ctx context.Context, request CheckRequest) (Proposal, error)
- func (e *Engine) PullRequestBranch(ctx context.Context, number int) (model.Branch, error)
- func (e *Engine) PullRequestRepository() string
- func (e *Engine) PullRequestsStale(ctx context.Context) (bool, error)
- func (e *Engine) PutBack(ctx context.Context, run model.Run, progress func(string)) ([]string, error)
- func (e *Engine) Queue(ctx context.Context, session *coord.Session) ([]checks.QueuedCheck, error)
- func (e *Engine) QueueCheck(ctx context.Context, request checks.QueueRequest) (checks.Queued, error)
- func (e *Engine) QueuedBaseline(ctx context.Context, of model.RunID) (model.Run, model.Plan, bool)
- func (e *Engine) Ready(ctx context.Context, branch model.Branch) (_ model.Branch, byCLI bool, err error)
- func (e *Engine) Rebase(ctx context.Context, branch model.Branch) (Rebased, error)
- func (e *Engine) RecordReview(ctx context.Context, report ReviewReport, posted string) error
- func (e *Engine) RefreshAdopted(ctx context.Context, branch model.Branch, to model.ObjectID) (model.Branch, error)
- func (e *Engine) RefreshPullRequests(ctx context.Context) (RefreshResult, error)
- func (e *Engine) RefreshStalePullRequests(ctx context.Context) (result RefreshResult, read bool, err error)
- func (e *Engine) Regroup(ctx context.Context, plan TidyPlan, spec, author string) (TidyPlan, error)
- func (e *Engine) Remedy(unmet model.Unmet) string
- func (e *Engine) RemoveLeftovers(ctx context.Context, session *coord.Session, leftovers []Leftover) ([]Leftover, error)
- func (e *Engine) RenameArchived(ctx context.Context, branch model.Branch) (model.Branch, error)
- func (e *Engine) RenamePort(ctx context.Context, request PortRenameRequest) (RenamedPort, error)
- func (e *Engine) Replace(ctx context.Context, session *coord.Session, runs []model.Run) ([]model.Run, error)
- func (e *Engine) RequestCancel(ctx context.Context, session *coord.Session, id model.RunID) (model.Run, error)
- func (e *Engine) RequestReview(ctx context.Context, branch model.Branch) ([]string, error)
- func (e *Engine) RerequestDue(ctx context.Context, branch model.Branch) (bool, error)
- func (e *Engine) RerunCI(ctx context.Context, branch model.Branch) ([]int64, error)
- func (e *Engine) Resolve(ctx context.Context, selector string) (model.Branch, error)
- func (e *Engine) ResolveRecord(ctx context.Context, selector string) (model.Branch, error)
- func (e *Engine) Restore(ctx context.Context, name string) (model.Checkpoint, model.Branch, error)
- func (e *Engine) Resume(ctx context.Context, session *coord.Session, id model.RunID) (model.Run, error)
- func (e *Engine) ResumePrepared(ctx context.Context, where Where, tests model.TestPolicy) ([]Resumed, error)
- func (e *Engine) Retry(ctx context.Context, previous model.Run) (model.Run, error)
- func (e *Engine) RevbumpLinked(ctx context.Context, branch model.Branch, update Update, except []string, ...) (LinkedRevbump, error)
- func (e *Engine) Review(ctx context.Context, number int) (ReviewReport, error)
- func (e *Engine) Revision(ctx context.Context, id model.RevisionID) (model.Revision, error)
- func (e *Engine) Run(ctx context.Context, id model.RunID) (model.Run, error)
- func (e *Engine) RunEvents(ctx context.Context, run model.RunID, after int64) ([]model.Event, error)
- func (e *Engine) RunEvidence(ctx context.Context, id model.RunID) (Evidence, error)
- func (e *Engine) RunNamed(ctx context.Context, name string) (model.Run, error)
- func (e *Engine) RunOrExecution(ctx context.Context, name string) (model.Run, model.ExecutionID, error)
- func (e *Engine) RunProviders(ctx context.Context, run model.Run) ([]string, error)
- func (e *Engine) Runs(ctx context.Context, filter store.RunFilter) ([]model.Run, error)
- func (e *Engine) Sandboxed() bool
- func (e *Engine) SeeAllThrough(ctx context.Context, ids []model.RunID, waited func(model.Run, string), ...)
- func (e *Engine) SeeThrough(ctx context.Context, session *coord.Session, id model.RunID, ...) (model.Run, *model.Session, error)
- func (e *Engine) Select(ctx context.Context, selector Selector, work Work) (Selection, error)
- func (e *Engine) SelectionReader() (*selection.Reader, error)
- func (e *Engine) Serve(ctx context.Context, session *coord.Session, options ServeOptions) error
- func (e *Engine) ServeState(ctx context.Context, session *coord.Session) (ServeState, error)
- func (e *Engine) Session(ctx context.Context, kind model.SessionKind) (*coord.Session, error)
- func (e *Engine) Shell(ctx context.Context, request ShellRequest) (int, error)
- func (e *Engine) ShellSteps(ctx context.Context, run model.Run) ([]refusal.Next, error)
- func (e *Engine) StampCleanup() error
- func (e *Engine) StandingAccepted(ctx context.Context, evidence Evidence) (map[string]AcceptedFailure, error)
- func (e *Engine) Start(ctx context.Context, request StartRequest) (model.Branch, error)
- func (e *Engine) StartAtHead(ctx context.Context) (Adoption, error)
- func (e *Engine) StartFrom(ctx context.Context, name string, from model.Branch) (FollowUp, error)
- func (e *Engine) Status(ctx context.Context, states ...model.BranchState) ([]BranchStatus, error)
- func (e *Engine) StatusReport(ctx context.Context, session *coord.Session, request StatusRequest) (StatusReport, error)
- func (e *Engine) SubmitForServe(ctx context.Context, candidate ServeCandidate) (Submitted, error)
- func (e *Engine) SuggestMaintainer(ctx context.Context, commit model.ObjectID) MaintainerSuggestion
- func (e *Engine) SuggestMaintainerAtMaster(ctx context.Context) MaintainerSuggestion
- func (e *Engine) Tclsh() string
- func (e *Engine) TogetherWords(ctx context.Context, runs []model.Run) string
- func (e *Engine) TrackedElsewhere(ctx context.Context, number int) error
- func (e *Engine) UndeclaredLinks(ctx context.Context, run model.Run) ([]evidence.LinkFinding, error)
- func (e *Engine) Untracked(ctx context.Context) string
- func (e *Engine) UntrackedChanging(ctx context.Context, port string) (string, error)
- func (e *Engine) UntrackedPatches(ctx context.Context, tree string, directories, untracked []string) (map[string][]string, error)
- func (e *Engine) Update(ctx context.Context, request UpdateRequest) (Update, error)
- func (e *Engine) Upstream() string
- func (e *Engine) UpstreamRemote(ctx context.Context) (*git.Remote, error)
- func (e *Engine) Where(ctx context.Context, request WhereRequest) (Where, error)
- func (e *Engine) Worktrees() string
- type Evidence
- type ExecutionLogs
- type FamilyReader
- type FollowUp
- type Forge
- type ForgetPlan
- type GitFetch
- type GitHubCLI
- type HTTPSProbe
- type HandEdit
- type Head
- type HeldBeforeEdit
- type Impact
- type IndexFailureReader
- type InstallEstimate
- type InstallFinding
- type InstallLine
- type Leftover
- type LinkFinding
- type LinkThrough
- type LinkedPorts
- type LinkedRevbump
- type LintFinding
- type LiveUnderMigrationError
- type LogCleanup
- type MacPortsBehind
- type MaintainerReader
- type MaintainerSuggestion
- type MasterChanged
- type MergedError
- type NamedProgram
- type NewPort
- type NotARunName
- type Observed
- type ObsoleteStub
- type OpenWork
- type Options
- type OtherPrefix
- type OtherPullRequest
- type OutdatedClass
- type OutdatedLook
- type OutdatedPlan
- type OutdatedPort
- type OutdatedReader
- type OutdatedReport
- type OutdatedRequest
- type Passing
- type PlainURL
- type PlanRequest
- type PlannedCreate
- type PlannedUpdate
- type PortBranch
- type PortBuilds
- type PortChange
- type PortComparison
- type PortDiff
- type PortHolds
- type PortLog
- type PortNamer
- type PortRelease
- type PortRenameRequest
- type PortSelection
- type PortVersion
- type Ports
- type PrepareOptions
- type PreparedUpdate
- type Preparer
- type Prerelease
- type Process
- type Profile
- type Programs
- type Project
- type ProjectReader
- type Proposal
- type PullRequestAdoption
- type PushKind
- type Rebased
- type RefreshResult
- type Refreshed
- type ReleaseUnderMigrationError
- type RenameHeldError
- type RenamedPort
- type ReplayOutcome
- type Replayed
- type RepositoryMove
- type Resumed
- type ReviewCheck
- type ReviewReport
- type RevisionAnalysis
- type RunLogs
- type Scope
- type SelectPolicy
- type Selection
- type Selector
- type ServeCandidate
- type ServeOptions
- type ServeOutdated
- type ServeState
- type Serving
- type SetAside
- type SetupGit
- type SetupReport
- type SetupTool
- type SetupUpstream
- type SharedFile
- type ShellRequest
- type ShipStage
- type SkippedUpdate
- type SourceArchiver
- type StartRequest
- type StatusReport
- type StatusRequest
- type Stealth
- type SubmitEdits
- type SubmitPlan
- func (p *SubmitPlan) Answer(testedBinaries, testedVariants bool)
- func (p SubmitPlan) Concerns() []model.Concern
- func (p *SubmitPlan) Describe(body string)
- func (p SubmitPlan) DescriptionSaysNothing() bool
- func (p SubmitPlan) ForkOwner() (owner string, another bool)
- func (p SubmitPlan) Head() string
- func (p SubmitPlan) Held() []model.Concern
- func (p SubmitPlan) NoteKept() bool
- func (p SubmitPlan) NoteRepeatsCommits() bool
- func (p SubmitPlan) Push() PushKind
- func (p SubmitPlan) RemoteBranch() string
- func (p SubmitPlan) ToDraft() bool
- func (p SubmitPlan) WasDraft() bool
- type SubmitRequest
- type Submitted
- type TakenError
- type TargetEvidence
- type TestedSaid
- type TidyGroup
- type TidyPlan
- func (p TidyPlan) Blocking() []string
- func (p TidyPlan) Gate() branchstate.Plan
- func (p TidyPlan) ModifiedBuild() bool
- func (p TidyPlan) OlderBuilds() []string
- func (p TidyPlan) Regroup(spec, author string) (TidyPlan, error)
- func (p TidyPlan) Save() ([]byte, error)
- func (p TidyPlan) Series() []TidyGroup
- func (p TidyPlan) Subjects() []string
- func (p TidyPlan) Unambiguous() bool
- type TidyRequest
- type TidyResult
- type UncertainRelease
- type Uncommitted
- type UnfoundBuild
- type Unlocated
- type UntrackedError
- type UntrackedPatchError
- type Update
- type UpdateRequest
- type VariantBuild
- type Vocabulary
- func (Vocabulary) Ago(at time.Time) string
- func (Vocabulary) CIFailure(failure model.CIFailure) string
- func (Vocabulary) CIPorts(failures []model.CIFailure) string
- func (Vocabulary) Environment(environment model.Environment) string
- func (Vocabulary) Holds(concerns []model.Concern) []string
- func (Vocabulary) Remade(target TargetEvidence) string
- func (Vocabulary) Revision(revision model.Revision) string
- func (Vocabulary) Unmet(unmet model.Unmet) string
- type Where
- type WhereRequest
- type Work
Constants ¶
const ( SectionRefreshed = prdescription.Refreshed SectionCurrent = prdescription.Current SectionKept = prdescription.Kept SectionAbsent = prdescription.Absent )
const ( CellRecorded = evidence.CellRecorded CellExcluded = evidence.CellExcluded CellUnmet = evidence.CellUnmet CellNotRun = evidence.CellNotRun CellRemade = evidence.CellRemade CellEntered = evidence.CellEntered )
const ( AcceptedAtBase = branchstate.AcceptedAtBase AcceptedUnestablished = branchstate.AcceptedUnestablished AcceptedBlocked = branchstate.AcceptedBlocked AcceptedStanding = branchstate.AcceptedStanding )
The kinds of reason a failure is accepted for (branchstate).
const ( ReplayReplayed = git.ReplayReplayed ReplayDropped = git.ReplayDropped ReplayConflict = git.ReplayConflict ReplayUntried = git.ReplayUntried )
const AccessUnknown = "unknown"
ReviewReport is what dockhand would say about someone's pull request (Design v3 §6.11): its commits and Portfiles against §8's rules, which findings of the last review are resolved, what upstream's change means for each port it changes, and the ports that depend on them. AccessUnknown is a role on the repository the forge wouldn't say.
const CacheUnused = 30 * 24 * time.Hour
CacheUnused is how long something a provider keeps to make environments from, such as a vanilla image Tart pulled, goes unused before cleanup removes it (decision 36).
const CleanupEvery = 24 * time.Hour
CleanupEvery is how often automatic cleanup runs, whichever process runs it: serve, or one a command starts once its own work is done (decision 36).
const HoldsLetGo = `` /* 193-byte string literal not displayed */
HoldsLetGo says once, after the held lines, what they stop and what lets them go.
const KeptFailedFor = 7 * 24 * time.Hour
KeptFailedFor is how long automatic cleanup spares a clone kept unasked for a failure in it (providers.tart.keep_failed), unless space is low.
const KeptFor = 24 * time.Hour
KeptFor is how long automatic cleanup spares a clone a check kept for dockhand shell, unless space is low; clean and the branch's next check remove it any time.
const LowSpacePause = time.Hour
LowSpacePause is how long cleanup waits after a pass before free space that is still short runs it again.
const PullRequestRefresh = 5 * time.Minute
PullRequestRefresh is how often serve reads the pull requests, and how old their reading is before status reads them itself.
const ServeNote = "Opened by `dockhand serve` for an update it prepared and checked, without a person's review."
ServeNote closes the description of a pull request serve opens by itself.
const TidyPlanVersion = 2
TidyPlanVersion is the version of the saved tidy plan format: TOML, whose messages read as they will be written.
const UpstreamBranch = "master"
UpstreamBranch is the branch pull requests are opened against.
const UpstreamRepository = "macports/macports-ports"
UpstreamRepository is MacPorts' ports repository on GitHub.
const UpstreamURL = "https://github.com/macports/macports-ports.git"
UpstreamURL is where master is fetched from, whatever the checkout's remotes are called, so a branch always starts from MacPorts' own master.
Variables ¶
var ErrAmbiguous = errors.New("is changed in more than one open branch")
ErrAmbiguous is a port more than one open branch changes, where the branch to work in is asked for.
var ErrFidelity = editprep.ErrFidelity
ErrFidelity is an edit whose evaluation isn't the change intended, which update refuses as it refuses an edit it can't make, with how to make it by hand.
var ErrNoBranch = errors.New("no tracked branch")
ErrNoBranch reports a name that no tracked branch has.
var ErrNotPortsTree = errors.New("not a MacPorts ports tree")
ErrNotPortsTree reports a directory that is not a MacPorts ports checkout.
var ErrReleaseUncertain = errors.New("the newest release is uncertain")
ErrReleaseUncertain marks an update to the newest release that couldn't tell which that is (uncertainRelease, aheadRelease): nothing was changed, and a branch that carries an update already goes on as it is (ship, after dolt's push failed: run again, its v040.15 tag compared newer and stopped it short of the check that had passed).
var ErrStalePlan = errors.New("the branch changed since this plan was made")
ErrStalePlan reports a plan whose branch or files changed since it was made.
var ErrStaleSubmit = errors.New("the branch changed after the submission was prepared")
ErrStaleSubmit reports a plan whose branch or fork moved since it was made.
var ErrUnsupported = editprep.ErrUnsupported
ErrUnsupported is an edit dockhand can't make by itself, such as a version it can't find in the Portfile; the error says why, after the sentinel's own words.
var ErrYourCheckout = errors.New("this is your checkout's master, not one of dockhand's branches")
ErrYourCheckout is a command run on the person's own checkout's master, which is never one of dockhand's branches; its error says how to name one.
Functions ¶
func Access ¶
Access words a role on the repository: "write access", "no access", or "access dockhand couldn't read with this login".
func Ago ¶ added in v0.4.0
Ago says how old an observation is, roughly: "just now", "5m ago", "3d ago".
func AheadWords ¶ added in v0.6.0
AheadWords say why a port ahead of upstream's tags isn't current.
func AlsoDefined ¶
AlsoDefined are the ports a directory defines beside the one named for it, sorted.
func BaselineWorthy ¶
BaselineWorthy sorts a check's ports into those a baseline can say something about, that failed at install or test somewhere, or whose tests failed where the policy only reports them, as uvw's did in check-38, and those it can't, that failed only before building, at lint, fetch, or checksum, which come from the branch's own Portfile and distfiles. A port blocked, unmet, or not evaluated is neither.
func BranchName ¶
BranchName is the Git name dockhand gives a branch it creates: the name a person typed, under dockhand/.
func CIFailureWords ¶ added in v0.5.0
CIFailureWords say a classified CI failure as status does after "CI failed": "fetching jni-sys-macros-0.4.1.crate (mirror.sjtu.edu.cn answered 403) on macos-15"; one unclassified by its log's first error line, "on macos-15: foo.cpp:12:3: error: …", or its check alone.
func CIPortWords ¶ added in v0.7.0
CIPortWords are each port a pull request's failed CI jobs built, with its result, a job's result for a port where several jobs built it read worst first: "exiv2 ✓, gpsbabel ✗ (build)". Empty where no job's log said any (Then's item 7).
func CarriedLines ¶ added in v0.8.0
CarriedLines say, of the evidence's results reused over a change that builds nothing differently (model.Carried), what changed since each earlier check built them, a sentence for each check that reused and each it reused from, in the targets' order (checks.CarriedWords): "check-767 reused check-766's builds (commit 3f2a1c9): since then only omnidiff's maintainers changed, which builds nothing differently, and lint ran again on this Portfile". None where nothing was carried.
func Checkouts ¶ added in v0.5.0
Checkouts are the ports checkouts the database has registered whose Git directory is still there, for a command run outside any checkout that names a branch: dockhand path <branch> run elsewhere failed "not a MacPorts ports tree", though the branch's worktree was recorded (the exiv2 field notes). It opens the database without a tree; one that doesn't exist yet has none.
func ClosedWords ¶ added in v0.6.0
ClosedWords say why an update closed unmerged isn't proposed again: "1.8.1's pull request #123 was closed unmerged, in jq-1.8.1; a newer release lifts this".
func CoverageWords ¶
func CoverageWords(compared model.UpstreamComparison) string
CoverageWords say in one line what an assessment read and checked: the new version's files it compared, the patches that apply and those it couldn't check, what it set apart, and how it read the source where that's said, a Git-fetched port's commits or nothing for one that fetches nothing. A comparison that found nothing read as one that hadn't looked: rust's said only its package.json, and its Cargo manifests and patches went unmentioned (rust 1.99.0, batch 23). "Read LICENSE, go.mod" read as an instruction (field testing, 2026-10-02). Empty where the comparison recorded no coverage.
func DecideCommand ¶ added in v0.7.0
DecideCommand is the command that answers a concern, as where it holds says it: dockhand decide license-changed -p jq --because "…".
func DecisionWords ¶ added in v0.7.0
DecisionWords are a decision on a concern as a person reads it: "jq license-changed: acceptable because the new license is still MIT".
func EnvironmentHeading ¶
func EnvironmentHeading(environment model.Environment, all []model.Environment) string
EnvironmentHeading is an environment's short name, for a column heading where its full words are shown elsewhere: its release alone, macOS 26, with its architecture where another environment of all shares the release, and its provider where all has several. An environment with no platform is its provider.
func EvidenceWords ¶
func EvidenceWords(evidence Evidence, target TargetEvidence, environment int, accepted AcceptedFailure) string
EvidenceWords is how one target's result in one environment reads, on the terminal and in the pull request alike (TargetWords). A result's tests read under the policy of the check that built it: when that check is an earlier one whose policy differs from this evidence's own, it is named, "tests failed (advisory, check-3)", so a later check with --tests required never makes an earlier advisory result read as required.
func FailureLines ¶
func FailureLines(evidence Evidence, target TargetEvidence, environment, n int) []string
FailureLines are the last lines, at most n, of the step a target failed at in an environment, read from its log where no reading of it found the cause (checks.FromItsLog): what a failure printed last, said in the check's own report rather than left to dockhand logs (the Vx port's field testing, 2026-10-03). The step ends where another target's step in the same log begins. None for a result that didn't fail, or has no log.
func ForgetWords ¶ added in v0.8.0
ForgetWords say how a branch set aside is thrown away, where archive keeps its Git branch for --undo: "dockhand clean --delete am-utils-6.2 then forgets it for good". clean refused the open branch, archive kept the Git branch, and a clean then said "Nothing to remove" with dockhand/am-utils-6.2 still there (field testing, the outdated-ports session's note 24); archive's undo and delete's forgetting stay two steps.
func GitHubWontBuild ¶ added in v0.7.0
GitHubWontBuild are the targets a plan's GitHub environments won't build: MacPorts' workflow builds only the ports a commit changes, so neither --also's unchanged ports nor a baseline's, which are the plan's Also targets. The plan says them before anything is pushed, where they were said only once the run was read.
func GitVersion ¶
GitVersion reads the version of the Git dockhand runs, options.Git or git on PATH, and refuses one older than dockhand works with (git.MinimumVersion), saying how to get a newer one.
func Here ¶
Here is the checkout to work on in dir when a command is pointed at tree without naming it itself, as MACPORTS_TREE points one: dir's own worktree when it is a worktree of the same repository, whose branch is the one checked out here, and tree otherwise. Inside a branch's worktree, that worktree is the checkout it belongs to.
func HistoryWords ¶
HistoryWords says what cleanup removed of build history.
func HoldLines ¶ added in v0.4.0
HoldLines are concerns as they're said, a line each, the same finding of several ports once: two subports' "setup.py changed" read twice in a submission's held line (field testing at f41fbad6, py-kubernetes).
func HoldRuleLines ¶ added in v0.7.0
HoldRuleLines are HoldLines, each naming the rule that raised it, as decide and holds.allow name it: "upstream's COPYING changed [license-changed]". A held line said neither what it stopped nor what let it go (the abook session, 2026-10-28).
func HoldRules ¶ added in v0.5.0
func HoldRules() []string
HoldRules are the rules whose concerns holds.allow may name, each said and holding nothing then: every assessment rule, every commit rule whose finding is an error, and the holds the engine raises itself. What blocks a submission, and archives that couldn't be compared, hold whatever the list says, as what couldn't be checked does (D4).
func IsCheckName ¶ added in v0.4.0
IsCheckName reports whether name is spelled as a check's, check-42 or 42.
func LeavesStableWords ¶ added in v0.6.0
LeavesStableWords say an update that takes a port from a stable version to a prerelease, as update and submit's preview say it, once each (the docs dig's I32): automatic selection never chooses such a version, so only one the person named does, and it holds nothing.
func LogCleanupWords ¶
func LogCleanupWords(done LogCleanup, after time.Duration) string
LogCleanupWords says what cleanup did to checks' logs: "compressed 242 logs, 802 MB to 50 MB; removed 12 checks' logs, 140 MB, kept for nothing past 15 days".
func MaintainerWords ¶
func MaintainerWords(s MaintainerSuggestion, file string) string
MaintainerWords say what to set as maintainer in dockhand's config, the file named, as the command read it: the entry most of the ports naming the person's login write, as they write it, and the others they write, to choose from; or, with nothing to suggest, a placeholder to fill in.
func NewTestsWords ¶ added in v0.5.0
NewTestsWords say why a baseline isn't offered for ports whose tests are new on the branch.
func NothingCompared ¶
func NothingCompared(compared model.UpstreamComparison) bool
NothingCompared reports a comparison of a port that fetches nothing, which had no upstream source to compare, and says so in its coverage.
func OlderMacPorts ¶ added in v0.5.0
func OlderMacPorts(behind []MacPortsBehind, reads bool) []string
OlderMacPorts are the one sentence of what keeps an older MacPorts than this Mac's, a line for each pair of versions, in the order they come: "macOS 15's image and macOS 26's Xcode image have MacPorts 2.12.6, older than this Mac's 2.12.7: <each one's setup>". A check's plan, setup's status, and an Xcode image's setup each composed it, with their own grouping (the architecture review of 5897a82, R3-7). reads adds why it matters to a check, that this Mac's MacPorts reads their ports.
func OnValues ¶
func OnValues(environments []model.Environment) ([]string, bool)
OnValues are environments as --on names them, as Environments reads them back: Tart's and GitHub's releases together by their product versions, tart:12,26 and github:15,26, a local check's prefix, local:/opt/local, and another provider by its name, in the order the environments first name each. False where a release can't be named, as one this dockhand doesn't know can't.
func OpenPortsTree ¶
OpenPortsTree opens the checkout containing dir and refuses anything that is not a ports tree: at least one <category>/<port>/Portfile in the working tree, or, for a sparse checkout, on one of its local branches.
func OthersPortfiles ¶ added in v0.7.0
OthersPortfiles is whose a branch's Portfiles are where they aren't the person's, as an adopted pull request's are its author's: "@alice's", or "#4711's author's" where the author wasn't kept; false for the person's own.
func PatchesApply ¶ added in v0.4.0
PatchesApply says how many patches apply, "6 patches apply", or of how many, where others don't.
func PrefixNote ¶ added in v0.6.0
func PrefixNote(environment model.Environment) string
PrefixNote is what a plan says of a local check's prefix other than /opt/local: MacPorts' binary archives are built for /opt/local alone, so every dependency builds from source there. Empty for any other environment.
func ReleaseSource ¶ added in v0.4.0
ReleaseSource says where a release was found: "GitHub tag jq-1.8.1", "GitHub commit e2a98e1" for a commit pin's, or "from its distfiles"; nothing where none says.
func ReleaseWords ¶ added in v0.4.0
ReleaseWords says where an update's version came from, as status says it: "jq 1.8.1, GitHub tag jq-1.8.1 of jqlang/jq at 1a2b3c4".
func RemadeWords ¶
func RemadeWords(target TargetEvidence) string
RemadeWords says what changed in the first environment where the target's result was recorded before it changed: its provider's words where it can say (buildenv.IdentityExplainer), as Tart says a new guest protocol, and otherwise that the environment was made again.
func RemakeWords ¶ added in v0.5.0
RemakeWords is the setup that makes a release's Tart image again, its Xcode image with --xcode and the Xcode it takes.
func SeriesWords ¶ added in v0.7.0
SeriesWords say a newer series than a versioned subport's (upstream.SeriesWords).
func SetAsideWords ¶ added in v0.5.0
SetAsideWords say why a port's newest release is uncertain: what was set aside, and whose commit it predates.
func Setup ¶ added in v0.5.0
Setup opens the engine for setup and reports on it, refusing a Git too old before anything is recorded (GitVersion). Worktrees go in named, an absolute directory, where it's given, else the configured directory (Options.Worktrees), else the default (DefaultWorktrees). The report holds what was found where it fails partway.
func SourceUnchanged ¶
func SourceUnchanged(compared model.UpstreamComparison) bool
SourceUnchanged reports a comparison of a port whose source the change left as the base had it, which says nothing of upstream.
func TakenWords ¶
TakenWords says a port name already taken, and what to do.
func TreePaths ¶ added in v0.4.0
TreePaths are paths a person typed, taken from where they are, here, when that is in the branch's worktree, else from the top of the tree, for diff and path (the command package split's 7a row 10).
func UnchangedWords ¶ added in v0.5.0
UnchangedWords say a port a baseline leaves out since master's build reads what the check's did: "gnome-voice left out: master's build reads what check-484's did".
func UnderUpstream ¶ added in v0.4.0
func UnderUpstream(change model.UpstreamChange) model.UpstreamChange
UnderUpstream is a change as it reads under an Upstream heading, which already says whose it is: "upstream's LICENSE changed" is "LICENSE changed" there. Elsewhere, as in what holds a submission, the words stand alone.
func UntrackedInChanged ¶ added in v0.4.0
UntrackedInChanged are the untracked files a capture left out that sit in a directory the plan changes: a new patch in a port's files/, which the check builds without, and fails or passes for the wrong reason (Codex's gcc15 group update, 2026-10-07). They're said before any VM boots, with what takes each in.
func VariantBuilds ¶
VariantBuilds are the builds --variants each makes of a port beside its defaults: one for each variant it declares, over its defaults, but for the ones among its defaults, which its default build has, and universal, which needs other architectures' dependencies a clean builder doesn't have.
func VariantsNote ¶ added in v0.8.0
func VariantsNote(builds []VariantBuild, each bool) string
VariantsNote is the variants item's note, naming each variant build and its checks: "(Dockhand built curl with +gnutls +sectrust and with +ssl +sectrust added to the default variants, in check-772 and check-773)", or, each having been built by --variants each, "(Dockhand built curl with each of +gnutls, +ssl added to the default variants)"; where one failed, "(Dockhand built curl with +gnutls +sectrust, which passed, and with +ssl +sectrust, which failed in check-775)".
func VariantsWords ¶ added in v0.8.0
func VariantsWords(builds []VariantBuild, each bool) string
VariantsWords are VariantsNote's words without its parentheses, which submit's preview says beneath its Checks row.
Types ¶
type AcceptedFailure ¶ added in v0.5.0
type AcceptedFailure = branchstate.AcceptedFailure
AcceptedFailure is why a failed port's failure is accepted (branchstate.AcceptedFailure).
type AdoptRequest ¶
type AdoptRequest struct {
// Branch is the Git branch to track; the checkout's current branch
// when empty.
Branch string
}
AdoptRequest asks to track an existing branch.
type Adoption ¶
type Adoption struct {
Branch model.Branch
// Already is true when the branch was tracked before.
Already bool
// Renamed is the name a tracked branch had before it was renamed with
// Git; adopting it under its new name kept its record.
Renamed string
// Commits counts the commits above master.
Commits int
Scope Scope
// Uncommitted are the ports the worktree's uncommitted edits change
// that its commits don't: "0 commits above master, changing no ports
// yet" was said of a tree with edits to three ports.
Uncommitted []string
// Placed is where adopting checked the branch out, where it wasn't
// anywhere, and Unplaced why it couldn't.
Placed, Unplaced string
}
Adoption reports what adopt found.
type AheadRelease ¶ added in v0.6.0
type AheadRelease = upstream.AheadError
AheadRelease is an update's refusal to choose a release where the port is ahead of every version upstream lists: the update needs the version named.
type AmbiguousError ¶
type AmbiguousError struct {
Port string
Branches []PortBranch
}
AmbiguousError is a port and the open branches that change it.
func (*AmbiguousError) Error ¶
func (a *AmbiguousError) Error() string
func (*AmbiguousError) Unwrap ¶
func (a *AmbiguousError) Unwrap() error
type ArchiveDiff ¶
type ArchiveDiff struct {
Directory string
// Old and New name the archives; one is empty when only one side
// declares it. Match is how they correspond, by the port's source set
// (macports.MatchSources): an uncertain one has a side alone, and
// isn't compared.
Old, New string
Match macports.SourceMatch
// OldFromMirror is true when the base's archive came from MacPorts'
// mirror, upstream serving something else under its name.
OldFromMirror bool
// Same is true when the archives are identical.
Same bool
Changed, Added, Removed int
Patch []byte
// Problem is why the port's archives could not be compared.
Problem string
}
ArchiveDiff is how one of a port's archives changed from the branch's base to its files now.
func (ArchiveDiff) Uncertain ¶
func (d ArchiveDiff) Uncertain() bool
Uncertain reports an archive that several of the other side's could correspond to, which wasn't compared.
type ArchiveFetcher ¶
type ArchiveFetcher interface {
FetchArchives(ctx context.Context, source model.Source, directory, into string) ([]treequery.FetchedArchive, error)
}
ArchiveFetcher fetches the source archives a port's Portfile declares in a source tree, into a directory, each checked against the Portfile's checksums.
type ArchivePlanner ¶
type ArchivePlanner interface {
// ArchivePlan is a port of a directory, or its first where port is
// empty, as evaluated, and the archives its fetch plan names, which
// fetchPlanned fetches: its own, where it declares crates or Go
// modules too; ErrNoArchives where it names none, as for a port
// fetched with Git, or a metaport.
ArchivePlan(ctx context.Context, source model.Source, directory, port string) (macports.PortInfo, []macports.Distfile, error)
}
ArchivePlanner says what a port fetches in a source, as MacPorts evaluates it on this Mac.
type ArchiveRequest ¶
type ArchiveRequest struct {
Branch model.Branch
Undo bool
// KeepWorktree leaves the worktree where it is; Discard removes it
// though it holds uncommitted edits or untracked files, which go.
KeepWorktree, Discard bool
// Commit commits the worktree's edits first, as tidy would, where its
// plan needs no words from the person, then removes it (the command
// package split's 7b row 5); NeedsWords says where it does.
Commit bool
}
ArchiveRequest asks to set a branch aside, or bring one back.
type ArchiveVersionReader ¶ added in v0.7.0
type ArchiveVersionReader interface {
ArchiveVersions(ctx context.Context, source model.Source) (map[string]string, error)
}
ArchiveVersionReader reads every indexed port's version and revision as an archive's name writes them (treequery.Reader.ArchiveVersions).
type Archived ¶
type Archived struct {
Branch model.Branch
// Removed is the worktree removed, and Kept why it stayed: what it
// holds that its Git branch doesn't. IgnoredRemoved are the files Git
// ignores that went with it, which nothing listed (the person's
// .gitignore item, 2026-10-04).
Removed, Kept string
IgnoredRemoved []string
// PullRequestOpen is whether the branch's pull request is open, as
// GitHub says now, where it can be read, else as last recorded: one
// closed with gh was said to be still open (the rc6 full stage).
PullRequestOpen bool
// NeedsWords is whether Commit's tidy plan needs the person's words,
// so nothing was committed and the worktree stays.
NeedsWords bool
}
Archived is a branch set aside: its worktree removed, or why it stayed.
type Artifact ¶ added in v0.7.0
type Artifact struct {
Port string
Environment model.Environment
Name, Path string
Missing string
}
Artifact is one archive a check's passed target built on one platform: its port, environment, MacPorts' name for it, and where it's kept on this Mac; Missing says why there's none, where it wasn't kept or is gone.
type AssessmentState ¶
type AssessmentState string
AssessmentState is how far a branch's files are assessed, as status reads what's recorded: every port's assessment recorded, one of them incomplete, or some not yet recorded, which a check or a submission collects.
const ( AssessmentAvailable AssessmentState = "available" AssessmentIncomplete AssessmentState = "incomplete" AssessmentPending AssessmentState = "pending" )
type Baseline ¶
type Baseline struct {
// Of is the branch's check it looks into, and OfPlan its plan.
Of model.Run
OfPlan model.Plan
// Revision is the checked revision's base, as a revision of the branch.
Revision model.Revision
Plan model.Plan
// New are the ports left out because the base has no Portfile for
// them: the branch adds them, so there is nothing to compare.
New []string
// Skipped are failed ports left out without --only because they failed
// only before building, at lint, fetch, or checksum: those come from
// the branch's own Portfile and distfiles, which a build at the base
// can't speak to.
Skipped []string
// NewTests are failed ports left out without --only because only their
// tests failed, and master declares none (testsNewHere).
NewTests []string
// Unchanged are failed ports left out without --only because their
// builds read only what master has (readsChanged), which BaselineCandidates
// leaves out of the offer alike.
Unchanged []string
}
Baseline is a planned baseline (Design v3 §6.8): ports of a branch's check built again at the master that check started from, in the same environments, to see what they do without the branch.
type BaselineOffer ¶ added in v0.5.0
type BaselineOffer struct {
Ports []string
Base model.ObjectID
NewTests []string
// Changed say, of ports offered again, what changed since an earlier
// baseline that would have answered them, as a rebase leaves it.
Changed []string
}
BaselineOffer is what check --baseline would build after a failed check, for the check to point to it: Ports, the ports that failed at install or test (BaselineWorthy) that master has, at Base, the base the check started from; and NewTests, those left out since only their tests failed and master declares none, which the check says instead.
type BaselineRequest ¶ added in v0.7.0
BaselineRequest is a baseline asked of a branch: of its newest finished check, or of Of, a finished check of the branch's named as people type it, check-42, since what moved names the check it's read against (5a72a542); of Ports, or of the ports that failed in it.
type BaselineRow ¶ added in v0.4.0
type BaselineRow struct {
Target model.TargetID
Environment model.Environment
Base model.TargetResult
Branch model.TargetResult
Excluded string
}
BaselineRow is one port's result at the base beside the branch's, in one environment: Excluded where the base doesn't build it there, and why.
func BaselineComparison ¶ added in v0.4.0
func BaselineComparison(base, branch Evidence) []BaselineRow
BaselineComparison sets each port's result at the base beside the branch's, in each environment where the baseline built it, and where the check failed it but master doesn't build it. A baseline rebuilds a port only where it failed, so elsewhere there is nothing to set beside (the command package review's row 6, moved here from check's printing).
type BranchDiff ¶
type BranchDiff struct {
Status BranchStatus
BaseTree string
Ports []PortDiff
// Other lists changed paths CI builds nothing for: _resources, and
// files in a port's directory outside its Portfile and files/.
Other []string
// Files lists every changed path, narrowed to the paths asked for.
Files []string
Patch []byte
}
BranchDiff is a branch's change from its base, as its files are now: what check would capture and a pull request would show.
type BranchStatus ¶
type BranchStatus struct {
Branch model.Branch
// Accepted, AtBase, and Decisions are what publication reads beside a
// failed check of the files as they are (branchstate.Check).
Accepted []string
AtBase map[string][]string
Decisions []model.Decision
// CI are its pull request's failed CI jobs at the head last observed,
// as each was classified (classifyCI).
CI []model.CIFailure
// HandEdits are the branch's hand edits as its working files have
// them (update --hand-edit), by directory.
HandEdits []HandEdit
// Missing is true when the Git branch is gone.
Missing bool
// WorktreeStays is a Git branch gone whose worktree dockhand made is
// still there, which isn't cleaned.
WorktreeStays bool
// Renamed is the branch's name before a rename by hand that this
// status followed (followRenames), said once.
Renamed string
// NoFork is true where no Git remote pushes to a GitHub repository
// but MacPorts' own, so submit has nowhere to push yet: read from
// the remotes' addresses alone, as status reads no network.
NoFork bool
// Pruned is true for an ended branch whose checks cleanup has
// removed but its newest, kept without what it built (D6): Latest is
// that check, and there's no Evidence.
Pruned bool
Head string
Commits int
// Edited lists tracked files changed and not committed.
Edited []string
// Edits are the branch's recorded edits, which say a hold before its
// check (branchstate.Preparation).
Edits []model.Edit
Scope Scope
// Changes are the change records of the files as they are now, by
// directory, where they've been made; status makes none.
Changes map[string]model.ChangeRecord
// Tree is the files as they are now: the working files when edited,
// else the head's.
Tree string
// Latest is the check status judges by: the newest finished check of
// the files as they are now, as submit credits one, else the newest
// finished check. Active is every run queued or running, baselines
// and runs asked to stop among them; Checking is the branch's check.
Latest *model.Run
Active []model.Run
Evidence *Evidence
// Current is true when Latest checked exactly the files as they are
// now, whatever their history.
Current bool
// Included are the untracked files Latest's snapshot took in with
// --include, which the files as they are now are compared with: a
// check that passed with an untracked patch included read as of files
// that had changed since, and asked for a check of the same files.
Included []string
// LatestRevision is what Latest checked.
LatestRevision *model.Revision
// Held are the findings of its files' recorded assessments that hold
// a branch serve prepared for a person's look, and Assessment how far
// they're recorded; status collects none.
Held []model.Concern
Assessment AssessmentState
// Decided are the person's decisions on its concerns that stand for
// its files, each said by status, and Awaiting those waiting on
// something, which block its submission (the person's voice).
Decided, Awaiting []model.Decision
// Wider is the check a passing attended host check didn't build that
// the update asks for (wider).
Wider *branchstate.Wider
// PastMerge are a merged branch's commits past what its pull request
// merged (Engine.PastMerge), counted.
PastMerge int
// Stopped is the active run recorded as running that no live process
// drives, once JudgeStopped has looked; nil otherwise.
Stopped *model.Run
// Releases are the releases the branch's updates chose, each port's
// latest, in the order the ports were first updated.
Releases []PortRelease
// Moved are the Git-fetched ports whose update chose a release whose
// tag named another commit then than when Latest's check planned it
// (preparedSources' release-moved), or whose recorded assessment read
// another commit (assessedSources' assessment-moved), where Latest
// checked the files as they are now, which hold a submission nobody
// looks over, as submit says them, unless a decision answers them.
// They're read from the store and the plan alone. Whether a
// tag names another commit now than the
// check planned (source-moved) takes the network, which status never
// reads, and nothing records it: submit's plan isn't kept, serve says
// its holds on its own terminal, and an assessment is made once for
// its files.
Moved []model.Concern
// OnMaster is the master dockhand last fetched where it has every
// change the branch's files make, so its work landed by another
// route, as duckdb-cxx14's C++14 fix did while status still asked to
// commit it for review (cleaning up duckdb-cxx14, finding 1); empty
// otherwise, or for a branch that changes nothing.
OnMaster model.ObjectID
// Merge is an open pull request's fitness to be merged by MacPorts'
// maintainer policy, as of the status, over the ports whose
// maintainers its change records keep, or master's cached port index;
// MaintainersUnread are the ports changed whose maintainers neither
// has, a new port's until its record is made (readMerge). Nil where
// there's no open pull request.
Merge *macports.Merge
MaintainersUnread []string
// contains filtered or unexported fields
}
BranchStatus is what status shows for one branch (Design v3 §10). Each field answers one question; nothing folds source, checks, and review into one "done".
func (BranchStatus) ChangedPorts ¶
func (s BranchStatus) ChangedPorts() (ports []string, notes map[string]string)
ChangedPorts are what the branch's files change as they are now, as a person reads it: _resources first, where it changed, with the PortGroup files its change records find changed and the ports each moved, as one line; then the ports its change records say (recordedPorts).
func (BranchStatus) Check ¶ added in v0.5.0
func (s BranchStatus) Check() branchstate.Check
Check is what's recorded of the branch's checks, as the verdict reads it (branchstate.Check).
func (BranchStatus) CheckStanding ¶ added in v0.4.0
func (s BranchStatus) CheckStanding() branchstate.Standing
CheckStanding judges the branch's checks (branchstate.Check.Standing).
func (BranchStatus) Checking ¶ added in v0.5.0
func (s BranchStatus) Checking() *model.Run
Checking is the branch's one check queued or running (branchstate).
func (BranchStatus) Cleaned ¶
func (s BranchStatus) Cleaned() bool
Cleaned reports whether a branch's Git branch is gone as clean removes it: a merged branch's, once its work is in master, or an archived or closed one's that held nothing master lacks: nothing about it needs anyone. An open branch whose Git branch is gone was lost, as to a rename. A worktree that stays is no clean's, whatever its Git branch: status said "cleaned" of branches whose worktrees clean kept (field testing's xapian-core-dsq3).
func (BranchStatus) Facts ¶ added in v0.5.0
func (s BranchStatus) Facts() branchstate.Facts
Facts are what's recorded of the branch, as the verdict reads it (branchstate.Facts).
func (BranchStatus) Failing ¶
func (s BranchStatus) Failing() []string
Failing lists the pull request's failing checks, sorted.
func (BranchStatus) IncludedPorts ¶
func (s BranchStatus) IncludedPorts() []string
IncludedPorts are the ports the latest check built from files Git doesn't track, which check --include added: a new port's Portfile, which the branch's own files don't change yet, so ChangedPorts names none. Status said "Ports none yet" of a branch whose check had just built one (Codex's feedback, approved 2026-10-05). None where the branch's files change a port, or the latest check was of a commit.
func (BranchStatus) OnlyPort ¶ added in v0.4.0
func (s BranchStatus) OnlyPort() (string, bool)
OnlyPort is the one port a branch is about, for a command run in it that names none: what its files change, but _resources, and the ports it was started for (model.Branch.Ports); false where that's none or several.
func (BranchStatus) Pushed ¶
func (s BranchStatus) Pushed() bool
Pushed reports whether the pull request has the branch's head.
func (BranchStatus) SomeoneElsePushed ¶
func (s BranchStatus) SomeoneElsePushed() bool
SomeoneElsePushed reports whether the pull request holds a commit that dockhand did not push and the branch does not have.
func (BranchStatus) Touches ¶ added in v0.4.0
func (s BranchStatus) Touches(port string) bool
Touches reports whether a branch is a port's: it changes the port, by its directory or its change record, or it was started for it (model.Branch.Ports), as status --port reads it.
type BuilderHistory ¶ added in v0.8.0
type BuilderHistory interface {
History(ctx context.Context, port string) (buildhistory.History, bool)
}
BuilderHistory reads what MacPorts' builders made of a port, as ports.macports.org keeps it (buildhistory.Reader): false where the site gave no answer, which says nothing.
type Builds ¶ added in v0.4.0
Builds are where checks build, as the configuration sets it: the profile a person's check takes, the one a check nobody looks over takes, and the person's own profiles, by name.
type Capture ¶
type Capture struct {
Revision model.Revision
// Reused is true when an earlier revision already held these files.
Reused bool
// Untracked lists the files left out because Git does not track them.
Untracked []string
// NewPorts are the directories among them whose Portfile is left out:
// a port written by hand, which the worktree's sparse checkout keeps
// git add from taking (the Vx port's field testing, 2026-10-03).
NewPorts []string
// Fixed are the lint findings the capture fixed in the working files
// first, as tidy's plan fixes them (lintFixes), each in words; a
// plan's are said, and its capture holds them, but nothing is
// written.
Fixed []string
}
Capture is the revision a check covers.
type CaptureMode ¶
type CaptureMode string
CaptureMode says which files a check captures (Design v3 §7).
const ( // CaptureWorking captures the tracked files as they are on disk, // staged or not. CaptureWorking CaptureMode = "working" // CaptureStaged captures the index. CaptureStaged CaptureMode = "staged" // CaptureHead captures the committed tip. CaptureHead CaptureMode = "head" // CaptureAuto captures what a command asking for no files in // particular means (autoMode): ship's, and check's without --head, // --staged, or --working-tree. CaptureAuto CaptureMode = "auto" )
type CaptureRequest ¶
type CaptureRequest struct {
Branch model.Branch
Mode CaptureMode
// Include adds untracked files to the capture without staging them.
Include []string
// Plan records nothing, for check --plan: an earlier revision with the
// same files is still found, and new files are a snapshot numbered
// only when a check records it.
Plan bool
// Named is a branch a flag named, rather than the one checked out
// where the command runs, which CaptureAuto reads.
Named bool
}
CaptureRequest asks for a revision of a branch to check.
type Cell ¶
What recorded checks establish is the evidence package's to say (the architecture review's finding 4); the engine loads the records it reads, asks providers what each environment is now, and words what it says. Its types keep their names here, for the commands that read them.
type CellKind ¶
What recorded checks establish is the evidence package's to say (the architecture review's finding 4); the engine loads the records it reads, asks providers what each environment is now, and words what it says. Its types keep their names here, for the commands that read them.
type CheckRequest ¶ added in v0.4.0
type CheckRequest struct {
// Capture is the files of the branch; its Branch is the check's.
Capture CaptureRequest
Where Where
// Tests are the tests asked; check.tests where empty (Options.Tests).
Tests model.TestPolicy
// Only, Also, Fresh, Keep, Variants, and EachVariant are
// PlanRequest's.
Only, Also []string
Fresh, Keep bool
Variants map[string]bool
// VariantsPort is the port --variants named, as 'curl +sectrust'
// names curl; empty where it named none.
VariantsPort string
EachVariant bool
}
CheckRequest is a check asked of a branch: the files it captures, where it builds, and what of it, as check's flags, ship, and serve ask it.
type CheckSummary ¶ added in v0.4.0
type CheckSummary struct {
Branch model.Branch
Revision model.Revision
Plan model.Plan
Altered []string
}
CheckSummary is a check with what it checks: its branch, revision, and plan, and what its dependencies' kept archives said, gone or altered.
type ChecksumLeft ¶ added in v0.4.0
type ChecksumLeft = editprep.ChecksumLeft
ChecksumLeft is what a checksum refresh left as it was, with why.
type ChecksumsToWrite ¶
type ChecksumsToWrite = editprep.ChecksumsToWrite
ChecksumsToWrite is a checksum refresh dockhand couldn't write, with the archives' checksums for a person to write.
type CleanBranch ¶
type CleanBranch struct {
Branch model.Branch
// Merged is the commit the pull request was merged at.
Merged model.ObjectID
Steps []CleanStep
// Superseded says the ports master has at other versions than an
// unmerged branch with work of its own started from, which a person
// may look at before removing it.
Superseded string
}
CleanBranch is what clean would do for one merged branch.
type CleanStep ¶
type CleanStep struct {
// What names it: "worktree ~/…", "branch dockhand/jq-4k2p",
// "ada/macports-ports:dockhand/jq-4k2p".
What string
// Kept says why it stays; empty when it would be removed.
Kept string
// Why says why it goes, where that isn't its branch's kind's reason.
Why string
// Done is true once it was removed.
Done bool
// Unreached is a fork branch not looked at, since the fork couldn't be
// reached for want of a key or credentials, which clean says in one
// line where it counted each as kept (the bump batch after a reboot,
// with no SSH key loaded: "kept 515").
Unreached bool
// Kind is what it is: a worktree, a local branch, a fork's branch, or
// what a check left, which a command reads where it read What's words.
Kind CleanKind
// Said is a step clean can never take, a fork branch no remote pushes
// to, that an earlier clean kept and said (model.Branch.CleanKept): it
// stays kept, and on status --all's line, but isn't listed again, as
// pr-34539's was on every clean (field testing).
Said bool
// contains filtered or unexported fields
}
CleanStep is one thing clean would remove, or keeps and why.
type CleanupReason ¶
CleanupReason is why automatic cleanup is due: every has passed since the last, or, when LowSpace, free space ran short. Words say which.
type CleanupReport ¶
type CleanupReport struct {
// Branches are the merged branches it cleaned, and what it kept.
Branches []CleanBranch
// Leftovers are what checks left in providers, and what it removed.
Leftovers []Leftover
// Indexes are the port index generations it removed.
Indexes []string
// Caches are what it removed from providers' caches, such as the
// vanilla images Tart pulled.
Caches []string
// Events and Sessions count what it pruned from the journal.
Events, Sessions int
// Archives are the kept archives it removed, which no live result
// named.
Archives []model.Archive
// Logs is what it compressed of checks' logs, and removed (D6).
Logs LogCleanup
// History is what it removed of what ended branches recorded of their
// checks, and Assessments the assessments of trees open branches moved
// past (D6).
History store.Pruned
Assessments int
}
CleanupReport is what one automatic cleanup removed.
type ComparisonLine ¶ added in v0.4.0
type ComparisonLine struct {
Hold bool
Ports []string
Words string
// Rule is what raised a line that holds, where it's named.
Rule string
}
ComparisonLine is one line of what comparing a branch's upstream archives found, under an Upstream heading: whether it holds, the ports it was found for, and its words.
func ComparisonLines ¶ added in v0.4.0
func ComparisonLines(comparisons []PortComparison) []ComparisonLine
ComparisonLines are what the comparisons found, a line each, the same finding of several ports once with each port named: a change a passing build can't catch, archives that couldn't be compared, which hold, and what was read and checked, so silence isn't taken for not looking (rust 1.99.0, batch 23). Whether a line holds is its own field, where submit sliced a "! " back off the words it had put on them.
type CreateRequest ¶
type CreateRequest struct {
Branch model.Branch
URL string
// Name is the port's name, which ObserveProject suggests.
Name string
// Category is where it goes; guessed from the build system, and marked
// so, when empty.
Category string
// Maintainer is the maintainers line; nomaintainer, marked, when empty.
// openmaintainer is added to it unless KeepMaintainers
// (macports.WithOpenMaintainer).
Maintainer string
// KeepMaintainers writes Maintainer as it is, create
// --no-openmaintainer.
KeepMaintainers bool
// Project is the project as ObserveProject found it.
Project Project
}
CreateRequest asks for a new port's first Portfile.
type Created ¶
type Created struct {
Port, Directory string
Version string
Build portcreate.Build
Crates int
Category string
// Unconfirmed names what the Portfile marks as guessed.
Unconfirmed []string
// Checksums is the refresh that filled them in; ChecksumsProblem says
// why it could not.
Checksums *Update
ChecksumsProblem string
// HomepageFrom is the forge's plain-HTTP homepage, where its https form
// answers and the Portfile has that, as MacPorts prefers.
HomepageFrom string
// PlainHTTP are the Portfile's URLs still over plain HTTP.
PlainHTTP []PlainURL
// MovedFrom is where a port this branch created was, where create
// moved it to another category rather than write it.
MovedFrom string
// CategoryFrom is what a guessed category was guessed from.
CategoryFrom string
}
Created is what create wrote.
type DecideRequest ¶ added in v0.7.0
type DecideRequest struct {
Branch model.Branch
Rule string
Port string
Answer model.DecisionAnswer
Words string
}
DecideRequest is a decision asked of a branch's concern: the rule that raised it, the port it's about, the branch's one port where empty, the answer, and the person's words for it.
type Declaration ¶ added in v0.8.0
Declaration is a dependency tidy writes from a passed check's link finding: the port the target linked and didn't declare, the spec written for it, and the evidence, as the commit's body says it.
type DependentReader ¶
type DependentReader interface {
Dependents(ctx context.Context, source model.Source, directories []string) ([]treequery.Dependent, error)
}
DependentReader finds the direct dependents of the ports some directories define. MacPorts' port index is the real one.
type DescriptionSections ¶
type DescriptionSections = prdescription.Sections
The pull request's description is prdescription's (the architecture review's finding 5): the engine establishes what it can claim, in its own words where they're its own, and publishes what it composes. What submitting again does to each part keeps its names here, for the commands that say it.
type DetachedError ¶ added in v0.4.0
type DetachedError struct{}
DetachedError is a checkout on no branch, at a commit, which StartAtHead starts one at.
func (*DetachedError) Error ¶ added in v0.4.0
func (*DetachedError) Error() string
func (*DetachedError) Unwrap ¶ added in v0.4.0
func (*DetachedError) Unwrap() error
type Engine ¶
type Engine struct {
Repo *git.Repository
Store store.Store
Repository model.RepositoryID
// Preparer edits ports; MacPorts' own evaluator when nil.
Preparer Preparer
// KeepModeline leaves the first line of every Portfile an edit writes
// as it was, where each edit otherwise gives it MacPorts' modeline
// (portfile.WithModeline): the person's --keep-modeline, for the
// command's whole run, serve's every update.
KeepModeline bool
// Forge publishes; GitHub when nil.
Forge Forge
// Ports are what the engine reads of ports, each capability a field;
// MacPorts' own where no Reader is given (Ports).
Ports Ports
// GitHub is the process's one GitHub runtime, which the forge,
// discovery, the source archiver, and project inspection share; the
// runtime with no login when nil, which compose never leaves it.
GitHub *github.Runtime
// GitHubCLI marks a draft ready where an organization refuses the
// forge's app; none when nil.
GitHubCLI GitHubCLI
// GitHubMoves reads where a repository moved from GitHub's web pages,
// for the engine's forge client to note beside a current port; none
// are read where nil.
GitHubMoves *forgegithub.Moves
// Builds are where checks build: build.default's profile, which a
// branch's evidence always requires (D17), build.unattended's, and the
// person's own profiles.
Builds Builds
// SourceArchiver writes a Git-fetched port's forge's archive of a
// commit, for its assessment; upstream discovery's forges when nil.
SourceArchiver SourceArchiver
// Discovery finds ports' newest releases, on GitHub and GitLab, which
// outdated reads; compose composes it with the preparer and the
// archiver (Then's item 15).
Discovery *upstream.Service
// Capacity is how many checks each provider takes at once, by its
// name, from providers.<name>.capacity: serve keeps to it, and so does
// a check run here (awaitSlot).
Capacity map[string]int
// Serves is the selection serve's daily look is for, your maintainer
// entries' ports by default, and whose look status shows
// (LastOutdatedLook).
Serves PortSelection
// TartHome is dockhand's Tart home, which status -v names to reach a
// running check's VMs.
TartHome string
// LocalServe lets serve check in a MacPorts prefix on this Mac
// ([providers.local] serve), which it otherwise doesn't (localAllowed).
LocalServe bool
// ConfigFile is the configuration file the command read, which a hint
// to set something there names: $DOCKHAND_CONFIG, or the default
// (configFile) where empty.
ConfigFile string
// ArchiveMirror is MacPorts' distfiles mirror, which an assessment
// fetches an archive from where upstream no longer serves it;
// archives.MacPortsMirror when empty.
ArchiveMirror string
// OutdatedReader finds newer releases for outdated; MacPorts' evaluator
// and upstream discovery when nil.
OutdatedReader OutdatedReader
// ProjectReader observes upstream projects for create; GitHub when nil.
ProjectReader ProjectReader
// HTTPS says whether a URL answers over HTTPS, for a port's plain-HTTP
// URLs; a request of the URL when nil.
HTTPS HTTPSProbe
// Catalog is what packages.macports.org serves of ports' archives,
// kept as compose places it: the listings a check's install estimate
// counts archives by, and master's archive's reading, an install
// finding's earlier one. Neither is had where it's nil.
Catalog *binaryarchive.Catalog
// Builders read what MacPorts' builders made of a port, as
// ports.macports.org keeps it, for impact and a failed check's offer
// of a baseline; nothing is read where it's nil.
Builders BuilderHistory
// Providers are where checks build, by name.
Providers map[string]buildenv.Provider
// contains filtered or unexported fields
}
Engine is bound to one ports checkout and its registered repository.
func Open ¶
Open checks that Tree is inside a ports checkout, opens the store, and registers the repository. A directory that is not a ports tree is refused before anything is recorded for it.
func (*Engine) ActiveCheck ¶ added in v0.4.0
func (e *Engine) ActiveCheck(ctx context.Context, session *coord.Session, branch model.Branch, revision model.Revision) (*checks.ActiveRunError, []model.Run, error)
ActiveCheck is the branch's one check queued or running (checks.Service.ActiveCheck).
func (*Engine) Adopt ¶
Adopt tracks a branch dockhand did not create, as it stands: nothing is moved or rewritten. Its base is where it leaves freshly fetched master.
func (*Engine) AdoptPullRequest ¶
func (e *Engine) AdoptPullRequest(ctx context.Context, number int, at model.ObjectID) (PullRequestAdoption, error)
AdoptPullRequest brings someone's pull request of MacPorts' repository into a branch of its own, pr-<number>, in a sparse worktree, to inspect and work on (Design v3 §6.11). Its head is recorded as the last push, so a push by its author since then is noticed; it assumes no permission to push to their branch, which submit checks. A tracked branch is returned as it stands, neither fetched nor moved (RefreshAdopted moves one).
at, where it's given, is the commit to adopt the pull request at, as a review read it, rather than its head fetched now: review --check reviewed one commit and checked another where the head moved between them (Codex's review of 2ad896d2, W2). It must be in the repository already, as Review's fetch left it.
func (*Engine) ApplyClean ¶
func (e *Engine) ApplyClean(ctx context.Context, plans []CleanBranch) ([]CleanBranch, error)
ApplyClean removes what the plans would, checking each again as it goes, and marks each step done. Steps that are kept are left alone.
func (*Engine) ApplySubmit ¶
func (e *Engine) ApplySubmit(ctx context.Context, plan SubmitPlan, answered model.Answered) (Submitted, error)
ApplySubmit pushes the planned commit to your fork, only while the fork's branch is as the plan saw it, and opens or updates the pull request.
func (*Engine) ApplyTidy ¶
ApplyTidy writes the plan's commits and moves the branch to them, after saving a checkpoint of the old history. The final tree is the working files as they were planned, so every file stays as it is; the index is reset to the new head.
func (*Engine) Archive ¶
Archive hides a branch from status without touching its files, its Git branch, or its pull request; undo brings it back.
func (*Engine) ArchiveBranch ¶
ArchiveBranch sets a branch aside in one step (the command-line UX review's §5): it leaves status, and its worktree goes where it holds nothing its Git branch doesn't, as clean --archived took it. The Git branch, the fork's branch, the checkpoints, and the record stay, so --undo brings it back, and the worktree is checked out again when a command next needs it. A worktree with uncommitted edits or untracked files stays, and says so, unless Discard says they go. Only a worktree dockhand made is removed.
func (*Engine) ArchiveDiff ¶
func (e *Engine) ArchiveDiff(ctx context.Context, branch model.Branch, ports []string) ([]ArchiveDiff, error)
ArchiveDiff compares the source archives of the ports a branch changes, or of the ports named, as the base declares them and as the branch's files declare them now: what changed inside, file by file.
func (*Engine) ArchiveDirectory ¶
ArchiveDirectory is where the checkout's kept archives are (decision 28), beside the database: each file named by the hex of its sha256. Each checkout the database serves keeps its own, so cleaning one up never weighs another's.
func (*Engine) ArchivedKept ¶ added in v0.8.0
ArchivedKept are the archived branches whose Git branch is still there, as archive keeps it for --undo: a clean removes none of it, and clean --delete forgets each.
func (*Engine) Artifacts ¶ added in v0.7.0
Artifacts are the archives a check's passed targets built, one for each port and platform it passed on, for otool and smoke tests by hand: a passed target's archive is kept by its digest, named nowhere a person sees (field testing's outdated-ports session, the person's "dockhand artifacts is a yes"). A target that didn't pass built none.
func (*Engine) BaselineCandidates ¶
BaselineCandidates are the baseline a failed check offers. There is none unless the check failed and is its branch's newest finished one, the one --baseline looks into.
func (*Engine) BeforeBuilding ¶ added in v0.8.0
func (e *Engine) BeforeBuilding(ctx context.Context, branch model.Branch, capture Capture, plan bool) ([]commitrules.Finding, error)
BeforeBuilding are the Portfile findings submit would say of a capture's changed Portfiles against its base (portfileFindings), which check says before it builds, so the edit comes before the build it would otherwise repeat (the openssl4 session's note 1). A plan says them each time; a check says them once a tree, none where an earlier check of the branch built the same tree.
func (*Engine) BranchLeftovers ¶ added in v0.8.0
func (e *Engine) BranchLeftovers(ctx context.Context, branches ...model.BranchID) ([]Leftover, error)
BranchLeftovers are what the branches' checks left in their providers: the clones they kept for dockhand shell, and any environment one left when its process died, each judged as PlanLeftovers judges it, one whose check is running kept and said. A clean naming the branches removes them, and clean --delete before it forgets them.
func (*Engine) BranchPath ¶ added in v0.4.0
BranchPath is the directory a branch is checked out in, its worktree placed or checked out again where clean took it; a merged branch's only where it's still there.
func (*Engine) BranchPort ¶ added in v0.5.0
BranchPort is the one port a branch is about (OnlyPort), for a command run in it that names none, read from its files and change records alone: branchPort ran a whole status, its checks and evidence among it, to read one port's name (the architecture review of 5897a82, R3-37).
func (*Engine) BranchStatus ¶
BranchStatus gathers one branch's status.
func (*Engine) BranchStatusOf ¶ added in v0.7.0
BranchStatusOf is the status of the branch an ID names, its record read again, as after a check that moved it on, for what moves it on next: view read and judged a branch itself (Then's item 6).
func (*Engine) BranchesChanging ¶
BranchesChanging lists the open branches whose commits or working files change a port: update commits nothing, so a branch it edited changes the port before tidy commits it. Where a branch's files as they stand have a change record for a directory, the record says which of its subports they change, so a branch updating terraform-1.16 changes that subport and not terraform-1.17; a directory without one changes the port its name is, as its text says. A command asking of many ports reads the open branches once, with OpenWork.
func (*Engine) BuildersBeside ¶ added in v0.8.0
BuildersBeside say, beside a failed check's offer of a baseline, what MacPorts' builders made of each offered port on each release it failed on here, by their latest build there: "MacPorts' builders failed exiv2 on macOS 15 arm64 too, at their latest build there, 2026-10-25 (ports.macports.org)". Where they failed the same release, the failure predates the branch, which can save the baseline's build; where they built it, the branch's change or this environment is the likelier cause. A port's history is read once; nothing is said where the site gave no answer, or of a release its builders never built the port on.
func (*Engine) Candidates ¶
Candidates are the runs serve could drive (checks.Service.Candidates).
func (*Engine) Capture ¶
Capture records what a check will build: the committed tip when the files are exactly it, otherwise a numbered snapshot of the files. A capture whose files an earlier revision already holds reuses it, so checking twice without an edit checks the same snapshot.
func (*Engine) Changes ¶ added in v0.6.0
Changes are what checks have changed of the person's own, as the local provider does a prefix on this Mac: each building there now, and each a check left changed when its process ended first, with how to put it back (buildenv.ChangingProvider). A provider that can't say is passed over: status still says the rest.
func (*Engine) ChangesHere ¶
ChangesHere reports whether what's checked out where the engine was opened changes a port: in the commits since it left master, as fetched now, or in files edited or added and not committed. Work planned on master would leave those out. It's for a checkout dockhand doesn't track, a branch a person made with Git or master itself; a tracked branch's changes are BranchesChanging's.
func (*Engine) CheckSummary ¶ added in v0.4.0
CheckSummary reads a check's summary in one transaction, where its four reads were each a View and could see four states (SQL-O3).
func (*Engine) Cleanup ¶
func (e *Engine) Cleanup(ctx context.Context, session *coord.Session, after time.Duration) (CleanupReport, error)
Cleanup is decision 36's automatic cleanup, which serve runs at most once a day: what clean --merged would remove, less anything it would keep, what checks whose process died left in providers, port index generations unused for longer than after, and kept archives no live result names. Open branches, and work of anyone's own, are never touched.
func (*Engine) CleanupDue ¶
CleanupDue says whether automatic cleanup is due, and why: every since the last, or, at most once in LowSpacePause, less than minFree free where the database or a provider's cache is; zero minFree watches no space. It reads files and the providers alone, never the database, so a command asks after closing it.
func (*Engine) CleanupIfDue ¶ added in v0.4.0
func (e *Engine) CleanupIfDue(ctx context.Context, session *coord.Session, every time.Duration, minFree uint64, after time.Duration, starting func(CleanupReason)) (report CleanupReport, ran bool, err error)
CleanupIfDue is decision 36's automatic pass, which serve and a command's background clean both run: it cleans up where cleanup is still due, since another process may have run it meanwhile, stamping first, so a pass that fails isn't tried again at once but the next day. starting is told why before it begins. ran is false where it wasn't due, or couldn't be stamped, which err says.
func (*Engine) Clone ¶
Clone is the main checkout's directory, whichever worktree the engine was opened in.
func (*Engine) ClosedAt ¶ added in v0.6.0
ClosedAt is the newest closed or archived branch that updated a port to a version and wasn't merged: an update a maintainer, or the person, closed, which an unattended look doesn't propose again at that version.
func (*Engine) CommitsAhead ¶
CommitsAhead is how many commits a branch has beyond its base; none for a branch whose work is all in its working files.
func (*Engine) Covered ¶ added in v0.4.0
func (e *Engine) Covered(ctx context.Context, branch model.BranchID, tree model.ObjectID, want model.Plan) (model.Run, bool, error)
Covered reports whether the finished checks of a branch's tree stand for a check asked of it, the plan want proposes: every target want builds, in every environment it builds there, passed under a test policy at least as strict as want's. A pass on fewer releases, or with advisory tests where tests are required, doesn't stand for it; one on more, or stricter, does (Codex's review of 832f059e, medium 4). It returns the newest check behind them.
func (*Engine) Create ¶
Create writes a new port's first Portfile from an upstream project, in the branch's worktree, and stages it, so the next check includes it (Design v3 §6.4). It fills in what it observed, marks what it guessed, and then fills in the checksums as dockhand checksums does. Nothing is committed.
func (*Engine) Decide ¶ added in v0.7.0
Decide records a decision on a concern of the branch's files as they are, its evidence the port's directory there, so a change to the port's Portfile or files lapses it and a change to another port's doesn't (the prioritization thread's word, 2026-10-27). A decision made again on the same evidence replaces it. One on a moving source names the commits of the concern status found, so a later move is a new concern (model.MovingSource).
func (*Engine) DefaultWorktrees ¶
DefaultWorktrees is where managed worktrees go unless configured otherwise: ~/Source/macports-branches, wherever the clone is, so a person's branches are in one place they know. Without a home directory, they go beside the clone.
func (*Engine) Diff ¶
Diff compares a branch's files as they are now, uncommitted edits included, with its base, narrowed to paths when any are given.
func (*Engine) Drive ¶
func (e *Engine) Drive(ctx context.Context, session *coord.Session, id model.RunID) (model.Run, error)
Drive runs a run to its end under this session's lease on it (checks.Service.Drive).
func (*Engine) Edit ¶
Edit readies a port's directory in the branch's worktree for editing: found by name, and added to a sparse worktree's cone. It returns the port's directory.
func (*Engine) Edited ¶
Edited lists the tracked files a branch's worktree has changed and not committed.
func (*Engine) Enqueue ¶
func (e *Engine) Enqueue(ctx context.Context, branch model.Branch, plan model.Plan, origin model.Origin) (model.Run, error)
Enqueue records a check request (checks.Service.Enqueue).
func (*Engine) EnqueueBaseline ¶
func (e *Engine) EnqueueBaseline(ctx context.Context, branch model.Branch, baseline Baseline, origin model.Origin) (model.Run, error)
EnqueueBaseline queues a planned baseline as a run marked as one.
func (*Engine) Environments ¶
Environments turns --on values into the environments a check builds in: each a provider that is set up, with the releases it can take, and a bare release name meaning Tart. Where nothing names them, a build profile does (Where).
func (*Engine) Events ¶
func (e *Engine) Events(ctx context.Context, after int64, level model.EventLevel) ([]model.Event, error)
Events reads the journal past a sequence number, at least as important as level (every level where it is empty), oldest first: what observers tail (Design v3 §11).
func (*Engine) EvidenceFor ¶
func (e *Engine) EvidenceFor(ctx context.Context, branch model.BranchID, tree model.ObjectID) (Evidence, bool, error)
EvidenceFor finds what the finished checks of a branch's tree established (evidence.Judge). A result holds for its tree, whichever snapshot or commit was checked, because a check builds files, not history. It reports false when no finished check covers the tree.
func (*Engine) ExecutionNamed ¶
ExecutionNamed finds a provider run by its ID, tart_7y62p4sigena6xlr, or by its provider's own reference for it, such as a workflow run's URL: the latest, when a provider reused one.
func (*Engine) Forget ¶ added in v0.5.0
Forget removes what plan says, worktree, Git branch, then record, the Git branch only while it's still at the commit planned, so one someone moved since stays, and the record isn't forgotten.
func (*Engine) Fork ¶
Fork finds your fork: the one Git remote that pushes to a fork of MacPorts' repository your GitHub login owns, or the remote named. With a sandbox (Options.PullRequests), the fork is the sandbox itself, which must be a fork of MacPorts' repository: its pull requests are within it.
func (*Engine) ForkRefuses ¶ added in v0.7.0
ForkRefuses says why your fork refuses this Mac's push, asked once with git ls-remote of its push URL before a batch that pushes starts its checks: for want of an SSH key loaded or HTTPS credentials, which a batch met only after checks that passed and pushes that failed, after a reboot (rc1's bump batch). nil where the fork answers, or can't be found or asked for another reason, which submit says as now.
func (*Engine) FreeName ¶
FreeName is a name for a new branch for work on a port: <port>-<short ID>, such as jq-4k2p, which no branch, tracked or not, and no worktree directory already uses. It holds no verb or version: it's for work, such as an edit, that says nothing more specific. NameFor names a branch for what it does.
func (*Engine) GitHubAllowance ¶ added in v0.5.0
GitHubAllowance is what's left of the hour's GitHub requests for the login the engine's runtime holds, for a look to weigh its cost first.
func (*Engine) GitHubClient ¶ added in v0.7.0
func (e *Engine) GitHubClient() *forgegithub.Client
GitHubClient is the engine's one GitHub client (github), which compose gives upstream discovery as its GitHub catalog.
func (*Engine) GitProgram ¶ added in v0.7.0
GitProgram is the Git the engine runs, which compose gives discovery.
func (*Engine) HoldsMajor ¶ added in v0.4.0
HoldsMajor reports whether an update of a port nobody looks over from one version to another is held for its major version (majorHold), for outdated to mark the updates it would hold.
func (*Engine) Impact ¶
Impact reads what a branch's change reaches. Dependents are looked for of the named ports, or else of every port the branch changes beyond its revision, from the index at the branch's base.
func (*Engine) InstallChanges ¶ added in v0.7.0
func (e *Engine) InstallChanges(ctx context.Context, run model.Run, fetch bool) ([]InstallFinding, error)
InstallChanges compares each target a check built, in each environment, with the port's previous result there that dockhand checked, the newest passed build of another check: what moved of its own libraries, and the files gone or added. A target with no earlier reading says nothing, unknown and never equal. Each is a notice, holding nothing.
fetch lets it fetch master's archive where none is kept yet; status, which reads no network itself, reads only an archive kept.
func (*Engine) InstallEstimates ¶ added in v0.7.0
func (e *Engine) InstallEstimates(ctx context.Context, plan model.Plan, source model.Source, wait bool) []InstallEstimate
InstallEstimates are what a plan's check will install in each of its environments, by the port index of its source: the closure of its targets' dependencies (planning.Closure), less what the environment has installed, none in Tart's or GitHub's, which start from MacPorts with no ports by their setup, and the person's active ports in a local prefix; a command provider's environments get none. wait has the listings looked up, as check --plan does; otherwise only what's kept is read, and the archives are said where all of them are. Nothing where the index can't be read.
func (*Engine) JudgeStopped ¶ added in v0.4.0
func (e *Engine) JudgeStopped(ctx context.Context, session *coord.Session, statuses []BranchStatus) error
JudgeStopped marks the statuses whose active run has stopped, their holders read in one transaction (SQL-O4).
func (*Engine) KeepForSubmit ¶ added in v0.8.0
func (e *Engine) KeepForSubmit(ctx context.Context, id model.BranchID, title string, note *string, tested TestedSaid) error
KeepNote keeps a submission's --note with its branch before submit's gate, given or emptied, so a submit refused there, or cancelled, keeps it for the next: without a terminal, a refused submit --note and a later submit --yes opened the pull request without the note (field testing's notes from the curl fix, note 9). A plan with no --note keeps the branch's as it is. KeepForSubmit keeps a pull request's title and note, and the person's tested statements, given before its submission, with the branch, for the submit that follows: ship --to commit or --to check took them and dropped them (Codex's workflow review of 1caa6c3d). An empty title, or a nil note, keeps what the branch has.
func (*Engine) KeepNote ¶ added in v0.8.0
func (e *Engine) KeepNote(ctx context.Context, plan SubmitPlan) error
func (*Engine) KeptClones ¶ added in v0.8.0
KeptClones are the clones this checkout's checks kept for dockhand shell, each with its check and attempt, the newest check's first.
func (*Engine) LastOutdatedLook ¶
func (e *Engine) LastOutdatedLook(selection PortSelection) (OutdatedLook, bool)
LastOutdatedLook is what serve's daily look last found, if it looked for this selection, the config's, each list compared as a set: on rc5, with no maintainer in the config, status still said "Your ports: 123 ports have newer releases", a look under an earlier maintainer's (the M1's rc5 run). A look that records none, as v0.4.0 and v0.5.0 wrote, is no one's. status and serve's notice read it alike.
func (*Engine) LatestCheck ¶ added in v0.4.0
func (e *Engine) LatestCheck(ctx context.Context, branch model.BranchID) (run model.Run, ok bool, err error)
LatestCheck is a branch's newest check, in any state, a baseline aside: the one logs, retry, wait, and watch's l land on, a branch having one check at a time (SQL-O1). A baseline is named by its own name. Status's verdict reads the newest finished one instead, until layer 1's branchstate takes it. ok is false where the branch has none.
func (*Engine) LatestCheckpoint ¶
LatestCheckpoint is the name of a branch's latest tidy or rebase that undo can take back: applied, and not restored since. Where it has none, the error says so.
func (*Engine) LatestEvent ¶
LatestEvent is the journal's newest sequence, where one watching what happens from now starts.
func (*Engine) LeadOf ¶ added in v0.5.0
func (e *Engine) LeadOf(ctx context.Context, session *coord.Session, id model.RunID) (checks.Lead, error)
LeadOf is who sees the run through now (checks.Service.LeadOf).
func (*Engine) Leader ¶ added in v0.4.0
Leader is the serve leading the queue (checks.Service.Leader).
func (*Engine) LinkedPorts ¶
func (e *Engine) LinkedPorts(ctx context.Context, branch model.Branch, port string, except []string) (LinkedPorts, error)
LinkedPorts reads a port's direct library dependents for a branch.
func (*Engine) LiveLog ¶ added in v0.5.0
func (e *Engine) LiveLog(ctx context.Context, id model.RunID, port string, only model.ExecutionID) (string, error)
LiveLog is where a running run's driver is copying port's log as the guest writes it (buildenv.LogName), in the newest of its builds' directories, for logs --follow; empty where none is copied yet, as before the build reaches the port, or on a provider that copies none. port is a target's ID or its port's name, which a variant build's ID begins with. only, where set, is the one execution whose directory is read.
func (*Engine) LoadTidyPlan ¶
LoadTidyPlan reads a saved plan back, as long as the branch's base, its tip, and its working files are as they were when it was made, and its commits still cover exactly the branch's changes.
func (*Engine) LogDirectory ¶
LogDirectory is where check logs are kept: logs beside the database.
func (*Engine) Logs ¶
Logs gathers where a run's logs are, and what the builds of its Git-fetched targets fetched, which is evidence of what they built.
func (*Engine) LookForOthers ¶ added in v0.7.0
LookForOthers starts looking for the ports' other open pull requests, beside the work a person asked for, returning at once: start's and an attended update's, which OtherPullRequests then reads.
func (*Engine) MaintainerHint ¶
MaintainerHint is MaintainerWords for this engine's person, at master, naming the file the command read.
func (*Engine) MasterReadings ¶ added in v0.8.0
MasterReadings is the directory the readings of master's archives are kept in, beside the kept archives: what a first check compares against (binaryarchive.Catalog's Readings).
func (*Engine) NameFor ¶
NameFor is a name for a new branch that says what it does, the person's decision of 2026-10-02 (the command-line UX review's §1, revised): <port>-<what>, such as jq-1.8.1 for an update, gdal-rebuild, or mods-new, with a short ID added only where that name is taken, as jq-1.8.1-4k2p; with nothing to say, <port>-<short ID>. Taken means it exists now: a tracked branch that isn't merged, a Git branch, or a worktree directory, so a merged and cleaned branch's name is free again. What Git refuses in a ref becomes -.
func (*Engine) NameTaken ¶
func (e *Engine) NameTaken(ctx context.Context, name string) (directory string, base model.ObjectID, unchecked string, err error)
NameTaken is the directory of the port master, fetched just now, already has by name, a subport's among them, which the port index knows; empty where none does. base is the master it read, for the branch create starts. create --new asks it before it starts a branch for the name, where it refused only once it had started one, left behind: sand's upstream name is textproc/sand's (the sand-runner port). Where the index couldn't say whether a subport has the name, unchecked says why, and a directory named for it is still found.
func (*Engine) Observe ¶ added in v0.8.0
Observe follows a run until it ends, driving nothing (checks.Service.Observe).
func (*Engine) ObserveProject ¶
ObserveProject reads an upstream project, for a person to see before create writes anything.
func (*Engine) Observing ¶ added in v0.4.0
Observing gives a command one observer session, a session that only reads and judges who is alive, on ctx, which every judgment made under ctx shares. Each session is a row and two journal events, and status judged twice a render, which watch redrew every 30 seconds. A ctx that has one keeps it, and ending it is its opener's (the command package split's 7b row 2).
func (*Engine) OpenBranches ¶
OpenBranches are the open branches, as shell completion offers them.
func (*Engine) OpenWork ¶ added in v0.8.0
OpenWork reads what the open branches change: their heads by one for-each-ref, their trees and their bases' by one cat-file, what each head changes from its base by one diff-tree, the worktrees by one worktree list, and a status of each worktree a branch is checked out in. A branch whose Git branch is gone is passed over.
The pull requests last read longer ago than serve reads them are read first, as a plain status reads them, so a branch GitHub says merged or closed is no longer open work: outdated said "already in act-0.2.95" and ship took that branch for 0.2.96's update, though #36353 had merged (field testing's act 0.2.96). A read that fails takes the branches as last read.
func (*Engine) OtherPullRequests ¶ added in v0.7.0
func (e *Engine) OtherPullRequests(ctx context.Context, ports []string, except int) []forge.PullRequestSummary
OtherPullRequests are the ports' open pull requests but except, each once, as a person starting work on them hears of them: never a hold, and nothing where the search failed, since a person can look.
func (*Engine) Outdated ¶
func (e *Engine) Outdated(ctx context.Context, request OutdatedRequest) (OutdatedReport, error)
Outdated reports which of the chosen ports have newer releases upstream (Design v3 §6.12), at master as fetched now.
func (*Engine) PassingBranches ¶
PassingBranches are the branches that passed and are ready to submit, for ship --passing and for serve, by branchstate's one definition (SubmitReadiness).
func (*Engine) PastMerge ¶ added in v0.7.0
func (e *Engine) PastMerge(ctx context.Context, branch model.Branch, head string) ([]git.HistoryCommit, error)
PastMerge are a merged branch's commits past the commit its pull request merged at, which went on after the merge and the merge left out, as wasmedge's follow-up did (the reflections' F): none for another branch, one whose merged commit isn't known, or one whose changes master has by another route (changesOnMaster), as a branch retidied after its submit has.
func (*Engine) PlanBaseline ¶
PlanBaseline plans a baseline of the branch's check, the newest finished one or the one named: of the ports named, or else of the ports that failed in it at install or test (BaselineWorthy), each rebuilt only where it failed (rebuildWhere). It is planned the way a check is, from the base that check started from, not the branch's base since a rebase: the base's own Portfiles are evaluated in each environment, so its exclusions, dependencies, and needs are the base's, and a port that needs Xcode is unmet where there is none, not sent there.
func (*Engine) PlanCheck ¶
PlanCheck works out the targets of a check (Design v3 §3): every subport of each directory the revision changes by MacPorts CI's rule, less those replaced, known to fail, or unsupported on a release, in dependency order. A directory that can't be evaluated leaves the plan unresolved; it is never dropped.
func (*Engine) PlanClean ¶
func (e *Engine) PlanClean(ctx context.Context, states ...model.BranchState) ([]CleanBranch, error)
PlanClean previews removing what merged branches leave behind (Design v3 §6.13): the worktree, the local branch, and the fork's branch, each only while it still holds the merged commit. A dirty worktree, and work that went on past the merge, are kept. The branch's record stays, so it is still searchable.
Closed branches, when asked for (clean --closed), lose their worktree, and what they left on your fork, the pull request's head while it holds what dockhand pushed and the checks' branches: their work isn't merged, so a Git branch with work of its own and dockhand's checkpoints stay, and the worktree is checked out again when it is next needed. An archived branch is cleaned by name, clean <name> (PlanCleanBranches).
func (*Engine) PlanCleanBranches ¶
func (e *Engine) PlanCleanBranches(ctx context.Context, branches []model.Branch) ([]CleanBranch, error)
PlanCleanBranches previews cleaning the branches named, each as PlanClean would by its state, and no other: the sand-runner session's person asked for one merged branch cleaned, and clean would have swept every merged branch, so the session did it by hand (batch 31). An open branch has nothing to clean, and is refused.
func (*Engine) PlanCreate ¶ added in v0.7.0
func (e *Engine) PlanCreate(ctx context.Context, request CreateRequest) (PlannedCreate, error)
PlanCreate is the Portfile create would write for a project, as create writes it, from what the person's checkout's categories say, with no branch started, nothing written, and no checksums fetched (create --plan, Then's item 14).
func (*Engine) PlanForget ¶ added in v0.5.0
PlanForget is what forgetting branch would remove; a merged, closed, or archived branch is forgotten, so a person can end a merged branch's listing that clean keeps (field testing's xapian-core-dsq3), but not an open one, which dockhand archive sets aside first.
func (*Engine) PlanLeftovers ¶
PlanLeftovers finds what providers left of checks, and which clean may remove. A provider removes its environment when the attempt using it ends, and a run's next attempt removes an earlier one's, so what is left was either in use or made by a process that died with no later attempt to follow. An environment is removed only when a check of this checkout made it and no live process drives that check: any later attempt makes its own. One whose check is running is kept, and so is one no check of this checkout made, since another checkout's database may be using it.
A clone a check kept for dockhand shell is removed too: clean is the person's asking.
func (*Engine) PlanNotes ¶ added in v0.4.0
PlanNotes say what a plan's preview and its check's heading should add of where it builds: an environment whose MacPorts is older than this Mac's, which reads the ports it builds, and where the plan's test policy can't be carried out as asked.
func (*Engine) PlanOutdated ¶
func (e *Engine) PlanOutdated(ctx context.Context, report OutdatedReport) (OutdatedPlan, error)
PlanOutdated splits a report's outdated ports into branches, one for the ports of each Portfile: a port an open branch already changes, or whose newest release could not be found, is left alone. A port whose newest release is uncertain isn't outdated, and isn't planned: which release it takes is a person's call.
func (*Engine) PlanRebase ¶ added in v0.8.0
PlanRebase says what Rebase would do: it fetches master and replays the branch's commits into objects nothing refers to, moving nothing and keeping no checkpoint. What rebase refuses, it says in Refused.
func (*Engine) PlanSiblings ¶ added in v0.5.0
PlanSiblings are a plan's changed targets that their directory's change record finds unchanged: built because a check builds every subport of a changed Portfile, as MacPorts' CI does, not because the revision changed them, as terraform-1.16's 18 siblings (field testing's terraform replay, 2026-10-22). None for a directory no record narrows, which keeps its text scope (changedSubports), or where the plan's revision can't be read. The records are made where they aren't yet, as a plan of a new commit's files has none: reading only what was recorded, check --plan on one said "Changed 19 ports" still (the replay's rerun on 1f445dc7).
func (*Engine) PlanSubmit ¶
func (e *Engine) PlanSubmit(ctx context.Context, request SubmitRequest) (SubmitPlan, error)
PlanSubmit works out what submit would push and publish, and why it may not, changing nothing.
func (*Engine) PlanTidy ¶
PlanTidy proposes the commits a branch should have: one per port directory by default, one per update where dockhand's edits updated several of a directory's ports (updateSteps), with the subject dockhand's authoring commands wrote or the one the branch's own commits give, and every edit not yet committed included. Nothing is changed.
func (*Engine) PortBranches ¶
PortBranches are the open branches that change a port, as BranchesChanging finds them, those that change more than its revision first (the command-line UX review's §1, revised): `-p jq` means jq's own update before the rebuild of jq a library's branch carries.
func (*Engine) PortDirectory ¶ added in v0.7.0
PortDirectory is a port's directory on the master dockhand last fetched, else the checkout's, a subport's its Portfile's; false where master has no such port, as for a version: update takes a second word naming no port as the version to update to.
func (*Engine) PortIndex ¶
PortIndex is how the engine stages a tree's port index for a platform, which a provider that ships the tree to a builder ships with it. Unlike name lookup's, it keeps the tree's base, as the stager says verification does: a check's index derives from its base's for the release, by the ports the branch changes, and a snapshot, which has no commit, reaches the mirror's index through its base's. Lookup's stager, shared until batch 14, built check-23's whole index for macOS 15 (the ov run, finding 4).
func (*Engine) PostReview ¶
func (e *Engine) PostReview(ctx context.Context, report ReviewReport, body string, requestChanges bool) (string, error)
PostReview posts a review's text, and its Portfile comments, on the pull request at the commit it reviewed, and records it.
func (*Engine) PrepareOutdated ¶
func (e *Engine) PrepareOutdated(ctx context.Context, plan OutdatedPlan, options PrepareOptions) []PreparedUpdate
PrepareOutdated updates each planned port from fresh master, with the upstream archives compared, in a branch started once there is an edit to make; commits the edit when the plan is unambiguous; and with To ShipCheck queues a check of that commit. A problem with one port is reported beside the others, and never stops them.
func (*Engine) PreviewBaseline ¶
PreviewBaseline plans a baseline as PlanBaseline does, and records nothing, not even the base as a revision of the branch: what check --baseline --plan shows.
func (*Engine) Processes ¶ added in v0.5.0
Processes are the dockhand processes working on the repository, oldest first, but session's own, whose process asks: those with a session, serve, a check, and status among them, and not commands that open none, such as submit and update.
func (*Engine) Profile ¶ added in v0.4.0
Profile is the profile a name means: the person's own, else dockhand's.
func (*Engine) ProposeCheck ¶ added in v0.4.0
ProposeCheck captures the branch's files and plans the check of them where request.Where says, with request.Tests, check.tests where it's empty: the one pipeline check, ship, and serve take (the command package review), which Enqueue then queues.
func (*Engine) PullRequestBranch ¶
PullRequestBranch is the open branch tracking a pull request to MacPorts (the command-line UX review's §1, revised: --pr, never #); where none does, the error names the adopt that tracks it.
func (*Engine) PullRequestRepository ¶
PullRequestRepository is the repository pull requests go to, and are read from: MacPorts' ports, unless Options.PullRequests names a sandbox.
func (*Engine) PullRequestsStale ¶ added in v0.4.0
PullRequestsStale reports whether the open branches' pull requests were last read longer ago than serve reads them, or never: status then reads them itself, where it said "CI not read yet" until --refresh. One with no pull request, or none open, isn't stale.
func (*Engine) PutBack ¶ added in v0.7.0
func (e *Engine) PutBack(ctx context.Context, run model.Run, progress func(string)) ([]string, error)
PutBack puts back what a check changed of the person's own and left, kept or stopped before it could put it back, by its provider's own put-back (buildenv.PuttingBackProvider), as dockhand undo check-N asks, saying how it goes: the places it put back. One that left nothing to put back is said so.
func (*Engine) Queue ¶ added in v0.4.0
Queue is every check queued or running (checks.Service.Queue).
func (*Engine) QueueCheck ¶ added in v0.5.0
func (e *Engine) QueueCheck(ctx context.Context, request checks.QueueRequest) (checks.Queued, error)
QueueCheck is the one way a check is queued (checks.Service.QueueCheck).
func (*Engine) QueuedBaseline ¶ added in v0.6.0
QueuedBaseline is the baseline queued as a check's continuation (continueWithBaseline), for the foreground check to run next; false where none is queued.
func (*Engine) Ready ¶
func (e *Engine) Ready(ctx context.Context, branch model.Branch) (_ model.Branch, byCLI bool, err error)
Ready takes a branch's draft pull request out of draft, so it is ready for review (Design v3 §9's submit --ready). Where an organization refuses dockhand's app, the GitHub CLI does it when it's signed in as the account dockhand is (D8), and byCLI says so.
func (*Engine) Rebase ¶
Rebase moves a branch's commits onto freshly fetched master, in its worktree, keeping a checkpoint of the old history for restore. A branch with uncommitted edits is refused, and a rebase that conflicts is abandoned with the branch as it was.
func (*Engine) RecordReview ¶
RecordReview keeps a review, posted or not, so the next one of the same pull request can say what is resolved. posted is "comment", "request-changes", or "".
func (*Engine) RefreshAdopted ¶ added in v0.7.0
func (e *Engine) RefreshAdopted(ctx context.Context, branch model.Branch, to model.ObjectID) (model.Branch, error)
RefreshAdopted moves an adopted pull request's branch to to, a head of the pull request since it was adopted, where the branch is untouched: at the head it was adopted from, or last moved to, with no edits in its worktree. The branch and its files are reset to to, not rebased, since a force-pushed head needn't descend from the old one, and the branch holds nothing of the person's; the record's last push becomes to. A branch with commits or edits of its own is refused, naming both commits and the check of the branch as it is. to must be in the repository.
func (*Engine) RefreshPullRequests ¶
func (e *Engine) RefreshPullRequests(ctx context.Context) (RefreshResult, error)
RefreshPullRequests reads every open or closed branch's pull request from the forge (Design v3 §6.13): its state, reviews, and checks, all of them first, outside any transaction, as the store's rule is, and then writes what was read in one (the SQL study's O8, which status and serve share). A merged pull request marks its branch merged, and a closed one closed; what changed is recorded as events. A pull request that can't be read is reported and the rest are read; the error is the store's.
func (*Engine) RefreshStalePullRequests ¶ added in v0.5.0
func (e *Engine) RefreshStalePullRequests(ctx context.Context) (result RefreshResult, read bool, err error)
RefreshStalePullRequests reads the pull requests where what's recorded of them is older than serve reads them (PullRequestsStale), within staleReadTimeout, as a plain status does by itself, where it said "CI not read yet" until --refresh: the one stale-read rule (R3-39). read is whether it read; a failure to tell whether they're stale reads nothing.
func (*Engine) Regroup ¶
Regroup rearranges a tidy plan's commits (TidyPlan.Regroup), and notes each that would come before a commit it depends on, as the newest check of the files orders their ports: "2 1" would have committed sqlit-tui, which pins textual-fastdatatable 0.19.0, before the commit providing it (the libuv run's finding 6). The note warns; the order is the person's. Files no check has seen are rearranged without one.
func (*Engine) Remedy ¶
Remedy is how to give an environment what an unmet target needs, when its provider can say (checks.Service.Remedy).
func (*Engine) RemoveLeftovers ¶
func (e *Engine) RemoveLeftovers(ctx context.Context, session *coord.Session, leftovers []Leftover) ([]Leftover, error)
RemoveLeftovers removes what PlanLeftovers found removable. Each goes under its check's lease, so no process takes the check up while its environment is removed; one a process took up since is kept.
func (*Engine) RenameArchived ¶ added in v0.4.0
RenameArchived renames an archived branch aside, as <name>-archived, so a new branch can take its name (decided 2026-10-07): its Git branch and its record, which archive --undo then finds under the new name. One with a pull request is refused: its name is the pull request's head on the fork, which a rename would leave behind. It returns the branch renamed.
func (*Engine) RenamePort ¶ added in v0.7.0
func (e *Engine) RenamePort(ctx context.Context, request PortRenameRequest) (RenamedPort, error)
RenamePort renames or moves a port on a branch: one edit, recorded, so tidy takes it as dockhand's. It does the mechanical part alone, saying what's left; a new release is update of the new name after. The port's directory is moved as committed, so one with changes not committed is refused.
func (*Engine) Replace ¶ added in v0.4.0
func (e *Engine) Replace(ctx context.Context, session *coord.Session, runs []model.Run) ([]model.Run, error)
Replace stops the runs a new check replaces (checks.Service.Replace).
func (*Engine) RequestCancel ¶
func (e *Engine) RequestCancel(ctx context.Context, session *coord.Session, id model.RunID) (model.Run, error)
RequestCancel records that a run should stop (checks.Service.RequestCancel).
func (*Engine) RequestReview ¶
RequestReview asks the reviewers who requested changes on a branch's pull request, as GitHub last reported them, to review it again.
func (*Engine) RerequestDue ¶ added in v0.8.0
RerequestDue reports whether the reviewers whose latest review asks for changes are still to be asked again after a push made since that review: dockhand pushed after the review, by its record of the push (EventBranchPush), and nobody was asked since. A request that failed after its push was dropped, a rerun having pushed nothing (Codex's workflow review of 1caa6c3d, finding 8); the pushed commit's committer time stood for the push, which a commit made before the review and pushed after defeats (Codex's sixth review, #76). False where the review's time, or the push's, isn't known.
func (*Engine) RerunCI ¶ added in v0.5.0
RerunCI runs the failed CI jobs of a branch's pull request again, at its head, as the person whose login it is: one re-run of each failed workflow run, as `gh run rerun --failed` did by hand for garage #35174 (field testing, 2026-10-03). It needs write access to the repository, which a maintainer has; without it, it's refused, with what moves it on. It returns the runs it asked to run again.
func (*Engine) Resolve ¶
Resolve finds a tracked branch by the name a person typed: the Git name, or the name without dockhand's prefix.
func (*Engine) ResolveRecord ¶
ResolveRecord finds a branch as Resolve does, or else the newest merged branch of that name, whose record clean keeps, as status --all shows it. Commands that change a branch resolve it; merged ones take no changes.
func (*Engine) Restore ¶
Restore puts a branch's history back as a checkpoint kept it, when the branch and its index are still where the tidy or rebase that made it left them. A tidy's puts the index back as it kept that, and leaves the working files alone, so edits tidy had committed read as uncommitted again. A rebase's puts back the files too, as they were before it, and the master the branch started from, in the transaction that marks it restored.
func (*Engine) Resume ¶
func (e *Engine) Resume(ctx context.Context, session *coord.Session, id model.RunID) (model.Run, error)
Resume drives a run, leaving it for the next driver where ctx ends (checks.Service.Resume).
func (*Engine) ResumePrepared ¶ added in v0.7.0
func (e *Engine) ResumePrepared(ctx context.Context, where Where, tests model.TestPolicy) ([]Resumed, error)
ResumePrepared is recovery's half for a branch, beside Candidates' for a run: it queues the check of each branch serve prepared and committed whose check it never queued: open, serve's, with commits of its own, no pull request, no run, and nothing uncommitted in its worktree. serve's preparation edits, commits, and starts a branch before it queues the check, so a serve stopped between them, or a planning error after the commit, left a branch the next serve skipped as already in hand, with no run for the queue's recovery or the submit pass to find (Codex's review of 2ad896d2, W6). One with uncommitted edits is left for the person, said.
func (*Engine) RevbumpLinked ¶
func (e *Engine) RevbumpLinked(ctx context.Context, branch model.Branch, update Update, except []string, plan bool) (LinkedRevbump, error)
RevbumpLinked bumps the revision of the ports that link an updated one directly (LinkedPorts), or with plan only finds them. It stops at the first port it can't bump, naming it; the ports before it stay bumped, as edits in the branch's files.
func (*Engine) RunEvents ¶
func (e *Engine) RunEvents(ctx context.Context, run model.RunID, after int64) ([]model.Event, error)
RunEvents are one run's events after a sequence, oldest first: what a command following the run shows, read by the run rather than through the whole journal.
func (*Engine) RunEvidence ¶
RunEvidence is what a run established for each target in each of its environments.
func (*Engine) RunOrExecution ¶ added in v0.4.0
func (e *Engine) RunOrExecution(ctx context.Context, name string) (model.Run, model.ExecutionID, error)
RunOrExecution is the check a name means, check-42, or the provider run it means, by its ID or its provider's own reference, with that run's check (the command package split's 7a row 11). A reference several environments' executions share, as a GitHub workflow run that built each release of its matrix, means the check, all of them: no execution.
func (*Engine) RunProviders ¶
RunProviders are the providers a run's plan builds on (checks.Service.RunProviders).
func (*Engine) SeeAllThrough ¶ added in v0.7.0
func (e *Engine) SeeAllThrough(ctx context.Context, ids []model.RunID, waited func(model.Run, string), ended func(model.Run, error))
SeeAllThrough sees a batch's queued runs to their ends together (checks.Service.SeeAllThrough).
func (*Engine) SeeThrough ¶ added in v0.4.0
func (e *Engine) SeeThrough(ctx context.Context, session *coord.Session, id model.RunID, before func(checks.Lead)) (model.Run, *model.Session, error)
SeeThrough sees a queued run to its end (checks.Service.SeeThrough).
func (*Engine) Select ¶ added in v0.4.0
Select finds the branch a Selector names, or says the branch to start or the choices a person has. A name -b gives is an existing branch's, never one started: a typo made one (the command-line UX second look's §1). work is what's done in it, which names a branch started for the port, and a refusal says.
func (*Engine) SelectionReader ¶ added in v0.7.0
SelectionReader is MacPorts' own evaluator, which compose builds discovery, the preparer, and the archiver over (selectionReader).
func (*Engine) Serve ¶
Serve leads the repository's queue for a session until ctx ends, or with Drain until the queue is empty, and does the rest of serve's work between checks (Design v3 §11). With another serve leading it stands by, and takes over when that one's session dies; a drain has nothing to do then. Runs still going when it stops are left for the next serve.
A drain that found the queue empty reads it once more after letting go of the lead, and drains again where a check was queued meanwhile, as check -d does where it sees no serve leading (dockhand check -d's drain).
func (*Engine) ServeState ¶
ServeState reads serve's state. Judging who is alive takes a session.
func (*Engine) Session ¶ added in v0.4.0
Session records this process's session of kind and keeps its heartbeat until ctx ends: the one coordinator built for a command, where command built its own (the command package split's 7b row 2).
func (*Engine) Shell ¶ added in v0.5.0
Shell runs a command in a clone a check kept, and returns its exit status: the clone is started for it and stopped after, and stays kept.
func (*Engine) ShellSteps ¶ added in v0.8.0
ShellSteps are the dockhand shell commands that open the clones a check kept: the check's name, with --on and the release where it kept several; none where it kept none.
func (*Engine) StampCleanup ¶
StampCleanup marks automatic cleanup as run now. It is stamped before it runs, so one that fails isn't tried again at once.
func (*Engine) StandingAccepted ¶ added in v0.5.0
func (e *Engine) StandingAccepted(ctx context.Context, evidence Evidence) (map[string]AcceptedFailure, error)
StandingAccepted are the failed ports of a check's evidence whose every failure a standing decision accepts (standingAccepted), which its report names, as submit takes them.
func (*Engine) Start ¶
Start creates a branch from freshly fetched master, in a sparse managed worktree or, with Here, in the checkout the engine was opened in.
func (*Engine) StartAtHead ¶ added in v0.4.0
StartAtHead starts a branch at a detached HEAD, where the checkout is, named for the first port its commits change from master, and tracks it, as adopt would (the command-line UX review's §2: a branch started where nothing else could be meant). One whose commits change no port is refused, since nothing names it.
func (*Engine) StartFrom ¶ added in v0.7.0
StartFrom starts a branch from master, fetched now, with a merged branch's commits past its merge picked onto it, as git rebase would replay them (Then's item 7): the follow-up a merge left, which was made by hand. A commit master has the change of is dropped; a conflict starts nothing.
func (*Engine) Status ¶
func (e *Engine) Status(ctx context.Context, states ...model.BranchState) ([]BranchStatus, error)
Status gathers every open branch's status, or the named branches'.
func (*Engine) StatusReport ¶ added in v0.7.0
func (e *Engine) StatusReport(ctx context.Context, session *coord.Session, request StatusRequest) (StatusReport, error)
StatusReport gathers what the request shows, as session observes.
func (*Engine) SubmitForServe ¶
SubmitForServe opens the pull request for a candidate serve may submit, saying in its description that no person reviewed it.
func (*Engine) SuggestMaintainer ¶
SuggestMaintainer reads how the port index at a commit writes the GitHub login dockhand signs in as, @login, for a person whose config names no maintainer. It only suggests: what can't be read, the login or the index, leaves it empty, and nothing is written.
func (*Engine) SuggestMaintainerAtMaster ¶
func (e *Engine) SuggestMaintainerAtMaster(ctx context.Context) MaintainerSuggestion
SuggestMaintainerAtMaster is SuggestMaintainer at master as fetched now, for a command that has no branch; empty where master can't be fetched.
func (*Engine) Tclsh ¶ added in v0.4.0
Tclsh is the port-tclsh the engine evaluates Portfiles with, and empty where there's none: the one named, else this Mac's MacPorts'.
func (*Engine) TogetherWords ¶ added in v0.7.0
TogetherWords say which of a batch's checks run together (checks.Service.TogetherWords).
func (*Engine) TrackedElsewhere ¶ added in v0.7.0
TrackedElsewhere refuses pull request number where an open branch tracks a pull request of that number in a repository other than the one pull requests go to (pullRequestHere): adopt's and review --check's refusal of the branch they'd find by number, before either fetches anything.
func (*Engine) UndeclaredLinks ¶ added in v0.5.0
func (e *Engine) UndeclaredLinks(ctx context.Context, run model.Run) ([]evidence.LinkFinding, error)
UndeclaredLinks are what a check's passed builds link that their ports don't declare in depends_lib (v0.5.0 part 6), the rule evidence's (evidence.UndeclaredLinks): this gathers its results' links, from the providers that read them (buildenv.LinkReader), and what each target declares, its depends_lib as the check's revision evaluates it in the result's environment, with itself and its Portfile's other subports. A port that can't be evaluated declares nothing that can be read, so its links are said unread rather than guessed at.
func (*Engine) Untracked ¶ added in v0.5.0
Untracked is the branch checked out here where it's one a person made and dockhand doesn't track: empty on master, or with no branch at all, which are no context (D7). Where no tracked branch is checked out, its changes are a person's own.
func (*Engine) UntrackedChanging ¶ added in v0.5.0
UntrackedChanging is the untracked branch checked out here (Untracked) where it changes port, which a branch from master would leave out: adopting it makes the work there. Empty where none does.
func (*Engine) UntrackedPatches ¶ added in v0.5.0
func (e *Engine) UntrackedPatches(ctx context.Context, tree string, directories, untracked []string) (map[string][]string, error)
UntrackedPatches are the untracked files a changed port's Portfile names in its patchfiles, read from tree, by port directory: the patch a person wrote and didn't git add, which the Portfile's commit needs, as net-snmp's patch-swinst_darwin-declaration.diff did, where tidy committed the patchfiles line without it and the check 404'd fetching it (field testing, check-469). untracked is the worktree's list; a name is read in the port's files/, where MacPorts looks for it.
func (*Engine) Update ¶
Update edits a port's files in the branch's worktree, as the worktree stands, committed or not, and commits nothing: `dockhand check` takes it from there. The edit is prepared from a capture of the tracked files, and written only if none of the files it touches changed in the meantime. Where it doesn't go, it says why, what it kept, and what moves it on (refusedUpdate).
func (*Engine) UpstreamRemote ¶
UpstreamRemote finds the checkout's remote for MacPorts' repository, whatever it is called; nil when it has none.
type Evidence ¶
What recorded checks establish is the evidence package's to say (the architecture review's finding 4); the engine loads the records it reads, asks providers what each environment is now, and words what it says. Its types keep their names here, for the commands that read them.
type ExecutionLogs ¶
type ExecutionLogs struct {
Execution model.GuestExecution
Results []model.TargetResult
// Git are what the builds of its Git-fetched targets fetched, by
// target, where one built.
Git map[model.TargetID]GitFetch
}
ExecutionLogs are one execution's results and where its logs are.
type FamilyReader ¶
type FamilyReader interface {
Family(ctx context.Context, source model.Source, directory string) (macports.Snapshot, error)
}
FamilyReader evaluates a port directory in this Mac's own context, every subport of it, with the root it was evaluated in, as a change record compares it. MacPorts' evaluator is one; a PortReader that isn't makes no records, and its revisions keep their directories' text scope.
type FollowUp ¶ added in v0.7.0
FollowUp is what start --from did: the branch it started, the merged branch it came from, and the commits it picked onto master.
type Forge ¶
type Forge interface {
AuthenticatedUser(ctx context.Context) (string, error)
// Login is who you are, and where the token comes from.
Login(ctx context.Context) (forge.Login, error)
NameFromRemote(url string) (string, error)
RepositoryInfo(ctx context.Context, name string) (forge.RepositoryInfo, error)
Find(ctx context.Context, query forge.PullRequestQuery) (forge.PullRequestObservation, error)
Observe(ctx context.Context, ref forge.PullRequestRef) (forge.PullRequestObservation, error)
Create(ctx context.Context, input forge.PullRequestInput) (forge.PullRequestObservation, error)
Update(ctx context.Context, input forge.PullRequestInput) (forge.PullRequestObservation, error)
OpenPullRequests(ctx context.Context, repository, port string) ([]forge.PullRequestSummary, error)
// Inspect reports a pull request's reviews and checks.
Inspect(ctx context.Context, ref forge.PullRequestRef) (forge.PullRequestStatus, error)
// MarkReady takes a draft out of draft, and MarkDraft returns one
// ready for review to draft.
MarkReady(ctx context.Context, ref forge.PullRequestRef) (forge.PullRequestObservation, error)
MarkDraft(ctx context.Context, ref forge.PullRequestRef) (forge.PullRequestObservation, error)
// Permission is a person's role on a repository.
Permission(ctx context.Context, repository, login string) (string, error)
// PostReview posts a review on a pull request.
PostReview(ctx context.Context, input forge.ReviewInput) (string, error)
// RequestReviewers asks people to review a pull request again.
RequestReviewers(ctx context.Context, ref forge.PullRequestRef, logins []string) error
// Repository binds a repository for reading, such as dockhand's own,
// asked whether it has the builds a branch's commits name.
Repository(instance, name string) (forge.Repository, error)
// Describe reads a repository's description, under the name it
// answers by now, which a renamed one's differs from the name asked:
// what an update asks of every release's repository, where it found
// by type assertion whether a repository could say (C3).
Describe(ctx context.Context, instance, name string) (forge.Description, error)
// Account reads a login as the forge has it now, for a repository
// move's old owner name.
Account(ctx context.Context, instance, login string) (forge.Account, error)
// FailedJobs are a head's CI jobs that failed, of each run's latest
// attempt; JobLog a job's log, forge.ErrNotFound where the forge no
// longer keeps it or won't give it; and RerunFailed runs a run's
// failed jobs again, as the person, forge.ErrRejected without the
// access it needs.
FailedJobs(ctx context.Context, repository, head string) ([]forge.CIJob, error)
JobLog(ctx context.Context, repository string, job int64) ([]byte, error)
RerunFailed(ctx context.Context, repository string, run int64) error
}
Forge is what submit needs of GitHub: who you are, which repositories your remotes name, the pull requests, and dockhand's own repository.
type ForgetPlan ¶ added in v0.5.0
type ForgetPlan struct {
Branch model.Branch
Worktree string
// KeptWorktree is the branch's checkout that stays, one dockhand
// didn't make: the person's own, as an adopted or --here branch
// records, which archive leaves too.
KeptWorktree string
Head string
Unmerged []git.CherryCommit
// Fork is what the branch left on your fork, as clean offers it
// (planCleanFork): removed before the record, whose checks name the
// check branches, is forgotten; a step kept is said and left.
Fork []CleanStep
// Leftovers are what the branch's checks left in their providers, the
// clones they kept above all, removed before the record, with which
// no check of this checkout would claim them (BranchLeftovers).
Leftovers []Leftover
}
ForgetPlan is what forgetting an ended branch removes (clean --delete): its worktree, where one is left; its Git branch at Head, where it has one, with the commits on it the master last fetched lacks, Unmerged, which go with it; and its record, but for what other branches' results name of its checks.
type GitFetch ¶
GitFetch is what a Git-fetched target's build fetched (batch 20): the source its plan expected, and the commit the build recorded fetching, empty where its provider didn't say (FetchedWords).
type GitHubCLI ¶
type GitHubCLI interface {
// Login is the account it's signed in as.
Login(ctx context.Context) (string, error)
// MarkReady takes a draft pull request out of draft, and MarkDraft
// returns one to draft.
MarkReady(ctx context.Context, ref forge.PullRequestRef) error
MarkDraft(ctx context.Context, ref forge.PullRequestRef) error
}
GitHubCLI is the GitHub CLI, which acts on GitHub as its own app. An organization that refuses dockhand's app may take it, as the macports organization does to mark a draft ready (D8).
type HTTPSProbe ¶
HTTPSProbe says whether a URL answers over HTTPS. It is asked about several URLs at once.
type HandEdit ¶ added in v0.6.0
HandEdit is an update dockhand refused, whose attempt it wrote for the person to finish, as a revision's files stand on it (update --hand-edit, Then's item 3): the port's directory, the refusal in its words, and whether the directory is the attempt as written or was adjusted by hand since.
type HeldBeforeEdit ¶
HeldBeforeEdit is an update no person looks over, bump's, held for a look before its edit was prepared (UpdateRequest.Unattended), for what would hold its submission after the check: another open pull request for the port, or not knowing whether there is one. Held says why, as a held submission does.
func (*HeldBeforeEdit) Error ¶
func (h *HeldBeforeEdit) Error() string
type Impact ¶
type Impact struct {
Diff BranchDiff
// Defined are the ports each changed directory defines at the base, as
// its index names them; none where it couldn't be read.
Defined map[string][]string
// Of are the directories whose dependents were looked for.
Of []string
Dependents []treequery.Dependent
// Unread says why dependents could not be read, when they couldn't.
Unread string
// Builds are what MacPorts' builders made of each port the branch
// changes and master has, by ports.macports.org; a port the site gave
// no answer for is left out.
Builds []PortBuilds
}
Impact is what a branch's change reaches beyond the ports it changes (Design v3 §6.7): the changed ports, the others that depend on them, and the shared files it changes. Dependents are candidates to look at, not proof of anything.
func (Impact) OneOfEachKind ¶
OneOfEachKind are dependents to build against the branch first: one of each kind of dependency there is, library first, a dependent of several kinds taken for the first. Nothing sizes a build, so within a kind it's the first the index names; impact suggested the first three in name order, aria2, bind9, and bind9.18, among the heaviest of libuv's to build (the libuv run's finding 3). One that depends only under a variant isn't taken, since check --also builds a port's default variants.
type IndexFailureReader ¶ added in v0.8.0
type IndexFailureReader interface {
IndexFailures(ctx context.Context, source model.Source, directories []string) (map[string]string, error)
}
IndexFailureReader says why a source's port index left out the Portfiles of some directories, portindex's reason for each it couldn't parse, by directory; the port reader that reads the index is one.
type InstallEstimate ¶ added in v0.7.0
type InstallEstimate struct {
Environment model.Environment
// Dependencies are how many it installs.
Dependencies int
// Unarchived are those with no archive for the release, and Unknown
// those whose listing couldn't be had in time, which leaves the
// archives unsaid.
Unarchived, Unknown int
// Unestimated says why the archives aren't estimated, where a local
// prefix's variants.conf sets global variants: the builders' archives
// aren't what it installs.
Unestimated string
}
InstallEstimate is what a check will install in an environment before it builds, by the port index: the dependencies its targets reach that the environment hasn't installed, and of those, the ones with no archive of their version on packages.macports.org for its release. A hint only: the clone decides (Decided: saying which build from source).
func (InstallEstimate) Words ¶ added in v0.7.0
func (est InstallEstimate) Words() string
Words are the estimate as a person reads it: "about 14 dependencies to install, 3 with no archive on packages.macports.org for this release, by the port index; the clone decides".
type InstallFinding ¶ added in v0.7.0
type InstallFinding struct {
evidence.InstallChange
Check string
// Version is the earlier build's version, where it's older than
// master's, and Master master's (Then's items 9 and 10): a finding
// against an old build may be the versions between's, not this one's.
Version, Master string
Dependents []string
// Unbumped is a change of files installed with neither the version
// nor the revision raised, as the revision's Portfile has them against
// its base's: installed copies keep the old files until rebuilt (the
// revbump classifier's non-ABI half).
Unbumped bool
// contains filtered or unexported fields
}
InstallFinding is what a check's build installed against an earlier build of the port in the same environment (evidence.InstallChange), with the earlier build's check, and, where its own libraries' install names moved, the ports that link it directly, which --revbump-dependents rebuilds (Then's item 9: exiv2 0.28's soname and its 38 dependents).
func (InstallFinding) Lines ¶ added in v0.7.0
func (f InstallFinding) Lines(bumped []string) []InstallLine
Lines say a finding as the check's report, status, and the pull request's description say it: its own libraries whose install names moved, with the ports that link it, those of them bumped named where the branch bumps any, and what configure no longer or now finds, each asking a look; and the files gone or added, asking one where neither the version nor the revision was raised.
type InstallLine ¶ added in v0.7.0
InstallLine is one line of what a finding says, and whether it asks a person's look.
type Leftover ¶
type Leftover struct {
buildenv.Leftover
// Run is the check it was made for, when one of this checkout's, and
// Execution the attempt that made it.
Run *model.Run
Execution *model.GuestExecution
// Kept says why it stays; empty when it would be removed.
Kept string
// Done is true once it was removed.
Done bool
}
Leftover is an environment a provider made for a check that is still there, such as a Tart clone, and what clean does with it.
type LinkFinding ¶ added in v0.5.0
type LinkFinding = evidence.LinkFinding
LinkFinding is evidence's (evidence.LinkFinding), for the command line to word.
type LinkThrough ¶ added in v0.8.0
type LinkThrough = evidence.LinkThrough
LinkThrough is the pkg-config an undeclared link came through (evidence.LinkThrough).
type LinkedPorts ¶
type LinkedPorts struct {
Base model.ObjectID
// Bump are the dependents to revision-bump, in name order.
Bump []treequery.Dependent
// Changed are dependents the branch already changes, left alone.
Changed []treequery.Dependent
// Excepted are the dependents --except took out.
Excepted []string
}
LinkedPorts is what update --revbump-dependents would bump for a port: its direct library dependents in the port index at the branch's base (Design v3 §6.7), one per directory, less the directories of the ports excepted and those the branch already changes.
type LinkedRevbump ¶
type LinkedRevbump struct {
LinkedPorts
// Subject is the commit subject recorded for tidy, after each port's
// name: "rebuild for <port> <version>".
Subject string
// Bumped are the dependents whose revision was bumped, in order; none
// for a plan.
Bumped []string
}
LinkedRevbump is what update --revbump-dependents did for an updated port, or with a plan would do.
type LintFinding ¶ added in v0.7.0
type LintFinding = evidence.LintFinding
LintFinding is evidence's (evidence.LintFinding), for the command line.
func LintFindings ¶ added in v0.7.0
func LintFindings(checked Evidence) []LintFinding
LintFindings are what lint warned of in a check's evidence (evidence.LintFindings).
type LiveUnderMigrationError ¶ added in v0.4.0
type LiveUnderMigrationError struct {
*store.LiveUnderMigrationError
}
LiveUnderMigrationError is a migration Open refused, since dockhand processes that read the older schema are working, said with the way on; Options.MigrateUnderLive is a person's answer to it. The store says what it found, and the engine the way on (the architecture review of 5897a82, R3-19).
func (*LiveUnderMigrationError) Error ¶ added in v0.5.0
func (e *LiveUnderMigrationError) Error() string
func (*LiveUnderMigrationError) Unwrap ¶ added in v0.5.0
func (e *LiveUnderMigrationError) Unwrap() error
type LogCleanup ¶
type LogCleanup struct {
Compressed buildlog.Compression
Removed []string
Bytes int64
// Staged and StagedBytes are the staged trees finished checks'
// attempts left, as a process stopped mid-build leaves one, which
// cleanup removed.
Staged int
StagedBytes int64
}
LogCleanup is what cleanup did to checks' logs: what it compressed, and the logs it removed, each a check's directory, with their bytes.
type MacPortsBehind ¶ added in v0.5.0
type MacPortsBehind struct {
Name, Image, Host, Remedy string
}
MacPortsBehind is something set up with an older MacPorts than this Mac's, which reads its ports: its name as a person reads it, the MacPorts it keeps and this Mac's, and the setup that makes it again.
type MaintainerReader ¶
type MaintainerReader interface {
Spellings(ctx context.Context, source model.Source, spelling string) ([]portindex.MaintainerSpelling, error)
}
MaintainerReader reads the ways a source's port index writes a maintainer (portindex.Index.Spellings). MacPorts' port index, as the port reader stages it, is the real one.
type MaintainerSuggestion ¶
type MaintainerSuggestion struct {
Login string
Spellings []portindex.MaintainerSpelling
}
MaintainerSuggestion is what a person whose config names no maintainer might set there (the flyctl run, macports/macports-ports#35069): the ways the port index's Portfiles write the GitHub login dockhand signs in as, most written first, each one a maintainers line can carry. Login is empty where it isn't known, and Spellings where nothing names it.
type MasterChanged ¶ added in v0.8.0
type MasterChanged struct {
Branch string
Base, Master model.ObjectID
Directories []string
OnMaster bool
}
MasterChanged is a submission stopped because master, fetched just before it would push, changed a port directory the branch changes since the branch's base: with the same files as the branch's, its changes are on master already, and a pull request would duplicate them (#164); with others, the branch is reviewed against master's first. A change master made elsewhere stops nothing (docs/usage/branches.md).
func (*MasterChanged) Error ¶ added in v0.8.0
func (m *MasterChanged) Error() string
func (*MasterChanged) Said ¶ added in v0.8.0
func (m *MasterChanged) Said(checkRan bool) string
Said is the stop in the words of the run that met it: one whose check ran, which nothing was pushed or submitted after, or one that started no check.
type MergedError ¶ added in v0.4.0
type MergedError struct {
// contains filtered or unexported fields
}
MergedError is a name an open branch hasn't, which a merged one's record keeps: what became of it, said from the record.
func (*MergedError) Error ¶ added in v0.4.0
func (m *MergedError) Error() string
type NamedProgram ¶ added in v0.8.0
type NamedProgram struct {
Name, Path, Source string
}
NamedProgram is a program a person named: its name as dockhand runs it, its path, and what named it, "--tool git", "GIT_BIN", or "[tools] git".
type NewPort ¶
type NewPort = prdescription.NewPort
The pull request's description is prdescription's (the architecture review's finding 5): the engine establishes what it can claim, in its own words where they're its own, and publishes what it composes. What submitting again does to each part keeps its names here, for the commands that say it.
type NotARunName ¶ added in v0.8.0
type NotARunName struct{ Name string }
NotARunName is a name RunNamed can't read as a run's, as "sh".
func (NotARunName) Error ¶ added in v0.8.0
func (n NotARunName) Error() string
type Observed ¶
type Observed struct {
Project Project
Version string
Build portcreate.Build
// Name and Category are the port's, unless the request names them.
Name, Category string
// Declared is what the project's own manifest says of it.
Declared portcreate.Declared
// License is the license line in MacPorts' words, from the manifest
// (LicenseFrom names it) or, failing that, the forge (LicenseFrom
// empty); empty where neither says one MacPorts has a name for.
License, LicenseFrom string
// LicenseGuess says where License was guessed from, a license file's
// first line, where neither names one (portcreate.GuessLicense).
LicenseGuess string
// Description is the port's one line: the manifest's, else the
// forge's.
Description string
}
Observed is an upstream project, and what create would make of it.
type ObsoleteStub ¶
ObsoleteStub is a port the Portfile keeps for an old name, replaced_by the one updated, fetching nothing, at its version: terraform's, at 1.16.0 beside terraform-1.16.
type OpenWork ¶ added in v0.8.0
type OpenWork struct {
// contains filtered or unexported fields
}
OpenWork is what the open branches change, read once: each one's head, its tree, the directories its commits and working files change, and its worktree where it's checked out there. outdated asked each due port's branches afresh, about nine git processes an open branch a port, 10,080 of a look's 10,125 over 1,114 ports and 40 branches (the faster look's baseline, 2026-10-30); read once, as status reads its branches, they're a few processes and a status a worktree. It holds while no branch starts, moves, or is edited.
func (*OpenWork) BranchesChanging ¶ added in v0.8.0
BranchesChanging are the open branches that change a port, as Engine.BranchesChanging finds them.
func (*OpenWork) PortBranches ¶ added in v0.8.0
PortBranches are the open branches that change a port, as Engine.PortBranches orders them.
type Options ¶
type Options struct {
// Tree is a directory inside the ports checkout; "." when empty.
Tree string
// Git is the git executable; "git" on Env's PATH when empty.
Git string
// Named are the programs the command line, its environment, or the
// configuration named, which setup says the source of and the
// processes dockhand starts are given as --tool.
Named []NamedProgram
// Env is the environment the programs dockhand runs run in, git,
// port-tclsh, Tart, and ssh among them: the command line's, as compose
// builds it.
Env []string
// Database is the store's path.
Database string
// Worktrees is the directory managed worktrees live in; when empty,
// ~/Source/macports-branches (DefaultWorktrees).
Worktrees string
// Home is the person's home directory, which DefaultWorktrees is
// under.
Home string
// Upstream is the URL master is fetched from; UpstreamURL when empty.
Upstream string
// PullRequests is the repository pull requests go to;
// UpstreamRepository when empty. The acceptance test names its
// sandbox, a fork of MacPorts' repository that takes pull requests
// within itself, so its repeatable rows open nothing at MacPorts.
PullRequests string
// PullRequestsURL is where a sandbox's pull requests' heads are
// fetched from: its address on github.com when empty, as compose
// leaves it; a test's stand-in, as Upstream is master's.
PullRequestsURL string
// Tclsh is MacPorts' port-tclsh, which evaluates Portfiles: this
// Mac's, which compose finds (macports.FindTclsh), and none where it's
// empty.
Tclsh string
// Programs are the other programs the engine's readers and editors
// run, which compose finds.
Programs Programs
// MigrateUnderLive migrates the database's schema though dockhand
// processes that read the older one are working: a person's answer to
// store.LiveUnderMigrationError, which the migration is otherwise.
MigrateUnderLive bool
// MigrateRelease migrates a database a release last opened though this
// build isn't one, a person's answer to ReleaseUnderMigrationError.
MigrateRelease bool
// KeepHTTP is --keep-http, or [update] keep_http: every update,
// create, and checksums refresh, serve's among them, leaves plain-HTTP
// links as they are, asking nothing and saying nothing of them, where
// each that answers over HTTPS is otherwise switched (the person's
// "keep_http", 2026-10-29).
KeepHTTP bool
// Source is --source, or [update] source: what every version update
// does about a GitHub port's source, suggest, choose, keep, releases,
// or archive (editprep.SourceMode); empty suggests.
Source string
// NamedDatabase is a Database named, with --db or DOCKHAND_DB, other
// than the default one a release opens: a copy the person made to try
// this build, as the refusal advises, which migrates without asking
// where a release last opened it, said so (field testing's .backup
// copy, 2026-10-29).
NamedDatabase bool
// Now defaults to time.Now.
Now func() time.Time
// Poll is how often a driver looks for a cancel request; a second when
// zero.
Poll time.Duration
// Readings is where readings of upstream's archives are kept
// (ReadingCache); none are kept when empty.
Readings string
// Indexes is where port indexes are cached, which staging an index
// needs; IndexMirror is the directory a cache with no generation near
// enough is seeded from, MacPorts' own when empty.
Indexes, IndexMirror string
// AllowMajors lets an update nobody looks over move a port's major
// version without a look; holds.majors = "allow". Held otherwise.
AllowMajors bool
// AllowHolds are the rules whose concerns don't hold an update nobody
// looks over, though they're said (holds.allow; HoldRules).
AllowHolds []string
// Baseline runs, after a check that fails, the baseline it points to,
// check.baseline: queued by the engine as the check's continuation, so
// a check -d, ship's, and serve's run it as the foreground one does
// (Then's item 4).
Baseline bool
// PortHolds are ports' own holds, over AllowMajors and AllowHolds for
// each, [holds.ports."<port>"], which holdsFor composes.
PortHolds map[string]PortHolds
// Tests are the tests a check runs where it asks none, check.tests,
// which ProposeCheck resolves for check, ship, and serve alike (the
// architecture review of 5897a82, R3-35); declared where it's empty.
Tests model.TestPolicy
}
Options selects what an engine works on.
type OtherPrefix ¶ added in v0.8.0
type OtherPrefix = upstream.OtherPrefix
OtherPrefix is a newer tag under another prefix than the port's, and its Words say so.
type OtherPullRequest ¶ added in v0.7.0
type OtherPullRequest = forge.PullRequestSummary
OtherPullRequest is another open pull request for a port: its number, title, and page.
type OutdatedClass ¶ added in v0.4.0
type OutdatedClass string
OutdatedClass is what a look found of a port, one of the classes below, which plain outdated counts and lists by (Summary).
const ( // OutdatedOwnVersion has no release to look for (OwnVersion). OutdatedOwnVersion OutdatedClass = "own-version" // OutdatedMoved tracks a branch that names a newer commit (Moved). OutdatedMoved OutdatedClass = "moved" // OutdatedUnchecked couldn't be checked (Problem). OutdatedUnchecked OutdatedClass = "unchecked" // OutdatedUncertain may have a newer release, for a look (Uncertain). OutdatedUncertain OutdatedClass = "uncertain" // OutdatedAhead is ahead of every version upstream lists, for a look // (Ahead). OutdatedAhead OutdatedClass = "ahead" // OutdatedUnpublished has a newer release not ready yet (Unpublished). OutdatedUnpublished OutdatedClass = "unpublished" // OutdatedNewer has a newer release (Outdated). OutdatedNewer OutdatedClass = "newer" // OutdatedCurrent has none. OutdatedCurrent OutdatedClass = "current" )
type OutdatedLook ¶
type OutdatedLook struct {
CheckedAt time.Time `json:"checked_at"`
// Maintainers, Categories, and NotMaintainers are the selection the
// look looked for, the config's then; a look is shown only where it's
// the config's now (LastOutdatedLook).
Maintainers []string `json:"maintainers,omitempty"`
Categories []string `json:"categories,omitempty"`
NotMaintainers []string `json:"not_maintainers,omitempty"`
Outdated []string `json:"outdated"`
// Uncertain are the ports that may have a newer release, which serve
// neither calls current nor prepares: a person looks. SetAside are the
// tags each was uncertain for, which the next look reads to say a port
// again only where they changed.
Uncertain []string `json:"uncertain,omitempty"`
SetAside map[string][]string `json:"set_aside,omitempty"`
}
OutdatedLook is what serve's daily look at your ports last found, for status.
type OutdatedPlan ¶
type OutdatedPlan struct {
Updates []PlannedUpdate
// Skipped are the outdated ports it leaves alone, and why.
Skipped []SkippedUpdate
}
OutdatedPlan is how update --outdated splits the work before it starts anything: one branch per port, since unrelated ports go in separate pull requests.
type OutdatedPort ¶
type OutdatedPort struct {
Port string
Current string
Newest string
// Outdated is true when upstream has a newer release.
Outdated bool
// Uncertain are the versions that compare newer than the port's own,
// newest first, but that discovery set aside, since their tags'
// commits predate the port's own tag's: whether the port is outdated
// is a person's call, and Newest is the first of them. It is neither
// current nor to be updated by itself.
Uncertain []SetAside
// Ahead is, for a port whose version compares newer than every one
// upstream lists, its own tag not among them, the newest tag listed:
// the repository may have moved, so it's neither current nor to be
// updated by itself, and Newest is that tag's version.
Ahead string
// Problem says why the port could not be checked; RetryAt, when a
// rate limit that kept it from being checked lifts, zero where none.
Problem string
RetryAt time.Time
Release *model.Release
// With is the subport whose check stands for this one, which shares
// its Portfile's release; it moves with that one's update.
With string
// Moved is, for a port that tracks a branch, the branch and the newer
// commit it names than the one the port pins: behind, with a version
// a person names, so it's neither outdated nor planned.
Moved *Head
// OwnVersion is a port with no release to look for: it fetches
// nothing, and no livecheck reads its version, as a _select port's.
// Its version is MacPorts' own; it's covered, and never planned.
OwnVersion bool
// Unpublished says why a newer release isn't ready: its release has
// none of the files the port fetches yet (upstream's askAssets). It's
// said, as update would refuse it, and never planned.
Unpublished string
// NewerSeries is, for a versioned subport, the newest release of a
// newer series than its own (upstream.Result.NewerSeries): said, a new
// subport being the maintainer's, and never planned.
NewerSeries string
// RepositoryMove is where GitHub answers the port's repository now,
// where that isn't the one github.setup names (upstream.Result.Move);
// nil where nothing said.
RepositoryMove *RepositoryMove
// OtherPrefix is the newest tag upstream lists that the port's tag
// prefix leaves out, which a "v" added or taken away would take, newer
// than Newest (upstream.Result.OtherPrefix); said, the port's own
// spelling deciding, and nil where none is.
OtherPrefix *OtherPrefix
// Prerelease is, for a port current because upstream listed nothing
// but a prerelease a port on a stable release doesn't take, that
// prerelease (upstream.Result.Prerelease); said, and empty otherwise.
Prerelease Prerelease
}
OutdatedPort is one port as its upstream stands.
func (OutdatedPort) Class ¶ added in v0.4.0
func (p OutdatedPort) Class() OutdatedClass
Class is what the look found of the port, the first of its facts that holds, in the order the constants are: one with no release to look for is neither checked nor current, and one that couldn't be checked isn't said to be anything else.
func (OutdatedPort) Reason ¶ added in v0.5.0
func (p OutdatedPort) Reason() string
Reason is why the port couldn't be checked, in a line: its problem's first, the rest being detail, as how its releases were listed after GitHub's rate limit stopped the look (R3-38: the command cut it).
type OutdatedReader ¶
type OutdatedReader interface {
Outdated(ctx context.Context, commit model.ObjectID, request OutdatedRequest) ([]OutdatedPort, error)
}
OutdatedReader finds ports' newest releases at a commit of master. MacPorts' evaluator and upstream discovery are the real one.
type OutdatedReport ¶
type OutdatedReport struct {
Master model.ObjectID
Ports []OutdatedPort
}
OutdatedReport is what outdated found, at a freshly fetched master.
func (OutdatedReport) RateLimited ¶
func (r OutdatedReport) RateLimited() ([]string, time.Time)
RateLimited are the ports a rate limit kept from being checked, and when the last of those limits lifts.
func (OutdatedReport) Summary ¶ added in v0.4.0
func (r OutdatedReport) Summary() map[OutdatedClass]int
Summary counts the report's ports by what the look found of each (OutdatedPort.Class).
func (OutdatedReport) Unchecked ¶
func (r OutdatedReport) Unchecked() []OutdatedPort
Unchecked are the ports that couldn't be checked, as GitHub's rate limit leaves them, and UncheckedWords says how many of all, and why the first couldn't, as "2 of 4 ports couldn't be checked: GitHub's rate limit …": what's said ahead of the rest's result, which it can't stand for, since "none has a newer release" was said of four where two due ones went unchecked (the rc6 full stage, D-N4).
func (OutdatedReport) UncheckedWords ¶
func (r OutdatedReport) UncheckedWords() string
Where they couldn't for several reasons, the reasons are counted, the commonest first, two named and the rest counted together: the daily look's 27 unchecked were said with one port's reason, "requested version matches multiple releases…" (the rc10 full stage's B7).
type OutdatedRequest ¶
type OutdatedRequest struct {
Ports []string
Maintainers []string
// Categories and NotMaintainers narrow a selection by master's index,
// as port echo combines them, beside Maintainers.
Categories, NotMaintainers []string
// Progress, when set, hears how many of the ports are looked up, as
// the lookups finish.
Progress func(done, total int)
// Allow, when set, is asked before the first lookup whether the look
// may go on, given how many it makes (outdated.Service.Allow).
Allow func(ctx context.Context, lookups int) error
}
OutdatedRequest chooses the ports to look at: the ports named, or those with one of the maintainers.
type Passing ¶
type Passing struct {
// Ready are those whose latest check passed for exactly their
// committed files, with nothing edited since.
Ready []BranchStatus
}
Passing is the open branches with checked work not yet on a pull request that may be submitted as passing.
type PlainURL ¶
PlainURL is a URL a port names over plain HTTP, its https form, and whether that answers.
type PlanRequest ¶
type PlanRequest struct {
Revision model.Revision
Environments []model.Environment
// Only narrows the check to these changed ports, and their changed
// prerequisites.
Only []string
// Also adds unchanged ports, built against the branch.
Also []string
Tests model.TestPolicy
// Fresh builds every target, reusing no earlier build's result.
Fresh bool
// Keep keeps each environment's clone where its guest finished
// (model.Plan.Keep).
Keep bool
// Span builds each port only on its oldest and newest release of the
// environments, a minmax profile's (Where.Span), and Profile is the
// profile that named them, and Asked whether the person did, which
// the plan keeps.
Span bool
Profile string
Asked bool
// Variants builds the one port the check selects with these variants
// instead of its defaults; EachVariant builds it with its defaults,
// and then with each variant it declares (VariantBuilds).
Variants map[string]bool
EachVariant bool
// VariantsPort is the port --variants named, changed or --also's;
// where empty, the plan's one port, else --only's (variantsTarget).
VariantsPort string
// contains filtered or unexported fields
}
PlanRequest asks what a check of a revision would build.
type PlannedCreate ¶ added in v0.7.0
PlannedCreate is what create would write, without writing it: the port's directory, its Portfile with placeholder checksums, and what it marks as guessed.
type PlannedUpdate ¶
type PlannedUpdate struct {
Port OutdatedPort
// Name is the branch's name, without dockhand/.
Name string
// Also are the other ports of Port's Portfile the plan updates, in
// the one branch, which Name names for Directory: tidy makes a commit
// each.
Also []OutdatedPort
Directory string
}
PlannedUpdate is one port's update and the branch it would start.
func (PlannedUpdate) CrossesMajor ¶
func (p PlannedUpdate) CrossesMajor() bool
CrossesMajor says whether the update moves the port to a new major version, which what depends on it may need to follow; a preview says it before the update is made.
func (PlannedUpdate) Ports ¶ added in v0.7.0
func (p PlannedUpdate) Ports() []OutdatedPort
Ports are the ports the planned branch updates, in order.
type PortBranch ¶
PortBranch is an open branch that changes a port, and whether its change record says it changes only the port's revision, as a branch of --revbump-dependents does.
type PortBuilds ¶ added in v0.8.0
type PortBuilds struct {
Port string
History buildhistory.History
}
PortBuilds is what MacPorts' builders made of a changed port, by their latest build on each release (buildhistory.History.Words).
type PortChange ¶ added in v0.5.0
type PortChange string
PortChange is how a branch changes a port: a new port, one removed, its revision alone, or changed.
const ( PortAdded PortChange = "new_port" PortMoved PortChange = "moved" PortRenamed PortChange = "renamed" PortRemoved PortChange = "removed" PortRevisionOnly PortChange = "revision_only" PortChanged PortChange = "changed" )
type PortComparison ¶
type PortComparison struct {
Port string
Comparison model.UpstreamComparison
}
PortComparison is what upstream's change means for a port a revision changes.
func CompiledNative ¶ added in v0.8.0
func CompiledNative(comparisons []PortComparison, compiled func(port string) (map[string]bool, bool)) []PortComparison
CompiledNative are comparisons as a check settles their native findings, at display, as UnderUpstream words them, the record left as it was (the omnidiff session's note 6): Cargo.lock pins every crate any feature or target could build, so omnidiff's named libgit2-sys, libsqlite3-sys, libmimalloc-sys, and onig_sys, each behind a feature off by default, a musl target, or used by nothing. A native finding whose crate a build of the port compiled keeps its line, saying so; the rest leave the list for one line of coverage. A port no log says compiled anything is as it was.
func Grouped ¶
func Grouped(comparisons []PortComparison) []PortComparison
Grouped are comparisons that say the same thing, one for each set of ports, named together in the order given: a new python port's subports each repeated its stub's block (field testing, 2026-10-02: py-mlx-vlm).
type PortDiff ¶
type PortDiff struct {
Directory string
// Kind is revision-only when the source proves it, else substantive.
Kind model.TargetKind
// Added and Deleted say the Portfile is new, or gone.
Added, Deleted bool
// MovedFrom is the base's directory of a port the branch moves here.
MovedFrom string
}
PortDiff is how a branch changes one port directory.
func (PortDiff) Change ¶ added in v0.5.0
func (p PortDiff) Change() PortChange
Change is how the branch changes the port, the one reading of Added, Deleted, and Kind, where diff's words and impact's test of them each read it (part 4, item 2).
type PortHolds ¶ added in v0.6.0
PortHolds are one port's own holds, as the configuration gives them ([holds.ports."<port>"]): AllowMajors and Allow, where set, over the global ones; FollowMoves, --follow-moves standing for an unattended update of it; After, the ports whose update to the same version is submitted before its own.
type PortLog ¶ added in v0.5.0
type PortLog struct {
Execution model.GuestExecution
Result model.TargetResult
}
PortLog is one build's log of a port: the provider run it was in, and its result.
type PortNamer ¶ added in v0.5.0
type PortNamer interface {
PortsDefined(ctx context.Context, source model.Source, directories []string) (map[string][]string, error)
}
PortNamer names the ports each of some directories defines, as a source's port index has them; the port reader that reads the index is one.
type PortRelease ¶
PortRelease is the release an update chose for a port.
type PortRenameRequest ¶ added in v0.7.0
type PortRenameRequest struct {
Branch model.Branch
Port string
// Name is the port's new name; empty moves it, keeping its name.
Name string
// Category is the new directory's: the port's own where empty, for a
// rename. A move names one.
Category string
Plan bool
// FromMaster plans it against master as fetched now, with no branch,
// as update's plan does: a plan with --new started the branch it
// named (Codex's workflow review of 1caa6c3d, finding 3). Plan alone.
FromMaster bool
}
PortRenameRequest is a port renamed, or moved to another category, on a branch, as MacPorts renames one: its Portfile and files/ at the new name's directory, and for a rename the old Portfile an obsolete stub replaced_by the new name (the person's "I agree we add a `rename` action to Dockhand.", 2026-10-29, from goplus, whose project gop became xgo).
type PortSelection ¶ added in v0.7.0
type PortSelection struct {
// Maintainers are your identities, or serve.maintainers'; with none
// and no category, serve says it needs them.
Maintainers, Categories, NotMaintainers []string
// Chosen is that serve.maintainers or serve.categories chose the
// ports, not your maintainer line.
Chosen bool
}
PortSelection is the ports serve's daily look is for, chosen by master's index as outdated's selectors choose them: your ports by default, the config's maintainer entries, else serve.maintainers, serve.categories, and serve.not_maintainers. A default and not a policy: either goes under the same holds, serve.submit_limit, and stages (the dig's I38a, the person's 2026-10-27 02:02Z).
func ServeSelection ¶ added in v0.7.0
func ServeSelection(mine, maintainers, categories, notMaintainers []string) PortSelection
ServeSelection is serve's selection from the config: serve's keys where they choose ports, else mine, your maintainer entries, beside not_maintainers.
func (PortSelection) Command ¶ added in v0.7.0
func (p PortSelection) Command(verb string) string
Command is a dockhand command, outdated or ship, over the selection.
func (PortSelection) Title ¶ added in v0.7.0
func (p PortSelection) Title() string
Title heads a line or notification of the selection's ports.
func (PortSelection) Words ¶ added in v0.7.0
func (p PortSelection) Words() string
Words name the selection's ports in serve's lines and status's.
type PortVersion ¶
PortVersion is a port's version and revision.
func (PortVersion) String ¶
func (v PortVersion) String() string
type Ports ¶ added in v0.5.0
type Ports struct {
// Reader reads ports for plans.
Reader checks.PortReader
// Families make change records.
Families FamilyReader
// Graphs order a plan's builds through ports it doesn't build, and
// find a baseline's and reuse's dependencies on.
Graphs checks.DependencyGraphReader
// Archives say what a port fetches, for its assessment.
Archives ArchivePlanner
// Fetcher fetches the archives a Portfile declares, for diff
// --archives.
Fetcher ArchiveFetcher
// Names name the ports a directory defines, as the port index has
// them.
Names PortNamer
// Dependents find a port's dependents, for impact and review.
Dependents DependentReader
// Maintainers find how the port index spells a maintainer.
Maintainers MaintainerReader
// Failures say why the port index left a directory's Portfile out,
// for a port a branch's edit broke.
Failures IndexFailureReader
}
Ports are what the engine reads of ports, a field for each capability, where it found each by type assertion on one reader, and did without one it didn't find, unsaid (C3). With no Reader, every one is MacPorts' own (treequery.Reader), which has them all; given a Reader, as a test does, only the fields set are, and one missing is said where it's needed, or is an error.
func MacPortsPorts ¶ added in v0.5.0
MacPortsPorts are MacPorts' own reader's capabilities, every one.
type PrepareOptions ¶
type PrepareOptions struct {
// Origin is who asked: a person, or serve.
Origin model.Origin
// To is how far each goes: ShipCommit, where it's empty, or ShipCheck,
// which queues a check of each prepared commit where Where says.
To ShipStage
Where Where
Tests model.TestPolicy
// Answered is how the person answered for what a person would decide,
// which serve sets to nobody: the caller says it, where prepareOne
// read it from Origin (the architecture review of 5897a82, R3-36).
Answered model.Answered
}
PrepareOptions are how PrepareOutdated prepares each branch.
type PreparedUpdate ¶
type PreparedUpdate struct {
Planned PlannedUpdate
Branch model.Branch
Update Update
// Tidied is true when the update was committed as one commit.
Tidied bool
Run *model.Run
// Problem says what stopped it, after whatever it had done.
Problem string
}
PreparedUpdate is what preparing one planned update did.
type Preparer ¶
type Preparer interface {
ResolveRelease(ctx context.Context, request editprep.Request) (model.Release, error)
Prepare(ctx context.Context, request editprep.Request) (editprep.Result, error)
}
Preparer edits a port in a source tree: it finds the release an update moves to, and prepares the edited tree. preparation.Service is the real one; tests substitute their own.
type Prerelease ¶ added in v0.8.0
type Prerelease = upstream.Prerelease
Prerelease is the prerelease a port's look listed alone, and its Words say so.
type Process ¶ added in v0.5.0
type Process struct {
Session model.Session
Leads bool
Runs []model.Run
// Expects is the schema the process's build writes where the database
// is at another, Database: a process on an older schema can't record
// what it does after a migration.
Expects, Database int
}
Process is a dockhand process working on the repository now: its session, alive by coord's liveness, whether it leads the queue, the checks it runs, and the schema it expects where that isn't the database's (0 where it matches, or its build recorded none).
type Profile ¶ added in v0.4.0
type Profile struct {
Name string
Provider string
// Releases are an explicit list, as "15" or "tahoe"; Rule a rule's
// name, host, minmax, macports-ci, or all, where there's no list.
Releases []string
Rule config.ReleaseRule
}
Profile is a build profile: a provider and the releases it builds on, a list or a rule (the person's design, 2026-10-13).
type Programs ¶ added in v0.8.0
type Programs struct {
Patches patchcheck.Tools
Vendoring depblock.Tools
Portindex string
}
Programs are where the programs dockhand runs beside MacPorts' evaluator are, each found once, by compose, on the PATH dockhand was run with: diff and patch, which check a port's patches; go2port and cargo2port, which regenerate its vendored dependencies; and portindex, which indexes a tree, found as port-tclsh is (macports.FindPortindex). One not found is empty, and what needs it says so.
type Project ¶
type Project struct {
Owner, Name string
Description string
Homepage string
// License is the forge's detection, as an SPDX identifier.
License string
Tag string
// Assets are the files the release carries.
Assets []string
Files map[string][]byte
// Directory is where a Go module is below the repository's root, its
// files read there and its port built there, and Package the module
// path of that root, which go.setup takes (the docs dig's I33); empty
// for a project at its root.
Directory, Package string
}
Project is what create observes of an upstream project: what its forge says of it, its latest release's tag, and the top-level build files at that tag.
type ProjectReader ¶
ProjectReader observes an upstream project from its URL.
type Proposal ¶ added in v0.4.0
Proposal is a check proposed and not yet queued: the files captured, and the plan of what it builds.
type PullRequestAdoption ¶
type PullRequestAdoption struct {
Adoption
Title string
Author string
// MaintainerCanModify is whether its author lets maintainers push to
// its branch.
MaintainerCanModify bool
// Head is the commit the branch stands at; empty for a tracked
// branch whose Git branch is gone.
Head model.ObjectID
}
PullRequestAdoption is what adopt --pr did.
type PushKind ¶ added in v0.5.0
type PushKind string
PushKind is what a submission's push would do to the fork's branch: nothing, for someone else's push there, or nothing new; replace it, add to it, or create it.
const ( PushOthersPushed PushKind = "others-pushed" PushNothingNew PushKind = "nothing-new" PushReplaces PushKind = "replaces" PushAdds PushKind = "adds" PushCreates PushKind = "creates" // PushNoFork is no fork found to push to (SubmitPlan.NoFork). PushNoFork PushKind = "no-fork" // PushUnreached is a fork this Mac can't push to (SubmitPlan.Unreached). PushUnreached PushKind = "unreached" )
type Rebased ¶
type Rebased struct {
From, To model.ObjectID
// UpToDate is true when the branch already started from master.
UpToDate bool
Checkpoint *model.Checkpoint
Commits int
// OlderBuilds are the builds the rebased commits name in Generated-By
// other than this one, which a rebase keeps as the commits had them.
OlderBuilds []string
// Replay is what the replay made of each of the branch's commits, in
// order, to its conflict and what it left untried.
Replay []Replayed
// Refused is why rebase wouldn't move the branch, which its plan says
// in its place: uncommitted edits, a merge commit, master having every
// change, or a conflict.
Refused string
}
Rebased is what a rebase did, or what its plan says it would do.
type RefreshResult ¶ added in v0.4.0
type RefreshResult struct {
Branches []Refreshed
Refused error
// Unread counts the pull requests a rate limit left unread, and
// RetryAt is when it lifts; zero where none stopped the refresh.
Unread int
RetryAt time.Time
}
RefreshResult is what reading the pull requests found: each branch's, and Refused, where the forge refused the read altogether, as a revoked login is refused for every pull request: said once, not as each branch's, where it was said five times and status went on to exit 0 (the rc6 full stage, D-C3). What was read before it was refused is kept.
func (RefreshResult) UnreadWords ¶ added in v0.6.0
func (r RefreshResult) UnreadWords() string
UnreadWords say how many pull requests a rate limit left unread, and when it lifts, as the day's look says its own; empty where none did.
type Refreshed ¶
type Refreshed struct {
Branch model.Branch
// Changes say what is new since the last reading, for people.
Changes []string
Err error
}
Refreshed is what reading one pull request found.
type ReleaseUnderMigrationError ¶ added in v0.6.0
type ReleaseUnderMigrationError struct {
*store.ReleaseUnderMigrationError
}
ReleaseUnderMigrationError is a migration Open refused, since a release last opened the database and this build isn't one: it would lock that release out. Options.MigrateRelease is a person's answer to it.
func (*ReleaseUnderMigrationError) Error ¶ added in v0.6.0
func (e *ReleaseUnderMigrationError) Error() string
func (*ReleaseUnderMigrationError) Unwrap ¶ added in v0.6.0
func (e *ReleaseUnderMigrationError) Unwrap() error
func (*ReleaseUnderMigrationError) Working ¶ added in v0.7.0
func (e *ReleaseUnderMigrationError) Working() string
Working says the processes working on the database now, as status does, after a sentence of its own; empty where there are none.
type RenameHeldError ¶ added in v0.4.0
RenameHeldError is a Git rename onto a name another record holds, open or with a pull request, which keeps it: the renamed branch stays untracked under its new name.
func (*RenameHeldError) Error ¶ added in v0.4.0
func (r *RenameHeldError) Error() string
type RenamedPort ¶ added in v0.7.0
type RenamedPort struct {
Port, Name string
// From and To are the port's directories before and after.
From, To string
// Stub is the obsolete stub a rename leaves at From; nil for a move.
Stub *portfile.Stub
// Category says the categories line names the new category first now;
// false where the directory's category didn't change, or no
// categories line named the old one first.
Category bool
// Left are the new Portfile's lines still naming the old name, which
// what the new name implies is the person's to change: a Go module's
// path, a binary's name, notes.
Left []string
// UsesName are the new Portfile's lines that use ${name} or
// ${subport}, which read the new name now, but the name line itself:
// which mean the port and which upstream's files is the person's call,
// so none is changed (rc1's quick stage, G6: jlv's destroot installed
// ${name}, and the binary built was still jlv).
UsesName []string
// Dependents are the ports that depend on the old name, by the port
// index's graph, whose lines are the person's; DependentsProblem why
// they couldn't be read.
Dependents []string
DependentsProblem string
Applied bool
}
RenamedPort is a port's rename or move, as written or, for a plan, as it would be.
type ReplayOutcome ¶ added in v0.8.0
type ReplayOutcome = git.ReplayOutcome
Replayed is what a replay made of one of a branch's commits, and ReplayOutcome which of replay, drop, conflict, or untried (git.Replay).
type Replayed ¶ added in v0.8.0
Replayed is what a replay made of one of a branch's commits, and ReplayOutcome which of replay, drop, conflict, or untried (git.Replay).
type RepositoryMove ¶ added in v0.8.0
type RepositoryMove = upstream.RepositoryMove
RepositoryMove is a repository GitHub answers by another name, and its Words say so.
type Resumed ¶ added in v0.7.0
type Resumed struct {
Branch model.Branch
Run *model.Run
// Problem is why it wasn't queued; HandEdits that its worktree holds
// edits not committed, which are the person's to carry on.
Problem string
HandEdits bool
// Held is a branch ship held before its check, a patch not applying.
Held bool
}
Resumed is a branch serve prepared and never queued a check of, as ResumePrepared found it: the run it queued, or why it was left for the person.
type ReviewCheck ¶ added in v0.8.0
ReviewCheck is review --check's check of the head reviewed: its run, as it ended, and the environments it built on, as checks.DescribeEnvironment says them.
func (ReviewCheck) Words ¶ added in v0.8.0
func (c ReviewCheck) Words() string
Words say the check in a sentence: "Dockhand ran `port lint` and the build in check-12 on tart macOS 15 (Sequoia) arm64, which failed; MacPorts CI runs both too."
type ReviewReport ¶
type ReviewReport struct {
Ref forge.PullRequestRef
Title string
// Author is who opened the pull request, whose Portfiles the review
// evaluates.
Author string
// Login is who would post it, and Permission their role on the
// repository: admin, maintain, write, triage, read, or none, or
// AccessUnknown where the forge wouldn't say.
Login, Permission string
// Head is the commit reviewed; Base where it leaves master.
Head, Base string
// Behind says that master here was behind the pull request's base,
// and where it was reviewed from instead; empty where it wasn't.
Behind string
Commits []git.HistoryCommit
Ports []string
Findings []commitrules.Finding
// Previous is the last review of the pull request, if any, and
// Resolved its findings that no longer hold.
Previous *model.Review
Resolved []model.ReviewFinding
// Upstream is what upstream's change means for each port the pull
// request changes, against its base, assessed as a branch's revision
// is, its patches included; UpstreamUnread why it couldn't be.
Upstream []PortComparison
UpstreamUnread string
// Dependents are the other ports that depend on those it changes, from
// the index at its base: candidates to look at, not proof of anything;
// DependentsUnread why they couldn't be read.
Dependents []treequery.Dependent
DependentsUnread string
// Check is the check review --check made of the head reviewed, which
// the posted text says in place of "Not checked": a failed check's
// review was posted saying Dockhand hadn't built it (Codex's workflow
// review of 1caa6c3d, finding 7). Nil where it made none.
Check *ReviewCheck
}
func (ReviewReport) CanRequestChanges ¶
func (r ReviewReport) CanRequestChanges() bool
CanRequestChanges reports whether the reviewer may request changes: GitHub lets anyone review, but MacPorts reads a request for changes from someone with write or triage access.
func (ReviewReport) Comments ¶
func (r ReviewReport) Comments() []forge.ReviewComment
Comments are the findings on a Portfile line, as comments on that line.
func (ReviewReport) DependentsWords ¶
func (r ReviewReport) DependentsWords() string
DependentsWords says the pull request's dependents in a line, naming the first few with how they depend, and why they couldn't be read where they couldn't; empty where it changes no port that has any.
func (ReviewReport) Markdown ¶
func (r ReviewReport) Markdown() string
Markdown is the review's text as it would be posted. Findings on a Portfile line are also posted as comments on that line.
func (ReviewReport) Summary ¶
func (r ReviewReport) Summary() string
Summary is the review's first line.
func (ReviewReport) UpstreamWords ¶
func (r ReviewReport) UpstreamWords() []string
UpstreamWords are what the assessment of each port found, a line each, naming its port where the pull request changes several.
type RevisionAnalysis ¶ added in v0.5.0
type RevisionAnalysis struct {
Base, BaseTree, Tree model.ObjectID
Paths []string
Scope macports.Scope
}
RevisionAnalysis is what a revision changes against its base, analyzed once and read by its change records, its assessments, and its plan, where each derived it for itself (C1, Codex's review of 386ac2cc, finding 4): the base commit and its tree, the revision's tree, the paths between them, and the ports and _resources those paths reach. It's keyed by tree and base, as the records and assessments are.
func (RevisionAnalysis) Sources ¶ added in v0.5.0
func (a RevisionAnalysis) Sources() [2]model.Source
Sources are the base's source and the revision's, as an evaluation reads each.
type RunLogs ¶
type RunLogs struct {
Run model.Run
Executions []ExecutionLogs
// Progress is what a running run last said of its work, as "macOS 26
// (Tahoe) arm64: building gnome-voice: configure".
Progress string
}
RunLogs are the logs a run's executions left, target by target.
func (RunLogs) Building ¶ added in v0.5.0
Building reports whether the run's progress says it's building port, with the step under way, as the Tart provider says it ("building jq (2 of 5): fetch"; tart.buildingWords): logs of a running target said it "recorded no log", which read as a failure (the gnome-voice session's notes, 2026-10-20).
func (RunLogs) ForPort ¶ added in v0.5.0
ForPort are a check's logs of a port, the one to show first, and the others: where it failed, or its tests did, before where it passed, the latest of those. check-65's libuv-devel failed its tests on macOS 15 and passed on 26, and logs of the port showed 26's, the last (the hugo exercise). It's false where no build of the port left a log.
func (RunLogs) StepLines ¶ added in v0.5.0
StepLines are where a step of a port's build is in its log (the steps its provider recorded, model.LogStep): the line it began on, and the line the next began on, its own next step's, or another target's in the same log, 0 where it ran to the log's end, as FailureLines bounds a failed step. A step that ran more than once is its last run. It's false where the build recorded no such step.
type Scope ¶
Scope is what a set of changed paths touches, by MacPorts CI's rule, which is macports' (macports.ScopeOf).
type SelectPolicy ¶ added in v0.4.0
type SelectPolicy int
SelectPolicy is what a command does where no branch is named.
const ( // SelectExisting finds a branch and starts none: -p names the port's // branch, and else the branch checked out here; a command that reads // or acts on a whole branch. SelectExisting SelectPolicy = iota // SelectOrStart works where the command runs, else in the port's open // branch, and starts one for the port where none changes it: an // authoring command. SelectOrStart )
type Selection ¶ added in v0.4.0
type Selection struct {
Branch model.Branch
Said string
Start *StartRequest
// ForVersion is Start's branch named for the version an update finds,
// started once there's an edit to make (UpdateRequest.Start); its Name
// is empty.
ForVersion bool
Choices []PortBranch
}
Selection is what a Selector found: Branch, an existing branch, with Said, how it was chosen where the first line says it, or, with Start, why the port's branch was passed over, its pull request ended; Start, a branch to start; or Choices, the open branches that change the port, where more than one does, for a person to choose among, or a script to be told.
type Selector ¶ added in v0.4.0
type Selector struct {
Branch string
PR int
Port string
New bool
NewName string
Policy SelectPolicy
}
Selector is which branch a command works in (the command package review's engine.Selector, which part 2's selector rollout wires): Branch, an existing one by its exact name; PR, the one tracking a pull request; Port, the open branch that changes a port, or the port an authoring command works on; New, a new branch, named NewName, or for Port where that's empty; and with none of them, the one checked out here. Policy says whether a branch may be started where none is named.
type ServeCandidate ¶
type ServeCandidate struct {
Branch model.Branch
Plan SubmitPlan
// Held are the concerns it waits for a person over; empty when serve
// may submit it.
Held []model.Concern
}
ServeCandidate is a branch serve prepared whose check passed, and what submitting it would do, or why it is held for a person's look (Design v3 §11's guardrails).
type ServeOptions ¶
type ServeOptions struct {
// Drain runs what is queued now and returns once the queue is empty.
Drain bool
// ShipTo is serve.ship_to: how far serve carries your outdated ports
// each day, list, or one of ship's stages; at submit, a pull request
// for each branch serve prepared whose check passed, at most
// SubmitLimit a day.
ShipTo string
SubmitLimit int
// Outdated is the daily look for new releases of your ports.
Outdated ServeOutdated
// Cleanup turns automatic cleanup on (decision 36), removing what has
// gone unused for CleanupAge.
Cleanup bool
CleanupAge time.Duration
// MinFree is the free space below which cleanup runs at once rather
// than waiting for its day; zero watches none.
MinFree uint64
// Say receives serve's lines, one at a time; Notify, what is worth a
// notification. Either may be nil.
Say func(line string)
Notify func(title, text string)
// Poll, Refresh, and CleanupEvery pace serve: how often it looks for
// work, reads pull requests, and cleans up. Zero means two seconds,
// five minutes, and a day.
Poll, Refresh, CleanupEvery time.Duration
// Now is the clock serve's daily work reads; time.Now when nil.
Now func() time.Time
// Executable is the file serve runs from, which it watches: replaced,
// as port upgrade replaces it, serve finishes its checks and stops,
// and launchd starts the new build. Empty watches none.
Executable string
// Build is the build serve runs, which status shows beside its own.
Build string
// Identity is who the person's GitHub login acts as now, read afresh
// each time (github.IdentityWatcher); serve acts on GitHub only as the
// account it first found. Nil checks nothing.
Identity func(context.Context) (string, error)
// IdentityEvery is how often Identity is read; a minute when zero.
IdentityEvery time.Duration
// ExecutableGrace is how long the executable may be missing before
// serve takes it as uninstalled, past an upgrade's moment between its
// old and new files; a minute when zero.
ExecutableGrace time.Duration
// Settled is called each time the queue empties after work, the day's
// look done and its checks ended, as DOCKHAND_HEAPPROFILE's heap
// profile is taken there; nil calls nothing.
Settled func()
}
ServeOptions are what serve does besides running the queue, as the person's configuration and flags set them (Design v3 §11).
type ServeOutdated ¶
type ServeOutdated struct {
PortSelection
// Hour and Minute are when it looks each day. A check of each checks
// with check.tests (Options.Tests), on build.unattended's profile.
Hour, Minute int
}
ServeOutdated is the daily look serve.ship_to carries, and whose ports it looks at.
type ServeState ¶
type ServeState struct {
Running bool
PID int
OpensPullRequests bool
// Build is the build the leading serve runs, where it said; NotActing,
// why it isn't acting on GitHub, where it isn't; LoginProblem, why it
// couldn't read its login, where it couldn't.
Build string
NotActing string
LoginProblem string
Queue int
Stopped int
}
ServeState is serve's state for the repository, as status show it: whether a serve leads it, as which process, and whether that serve opens pull requests for the updates it prepared that pass; and the checks queued or running, with how many of those have stopped.
func (ServeState) Upgraded ¶ added in v0.4.0
func (s ServeState) Upgraded() (string, bool)
Upgraded is the build a running serve runs where it isn't this process's, as one port upgrade left running (the rc3 full stage, A7); false where it's the same, or unknown.
type Serving ¶
type Serving struct {
PID int `json:"pid"`
SubmitPassing bool `json:"submit_passing"`
Build string `json:"build,omitempty"`
// NotActing is why serve isn't acting on GitHub, as its login stands;
// empty while it acts.
NotActing string `json:"not_acting,omitempty"`
// LoginProblem is why serve couldn't read who its login is, the last
// time it looked; empty when it could.
LoginProblem string `json:"login_problem,omitempty"`
}
Serving is what the leading serve says about itself, for status and queue in other terminals.
type SetAside ¶
SetAside is a version discovery set aside: it compares newer than the port's own, but its tag's commit predates the port's own tag's.
type SetupGit ¶ added in v0.5.0
type SetupGit struct {
Version string `json:"version"`
Path string `json:"path"`
// Source is what named it, "--tool git", "GIT_BIN", or "[tools]
// git"; "PATH" where nothing did.
Source string `json:"source"`
}
SetupGit is the Git dockhand runs.
type SetupReport ¶ added in v0.5.0
type SetupReport struct {
Checkout string `json:"checkout"`
Upstream SetupUpstream `json:"upstream"`
Git SetupGit `json:"git"`
Worktrees string `json:"worktrees"`
MacPorts string `json:"macports"`
Records string `json:"records"`
// Vendoring are go2port and cargo2port, which create and an update's
// Go and Rust vendoring run, each found or not, so a missing one is
// said before serve's next look fails on it (the docs dig's I38).
Vendoring []SetupTool `json:"vendoring"`
// MacPortsSource is what named port-tclsh, where something did, and
// Programs the other programs named that the report has no line of
// its own for, xcodes, gh, patch, diff, and tart, each with its
// source (Options.Named).
MacPortsSource string `json:"macports_source,omitempty"`
Programs []SetupTool `json:"programs,omitempty"`
// Unchosen is where the person hasn't said where worktrees go, by name
// or in the configuration, so Worktrees is the default, which a
// question may change (Choose).
Unchosen bool `json:"-"`
// Remember is the worktrees directory chosen that the configuration
// doesn't keep yet, or empty.
Remember string `json:"-"`
}
SetupReport is what setup finds of the checkout dockhand works on: the main checkout, MacPorts' repository and where master comes from, the Git it runs, where branch worktrees go, the MacPorts prefix whose port-tclsh it evaluates with (empty where there's none), and its records.
func (*SetupReport) Choose ¶ added in v0.5.0
func (r *SetupReport) Choose(directory string)
Choose puts worktrees in directory, the person's answer where setup asked (Unchosen), for the configuration to keep.
type SetupTool ¶ added in v0.7.0
type SetupTool struct {
Name string `json:"name"`
Path string `json:"path,omitempty"`
For string `json:"for,omitempty"`
Source string `json:"source"`
}
SetupTool is a helper dockhand runs, where it was found, or empty, and what it's for.
type SetupUpstream ¶ added in v0.5.0
type SetupUpstream struct {
Repository string `json:"repository"`
Remote string `json:"remote,omitempty"`
FetchedFrom string `json:"fetched_from"`
}
SetupUpstream is MacPorts' repository, the checkout's remote for it where it has one, and where master is fetched from.
type SharedFile ¶
SharedFile is a changed file that ports load rather than own.
type ShellRequest ¶ added in v0.5.0
type ShellRequest struct {
Run model.Run
Release string
Port string
Command []string
// Test copies the port's directory, as it is in the branch's worktree
// now, over the one the check staged, and runs its test phase alone
// again, on the build as it stands: never a result or evidence.
Test bool
Input io.Reader
Output io.Writer
Terminal bool
// Notice hears, before a shell opens in a running check's guest, what
// it leaves as no evidence.
Notice func(string)
}
ShellRequest is a command in a clone a check kept (model.Plan.Keep): the check's, on Release where it kept several, in Port's work directory, the first port it changed where Port is empty. Command is what to run, a shell where it's empty, with Input and Output its streams, on a terminal where Terminal.
type ShipStage ¶ added in v0.4.0
type ShipStage string
ShipStage is how far ship takes a target: committed, checked, or submitted (the command-line UX second look's §6, --to).
type SkippedUpdate ¶
SkippedUpdate is a port left alone, and why.
type SourceArchiver ¶
type SourceArchiver = comparison.SourceArchiver
SourceArchiver writes a Git-fetched port's forge's archive of a commit, for its assessment (comparison.SourceArchiver).
type StartRequest ¶
type StartRequest struct {
// Name is what the person typed; the branch is dockhand/<Name>.
Name string
// Here creates the branch in the person's own checkout, not a managed
// worktree.
Here bool
// Origin is who starts it; a person unless serve does.
Origin model.Origin
// Base is the master commit to start from, fetched moments ago, as an
// update prepared on it was; master is fetched now when empty.
Base model.ObjectID
// Ports are the ports it's started for, which its record keeps
// (model.Branch.Ports).
Ports []string
// Head is the commit the branch starts at, past Base, as start --from
// picks a merged branch's commits onto master (StartFrom); Base where
// empty. Directories are the port directories its worktree checks
// out beside _resources, the ports Head's commits change.
Head model.ObjectID
Directories []string
}
StartRequest asks for a new branch from fresh master.
type StatusReport ¶ added in v0.7.0
type StatusReport struct {
Statuses []BranchStatus
// Links are what each branch's latest check's builds link and don't
// declare, by the check; a check whose links couldn't be read has
// none.
Links map[model.RunID][]LinkFinding
// Lint are what lint warned of in each branch's latest check, for the
// branches status details (the docs dig's I13).
Lint map[model.RunID][]LintFinding
// Installed are what each such check's builds installed and configure
// found against the port's earlier build (InstallChanges), by the
// check, for the branches named alone.
Installed map[model.RunID][]InstallFinding
// Instructions are each branch shown in detail's Portfiles' comments
// that read as a maintainer's instruction (portfile.Instructions), by
// the branch, quoted (the docs dig's I7).
Instructions map[model.BranchID][]string
Serve ServeState
Queue []checks.QueuedCheck
Processes []Process
Changes []buildenv.Change
// Look is serve's last daily look under the selection configured now,
// where it found any port to say (LastOutdatedLook); nil otherwise.
Look *OutdatedLook
}
StatusReport is everything status shows, gathered before anything is rendered, its text and its JSON written from it alone (Then's item 6, C8-6): each branch's status judged once, a stopped check marked, and, for the branches named, which status shows in detail, what their latest checks' builds link and don't declare, which evaluates their Portfiles; and the overview's parts, where asked.
type StatusRequest ¶ added in v0.7.0
type StatusRequest struct {
Branches []model.Branch
States []model.BranchState
Port string
Overview bool
Detail model.BranchID
}
StatusRequest is what status shows: the branches named, else every branch in States touching Port where it names one; and with Overview, serve's state, the check queue, dockhand's processes, and what changed in the providers, which a branch's own status leaves out. Detail names one of the branches in States whose status is shown in detail too, as a branch named is, its extras read in the same request: the console's pane read the branch and a report of its own again at each refresh (#12).
type Stealth ¶
Stealth is a stealth update (Design v3 §6.5): a distfile that changed upstream without a new name. The editor finds and makes it, given the files the branch has changed since its base (Update).
type SubmitEdits ¶ added in v0.4.0
type SubmitEdits struct {
Title, Body bool
}
SubmitEdits are what a submission rewrote of an existing pull request: its title, its description, or both. A pull request whose description is its author's (SubmitPlan.Theirs) is rewritten in neither.
type SubmitPlan ¶
type SubmitPlan struct {
Request SubmitRequest
Branch model.Branch
Commit string
Tree string
Commits []git.HistoryCommit
Ports []string
TestedStale []string
Findings []commitrules.Finding
// LeftOut are uncommitted files --head leaves out.
LeftOut []string
// ChangedPatches are the patches the branch changed under their own
// names, which the base had: a notice, since the upstream assessment
// reads the base's source for them and says nothing of the patch, and
// a check applies it (v0.4.0's known issues).
ChangedPatches []string
// ModifiedBuilds are the commits whose Generated-By names a dockhand
// built from uncommitted source, which nobody else can find: shown,
// so they can be tidied again with a build of a pushed commit.
ModifiedBuilds []string
// UnfoundBuilds are the other builds the commits name in Generated-By
// that nobody else can find either: dockhand's repository on GitHub
// doesn't have what each was built from, or it names nothing. Shown,
// holding nothing, as ModifiedBuilds are.
UnfoundBuilds []UnfoundBuild
// BuildsProblem says why GitHub couldn't be asked about them.
BuildsProblem string
Repository, HeadRepository, PushURL string
// Login is who the submission pushes and writes the pull request as,
// and where its token comes from, which the preview names (the rc9
// full stage's D-C4).
Login forge.Login
// RemoteHead is the fork's branch as it was seen.
RemoteHead git.RefValue
// Replaces is true when the push replaces history rather than adding
// to it.
Replaces bool
// NoFork is true where no fork was found to push to, which holds the
// submission (branchstate.BlockNoFork); Unreached where the fork
// refused this Mac (branchstate.BlockForkUnreached).
NoFork, Unreached bool
// Amended is someone else's commit the push replaces, which the
// branch's reflog shows and the commit amends: said on the preview's
// Push line, as only the reflog vouches for it (the rc5 full stage,
// D-S1).
Amended model.ObjectID
// OthersPushed is what someone else pushed to the pull request since
// dockhand last did, which holds the push; empty where none did.
OthersPushed model.ObjectID
// Existing is the pull request already open for the branch.
Existing *forge.PullRequestObservation
// Earlier is a pull request from the same head branch name that is
// closed or merged, which isn't the branch's: a new one opens beside
// it, and the preview says so.
Earlier *forge.PullRequest
Title string
Body string
// BodyKept is true when a person's edits to the description are kept
// as they are.
BodyKept bool
// Sections are what submitting again does to each part of an existing
// pull request's description that dockhand writes; zero for a new one.
Sections DescriptionSections
Evidence *Evidence
// AtBase are the changed builds that failed whose baseline fails them
// the same way, each by its ID with the baselines that did: --accept takes
// them, and the pull request says so (the person's word, 2026-10-17).
AtBase map[string][]string
// Accepted are the failed ports the submission accepts, each with why,
// as the pull request's table and the preview's Checks line say it:
// its baseline failing alike, the cause not established, or blocked
// only by accepted failures.
Accepted map[string]AcceptedFailure
// Accept are the builds --accept took, by ID, as AcceptTarget resolved
// each name given when it was given: what the submission records, so a
// bare name doesn't come to take a build a later check fails (#235).
Accept []string
// Blocks are what stops the submission, each of its kind
// (branchstate.Block), whose words Blocking says.
Blocks []branchstate.Block
// Standing are the standing decisions --standing asks for, which the
// submission records; StandingAccepted the failed ports a standing
// decision accepts, recorded or asked for.
Standing []model.Decision
StandingAccepted map[string]AcceptedFailure
// UncoveredCI are the releases MacPorts' CI builds on that the check
// built on none of, which the preview and the pull request say.
UncoveredCI []string
// Upstream is what upstream's change means for each port the commit
// changes, against the branch's base: its revision's assessments,
// collected where they weren't recorded (the assessment design, D). A
// person's submission shows them; only one nobody looks over is held
// for them (D4).
Upstream []PortComparison
// Searched are the ports other pull requests were looked for under:
// the ports whose source changed, terraform-1.16, rather than the
// directory's terraform (batch 40); the directories' names where none
// did.
Searched []string
Others []forge.PullRequestSummary
// SearchProblem says why other pull requests could not be looked for.
SearchProblem string
// Moved are the Git-fetched ports whose git.branch named another
// commit when the check the submission rests on planned it than when
// their update chose it (preparedSources), or names another now than
// then (movedSources).
Moved []model.Concern
// Majors are the major-version holds of the branch's updates
// (holds.majors), and Floors where it raises the oldest macOS a port
// builds on, each of which holds a submission nobody looks over.
Majors []model.Concern
Floors []model.Concern
// Undeclared are the libraries its check's builds link from a port
// they don't declare in depends_lib, each of which holds a submission
// nobody looks over (linkHolds).
Undeclared []model.Concern
// Unlinked are the declarations in depends_lib nothing its check's
// builds link, notices that hold nothing (unlinked-dependency).
Unlinked []LinkFinding
// Decided are the person's decisions on its concerns that stand for
// its files, by subject (the person's voice): an acceptance lets its
// concern go for a submission nobody looks over, said, and given in
// the description; one awaiting something blocks it.
Decided map[string]model.Decision
// Prereleases say each update that takes a port from a stable version
// to a prerelease (LeavesStableWords), which holds nothing.
Prereleases []string
// After are the holds of a port whose holds name ports to submit
// first, at the same version (afterHolds).
After []model.Concern
// Blocking is what stops the submission.
Blocking []string
// CheckNeeded is true when a PendingCheck plan has no check for its
// files yet, or only one that built them somewhere they're required.
CheckNeeded bool
// Theirs is true for a pull request someone else opened: submit only
// pushes to it, and never rewrites its title or description.
Theirs bool
// Retitled is true where the open pull request's title is dockhand's,
// taken from the commits it last pushed, and Title is the one its
// commits give now (title).
Retitled bool
// Note is the person's note the description gives under Description:
// the one the request gives, or the branch's, trimmed and with Unix
// line endings. NoteLeftOut is true when the description won't give
// it, since its Description is a person's own, edited since dockhand
// wrote it or left out, which submit keeps as it is.
Note string
NoteLeftOut bool
// Written is what dockhand has written of Body, recorded as what it
// last wrote: Body, but each part kept as someone's own carries
// dockhand's last text of it (prdescription.Written).
Written string
// contains filtered or unexported fields
}
SubmitPlan is exactly what submit would do, bound to the branch head and the fork's branch head it saw.
func (*SubmitPlan) Answer ¶
func (p *SubmitPlan) Answer(testedBinaries, testedVariants bool)
Answer records the person's statements for the template's last two items, which only they can make, and writes the description again.
func (SubmitPlan) Concerns ¶
func (p SubmitPlan) Concerns() []model.Concern
Concerns are what a submission would wait on a person's look for, were nobody to look it over (the assessment design, E), each once: what its assessments found that a passing build can't catch, or couldn't check (D4); a Git-fetched source whose tag moved between its update, its check, and now (Moved); a commit-rule error; and another open pull request for its ports, or not knowing whether there is one. A person's own submission shows them and goes ahead, and each kind of submission keeps its own rules over its evidence (§3's publication rule).
func (*SubmitPlan) Describe ¶
func (p *SubmitPlan) Describe(body string)
Describe replaces the description with one the person wrote, which gives their note however they left it.
func (SubmitPlan) DescriptionSaysNothing ¶
func (p SubmitPlan) DescriptionSaysNothing() bool
DescriptionSaysNothing reports a Description dockhand writes that would say nothing of the change (prdescription.SaysNothing), for submit to point at --note; one a person keeps is theirs.
func (SubmitPlan) ForkOwner ¶ added in v0.4.0
func (p SubmitPlan) ForkOwner() (owner string, another bool)
ForkOwner is the account that owns the repository the submission pushes to, and whether it isn't the login's own: a fork's owner check gives way under DOCKHAND_PULL_REQUESTS's sandbox and to --remote, so GitHub's permission is all that lets the login push there, and the pull request is the login's, not the owner's (the rc9 full stage's D-C4). Pushing to someone else's pull request (Theirs) is that already, and isn't another.
func (SubmitPlan) Head ¶
func (p SubmitPlan) Head() string
Head is the fork's head as "owner/repo:branch".
func (SubmitPlan) Held ¶ added in v0.5.0
func (p SubmitPlan) Held() []model.Concern
Held are the concerns a submission no person looked over waits for one over (Design v3 §11's guardrails): what blocks it, and its concerns, as dockhand bump's and serve's alike, for a branch of any origin. It was Engine.Held, with a context it ignored and an error always nil (the architecture review of 5897a82, R3-10's signature).
func (SubmitPlan) NoteKept ¶ added in v0.3.1
func (p SubmitPlan) NoteKept() bool
NoteKept reports a note from an earlier submit, which this one keeps, across rewritten commits too, since no --note was given.
func (SubmitPlan) NoteRepeatsCommits ¶ added in v0.3.1
func (p SubmitPlan) NoteRepeatsCommits() bool
NoteRepeatsCommits reports a note that mostly repeats the commits' bodies, which the Description gives already (prdescription).
func (SubmitPlan) Push ¶ added in v0.5.0
func (p SubmitPlan) Push() PushKind
Push is what the plan's push would do, the one reading of its remote head, which submit's preview and its JSON word (part 4, item 2). What a block holds isn't said as what the push would do (the rc6 full stage, D-S1: "replaces the fork's branch at d2b5022 …").
func (SubmitPlan) RemoteBranch ¶
func (p SubmitPlan) RemoteBranch() string
RemoteBranch is the fork's branch submit pushes to: the one the pull request was opened from, which renaming the local branch does not move (a pull request's head can't change), else the branch's own name.
func (SubmitPlan) ToDraft ¶ added in v0.7.0
func (p SubmitPlan) ToDraft() bool
ToDraft reports whether a draft submission returns its open pull request to draft before it pushes: a draft request lets failing or unchecked work through, which only a pull request that is a draft may carry, and an update edited only the title and body, so failing work reached a ready pull request (Codex's review of 2ad896d2, W3). The forge leaves one already a draft as it is.
func (SubmitPlan) WasDraft ¶ added in v0.7.0
func (p SubmitPlan) WasDraft() bool
WasDraft reports whether the branch's record says its pull request is a draft, as dockhand made it or last read it.
type SubmitRequest ¶
type SubmitRequest struct {
Branch model.Branch
// Head submits the committed head and leaves uncommitted edits out.
Head bool
// Draft opens the pull request as a draft, which unfinished or failing
// checks allow.
Draft bool
// Bound is the commit a caller bound the submission to, as ship binds
// the one its check was of; ApplySubmit refuses another (branchstate
// .Publish). Empty where none was.
Bound string
// NoCheck submits without any check; the description says so.
NoCheck bool
// PendingCheck previews a submission whose check is still to run, for
// ship, which checks first: having none yet does not stop it. Where and
// Tests are where and with what tests that check was asked to build,
// none where it wasn't: a finished check stands for the ask only where
// it covers them (Covered), else CheckNeeded (the architecture review
// of 5897a82, R3-8).
PendingCheck bool
Where WhereRequest
Tests model.TestPolicy
// Accept acknowledges failed revision-only targets or extras by port.
Accept []string
// Standing accepts each port Accept names whose every failure is a
// dependency failing to install, by the dependency's version on the
// image it failed on, for every branch until either changes.
Standing bool
// Title replaces the branch's title, and the pull request's.
Title string
// Types are the template's Type(s) that apply.
Types []string
// Remote names the Git remote of your fork when more than one could be.
Remote string
SkipNotification bool
// TestedBinaries and TestedVariants are the person's statements for
// the template's last two items; WithdrawBinaries and WithdrawVariants
// are their saying no, --tested-binaries=false, which removes a kept
// statement, where saying nothing keeps it (#153).
TestedBinaries, TestedVariants bool
WithdrawBinaries, WithdrawVariants bool
// Rewrite replaces an open pull request's description with the one
// dockhand composes, a person's own included, their note kept: an
// adopted branch's description, which nothing recorded dockhand
// writing, is otherwise theirs and stays (#34756 kept September's
// Tested on under the v0.3.0 commit). Never someone else's.
Rewrite bool
// Note replaces the branch's note, which the description gives under
// Description (model.Branch.Note), and empty clears it; nil keeps the
// one recorded. It is recorded once the submission is applied.
Note *string
}
SubmitRequest asks to open or update a branch's pull request (Design v3 §9).
type Submitted ¶
type Submitted struct {
PullRequest forge.PullRequest
Created bool
Pushed bool
Edited SubmitEdits
// Drafted is an open pull request returned to draft before the push.
Drafted bool
}
Submitted is what submit did: the pull request it opened or updated, and whether it pushed, and rewrote an existing one's title or description.
type TakenError ¶ added in v0.4.0
TakenError is a name a tracked branch holds, which start can't take, with what fits the record: an open one is worked in, an archived one without a pull request can be renamed aside (RenameArchived), and the rest keep the name (the rc8 full stage's B10).
func (*TakenError) Error ¶ added in v0.4.0
func (t *TakenError) Error() string
type TargetEvidence ¶
type TargetEvidence = evidence.TargetEvidence
What recorded checks establish is the evidence package's to say (the architecture review's finding 4); the engine loads the records it reads, asks providers what each environment is now, and words what it says. Its types keep their names here, for the commands that read them.
type TestedSaid ¶ added in v0.8.0
type TestedSaid struct {
Binaries, Variants, WithdrawBinaries, WithdrawVariants bool
}
TestedSaid is what a person said of the template's last two items: that they tested the binaries and the variants, or, withdrawing, that they didn't (--tested-binaries=false).
type TidyGroup ¶
type TidyGroup struct {
// Directory is the port directory the commit changes; empty for files
// outside any port, or for a squash.
Directory string
// MovedFrom is the base's directory of a port the commit moves to
// Directory, whose removal the commit carries too.
MovedFrom string
// RenamedFrom is the old name of the port the commit renames, its
// first: as its change record says (macports.PortTransition), or else
// the name of the directory it moves from, where that differs.
RenamedFrom string
Ports []string
Paths []string
Message string
// Combines are the branch's existing commits it takes changes from.
Combines []git.HistoryCommit
// Working is true when it includes edits not yet committed.
Working bool
Author git.Signature
// FromEdits is true when its files are exactly what dockhand's
// authoring commands wrote, and its subject the one they wrote.
FromEdits bool
// From is the tree the commit's files are taken from, where they
// aren't the working files': an update step's, one of several
// updates in a directory made a commit each (updateSteps). Empty for
// the rest.
From string
// Created is a new port this branch's create wrote, edited by hand
// since, as create asks: its edits are the port's, and create's
// subject still names the commit, though it isn't dockhand's alone.
Created bool
// Notes say why it needs a person's review.
Notes []string
// HandEdit is the hand edit's line where the commit holds one, which
// Notes says too (branchstate.Group.HandEdit).
HandEdit string
// Blocking are what must be settled before it can be applied.
Blocking []string
// contains filtered or unexported fields
}
TidyGroup is one proposed commit.
func (*TidyGroup) SetSubject ¶ added in v0.4.0
SetSubject replaces the commit's subject, keeping the rest of its message, and settles what a missing subject blocked; the message is a person's now, not dockhand's authoring commands'.
func (TidyGroup) Trailers ¶ added in v0.8.0
Trailers are the lines of a group's message's trailer paragraph (commitmsg.SplitTrailers): those it keeps, Closes:, See:, and the attribution trailers a person wrote, and dockhand's own Generated-By, which it adds, or keeps where a commit it combines carried it.
type TidyPlan ¶
type TidyPlan struct {
Branch model.Branch
// Base and Head are commits; Final is the tree the series ends at,
// the working files as they were captured, and BaseTree the base's.
Base, Head, Final, BaseTree string
// Index is the index's tree when the plan was made. Applying refuses
// if it has changed, since something was staged that the plan never
// saw, and the checkpoint keeps it (Design v3 §8).
Index string
History []git.HistoryCommit
Groups []TidyGroup
// Keep is true when the history already has a good shape and nothing
// is uncommitted.
Keep bool
// Findings are problems in the files that the plan leaves for the
// person to fix.
Findings []commitrules.Finding
// Warnings are what MacPorts' commit rules warn of in the commits as
// they are, as submit says them: a plan that would keep the commits
// can still be saved, for their messages to be rewritten.
Warnings []commitrules.Finding
// Taken are the untracked files a changed port's patchfiles names,
// which the plan commits with the port; LeftOut the other untracked
// files in a changed port's directory, which it doesn't; Ignored the
// files patchfiles names that Git ignores, left out as git add leaves
// them (tidyWorkingFiles).
Taken, LeftOut, Ignored []string
// Fixed are the lint findings the plan fixes on the lines the branch
// adds or alters, as dockhand's own edits, each with its Portfile
// (tidyWorkingFiles); applying commits them and writes them into the
// working files.
Fixed []string
// Declare is the commit after the groups that declares what the
// branch's passed check found its builds link and not declare
// (declareTidy), Declared the tree it ends at, and Declarations its
// lines; nil where it declares nothing. NotDeclared say the findings
// it leaves to the person, and why.
Declare *TidyGroup
Declared string
Declarations []Declaration
NotDeclared []string
// Restyle is the commit --restyle makes after the groups, of the
// Portfiles it restyles, and Restyled the tree it ends at, Final's
// with them; nil where nothing is restyled. NotRestyled say the
// Portfiles it leaves as they are, and why.
Restyle *TidyGroup
Restyled string
NotRestyled []string
// PathStyle is --restyle's commit after Restyle, of the port:
// dependencies it writes path-style, and PathStyled the tree it ends
// at; nil where it writes none. pathStyled are its edits of the
// working files, restyled.
PathStyle *TidyGroup
PathStyled string
// contains filtered or unexported fields
}
TidyPlan is a proposed series of commits for a branch, bound to the branch head and working files it was made from.
func (TidyPlan) Gate ¶ added in v0.5.0
func (p TidyPlan) Gate() branchstate.Plan
Gate is the plan as the verdict on committing it reads it (branchstate.Plan), where the plan judged itself.
func (TidyPlan) ModifiedBuild ¶
ModifiedBuild reports whether the plan's commits name, in Generated-By, a dockhand built from uncommitted source, which nobody else can find.
func (TidyPlan) OlderBuilds ¶
OlderBuilds are the builds the branch's commits name in Generated-By other than this one: a commit tidy leaves as it is keeps its line, and one it writes names this build.
func (TidyPlan) Regroup ¶
Regroup rearranges a plan's commits (Design v3 §8's "Change groups"): spec lists the new commits in order, each one or more of the plan's numbered commits joined by "+", such as "2 1+3". Every commit is named once. A commit made of several takes the first one's message, and author, when their authors differ, the one given as "Name <email>".
func (TidyPlan) Save ¶
Save writes the plan as a TOML file a person can review, edit, and apply with LoadTidyPlan.
func (TidyPlan) Series ¶ added in v0.8.0
Series are the plan's commits in the order applying it writes them: its groups, its declaration, then --restyle's whitespace and path-style commits.
func (TidyPlan) Subjects ¶ added in v0.5.0
Subjects are the subjects the branch is committed with once the plan is applied: its commits' where it keeps them, else its groups'.
func (TidyPlan) Unambiguous ¶
Unambiguous reports whether the plan may be applied without review (branchstate.Plan.Unambiguous).
type TidyRequest ¶
type TidyRequest struct {
Branch model.Branch
// Squash makes one commit of the whole branch, with Message.
Squash bool
Message string
// Author attributes a commit that combines several people's commits,
// as "Name <email>".
Author string
// Restyle restyles whole each Portfile the branch changes, in a
// commit of its own, last (restyleTidy).
Restyle bool
}
TidyRequest asks what a branch's commits should be (Design v3 §8).
type TidyResult ¶
type TidyResult struct {
Checkpoint model.Checkpoint
Commits []string
// Kept is how many of the leading commits are the branch's own, as
// they were, since tidy wouldn't change them.
Kept int
// Narrowed are the directories a worktree dockhand made was narrowed
// to leave out again, once nothing of the branch's is in them.
Narrowed []string
}
TidyResult is what applying a plan did.
type UncertainRelease ¶
type UncertainRelease = upstream.UncertainError
UncertainRelease is an update's refusal to choose a release where discovery set a newer one aside and found nothing newer beyond it: the update needs the version named.
type Uncommitted ¶ added in v0.5.0
Uncommitted is a submission of a branch whose edits aren't committed, Paths, or that has no commits above master yet. submit commits them as tidy would, previewed as tidy previews them, and submits those commits (Design v3 §3's chaining, where it refused and named tidy); a submission of the committed head alone takes --head.
func (*Uncommitted) Error ¶ added in v0.5.0
func (u *Uncommitted) Error() string
type UnfoundBuild ¶
type UnfoundBuild struct {
// Build is the build as the trailer names it.
Build string
// Commits are the branch's commits naming it.
Commits []string
// Source is what GitHub was asked for; neither field, for a build
// that names nothing to ask about.
Source buildinfo.Source
}
UnfoundBuild is a dockhand build a branch's commits name in Generated-By that nobody else can find: dockhand's repository on GitHub doesn't have the commit or the release it names, or it names neither, recording no revision.
type Unlocated ¶
Unlocated is a checksum declaration dockhand can't find in the Portfile to edit, an unsupported edit that names the archive and why.
type UntrackedError ¶ added in v0.4.0
type UntrackedError struct{ Name string }
UntrackedError is a checkout on a Git branch dockhand doesn't track, which adopt tracks.
func (*UntrackedError) Error ¶ added in v0.4.0
func (u *UntrackedError) Error() string
func (*UntrackedError) Unwrap ¶ added in v0.4.0
func (u *UntrackedError) Unwrap() error
type UntrackedPatchError ¶ added in v0.5.0
type UntrackedPatchError struct {
Port string
Path string
// Ignored is true where Git ignores it.
Ignored bool
}
UntrackedPatchError is a check refused before any VM starts, since a changed port's patchfiles names a file the capture doesn't hold: one Git doesn't track, or one it ignores, which --include can't take.
func (*UntrackedPatchError) Error ¶ added in v0.5.0
func (u *UntrackedPatchError) Error() string
type Update ¶
type Update struct {
Branch model.Branch
// Base is the commit the update was prepared on: the branch's base, or
// master as fetched for a plan from master.
Base model.ObjectID
// Port is the name the Portfile evaluates to.
Port string
Before, After PortVersion
// CrossesMajor is an update to a new major version, semgrep's 0.14.0
// to 1.179.0, which read as a plain bump (field testing, 2026-10-02).
CrossesMajor bool
// LeavesStable is an update from a stable version to a prerelease,
// jq's 1.8.1 to 2.0-rc1, which only a version the person names takes
// (the docs dig's I32); LeavesStableWords say it.
LeavesStable bool
// ClosedBefore says an earlier update of the port to this version was
// closed unmerged, which an attended update goes ahead of and says,
// and an unattended look doesn't propose again (the docs dig's I1);
// empty where none was.
ClosedBefore string
// Release is where a bump found its version.
Release *model.Release
// Files are the paths the edit changes, sorted.
Files []string
// Diff is the edit as a patch.
Diff string
// Subject is the commit subject the edit would be committed with.
Subject string
// Obsolete is the obsolete stub the Portfile keeps for the port, where
// it has one: replaced_by the port, fetching nothing, and whether the
// update moved it too (WithObsolete).
Obsolete *ObsoleteStub
// Distfiles counts the port's archives whose checksums were written,
// and Regenerated the dependency blocks written again, a Git crate's
// archive among them, each with its entries.
Distfiles int
Regenerated []editprep.Regenerated
// Compared counts the distinct archives a checksum refresh fetched to
// compare, and ChecksumsLeft what it left as it was, with why.
Compared int
ChecksumsLeft []editprep.ChecksumLeft
// Differing are the archives whose checksums weren't as the Portfile
// declared them, for a checksum refresh.
Differing []string
// PatchProblems name the port's patches that no longer apply, and
// PatchesUnchecked those no check reached before the build;
// PatchesApplied counts those checked that apply.
PatchProblems []string
PatchesUnchecked []string
PatchesApplied int
// MissingWorksrcdir is the worksrcdir the new source doesn't hold, said
// before the patches, whose results follow from it; empty where it
// holds it.
MissingWorksrcdir string
// Instructions are the Portfile's comments that read as a maintainer's
// instruction about updating it (portfile.Instructions), each with its
// line: quoted, never read for intent (the docs dig's I7).
Instructions []string
// PatchesDropped are the patches the update took out, with their
// files, since the new source already holds them; PatchesRefreshed
// those it re-emitted to apply as written, each with what it did.
PatchesDropped []string
PatchesRefreshed []string
// Current is true when there was nothing to change.
Current bool
// Started is true when the update started its branch
// (UpdateRequest.Start).
Started bool
// Applied is true when the working files were written.
Applied bool
// HandEdit is the refusal a hand edit's attempt was written for, in
// its words (update --hand-edit): the files are the person's to
// finish, recorded as theirs, not as dockhand's edit.
HandEdit string
// Left is what the hand edit's attempt couldn't write, with why.
Left []editprep.ChecksumLeft
// Upstream is what comparing the old and new upstream archives found,
// when the update compared them.
Upstream *model.UpstreamComparison
// Others are the port's other open pull requests, where the update
// looked for them (UpdateRequest.LookForOthers).
Others []forge.PullRequestSummary
// Renamed is the GitHub repository the update's release came from as
// GitHub names it now, where that's another name than the Portfile's:
// returntocorp/semgrep answered as semgrep/semgrep, by a redirect
// discovery follows unsaid (field testing, 2026-10-02). Empty where
// it's the same, or couldn't be asked.
Renamed string
// Followed is the repository github.setup was pointed at, where the
// update followed a move (FollowMoves).
Followed string
// RenamedFrom is the branch's name before the update renamed it for
// the version it now moves to; empty where it wasn't renamed.
RenamedFrom string
// HTTPS are the plain-HTTP links the edit switched to https, which
// answered there (portedit.HTTPSAnswers).
HTTPS []PlainURL
// PlainHTTP are the port's URLs still over plain HTTP after the edit,
// homepage, master_sites, and livecheck.url, each with whether its
// https form answers, since MacPorts prefers HTTPS: one that doesn't,
// or one the Portfile writes through a variable, which the edit leaves.
PlainHTTP []PlainURL
// Stealth is a checksum refresh's stealth update, when it found one.
Stealth *Stealth
// DistSubdirRemoved is true when a version update removed the
// dist_subdir an earlier stealth update set.
DistSubdirRemoved bool
// Fixed are the lint findings the edit fixed on the lines it wrote,
// each in words: whitespace, a swallowing continuation, a lone
// openmaintainer, and a version update's move from GitHub's tarball.
Fixed []string
// contains filtered or unexported fields
}
Update reports an update or checksum refresh.
type UpdateRequest ¶
type UpdateRequest struct {
Branch model.Branch
// Batch is one port's update among several, which no person is at
// for this one: it keeps no branch for an edit by hand (HandBranch).
Batch bool
// Action is model.EditUpdate, a new version; model.EditChecksums, the
// checksums of the version the Portfile names; or model.EditRevbump, a
// new revision. The edit it records is of the same kind.
Action model.EditKind
Port string
// Version is the release a bump moves to; the newest when empty.
Version string
// Release is that release where it was found already, as outdated
// finds one: the update takes it rather than asking upstream again,
// and checks it against the Portfile as any. Its version is Version's.
Release *model.Release
// EditIntent is what the person authorized for the edit, which it
// records: SharedRelease moves every subport that shares the port's
// release, and KeepOldChecksums refreshes a legacy checksum group's
// values in place (the architecture review's C4c: embedded, not
// copied field by field).
model.EditIntent
// Closes are the Trac tickets the update closes, by number, which the
// branch keeps for tidy's Closes: trailer (the docs dig's I41).
Closes []string
// Subject is the reason for a revision bump, the commit subject after
// the port's name: "rebuild for poppler 25.09.0"; Excepted are the
// dependents --except left out of the same rebuild, which its edit
// keeps for the pull request's description.
Subject string
Excepted []string
// Plan prepares the edit and changes nothing.
Plan bool
// FromMaster plans against master as fetched now, with no branch: a
// look before starting one. It goes only with Plan.
FromMaster bool
// Start, for a version update, prepares it against master as fetched
// now and starts this branch from that master only once there is an
// edit to make: a port already current starts nothing. An edit
// dockhand can't make by itself starts it too, for the person to make
// by hand. It takes the place of Branch.
Start *StartRequest
// Started is a branch started for this update before it was asked,
// which an update that doesn't go keeps (refusedUpdate).
Started bool
// KeepRevision leaves the revision of a stealth update as it is, for a
// change that needs no rebuild.
KeepRevision bool
// CompareUpstream fetches the current version's archives beside the
// new ones and compares them, for a version update (Design v3 §6.12).
CompareUpstream bool
// LookForOthers names the port's other open pull requests, for a
// version update, as submit's preview does: someone starting an update
// should hear of one in flight. It's looked for beside the edit, and
// holds nothing, stops nothing, and says nothing where the search
// failed (Engine.OtherPullRequests).
LookForOthers bool
// Unattended is a version update no person looks over before it is
// submitted, bump's. It looks for the port's other open pull requests
// once its release is found and before it prepares the edit, and is
// held there on one, or on not knowing (HeldBeforeEdit), since either
// would hold the submission after the check: nothing is downloaded or
// built for it. Submit looks again before publishing.
Unattended bool
// HandEdit asks, where dockhand refuses the update as an edit it
// doesn't make, for its best attempt, written as the person's hand edit
// with the refusal recorded (model.FindingHandEdit). Attended only:
// serve and bump never take it.
HandEdit bool
// FollowMoves points github.setup at the repository GitHub now answers
// the release's by, where it moved: the person's choice, never made
// unasked (part 2's new holds), save by the port's own holds, moves =
// "follow", for an unattended update, standingFollow, which never
// follows a port rename (portRename).
FollowMoves bool
// WithObsolete also moves the obsolete stub the Portfile keeps for the
// port, one replaced_by it that fetches nothing, to the same version,
// in the same commit: terraform beside terraform-1.16, whose version
// follows the newest subport's by convention (field testing,
// 2026-10-02, the person's word).
WithObsolete bool
// contains filtered or unexported fields
}
UpdateRequest asks to edit one port's files in a branch's worktree.
func (UpdateRequest) HandBranch ¶ added in v0.5.0
func (r UpdateRequest) HandBranch() bool
HandBranch reports whether a Start request starts its branch for an edit dockhand can't make, for the person to make it by hand: a person's own update does, and one nobody looks over, or one of a batch, leaves nothing (field testing's cleanup, af03bbab: pgdog, reposurgeon, and termusic each left an empty branch status listed for hours). The one decision of it, for serve's ship and the command's (the architecture review of 5897a82, R3-11).
type VariantBuild ¶ added in v0.8.0
type VariantBuild = evidence.VariantBuild
What recorded checks establish is the evidence package's to say (the architecture review's finding 4); the engine loads the records it reads, asks providers what each environment is now, and words what it says. Its types keep their names here, for the commands that read them.
type Vocabulary ¶ added in v0.5.0
type Vocabulary struct{}
Vocabulary words what branchstate's sentences name, as the engine words each (branchstate.Vocabulary).
func (Vocabulary) CIFailure ¶ added in v0.5.0
func (Vocabulary) CIFailure(failure model.CIFailure) string
func (Vocabulary) CIPorts ¶ added in v0.7.0
func (Vocabulary) CIPorts(failures []model.CIFailure) string
func (Vocabulary) Environment ¶ added in v0.5.0
func (Vocabulary) Environment(environment model.Environment) string
func (Vocabulary) Holds ¶ added in v0.5.0
func (Vocabulary) Holds(concerns []model.Concern) []string
func (Vocabulary) Remade ¶ added in v0.5.0
func (Vocabulary) Remade(target TargetEvidence) string
type Where ¶ added in v0.4.0
type Where struct {
Profile string
Environments []model.Environment
Span bool
Asked bool
}
Where is where a check builds: the environments, the profile that named them, empty where --on did, whether each port builds only on its oldest and newest of them (minmax), and whether the person named them, with --on or --build (WhereRequest.explicit), which the plan keeps for submit (D17).
type WhereRequest ¶ added in v0.4.0
WhereRequest is how a check was told where: --on's explicit environments, else --build's profile, else build.unattended for a check nobody looks over before it's submitted, and build.default for the rest (the command package review's CheckDefaults, which build profiles are).
type Work ¶ added in v0.5.0
type Work string
Work is what a command does in the branch it selects, which names a branch started for the port (NameFor) and says the work where a refusal does; WorkNone starts none (the architecture review of 5897a82, R3-25: a name suffix, a "version" sentinel, and a purpose string were passed beside each other).
const ( // WorkNone reads or acts on a branch, and starts none. WorkNone Work = "" // WorkUpdate is a version update, whose branch is named for the // version it finds, once it does (Selection.ForVersion). WorkUpdate Work = "update" WorkEdit Work = "edit" WorkChecksums Work = "checksums" WorkRevbump Work = "revbump" WorkCreate Work = "create" )
Source Files
¶
- archivediff.go
- archives.go
- assessment.go
- baseline.go
- body.go
- branches.go
- builders.go
- capture.go
- changes.go
- checkservice.go
- ci.go
- cifailure.go
- clean.go
- cleanup.go
- collector.go
- create.go
- decide.go
- declare.go
- diff.go
- disk_unix.go
- distributable.go
- engine.go
- estimate.go
- evidence.go
- follow.go
- followup.go
- forge.go
- forget.go
- handedit.go
- history.go
- https.go
- installed.go
- links.go
- maintainer.go
- merge.go
- others.go
- outdated.go
- plan.go
- policy.go
- portrename.go
- ports.go
- preparer.go
- processes.go
- profile.go
- provenance.go
- provider.go
- recovery.go
- refused.go
- renames.go
- restore.go
- restyle.go
- retention.go
- review.go
- revision.go
- runner.go
- scope.go
- selector.go
- serve.go
- servesubmit.go
- session.go
- setup.go
- shell.go
- ship.go
- status.go
- statusreport.go
- stealth.go
- submit.go
- tidy.go
- tidyplan.go
- tidysteps.go
- trust.go
- unindexed.go
- update.go
- verbs.go
- words.go