[semantic-memory] Resumable corpus/backfill ingestion for LLM logs, web research, docs, and historical memory #41
Labels
No labels
accessibility
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/symbolic-memory#41
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?
Parent: #4
Depends on: #5, #6
Goal
Make it practical to semantic-compile large existing corpora into symbolic memory without requiring one giant context or reprocessing everything on every run.
Primary targets:
Required pipeline
Resumability/idempotency
Track enough identity to avoid redoing completed units:
Interrupted ingestion resumes from uncompleted work. Re-running unchanged corpus should mostly become no-op/already-present work.
Changed source content is a new source/version and never mutates previous evidence.
Structured adapters
Where possible, extract structure deterministically before semantic compilation:
That structure informs segmentation and provenance but does not replace semantic rule/procedure induction.
Large-corpus behavior
Backfill mode
Provide a mode that walks existing durable memories and creates missing semantic projections without rewriting source records.
Conceptual API:
Acceptance
Scope clarification from #4/#388/#392-#396: corpus/backfill ingestion must exercise heterogeneous knowledge, not only procedural extraction. Batch fixtures should include events/time, taxonomy/definitions, causal/diagnostic text, policy/defaults/exceptions, quantities/constraints, attributed conflicting claims, hypotheses/scenarios, organization/roles, and mixed documents; preserve cross-segment links and feed cross-memory reconciliation through #10 where needed.
Machine Spirit #399A large-corpus implication
For LLM logs/web/docs backfill, do not make text-window overlap the primary cross-segment memory mechanism. The upstream compiler now needs to carry an explicit symbolic discourse workspace across bounded segments: accessible referents, entity/event candidates, speaker/quote stack, time anchors, section/genre/topic, deterministic source metadata, and unresolved semantic hypotheses.
Structured adapters should feed exact envelope metadata first (LLM role/message/tool-call/result/timestamp/provider IDs; web URL/publication/byline/update; document section/list/table structure) so the semantic model never has to rediscover metadata already known deterministically.
Checkpoint identity should therefore eventually include the upstream discourse/compiler-state version/fingerprint needed to reproduce segment interpretation. The durable corpus store still owns source/checkpoint lifecycle; the ephemeral Semantic Compilation Lattice remains upstream in Prolog-RLM.
Add a corpus fixture where an entity or speaker introduced in segment N is referenced several bounded segments later. The run must preserve identity or explicit ambiguity without loading the whole prior source into one provider context.
Upstream Machine Spirit #399C corpus-ingestion requirement
Large-corpus ingestion must treat analyzer/language/ontology heterogeneity as first-class work identity.
Extend resumable fingerprints/checkpoints to include, where applicable:
Operational requirements:
compiledcounter.See lost-rob0t/prolog-rlm#399 subpass C.
Upstream Machine Spirit #399D backfill execution requirement
Large-corpus/backfill ingestion should consume Prolog-RLM's Semantic Build Graph (SBG) execution receipts instead of treating
segment fingerprint -> compiled yes/noas the whole resumability model.Persist/checkpoint enough state to reuse completed immutable semantic work independently:
Hard behavior:
Symbolic Memory owns the durable ingestion ledger/CAS retention policy; it should not duplicate SCL/SCC/analyzer scheduling logic from Prolog-RLM.
Full design and differential-conformance fixtures: lost-rob0t/prolog-rlm#399D.
Machine Spirit #402A corpus/backfill durability handoff
Depth 5A (
prolog-rlm#402A) makes the resumability contract more precise:A corpus runner checkpoint is not proof a semantic projection is durable; the authoritative receipt is the ledger commit/frontier. After a crash, the runner reconciles work records against committed ledger identities and resumes missing work without duplicating already committed projections.
Changed source bytes remain new source lineage. Same source/work inputs may reuse #399D compiler artifacts, but semantic projection commits are independently idempotent. Progress/status views are rebuildable from durable work/commit lineage and must never manufacture completion from an uncommitted local checkpoint.
For large corpora, physical event/object segments may eventually be tiered, but canonical history cannot be destructively compacted merely to reduce index/log size. Depth 5D owns benchmark thresholds and physical backend choices.
MACHINE-SPIRIT #402C handoff — federated/backfill lineage
Corpus/backfill work that consumes remote/federated sources must checkpoint against logical remote ledger frontiers/checkpoints and federation-link/adapter versions, not merely local file position.
Required distinctions:
Exact sparse frontier/change-feed algorithms are reserved for prolog-rlm#402D. Full composition semantics: prolog-rlm#402C.
Machine Spirit #402D handoff: corpus/backfill ingestion should write stable idempotent event batches against expected ledger frontiers and advance resumable cursors only from committed receipts. Catch-up/projection work consumes deltas from exact frontiers; restart resumes without whole-corpus rescans. Large ingestion must use bounded cursor/page APIs, not whole-store
findall/3. See prolog-rlm#402 SAFIRE D1-D8/D33/D40.Implementation decomposition
#8 remains the canonical large-corpus/backfill requirement. It is now split into:
#22 supplies semantic projection mechanics; #23 publishes accepted semantic history. Keep ingestion orchestration out of the semantic compiler and out of transport adapters.