Skip to content

Test-build pipeline Phase B, PR 2: consolidate scattered validation logic - #1219

Merged
mkarlesky merged 3 commits into
next_versionfrom
test-invoker-phaseb-pr2-validation-consolidation
Aug 20, 2026
Merged

Test-build pipeline Phase B, PR 2: consolidate scattered validation logic#1219
mkarlesky merged 3 commits into
next_versionfrom
test-invoker-phaseb-pr2-validation-consolidation

Conversation

@mkarlesky

Copy link
Copy Markdown
Member

Summary

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

Four independent validators -- TestBuildSetup#validate_mocks_in_use/#validate_partials_in_use, TestBuildPlanner#validate_header_includes, and TestSourceFileDirectiveResolver#validate! -- each raise CeedlingException on a real, user-facing configuration mistake, but had no shared home and no consistent calling convention.

  • Filled a real, pre-existing coverage gap first: neither validate_mocks_in_use's nor validate_partials_in_use's raise path had any system-level coverage, only unit tests. New system spec (spec/system/mocks_partials_configuration_validation_spec.rb) confirms both against the real CLI, run against the unrefactored code first to lock in current behavior before touching anything.
  • Standardized validate_header_includes's two positional params to keyword args, matching the other three validators' existing convention.
  • Moved all four into a new TestBuildValidations module (lib/ceedling/test_invoker/test_build_validations.rb), mixed into TestBuildSetup, TestBuildPlanner, and TestSourceFileDirectiveResolver -- same pattern TestPipelineHelpers already established for non-validation shared helpers in this same directory.

Two things the new system spec surfaced along the way, worth knowing for future work here: CMock's real default mock-file prefix is mock_ (lowercase), not the Mock naming unit-test doubles in this codebase happen to stub; and Partials-configuration-macro scanning (TEST_PARTIAL_*_MODULE(), etc.) only happens when test preprocessing is enabled (:project ↳ :use_test_preprocessor other than :none, this project's own default) -- so validate_partials_in_use's "used without configuring" check can only ever fire under that setting.

Test plan

  • bundle exec rspec spec/units -- 2588 examples, 0 failures
  • Docker (throwtheswitch/madsciencelab-plugins:v1.1.4) targeted run: spec/system/mocks_partials_configuration_validation_spec.rb (new), spec/system/header_include_path_validation_spec.rb, spec/system/test_source_file_directive_spec.rb -- 14 examples, 0 failures

🤖 Generated with Claude Code

mkarlesky and others added 3 commits August 20, 2026 14:59
…in_use raise paths

Neither validator's raise path had system-level coverage before now --
only unit-tested, with the actual CLI-facing error text and exit
status never confirmed end-to-end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Standardizes on the same calling convention every other validator in
the pipeline already uses.

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

validate_mocks_in_use/validate_partials_in_use (TestBuildSetup),
validate_header_includes (TestBuildPlanner), and validate!
(TestSourceFileDirectiveResolver) were each independently defined,
identical in shape (raise CeedlingException on a real, user-facing
configuration mistake) but with no shared home -- same pattern
TestPipelineHelpers already covers for non-validation helpers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mkarlesky
mkarlesky merged commit 70a0174 into next_version Aug 20, 2026
22 of 39 checks passed
@mkarlesky
mkarlesky deleted the test-invoker-phaseb-pr2-validation-consolidation branch August 20, 2026 19:47
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