M3 — donor non-PLS source move: STATUS¶
Date: 2026-05-21 (same merge sprint)
Branch: merge/import-donor
Pushed: pending commit (this report ships with it)
What was done¶
222 donor source files were git mv-moved from
_donor/nirs4all-methods/cpp/src/core/{preprocessing,augmentations,splitters,filters,utilities}/
to their final positions under cpp/src/core/<category>/. Blame chain
preserved via git mv for every file (status R in git status).
Category move |
Files |
From |
To |
Note |
|---|---|---|---|---|
Preprocessing |
94 |
|
|
per-subcategory move (baselines, derivatives, feature_selection, orthogonalization, resampling, scaling, scatter, signal_conversion, smoothing, specialized, wavelets) |
Augmentation |
82 |
|
|
plural → singular rename per §11/M3 decision (drift, edge_artifacts, environmental, mixup, noise, random, scattering, spectral, splines, wavelength) |
Splitters |
20 |
|
|
flat |
Filters |
16 |
|
|
includes |
Utilities |
10 |
|
|
flat |
Total |
222 |
Common-core duplicates deleted (M3.2)¶
Files that had landed at cpp/src/core/common/ during M2.5 were removed
from their donor location:
_donor/nirs4all-methods/cpp/src/core/context.cpp (deleted)
_donor/nirs4all-methods/cpp/src/core/context.hpp (deleted)
_donor/nirs4all-methods/cpp/src/core/status.cpp (deleted)
_donor/nirs4all-methods/cpp/src/core/status.hpp (deleted)
_donor/nirs4all-methods/cpp/src/core/matrix_view.cpp (deleted)
_donor/nirs4all-methods/cpp/src/core/matrix_view.hpp (deleted)
_donor/nirs4all-methods/cpp/src/core/version.cpp (deleted)
_donor/nirs4all-methods/cpp/src/core/version.hpp (deleted)
_donor/nirs4all-methods/cpp/src/core/parallel.hpp (deleted)
_donor/nirs4all-methods/cpp/src/core/linalg.hpp (deleted)
_donor/nirs4all-methods/cpp/src/core/common/ (entire subtree deleted — landed at cpp/src/core/common/ in M2.5)
After M3, _donor/nirs4all-methods/cpp/src/core/ is empty (verified
by find ... -type f returning 0).
Stale-reference cleanup (M3.3)¶
File |
Reference |
Action |
|---|---|---|
|
|
Updated to |
|
|
Already correct — no change |
|
|
Already correct — no change |
|
89 |
Marked BROKEN with a header note; not rewritten (this CMakeLists is dormant — pls4all does not activate it, and the unified CMakeLists lands in M5/M6) |
Build verification (M3.4)¶
pls4all build and tests remain green after the M3 moves, because the
M3 moves are purely additive from pls4all’s build-system perspective:
pls4all’s
cpp/src/CMakeLists.txtenumerates explicit source files undercpp/src/core/<file>.cpp(nofile(GLOB ...)patterns), and the source list is unchanged.The moved donor sources now live at
cpp/src/core/<category>/<sub>/<file>.{c,h}, paths that pls4all’s CMakeLists does not reference.The deleted
_donor/.../cpp/src/core/{context,status,matrix_view,version,parallel,linalg.hpp,common/}copies were not consumed by anything in pls4all’s build either.
$ cmake --build --preset dev-release
ninja: no work to do.
$ ./build/dev-release/cpp/tests/n4m_tests
=== 265 run, 0 failures, 0 skipped ===
Roadmap gate evaluation¶
The roadmap M3 gate (MERGE_ROADMAP.md §9 row M3):
donor fixtures still pass against the moved sources;
git blame -C -C -Cchains back to donor commits
Sub-gate |
Status |
Notes |
|---|---|---|
|
✅ verified |
All 222 moves are |
Donor fixtures pass against moved sources |
⚠️ deferred |
The donor’s C++ test binary ( |
pls4all-fixture C++ tests still pass |
✅ 265/265 |
unchanged by M3 |
File-count budget after M3¶
cpp/src/core/
├── common/ 31 files (landed in M2.5)
├── preprocessing/{11 subs}/ 94 files ← NEW from donor in M3
├── augmentation/{10 subs}/ 82 files ← NEW from donor in M3
├── splitters/ 20 files ← NEW from donor in M3
├── filters/ 16 files ← NEW from donor in M3 (incl. _vendored)
├── utilities/ 10 files ← NEW from donor in M3
├── <models/, selection/, diagnostics/, aom_pop/, transfer/, pipeline/> placeholders only (target for M4 split of pls4all's model.cpp + extra_pls.cpp)
└── <pls4all flat sources at this level> 58 files (unchanged in M3 — M4 splits them)
Total under cpp/src/core/: ~311 files post-M3 (was ~89 after M2).
What is NOT done in M3¶
Per roadmap §9, the following stay open and land later:
M4 — pls4all source split: 6188 lines across
model.cpp(4541 L) +extra_pls.cpp(1647 L) split into ~28 target files. Detailed plan atdocs/merge/M4/SPLIT_PLAN.md(produced by an Explore agent in parallel with M3).M5 — ABI rename:
n4m_*→n4m_*mechanical pass. Until then, pls4all’s flat sources still usen4m_*symbols.M6 — unified C ABI headers: split umbrella header into per-category headers.
M7 — unified parity gate: wires both halves into one runner.
The donor’s broken
_donor/.../cpp/src/CMakeLists.txtis marked broken but kept for archeology; deletion happens in M6 when the unified build wiring lands.
Risk register update¶
Risk |
Status |
|---|---|
Move breaks pls4all build |
✅ Confirmed safe (additive only — pls4all CMakeLists references unchanged) |
Move breaks donor’s standalone build |
Accepted — donor build was already dormant in pls4all repo; flagged in CMakeLists header |
Blame loss on rename |
Mitigated — |
Plural-singular rename causes downstream confusion |
Mitigated — singular |
Next: M4 — pls4all source split¶
Plan ready at docs/merge/M4/SPLIT_PLAN.md. 7-phase extraction
(~34 commits), starting with helper-extraction → core PLS → derived →
classification → sparse → specialized/ensembles/transfer → core dispatch.