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
+7
View File
@@ -304,6 +304,13 @@ RemoveResult BankBook::removeSample(const std::string& sampleId,
: RemoveResult::RejectedSampleAbsent;
}
bool BankBook::updateSampleInPlace(const std::string& sampleId, const Sample& updated) {
for (auto& b : banks_)
if (b.index.query(sampleId) != nullptr)
return b.index.updateInPlace(sampleId, updated);
return false; // no bank holds the id
}
bool BankBook::hashReferencedElsewhere(const std::string& hash,
const std::string& exceptBankId) const {
if (hash.empty()) return false; // empty hashes never dedup (mirror findByHash)