feat(history): persist temporal perspectives and idempotent receipts - #48
Open
DivyamTalwar wants to merge 7 commits into
Open
DivyamTalwar wants to merge 7 commits into
DivyamTalwar wants to merge 7 commits into
Conversation
…tmind-j09-reviewed-20260928 # Conflicts: # docs/open-work-preflight.md # tests/test_open_work_bindings.py
…tmind-j09-reviewed-20260928
7 tasks
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.
Follow-up and scope
Implements J-09, the follow-up tracked in #40. Stacked on #47 for review order. The history API uses JITMIND's scope/temporal contracts; it does not require another product or make optional conversation checkpoints mandatory.
Why this follow-up was necessary
An in-memory seven-query temporal oracle does not prove that earlier knowledge perspectives survive restart. Mutable current facts and an ID-only projection outbox cannot reconstruct the original validity intervals after retroactive corrections.
Implementation
SQLiteTemporalHistorywith immutable complete perspectives, namespace-scoped revisions, compare-and-swap publication, monotonic recorded times and validated interval models.DurableTemporalOracleand frozen idempotent publication receipts. Exact same-key retries reconcile an earlier commit after response loss; different bodies conflict.Review and tests
The independent review found no blocking defect within its bounded SQLite/scope/temporal checks. The supervisor then assembled the final dependency owners and reran:
Candidate
3dadfee445d82d45816a21c68fe6d741a75159ad, parent75574aef663b25f48619fcf2179e59492ddbe49b.Includes 37 new real SQLite cases: all seven temporal queries after reopen/spawned-process restart, concurrent CAS/idempotency, invalid scopes/models, bounded acquisition, commit-error reconciliation, response loss, corruption protection and backup during publication. Counts include inherited tests and are not independent performance samples.
Important boundaries
History uses an explicitly separate database because the current fact store rejects foreign schema objects. There is no atomic transaction across those independent stores. Generic text updates do not automatically create structured temporal perspectives: the host must use the documented structured writer. Legacy historical perspectives are not invented during migration.
DELETE/FULL local SQLite is the supported mode here. TTL affects eligibility, not physical erasure of retained history/backups. Revocation after an accepted COMMIT cannot undo it. Full-history reads fail visibly above configured bounds. Other platforms, hardware power loss, live model quality and donor superiority remain outside these tests.
See
docs/durable-temporal-history.mdfor APIs, retention, migration and backup/restore. Merge prerequisites first, then retarget and rerun CI. No automatic merge.