tracking: one ledger, one authority — prune protection and replace-vs-add answered from the same records, fail-safe on unreadable state
This commit is contained in:
@@ -31,14 +31,13 @@ void CommitRealtimeResult(ReaSamplerSession& session, const CaptureResult& res)
|
||||
return;
|
||||
}
|
||||
session.bank().add(res.sample);
|
||||
// Record the file in the owned manifest regardless of the index AddResult — even
|
||||
// a hash-collapse still wrote a file the tool owns; the manifest dedups a repeat
|
||||
// path itself (prune reconciles manifest vs index).
|
||||
session.owned().add(res.sample.relativePath);
|
||||
// Record the birth regardless of the index AddResult — even a hash-collapse still
|
||||
// wrote a file the tool owns; the ledger dedups a repeat path itself.
|
||||
session.recordCreated(res.sample, tracking::OriginKind::Capture);
|
||||
// A capture add changes what a live instance could play, so bump the generation
|
||||
// before persisting to refresh instances.
|
||||
session.bumpBankGeneration();
|
||||
session.saveToActiveProject(); // persist book + manifest + generation + MarkProjectDirty
|
||||
session.saveToActiveProject(); // persist book + ledger + generation + MarkProjectDirty
|
||||
}
|
||||
|
||||
// Advances any in-flight realtime capture one tick. Detects a project switch
|
||||
|
||||
Reference in New Issue
Block a user