Documentation
¶
Index ¶
- func FailedWorkResultFromPreparation(dispatchID string, transitionID string, start time.Time, err error) interfaces.WorkResult
- func ResolveFactoryWorktreeCheckoutPath(factoryRoot, worktreeName string) (string, error)
- func ResolveFactoryWorktreeParent(factoryRoot string) (string, error)
- func ShouldPrepareFactoryWorktreeForCodex(executionModelProvider string, authoredWorkingDirectory string, ...) bool
- type ExecGitCommander
- type GitCommander
- type PrepareFactoryGitWorktreeResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailedWorkResultFromPreparation ¶
func FailedWorkResultFromPreparation( dispatchID string, transitionID string, start time.Time, err error, ) interfaces.WorkResult
FailedWorkResultFromPreparation maps a preparation error to a failed workstation result.
func ResolveFactoryWorktreeCheckoutPath ¶
ResolveFactoryWorktreeCheckoutPath returns the target checkout path for a resolved worktree name under the factory-local worktrees parent.
func ResolveFactoryWorktreeParent ¶
ResolveFactoryWorktreeParent returns the directory under factoryRoot where new git worktree checkouts should be created. When no existing worktrees parent is present, the default is <factoryRoot>/.worktrees.
func ShouldPrepareFactoryWorktreeForCodex ¶
func ShouldPrepareFactoryWorktreeForCodex( executionModelProvider string, authoredWorkingDirectory string, resolvedWorktree string, ) bool
ShouldPrepareFactoryWorktreeForCodex reports whether a Codex model workstation dispatch should materialize a factory-local git worktree before execution. Preparation runs when execution will use the Codex provider, a worktree template resolved to a name, and the workstation did not also author a workingDirectory template. Callers must pass the resolved execution model provider (not runner ID alone) so legacy modelProvider: claude workstations with default runner selection keep CLI --worktree passthrough.
Types ¶
type ExecGitCommander ¶
type ExecGitCommander struct{}
ExecGitCommander implements GitCommander via the git binary on PATH.
type GitCommander ¶
type GitCommander interface {
Run(ctx context.Context, dir string, args ...string) (stdout string, stderr string, exitCode int, err error)
}
GitCommander runs git CLI commands. Tests inject fakes; production uses ExecGitCommander.
type PrepareFactoryGitWorktreeResult ¶
PrepareFactoryGitWorktreeResult describes a successful worktree preparation.
func PrepareFactoryGitWorktree ¶
func PrepareFactoryGitWorktree( ctx context.Context, factoryRoot string, worktreeName string, git GitCommander, ) (PrepareFactoryGitWorktreeResult, error)
PrepareFactoryGitWorktree creates or reuses a git worktree checkout for the resolved worktree name under the factory root.