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:
@@ -273,9 +273,9 @@ ImportResult importFileIntoActiveBank(const std::string& absoluteSourcePath) {
|
||||
s.createdTimestamp = nowSec;
|
||||
|
||||
const AddResult r = book.activeIndex().add(s);
|
||||
// Record as owned regardless of outcome — the tool WROTE the file, so prune must
|
||||
// Record the birth regardless of outcome — the tool WROTE the file, so prune must
|
||||
// attribute it even in the narrow Collapsed race below.
|
||||
g_session->owned().add(paths.relativePath);
|
||||
g_session->recordCreated(s, tracking::OriginKind::Ingest);
|
||||
|
||||
switch (r) {
|
||||
case AddResult::Added:
|
||||
|
||||
Reference in New Issue
Block a user