Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript
1.5 KB
Raw Blame

kind: fix

When a newer fact replaces an older one, every writer now ends the older fact's validity by one rule. It ends on the newer fact's valid_from when that date falls after the older fact began and before the older fact's own end (or now, if it had none); otherwise it ends at its own earlier end or now, and never before its own valid_from (a fact dated in the future ends where it begins). Per writer: remember with replaces (managed or not) and the engine supersede path used to leave the older fact open-ended when the newer fact was backdated, and now end it at the time of the write; the unmanaged remember that strikes the row in a page's facts table used to end it on today's date and now ends it at the newer fact's valid_from, which for remember is the time of the write; an accepted gbrain decide proposal used to end it at the time of acceptance and now ends it on the newer fact's valid_from when that falls inside the older fact's window; expireFact takes an optional successor date and applies the same rule. Extraction already used the rule and only gains the backdated case. A backdated replacement is one dated on or before the day the older fact began. For one of those, the older fact's end date is the day gbrain learned of the replacement (the time of the write), not a date taken from the source, unless the older fact already had an earlier end, which it keeps. Only future writes change. No stored row is rewritten, and forgetting or withdrawing a fact works exactly as before.