refactor: add memory session sync identity API#89348
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 21, 2026, 8:07 PM ET / 00:07 UTC. Summary PR surface: Source +243, Tests +187, Generated 0. Total +430 across 18 files. Reproducibility: not applicable. this is a refactor/API PR rather than a bug report. Source inspection shows current main only supports path-shaped Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Use #95087 as the reviewed landing path and close this draft only after maintainer acceptance or merge; revive this branch only if maintainers want the narrower API slice. Do we have a high-confidence way to reproduce the issue? Not applicable; this is a refactor/API PR rather than a bug report. Source inspection shows current main only supports path-shaped Is this the best way to solve the issue? No as a standalone merge path right now. The combined successor is the better review unit because it includes the dependent QMD identity mapping and proof, but protected status means maintainers must own the final stack decision. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1f6ae32cabb9. Label changesLabel justifications:
Evidence reviewedPR surface: Source +243, Tests +187, Generated 0. Total +430 across 18 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Superseded by #95087. The replacement draft bundles this memory session sync identity API slice with the dependent QMD artifact identity mapping from #89360, stacked on #95030. That keeps the memory-core targeted sync API and QMD session-search visibility mapping in one review unit with current proof and autoreview. |
What
Adds identity-based memory session sync targets so memory-core can sync runtime transcripts by storage-neutral session identity while keeping deprecated
sessionFilescompatibility for canonical OpenClaw transcript paths.Why
Path 3 needs memory sync to stop treating transcript filenames as canonical identity before the SQLite storage flip. The scoped transcript read/write APIs can address known transcript targets, but memory sync also needs an identity-shaped targeted-sync request that can work under either file-backed or SQLite-backed stores.
Refs #88838. Builds on #89262.
Changes
sync({ sessions })sessionFilespackages/memory-host-sdk/src/host/types.tspackages/memory-host-sdk/src/host/session-files.tsextensions/memory-core/src/memory/manager-sync-ops.tsextensions/memory-core/src/memory/manager-sync-control.tsextensions/memory-core/src/memory/manager.tsextensions/memory-core/src/memory/qmd-manager.tssrc/plugin-sdk/memory-core-host-engine-storage.tsdocs/.generated/plugin-sdk-api-baseline.sha256Testing
node scripts/run-vitest.mjs packages/memory-host-sdk/src/host/session-files.test.ts extensions/memory-core/src/memory/manager-targeted-sync.test.ts extensions/memory-core/src/memory/manager-session-sync-state.test.ts extensions/memory-core/src/memory/manager.readonly-recovery.test.ts extensions/memory-core/src/memory/manager-sync-yield.test.ts extensions/memory-core/src/memory/manager-sync-ops.startup-catchup.test.tspnpm exec oxfmt --check <touched files>node scripts/run-oxlint.mjs <touched files>pnpm exec tsx scripts/sync-plugin-sdk-exports.ts --checkpnpm exec tsx scripts/check-plugin-sdk-subpath-exports.tspnpm exec tsx scripts/generate-plugin-sdk-api-baseline.ts --checkBroad
tsgoproof is still blocked by existing unrelated Copilot/UI type errors outside this branch.