childrun

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package childrun executes and publishes supplied child review runs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) 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 (*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 FollowupExecutorConfig struct {
	ProviderInstance  string
	SeverityThreshold domain.Severity
	MulgaeVersion     string
	MulgaeCommit      string
	Diagnostics       ports.RuntimeDiagnosticSinkFactory
}

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 (*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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL