Skip to content

[#674-1/5] Consolidate src/impl/ into feature directories #675

Description

@kcenon

What

Move every file out of src/impl/ into the appropriate feature directory under src/{alert,collectors,context,core,modules,platform,plugins,utils}/. After this PR, src/impl/ no longer exists; every implementation file lives next to the feature it implements.

Why

src/impl/ is a holdover from an earlier layout where implementations were collected away from their headers. The current canonical layout co-locates implementations with their feature directories. Keeping src/impl/ alive:

  • forces #include paths to mention impl/ as if it were a meaningful concept (it isn't)
  • makes every later cleanup harder (CMake fallback branch, hardcoded source list, decomposition) because two parallel layouts must be kept consistent

This is sub-issue 1 of 5 in EPIC #674 and the prerequisite for the other four sub-issues. Path stability after this PR is what makes the CMake work safe.

Where

  • Source: src/impl/<files>
  • Target: src/{alert,collectors,context,core,modules,platform,plugins,utils}/ (feature dirs already exist)
  • Affected: every translation unit that #includes the moved files; the target_sources(...) lists in CMakeLists.txt

How

Technical Approach

  1. Enumerate src/impl/ contents.
  2. For each file, decide the target feature directory by inspecting which src/<feature>/ already owns the corresponding header (or the closest semantic owner if the header is in include/).
  3. Move with git mv so rename history is preserved.
  4. Update every #include "impl/..." and #include <impl/...> site in the repo (sources, tests, examples, integration_tests, benchmarks).
  5. Update target_sources(...) and any other source-listing in CMakeLists.txt to point at the new paths. Keep this minimal — full source-list cleanup is sub-issue [EPIC] monitoring_system: remove legacy fallback and decompose CMake #674-3, not this one.
  6. Verify src/impl/ no longer exists at the repo root.
  7. Build + test.

Acceptance Criteria

  • src/impl/ directory removed from repo root
  • Every former src/impl/ file lives under the appropriate src/<feature>/
  • Every #include referring to the old impl/ path updated
  • cmake -S . -B build && cmake --build build/ -j succeeds (CI fallback if local toolchain is unavailable)
  • ctest --test-dir build/ --output-on-failure passes
  • PR merged with all CI checks green

Estimated Size

S–M. Pure mechanical move + path updates. No logic changes.

Part of #674

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/highHigh priority - Critical for productionsize/MMedium - 1-3 days of worktype/refactorCode refactoring without functional changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions