Consolidate the build pipeline into a cohesive BuildPipeline - #281
Conversation
Move the Clean/Restore/Build/Test/Pack step bodies out of the static BuildSteps helper into a new injectable BuildPipeline (in the new Buildvana.Tool.Build namespace), exposing single-step, prefix, and range execution over an ordered BuildStep enum. Rewire the five pipeline subcommands and ReleaseCommand to drive the pipeline instead of the statics, then delete BuildSteps. Behavior- preserving: same dotnet invocations, in the same order, with the same arguments and side effects. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
@claude please review this PR. |
|
Claude finished @rdeago's task in 1m 40s —— View job Code Review
The refactor is clean and behavior-preserving. I verified all five pipeline commands and Behavioral equivalence check
All match. The two-pass nature of DesignThe refactor is a genuine improvement: FindingsMinor — for (var step = first; step <= last; step++)If a caller passes Pre-existing — Every Pre-existing — [Description("Build all projects and run tests.")]The command actually does SummaryCode is correct, clean, and well-structured. The only item worth acting on before #269 is the |
Throw ArgumentOutOfRangeException when first > last instead of silently running no steps, making misuse loud before Tenacom#269 adds more callers. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Thanks for the review! Addressed the one actionable point:
The two pre-existing findings I'm intentionally leaving out to keep this PR a behavior-preserving refactor:
@claude please re-review. |
|
Claude finished @rdeago's task in 31s —— View job Re-Review
The fix in
Guard.IsLessThanOrEqualTo((int)first, (int)last, nameof(first));This is consistent with the constructor's existing The two deferred pre-existing findings are reasonable calls — both belong in their own PRs and don't affect this refactor's correctness. LGTM. |
Summary
Prerequisite for #269. Extracts the build pipeline (
Clean → Restore → Build → Test → Pack)into a real domain object so #269 can later hang
buildvana.jsonsettings onto pipeline steps.BuildStepenum and an injectableBuildPipelinein a newBuildvana.Tool.Buildnamespace.BuildPipelineowns the step bodies (moved from the staticBuildSteps) and exposes the three execution shapes: a single step (RunAsync), a prefix(
RunThroughAsync), and a range (RunRangeAsync).BuildPipelineviaRunThroughAsync(BuildStep.X).ReleaseCommandto drive the pipeline step-by-step, preserving its two passes(
Clean→Testverification, thenRestore→Packartifacts with no re-clean).BuildPipelinein DI; deleteBuildSteps.Strictly behavior-preserving: same
dotnetinvocations, in the same order, with the samearguments and side effects. No
buildvana.jsonwiring (that's #269), no new subcommand,no public API change.
Test plan
dotnet bv build— clean, zero warningsdotnet bv pack— fullClean→Restore→Build→Test→Packran in order, tests pass, both packages producedinspectcode --severity=WARNING— 0 resultsNo CHANGELOG entry: internal refactor, no observable behavior change.
Closes #280.