Skip to content

Test-build pipeline: fix lock scope, remove dead code, close coverage gaps - #1217

Merged
mkarlesky merged 1 commit into
next_versionfrom
test-invoker-audit-fixes
Aug 20, 2026
Merged

Test-build pipeline: fix lock scope, remove dead code, close coverage gaps#1217
mkarlesky merged 1 commit into
next_versionfrom
test-invoker-audit-fixes

Conversation

@mkarlesky

Copy link
Copy Markdown
Member

Summary

Audit of the test-build pipeline (lib/ceedling/test_invoker/) against its own README, comments, and test coverage, following the two major refactorings that produced its current stage-sequenced architecture.

  • Real bug fixed: stage_determine_files held the shared-state lock across a call to @plugin_manager.pre_test, an arbitrary plugin hook — not just the struct-field writes the README says the lock is for. Under Batchinator parallelism this serialized every test's plugin-hook invocation behind one global mutex. Moved the call outside the lock.
  • Dead code removed (each confirmed via git history against a real, currently-active replacement, not guessed): Stage#run?, Testable#results_fail, Testable#no_link_objects, TestBuildPlanner#fetch_include_search_paths_for_test_file, TestBuildPlanner#form_partials_filenames.
  • Doc/comment drift fixed: README's accumulator-list count (missing objects_list), a duplicate stage heading ("Collecting More Test Context" used for two different stages), a couple of typos, a misspelled method name, and generate_executable_now renamed to generate_executable (the _now suffix was a disambiguation artifact from the original Rake-extraction refactor).
  • Documented, not changed: why a Partial-replaced module's own source is always compiled (stage 15) and only excluded from the objects handed to the linker (stage 16) — a context-conditional "skip the compile entirely for plain builds" optimization was tried during this work but reverted after the Docker system-spec run (delta_builds_spec.rb, wondrous_forest project) showed a plain, non-coverage build still needs that compile for its own dependency tracking to keep working.
  • Test coverage added for previously-untested branches: generate_executable's ShellException rescue path, :mocking combined with mocks disabled, stage_prepare_build_paths, the mock/Partials-in-use validators, tailor_search_paths's special-case branches, and TEST_SOURCE_FILE() validation under assembly support.

Test plan

  • bundle exec rspec spec/units — 2587 examples, 0 failures
  • Docker (throwtheswitch/madsciencelab-plugins:v1.1.4) spec/system/delta_builds_spec.rb — 16 examples, 0 failures
  • Docker spec/system/gcov_deployment_spec.rb's Partials/coverage cases — 16 examples, 0 failures

🤖 Generated with Claude Code

…rage gaps

Audits the test-build pipeline (lib/ceedling/test_invoker/) against its own
README and comments: moves a plugin hook call outside the shared-state lock
in stage_determine_files, removes five confirmed-dead struct fields/methods
(Stage#run?, Testable#results_fail/#no_link_objects,
fetch_include_search_paths_for_test_file, form_partials_filenames), fixes a
duplicate stage heading and a couple of typos/misspellings, renames
generate_executable_now to generate_executable, and documents why a
Partial-replaced module's source is always compiled and only excluded from
linking. Adds unit coverage for previously-untested branches: the
generate_executable ShellException rescue path, :mocking with mocks
disabled, stage_prepare_build_paths, the mock/Partials-in-use validators,
tailor_search_paths's special-case branches, and TEST_SOURCE_FILE()
validation under assembly support.

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