[RESEARCH][materialization] Incremental semantic-ledger → Prolog materialization, invalidation, and replay contract #388
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nsaspy/prolog-rlm#388
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Related: #392 #394 #400 #402 #408 #409
Research question
Specify the generic materialization contract that turns an append-only semantic ledger into a current Prolog reasoning view while preserving exact replay, provenance, lifecycle semantics, and deterministic rebuildability.
This issue is backend-neutral. CouchDB/#408 is one candidate transport; the materialization semantics must not depend on CouchDB-specific behavior.
This is a research/design issue only. Do not implement a materializer here.
Target architecture
Canonical ledger history remains authoritative. Materialized Prolog state is rebuildable derived state.
Core questions
Required invariants
Research and formalize at least:
Rebuild equivalence
under normalized query outcomes and receipts.
Canonical-state separation
Deleting a cache or restarting Prolog must never destroy knowledge.
Lifecycle correctness
No execution laundering
Ledger records are data. Materialization must never
consult/1,call/1, or otherwise execute arbitrary source/model-supplied Prolog.Candidate strategies to compare
Evaluate at least:
Compare memory use, update latency, query latency, invalidation complexity, explanation quality, historical-cut support, and failure behavior.
Incremental invalidation graph
Research an explicit dependency graph such as:
A change should invalidate only actual downstream dependents where supported.
But incremental optimization must never change semantics: if dependency tracking is uncertain, fall back to a bounded safe rebuild of the affected projection.
Checkpoint / crash semantics
Specify crash points including:
A checkpoint must not claim a cut is materialized until the corresponding projection is atomically visible under the chosen semantics.
Define stale/lagging/rebuilding/integrity-blocked result states where current exact knowledge cannot be served.
Concurrency
Research whether the first profile should use:
Do not create a second scheduler in the design.
Historical / temporal reasoning
A current materialized projection must not destroy the ability to answer:
Research whether historical queries are best served by temporary projections, direct ledger queries, or reusable checkpoints.
Required outputs
Produce a research record containing:
Acceptance
Non-goals