Documentation
¶
Index ¶
- type CellRunInput
- type CellRunResult
- type CellRunner
- type CellWaitMode
- type DecisionKind
- type DetachedLaneTicket
- type ExecutionInput
- type ExecutionResult
- type ExecutionStep
- type LaneID
- type LaneRunSummary
- type Phase
- type PhaseCell
- type PhaseID
- type PhaseRunSummary
- type Plan
- type State
- type TransitionDecision
- type TransitionPlanInput
- type TransitionPlanner
- type TransitionPolicy
- type TransitionRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CellRunInput ¶
type CellRunInput struct {
CurrentPhaseID PhaseID
CurrentPhaseIndex int
StepIndex int
StateSnapshot map[string]any
PreviousRowLaneValues map[LaneID]any
PendingDetachedByLane map[LaneID]int
}
CellRunInput is the full per-cell callback input.
type CellRunResult ¶
CellRunResult is one cell callback output payload.
type CellRunner ¶
type CellRunner func( run_context context.Context, input CellRunInput, ) (CellRunResult, error)
CellRunner executes one phase/lane cell.
type CellWaitMode ¶
type CellWaitMode string
CellWaitMode controls whether lane work gates phase completion.
const ( // CellWaitModeAwaitCompletion means lane work must finish before transition // planning executes. CellWaitModeAwaitCompletion CellWaitMode = "await-completion" // CellWaitModeDetached means lane work is launched and not awaited by the // critical path. CellWaitModeDetached CellWaitMode = "detached" )
type DecisionKind ¶
type DecisionKind string
DecisionKind selects the next control-flow move after a phase finishes.
const ( // DecisionKindAdvance moves to the next phase in Plan.Phases. DecisionKindAdvance DecisionKind = "advance" // DecisionKindJump moves to TransitionDecision.TargetPhaseID. DecisionKindJump DecisionKind = "jump" // DecisionKindLoopBack moves to an earlier TransitionDecision.TargetPhaseID. DecisionKindLoopBack DecisionKind = "loop-back" // DecisionKindRepeat reruns the current phase. DecisionKindRepeat DecisionKind = "repeat" // DecisionKindStop ends orchestration. DecisionKindStop DecisionKind = "stop" )
type DetachedLaneTicket ¶
DetachedLaneTicket is one detached lane execution handle.
type ExecutionInput ¶
type ExecutionInput struct {
Context context.Context
Plan Plan
InitialState State
StartPhaseID PhaseID
MaxSteps int
}
ExecutionInput carries everything required for one orchestration run.
type ExecutionResult ¶
type ExecutionResult struct {
FinalState State
Steps []ExecutionStep
DetachedLaneTickets []DetachedLaneTicket
}
ExecutionResult is the full orchestration run output.
func Run ¶
func Run( input ExecutionInput, ) (ExecutionResult, error)
Run executes a dynamic phase/lane matrix with first-class transition planning.
type ExecutionStep ¶
type ExecutionStep struct {
PhaseRunSummary PhaseRunSummary
TransitionDecision TransitionDecision
}
ExecutionStep captures one executed phase and its transition decision.
type LaneRunSummary ¶
type LaneRunSummary struct {
LaneID LaneID
WaitMode CellWaitMode
DetachedTicketPresent bool
ProducedLaneValue bool
}
LaneRunSummary describes one lane launch in one phase step.
type PhaseCell ¶
type PhaseCell struct {
LaneID LaneID
WaitMode CellWaitMode
Run CellRunner
}
PhaseCell defines one lane cell inside one phase.
type PhaseRunSummary ¶
type PhaseRunSummary struct {
PhaseID PhaseID
LaneRuns []LaneRunSummary
AwaitedLaneValues map[LaneID]any
PendingDetachedByLane map[LaneID]int
}
PhaseRunSummary describes one phase step execution.
type Plan ¶
type Plan struct {
Phases []Phase
TransitionPlanner TransitionPlanner
}
Plan is the dynamic phase/lane matrix and transition planning bundle.
type TransitionDecision ¶
type TransitionDecision struct {
Kind DecisionKind
TargetPhaseID PhaseID
}
TransitionDecision is one policy-selected next-step decision.
type TransitionPlanInput ¶
type TransitionPlanInput struct {
PolicyID string
Plan *Plan
State *State
CurrentPhaseID PhaseID
CurrentPhaseStep PhaseRunSummary
CurrentStepIndex int
}
TransitionPlanInput is the input contract for transition rule matching.
type TransitionPlanner ¶
type TransitionPlanner struct {
Policies map[string]TransitionPolicy
}
TransitionPlanner resolves next-step transitions using named policies.
type TransitionPolicy ¶
type TransitionPolicy struct {
Rules []TransitionRule
}
TransitionPolicy is one reusable transition rule set.
type TransitionRule ¶
type TransitionRule struct {
RuleID string
Matches func(input TransitionPlanInput) bool
Decision TransitionDecision
}
TransitionRule is one ordered branch in a transition policy.