fix(storage): derive the canonical count ledger from identity records, stamp the derivation rule, and mark legacy-derived ledgers suspect at load
This commit is contained in:
parent
204d74c161
commit
fd6b4ce4ff
4 changed files with 285 additions and 7 deletions
|
|
@ -4820,6 +4820,10 @@ export abstract class BaseStorage extends BaseStorageAdapter {
|
|||
this.totalVerbCountAll = allVerbs
|
||||
this.totalVectoredNounCount = allVectoredNouns
|
||||
this.allCountsSuspect = false
|
||||
// This walk counts one entity per metadata.json record (never per bare
|
||||
// container) — the identity-record rule. Stamp it so a future load
|
||||
// trusts these scalars instead of naming them suspect at open.
|
||||
this.allCountsDerivedBy = 'identity-record'
|
||||
this.countCache.clear()
|
||||
await this.persistCounts()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue