Documentation
¶
Overview ¶
Package childrun executes and publishes supplied child review runs.
Index ¶
- func ProviderOutputStagingLocator(provider ports.ObservedReviewProvider) ports.ProviderOutputStagingLocator
- type Executor
- func (executor *Executor) BindRecoveryCleanup(snapshotSHA256 string, ...) error
- func (executor *Executor) ExecuteChildReplay(ctx context.Context, child rerun.ChildReplay) (_ rerun.ChildReplayResult, retErr error)
- func (executor *Executor) ExecuteDelta(ctx context.Context, request delta.ChildRequest) (_ delta.ExecutionResult, retErr error)
- type ExecutorConfig
- type FollowupExecutor
- type FollowupExecutorConfig
- type FollowupIDIssuer
- type FollowupPromptSource
- type FollowupRepairPromptSource
- type FollowupRuntimeInventorySource
- type ProductionFollowupPromptSource
- func NewProductionFollowupPromptSource(ids prompt.InvocationIDIssuer, roleTask func() (prompt.RoleTaskID, error), ...) (*ProductionFollowupPromptSource, error)
- func NewProductionFollowupPromptSourceWithStaging(ids prompt.InvocationIDIssuer, roleTask func() (prompt.RoleTaskID, error), ...) (*ProductionFollowupPromptSource, error)
- func (source *ProductionFollowupPromptSource) BuildFollowupInvocation(ctx context.Context, execution appfollowup.Execution, run domain.Run, ...) (ports.ProviderInvocation, error)
- func (source *ProductionFollowupPromptSource) BuildFollowupRepairInvocation(ctx context.Context, execution appfollowup.Execution, run domain.Run, ...) (ports.ProviderInvocation, error)
- func (source *ProductionFollowupPromptSource) BuildFollowupRuntimeArtifact(_ context.Context, execution appfollowup.Execution, run domain.Run, ...) (publication.FollowupRuntimeArtifactInput, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProviderOutputStagingLocator ¶ added in v0.1.4
func ProviderOutputStagingLocator(provider ports.ObservedReviewProvider) ports.ProviderOutputStagingLocator
ProviderOutputStagingLocator returns the adapter-owned staging authority when the qualified provider registry implements it. It is the single assertion idiom every child workflow uses to thread staging into its prompt authority and its review runtime. A provider without that authority resolves no destination, so every child launch keeps the stdout transport and legacy or fake providers are unaffected.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor is the production delta child executor. It deliberately accepts a supplied domain.Run rather than minting or substituting child identity.
func NewExecutor ¶
func NewExecutor( coordinator *review.Coordinator, runtime *review.ProviderInvocationRuntime, publisher *publication.Service, artifactRoot ports.AnchoredRoot, config ExecutorConfig, ) (*Executor, error)
NewExecutor constructs a child executor with all execution and publication authority supplied explicitly.
func (*Executor) BindRecoveryCleanup ¶ added in v0.1.20
func (executor *Executor) BindRecoveryCleanup(snapshotSHA256 string, cleanup func(context.Context, domain.RunID) (ports.WorkspaceTerminalReceipt, error)) error
BindRecoveryCleanup transfers the caller's one-shot cleanup boundary for a failed rerun. The callback must return the actual terminal release receipt.
func (*Executor) ExecuteChildReplay ¶
func (executor *Executor) ExecuteChildReplay(ctx context.Context, child rerun.ChildReplay) (_ rerun.ChildReplayResult, retErr error)
ExecuteChildReplay executes the already-authorized fresh rerun without replacing any identity or lineage supplied by rerun.Service.
func (*Executor) ExecuteDelta ¶
func (executor *Executor) ExecuteDelta(ctx context.Context, request delta.ChildRequest) (_ delta.ExecutionResult, retErr error)
ExecuteDelta executes exactly request.Run, binds only that run's runtime inventory, and returns a URI derived from the P2 publication receipt.
type ExecutorConfig ¶
type ExecutorConfig struct {
Assignments []review.Assignment
SeverityThreshold domain.Severity
Policy *domain.CIPolicy
MulgaeVersion string
MulgaeCommit string
Diagnostics ports.RuntimeDiagnosticSinkFactory
Clock ports.Clock
}
ExecutorConfig contains the immutable review and publication authority for child review runs. The coordinator already owns the corresponding prompt, assignment budget, and provider execution authority.
type FollowupExecutor ¶
type FollowupExecutor struct {
// contains filtered or unexported fields
}
FollowupExecutor performs one source-bound followup invocation and, only for structurally repairable output, one same-provider repair invocation.
func NewFollowupExecutor ¶
func NewFollowupExecutor(clock ports.Clock, ids FollowupIDIssuer, provider ports.ObservedReviewProvider, prompts FollowupPromptSource, validator *validation.FollowupValidator, publisher *publication.Service, artifactRoot ports.AnchoredRoot, config FollowupExecutorConfig) (*FollowupExecutor, error)
func (*FollowupExecutor) ExecuteFollowup ¶
func (executor *FollowupExecutor) ExecuteFollowup(ctx context.Context, execution appfollowup.Execution) (_ appfollowup.ExecutionResult, retErr error)
ExecuteFollowup publishes only a schema-valid, trusted-scope normalized result. Repair never changes provider, attempt, role, target, or lineage.
type FollowupExecutorConfig ¶
type FollowupIDIssuer ¶
type FollowupIDIssuer interface {
NewRunID(time.Time) (domain.RunID, error)
NewAttemptID(time.Time) (domain.AttemptID, error)
}
FollowupIDIssuer mints the fresh child and its one bounded provider attempt.
type FollowupPromptSource ¶
type FollowupPromptSource interface {
BuildFollowupInvocation(context.Context, appfollowup.Execution, domain.Run, domain.AttemptID) (ports.ProviderInvocation, error)
}
FollowupPromptSource is the sole trusted source of a followup provider invocation. It must bind source bytes, current bytes, objective, and the selected role before the provider boundary is reached.
type FollowupRepairPromptSource ¶
type FollowupRepairPromptSource interface {
BuildFollowupRepairInvocation(context.Context, appfollowup.Execution, domain.Run, domain.AttemptID, []byte) (ports.ProviderInvocation, error)
}
FollowupRepairPromptSource is the optional bounded repair authority. The production prompt source implements it; legacy injected fixtures that do not explicitly grant repair remain single-invocation and fail closed.
type FollowupRuntimeInventorySource ¶
type FollowupRuntimeInventorySource interface {
BuildFollowupRuntimeArtifact(context.Context, appfollowup.Execution, domain.Run, ports.ProviderInvocation) (publication.FollowupRuntimeArtifactInput, error)
}
FollowupRuntimeInventorySource supplies the immutable target and prompt manifest metadata required to publish a specialized followup invocation.
type ProductionFollowupPromptSource ¶
type ProductionFollowupPromptSource struct {
// contains filtered or unexported fields
}
ProductionFollowupPromptSource composes and inventories the one source-bound followup invocation. It has no provider selection or retry authority.
func NewProductionFollowupPromptSource ¶
func NewProductionFollowupPromptSource(ids prompt.InvocationIDIssuer, roleTask func() (prompt.RoleTaskID, error), providerInstance string, workspace ports.WorkspaceExecutionAuthority) (*ProductionFollowupPromptSource, error)
func NewProductionFollowupPromptSourceWithStaging ¶ added in v0.1.4
func NewProductionFollowupPromptSourceWithStaging(ids prompt.InvocationIDIssuer, roleTask func() (prompt.RoleTaskID, error), providerInstance string, workspace ports.WorkspaceExecutionAuthority, staging ports.ProviderOutputStagingLocator) (*ProductionFollowupPromptSource, error)
NewProductionFollowupPromptSourceWithStaging binds the adapter-owned staging locator to the followup prompt authority. Each followup launch then states its own resolved absolute destination exactly as root review does, and the invocation it returns carries that same destination.
func (*ProductionFollowupPromptSource) BuildFollowupInvocation ¶
func (source *ProductionFollowupPromptSource) BuildFollowupInvocation(ctx context.Context, execution appfollowup.Execution, run domain.Run, attemptID domain.AttemptID) (ports.ProviderInvocation, error)
func (*ProductionFollowupPromptSource) BuildFollowupRepairInvocation ¶
func (source *ProductionFollowupPromptSource) BuildFollowupRepairInvocation(ctx context.Context, execution appfollowup.Execution, run domain.Run, attemptID domain.AttemptID, prior []byte) (ports.ProviderInvocation, error)
func (*ProductionFollowupPromptSource) BuildFollowupRuntimeArtifact ¶
func (source *ProductionFollowupPromptSource) BuildFollowupRuntimeArtifact(_ context.Context, execution appfollowup.Execution, run domain.Run, invocation ports.ProviderInvocation) (publication.FollowupRuntimeArtifactInput, error)