Skip to content

Test-build pipeline Phase B, PR 1: mechanical cleanups and small consolidations - #1218

Merged
mkarlesky merged 9 commits into
next_versionfrom
test-invoker-phaseb-pr1-mechanical-cleanups
Aug 20, 2026
Merged

Test-build pipeline Phase B, PR 1: mechanical cleanups and small consolidations#1218
mkarlesky merged 9 commits into
next_versionfrom
test-invoker-phaseb-pr1-mechanical-cleanups

Conversation

@mkarlesky

Copy link
Copy Markdown
Member

Summary

First of four PRs implementing Phase B of the test-build pipeline (lib/ceedling/test_invoker/) architecture review, following PR #1217 (Phase A). This PR bundles the lowest-risk, non-overlapping items -- all behavior-preserving, none touching DI wiring or adding a new class.

  • Simplify stage_flatten_objects_list's nested map { ... }.flatten to flat_map.
  • Rename run_fixture_now to run_fixture (same historical _now Rake-extraction-artifact pattern already resolved for generate_executable_now in Phase A).
  • Extract three repeated literals into shared TestPipelineHelpers methods: the vendor-path array literal (11 call sites), the { flags:, defines:, search_paths: } meta-hash (6 call sites), and (private to TestBuildExecutor) the directives-only fallback condition (4 call sites).
  • Replace objects_list's raw { test:, obj: } Hash entries with a named ObjectWork struct, matching PartialWork/MockWork's existing pattern for the sibling T1/T2 transforms.
  • Consolidate the identical TestBuildSetup#mock_partial?/TestBuildPlanner#is_mock_partial? predicates into one shared TestPipelineHelpers method.
  • Change Partializer#extract_module_contents's boolean-trap third positional arg to a keyword arg (fallback:), and bring its doc comment back in line with the method's actual current signature.
  • Extract tailor_search_paths's four branches into named private methods for readability, keeping the if/elsif dispatch itself (a true Hash-dispatch table would need a Hash of Procs here, not a Hash of static values -- not a good fit for this method's config-gated, priority-ordered matching).

Test plan

  • bundle exec rspec spec/units -- 2588 examples, 0 failures
  • Each of the 9 commits verified independently against its own touched spec files before the next commit landed

No targeted Docker system-spec run for this PR -- every change here is either behavior-preserving with strong existing unit coverage, or (the extract_module_contents keyword-arg change) touches Partializer with its own strong existing spec. Relying on CI for system coverage.

🤖 Generated with Claude Code

mkarlesky and others added 9 commits August 20, 2026 13:45
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The _now suffix was a disambiguation artifact from the earliest
refactoring that extracted Rake from the core of the test-build
pipeline, no longer meaningful today -- same pattern already resolved
for generate_executable_now.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…elper

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…edicate

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Matches PartialWork/MockWork, the same kind of flattened per-item
record T1/T2 already use for their own parallel-processing lists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
TestBuildSetup and TestBuildPlanner each defined the identical
Partial-mock naming check independently; both already include
TestPipelineHelpers, so it lives there now under its one name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Also brings its doc comment's params back in line with the method's
actual current signature -- it previously documented header_filepath/
source_filepath, neither of which this method takes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Keeps the if/elsif dispatch on filepath -- it's priority-ordered and
config-gated, not a plain Symbol-keyed lookup -- but gives each
branch's own path-building its own name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant