Skip to content

Test-build pipeline Phase B, PR 3: consolidate duplicate Partial header/source preprocessing - #1220

Merged
mkarlesky merged 2 commits into
next_versionfrom
test-invoker-phaseb-pr3-partial-preprocessing-consolidation
Aug 20, 2026
Merged

Test-build pipeline Phase B, PR 3: consolidate duplicate Partial header/source preprocessing#1220
mkarlesky merged 2 commits into
next_versionfrom
test-invoker-phaseb-pr3-partial-preprocessing-consolidation

Conversation

@mkarlesky

Copy link
Copy Markdown
Member

Summary

Third of four PRs implementing Phase B of the test-build pipeline (lib/ceedling/test_invoker/) architecture review, following PR #1217 (Phase A), PR #1218 (Phase B, PR 1), and PR #1219 (Phase B, PR 2).

TestBuildExecutor#stage_preprocess_partial_headers and #stage_preprocess_partial_sources (stages 6 and 7) were two ~110-line methods, structurally identical -- three preprocessing passes over a Partial's file, one DependencyTracker target per file per test -- differing only in which of state.partials_headers/state.partials_sources supplies the work and which Preprocessinator methods a header vs. a source is actually preprocessed by. The sources method's own doc comment already said "Mirrors stage 6 exactly."

  • Added the one real coverage asymmetry the two near-duplicate spec contexts had: the headers context tested the "directives-only preprocessing unavailable for this toolchain" branch; the sources context didn't. Added that test to the sources context first, against the unconsolidated code, to lock in current behavior.
  • Consolidated both methods into one shared private preprocess_partials body, parameterized on the input list, a kind/noun pair for log text, and the two Preprocessinator method names to call. Both stage_preprocess_partial_headers and stage_preprocess_partial_sources keep their own names and stay the pipeline's two public entry points -- TestPipelineManager calls them exactly as before, no change to stage ordering or conditions.
  • Every existing unit example in both spec contexts passed unmodified against the new shared body -- the public input/output contract didn't change, only the internal duplication.

Test plan

  • bundle exec rspec spec/units -- 2589 examples, 0 failures
  • Docker (throwtheswitch/madsciencelab-plugins:v1.1.4) spec/system/delta_builds_spec.rb (wondrous_forest Partials cases -- the real end-to-end safety net for staleness/skip behavior across both stages) -- 16 examples, 0 failures
  • Docker spec/system/gcov_deployment_spec.rb's Partials/coverage cases -- 16 examples, 0 failures

🤖 Generated with Claude Code

mkarlesky and others added 2 commits August 20, 2026 15:51
stage_preprocess_partial_headers's own spec context already covered
this branch; stage_preprocess_partial_sources's context didn't.

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

The two methods were structurally identical -- three preprocessing
passes over a partial file, one DependencyTracker target per file --
differing only in which of state.partials_headers/partials_sources
supplies the work and which Preprocessinator methods a header vs. a
source is actually preprocessed by. Both stage methods keep their own
name and stay the pipeline's two public entry points; only the shared
body moved.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mkarlesky
mkarlesky merged commit b5a27e5 into next_version Aug 20, 2026
22 of 40 checks passed
@mkarlesky
mkarlesky deleted the test-invoker-phaseb-pr3-partial-preprocessing-consolidation branch August 20, 2026 21:05
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