Documentation
¶
Overview ¶
Package orchestrate runs typed repository mutations through isolated worktrees, local verification, and optional GitHub publication stages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCanonical ¶
func EnsureCanonical(ctx context.Context, repository Repository, canonical string, options Options) error
EnsureCanonical clones a missing repository, fetches origin, and verifies the configured base ref without checking out or modifying the canonical tree.
Types ¶
type Assessment ¶
Assessment is adapter-owned planning metadata plus an execution decision.
type Handler ¶
type Handler[T any] interface { Inspect(context.Context, string, string, Repository) (Assessment[T], error) Apply(context.Context, string, Repository) (T, error) ValidatePublishable(context.Context, string, Repository) error CommitMessage(Repository) string PullRequest(Repository) (title, body string) }
Handler supplies mutation policy while Engine owns repository lifecycle.
type OperationLock ¶
type OperationLock struct {
// contains filtered or unexported fields
}
OperationLock prevents two processes from mutating the same operation worktrees. Higher-level planners may hold a campaign lock while individual lifecycle runs also protect their wave directories.
func AcquireOperationLock ¶
func AcquireOperationLock(githubDir, operation string) (OperationLock, error)
AcquireOperationLock creates an exclusive lock below the operation root.
func (OperationLock) Release ¶
func (lock OperationLock) Release()
Release removes the operation lock. It is safe to call from defer.
type Options ¶
type Options struct {
GitHubDir string
Operation string
Branch string
Ref string
Parallel int
DryRun bool
Resume bool
Verify bool
Checks []quality.Check
Timeout time.Duration
Retry int
// CheckPollInterval overrides the GitHub-check polling delay. A zero value
// uses the production default. It is primarily useful for deterministic
// lifecycle tests.
CheckPollInterval time.Duration
Commit bool
Push bool
PR bool
Merge bool
}
Options controls a repository operation independently of mutation policy.
type RemoteCheck ¶
type RemoteCheck struct {
Name string `json:"name" yaml:"name"`
Bucket string `json:"bucket" yaml:"bucket"`
Link string `json:"link,omitempty" yaml:"link,omitempty"`
}
RemoteCheck is the normalized GitHub check state observed before merge.
type Repository ¶
Repository identifies a canonical clone selected by command-level discovery.
type Result ¶
type Result[T any] struct { Repository string CanonicalDir string WorktreeDir string Branch string Ref string Status string Reason string Metadata T ChangedFiles []string Verifications []quality.VerificationEntry Commit string Pushed bool PR string Checks []RemoteCheck Merged bool }
Result records lifecycle state and typed adapter metadata for one repository.