< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Workflows.Sequential.PipelinePhase
Assembly: NexusLabs.Needlr.AgentFramework.Workflows
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Workflows/Sequential/PipelinePhase.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 44
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_Name()100%11100%
get_Stages()100%11100%
get_Policy()100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Workflows/Sequential/PipelinePhase.cs

#LineLine coverage
 1using NexusLabs.Needlr.AgentFramework.Workflows.Sequential;
 2
 3namespace NexusLabs.Needlr.AgentFramework.Workflows.Sequential;
 4
 5/// <summary>
 6/// Defines a named group of sequential stages that share runtime configuration.
 7/// The <see cref="SequentialPipelineRunner"/> applies the phase's policy (lifecycle
 8/// hooks, token budget) before executing any stage within it.
 9/// </summary>
 10/// <remarks>
 11/// <para>
 12/// Phases represent runtime configuration boundaries, not logical groupings.
 13/// The same phase configuration can appear multiple times in a pipeline — each
 14/// <see cref="PipelinePhase"/> instance is a distinct runtime scope with its own
 15/// <see cref="PipelinePhasePolicy.OnEnterAsync"/> invocation and budget scope.
 16/// </para>
 17/// <para>
 18/// Empty phases (zero stages) are valid. <see cref="PipelinePhasePolicy.OnEnterAsync"/>
 19/// and progress events still fire, enabling setup-only phases.
 20/// </para>
 21/// </remarks>
 22/// <param name="Name">Human-readable name for the phase (used in diagnostics, progress events, and result metadata).</p
 23/// <param name="Stages">The ordered list of stages within this phase.</param>
 24/// <param name="Policy">Optional <see cref="PipelinePhasePolicy"/> controlling lifecycle hooks and phase-level budget.<
 25/// <example>
 26/// <code>
 27/// var phases = new[]
 28/// {
 29///     new PipelinePhase("Analysis", [
 30///         new PipelineStage("ParseDiff", diffParser),
 31///         new PipelineStage("SecurityScan", securityScanner),
 32///     ]),
 33///     new PipelinePhase("Synthesis", [
 34///         new PipelineStage("GenerateComments", commentGenerator),
 35///     ], new PipelinePhasePolicy { TokenBudget = 30_000 }),
 36/// };
 37///
 38/// await runner.RunPhasedAsync(workspace, phases, options: null, ct);
 39/// </code>
 40/// </example>
 4341public sealed record PipelinePhase(
 23142    string Name,
 27943    IReadOnlyList<PipelineStage> Stages,
 8644    PipelinePhasePolicy? Policy = null);