M10: provenance populate + re-capture from source (bank-only)

Pure provenance core (recipe fingerprint, FX-chain identity, parent
detection) + shell reads; capture stamps provenance on resample-from-sample;
re-capture regenerates a provenanced sample from its source, never touching
the timeline. Adds BankIndex/BankBook in-place update. CTest-covered.
This commit is contained in:
2026-07-26 17:33:22 -04:00
parent 399dafa859
commit 20018c1df2
13 changed files with 1368 additions and 11 deletions
+21 -1
View File
@@ -253,6 +253,19 @@ target_link_libraries(wav_trim PUBLIC peaks)
add_library(app_version STATIC src/app_version.cpp)
target_include_directories(app_version PUBLIC src ${CMAKE_CURRENT_BINARY_DIR}/generated)
# ---------------------------------------------------------------------------
# 2j) Pure provenance library — NO REAPER, NO SWELL. The Milestone 10 core: the
# recorded capture recipe (CaptureRecipe) + the thin drift-fingerprint that
# rides in Provenance.fxChainSnapshot (P1=a), its build/parse round-trip, the
# FX-chain identity fold, and the pure parent-detection decision (resample-from-
# sample by resolved file path). Split out so the encoding + decision logic are
# unit-tested outside the DAW; the FX-chain query, capture re-run, and action
# registration stay in the shell (main.cpp / actions.cpp). No dependency on
# bank_model — it takes plain strings/values at its boundary.
# ---------------------------------------------------------------------------
add_library(provenance STATIC src/provenance.cpp)
target_include_directories(provenance PUBLIC src)
# ---------------------------------------------------------------------------
# 3) Standalone tests for the pure modules (run without launching REAPER).
# ---------------------------------------------------------------------------
@@ -329,6 +342,12 @@ add_executable(app_version_tests tests/test_app_version.cpp)
target_link_libraries(app_version_tests PRIVATE app_version)
add_test(NAME app_version_tests COMMAND app_version_tests)
# The provenance test links bank_model too — it proves the recorded recipe survives
# the Sample-JSON round-trip (Provenance.fxChainSnapshot), the M1 seam M10 rides on.
add_executable(provenance_tests tests/test_provenance.cpp)
target_link_libraries(provenance_tests PRIVATE provenance bank_model)
add_test(NAME provenance_tests COMMAND provenance_tests)
# ---------------------------------------------------------------------------
# 4) The REAPER extension — a loadable module (dlopen'd by REAPER, not linked).
# ---------------------------------------------------------------------------
@@ -359,6 +378,7 @@ add_library(reaper_reasampler MODULE
src/view_tree.cpp
src/view.cpp
src/track_guid.cpp
src/provenance_shell.cpp
src/guid_diff.cpp
src/lane_keys.cpp
src/item_read.cpp
@@ -366,7 +386,7 @@ add_library(reaper_reasampler MODULE
src/bank_book.cpp
src/owned_manifest.cpp
)
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid mode_switch tab_strip view_mode_model insert_plan render_settings tail_control realtime_record bank_book wav_trim owned_manifest app_version)
target_link_libraries(reaper_reasampler PRIVATE bank_model capture_paths peaks bank_grid mode_switch tab_strip view_mode_model insert_plan render_settings tail_control realtime_record bank_book wav_trim owned_manifest app_version provenance)
target_include_directories(reaper_reasampler PRIVATE ${SDK_INC} ${WDL_INC})
# OUTPUT_NAME is channel-derived (Phase V, V4): "reaper_reasampler" (stable, default) or
# "reaper_reasampler_beta" (beta). REAPER dlopen's any reaper_* module, so both channels'