Repository navigation
refactor(memory): consolidate session transcript ingestion - #117293
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 1, 2026, 5:10 AM ET / 09:10 UTC. ClawSweeper reviewWhat this changesThe PR moves live-dreaming and historical-backfill transcript parsing, deduplication, checkpoint persistence, corpus writes, and search citations into a shared private Memory Core ingestion module, while separating a test configuration helper from a broad manager helper. Merge readinessThis PR remains necessary: current main can discard checkpoints for transcript sources left unvisited after the global live-ingestion cap, while the proposed shared owner preserves them and keeps backfill’s separate provenance and cursor policy. I found no discrete correctness defect in the patch; because it centralizes persisted session state and still has exact-head checks in progress, it should stay open for the protected maintainer review path. Priority: P2 Review scores
Verification
How this fits togetherMemory Core consumes session transcripts in two workflows: live dreaming extracts recent interactive-session signals, while backfill processes retained or explicitly supplied archives. Both workflows persist ingestion checkpoints and dedupe hashes, append searchable session-corpus lines, and return citations to later memory features. flowchart LR
A[Session transcript sources] --> B[Live dreaming]
A --> C[Historical backfill]
B --> D[Shared ingestion owner]
C --> D
D --> E[Checkpoint and dedupe state]
D --> F[Searchable session corpus]
F --> G[Memory citations and recall]
Decision needed
Why: The patch is source-supported and proof-backed, but it changes the owner boundary for persisted session-ingestion state used by two workflows and carries the protected Before merge
Agent review detailsSecurityNone. PR surfaceSource -251, Tests +162. Total -89 across 13 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one private ingestion owner for scanning and persistent-state mechanics, retain each workflow’s explicit orchestration and provenance policy, and merge only after the remaining exact-head checks are green and the Memory Core owner accepts the state-transition proof. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main initializes the next live-ingestion checkpoint map empty, stops once the global cap is exhausted, and then writes only visited sources. The PR adds a focused regression that constructs this capped-sweep ordering and verifies the later checkpoint remains unchanged. Is this the best way to solve the issue? Yes. A single private owner for parsing, state, dedupe, corpus append, and citations removes the duplicated lifecycle policy while retaining separate live and backfill orchestration where their product semantics intentionally differ. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b721cffa4461. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
48b4b1c to
434845f
Compare
434845f to
902519f
Compare
|
Merged via squash.
|
* origin/main: fix(update): keep rolled-back Git installs runnable (openclaw#117294) refactor(ui): centralize chat outbox projections (openclaw#117284) fix(sessions): preserve target rows during legacy migration (openclaw#117272) fix(security): detect multiline skill prompt injection (openclaw#117254) fix(qa): lease credentials for Telegram startup proof (openclaw#116842) refactor(memory): unify session ingestion (openclaw#117293) fix(channels): strip internal tool text in Reef and Zalo Personal (openclaw#112621) fix(ui): keep newer Appearance choices after delayed theme imports [AI-assisted] (openclaw#117292) fix(inference): simplify lifecycle and preserve Codex tool identity (openclaw#117298)
* origin/main: fix(update): keep rolled-back Git installs runnable (openclaw#117294) refactor(ui): centralize chat outbox projections (openclaw#117284) fix(sessions): preserve target rows during legacy migration (openclaw#117272) fix(security): detect multiline skill prompt injection (openclaw#117254) fix(qa): lease credentials for Telegram startup proof (openclaw#116842) refactor(memory): unify session ingestion (openclaw#117293) fix(channels): strip internal tool text in Reef and Zalo Personal (openclaw#112621) fix(ui): keep newer Appearance choices after delayed theme imports [AI-assisted] (openclaw#117292) fix(inference): simplify lifecycle and preserve Codex tool identity (openclaw#117298)
What Problem This Solves
Session transcript ingestion had separate live-dreaming and historical-backfill implementations for parsing, checkpoints, dedupe hashes, state persistence, and corpus citations. That duplication allowed policy and lifecycle behavior to drift. In particular, a live sweep that reached its global candidate cap replaced checkpoint state with only the files it visited, so later sources could lose their checkpoints and replay already-ingested transcript content.
After #117247 merged, its shared test config isolator also sat in the broad manager test helper. Importing that manager helper from tools test support made the test-project router discover seven unrelated transitive importers, breaking precise changed-test routing and blocking unrelated CI shards.
Why This Change Was Made
This creates one private session-ingestion owner for transcript normalization, provenance, hashing, checkpoint persistence, corpus append, and MemorySearchResult citations. Live dreaming and historical backfill retain separate orchestration policies:
The main-wide test-import repair moves isolateMemoryManagerTestConfig into one dependency-free type-only test leaf. Manager watcher/self-heal tests and tools test support import that leaf directly; the broad lazy manager helper no longer exports or owns config isolation. The helper still preserves explicit plugins.enabled, nested entries, allowlists, slots, and load settings while defaulting only an omitted enabled field. After rebasing onto the current-main routing update, the strict exact expected importer list deletes only the seven now-stale paths and retains the canonical five; the assertion is not weakened.
The shared ingestion owner removes connected duplicate state, scanner, hashing, and corpus-writing code. Handwritten production delta remains 603 additions / 855 deletions: net -252 lines. Tests and test-support are 184 additions / 21 deletions: net +163 lines.
User Impact
Operators should see no intended workflow or configuration change. Live dreaming no longer replays later sessions after a capped sweep loses their checkpoints, and historical backfill reliably notices content replacement even when filesystem size and mtime are preserved. The test-support repair restores precise changed-test routing so unrelated Memory Core tests and dependent PRs do not enter oversized shards.
Evidence