feat: add temporal claims to wiki pages - #223
Open
Amidwestnoob wants to merge 1 commit into
Open
Conversation
This was referenced Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add temporal claims to OpenKB pages
Closes #222
Problem
OpenKB stores factual state as prose. A page cannot identify the date of a claim. A page cannot separate assistant output from source evidence. A page also cannot show how new evidence corrects an old claim.
Approach
This change adds claims to summary, concept, and entity pages.
claimsfield as a one-line JSON array in YAML frontmatter.textfield.as_offield.source_anchorfield.statusfield to have a value ofproposed,validated,superseded, orabandoned.idfield in OpenKB code.idfield.supersedesfield.superseded_bysupersession links for the applied links.read_current_page_claims()for strict current reads.statusvalue ofproposedonly after an explicit request.Authority rules
The optional
authorityfield can have a value offirst_party,document, orassistant.statusvalue ofvalidated, OpenKB changes the value toproposed.statusvalue ofvalidated.authorityvalue offirst_partycan supersede another claim with anauthorityvalue offirst_party.idvalue as an incoming duplicate claim, OpenKB keeps the stored claim.authorityfield todocumentbefore it writes a model claim.authorityfield todocumentfor summary, concept, and entity pages.authorityfield tofirst_partyorassistantthrough the public claims API.authorityvalue ofdocumentuse the sameas_ofandstatusrules as claims without anauthorityfield.Synthetic regression case
The tests use a synthetic device.
statusvalue ofproposed.authorityvalue offirst_party.statusvalue ofproposed.current_claims()returns the corrections from the claims that have anauthorityvalue offirst_party.statusvalue ofsuperseded.The tests also cover direct authority changes. The tests cover duplicate-identity authority changes. The tests cover supersession link injection through a duplicate
idvalue.Aggregate production case study
A conversation-ingestion deployment supplied these aggregate lessons. The deployment filtered private data before model inference.
Public documentation
README.mdexplains theclaimsfield and strict current reads.README.mdexplains theauthorityfield.openkb/schema.pydefines each JSON field and each allowed field value.docs/golden-principles.mddefines the history, authority, and duplicate-ID rules.Tests
The deterministic tests cover these cases:
idfield.text,as_of,status,source_anchor, andauthorityfields.supersedesandsuperseded_bysupersession links.statusvalue ofvalidated.authorityvalue offirst_party.statusvalue ofabandonedcannot supersede a claim with astatusvalue ofvalidated.authorityvalue offirst_party.idvalue cannot change the storedauthorityorstatusfield.idvalue cannot add a supersession link.authorityfield todocumentbefore each summary, concept, or entity write.as_ofandstatusfields permit the supersession link.authorityfield can supersede another claim without anauthorityfield when theas_ofandstatusfields permit the supersession link.claimsJSON array.read_current_page_claims()rejects a path outside the wiki root.Run these commands:
The last run gave these results:
pytest: 1,286 passed.ruff check .: passed.ruff format --check .: 122 files already formatted.mypy openkb/claims.py: passed.git diff --check: passed.Risks and non-goals
authorityfield tofirst_party.current_claims()for strict current reads.Relation to existing work
Follow-up
Create a separate conversation adapter that does not depend on a transport. Create a separate materialization interface. The adapter and the interface can provide deterministic cleaning. The adapter and the interface can provide source identifiers. The adapter and the interface can provide speaker identifiers. The adapter and the interface can provide authority values. The adapter and the interface can provide evidence identifiers. The adapter and the interface can provide bounded documents. The adapter and the interface can provide recovery splits. The adapter and the interface can provide closed windows. The adapter and the interface can provide content hashes. The adapter and the interface can provide idempotent manifests. The adapter and the interface can provide timeouts. The adapter and the interface can provide replay-safe compilation.
Caller code must control transport lists. Caller code must control closed-window delays. Caller code must control privacy filters. Caller code must control credentials. Caller code must control scheduler limits. The adapter design and the interface design must not depend on PR #179.