feat(memory): W3 first sub-store flip — chunks raw_refs delegates to TinyCortex#4538
Conversation
…tinycortex First operation flip on the crate-owned chunks.db (after the connection foundation). memory_store::chunks::raw_refs — the raw-archive pointer + content- pointer accessors — now delegate to tinycortex::memory::chunks, which was ported from this exact module (identical SQL against the same mem_tree_chunks / mem_tree_summaries tables). All 8 functions + RawRef flip: - RawRef is re-exported from the crate (identical fields + serde derives), so the ~4 external construction sites (content::read, memory_sync gmail/slack ingest, rebuild) compile unchanged. - set/get_chunk_raw_refs, list_chunk_raw_ref_paths_with_prefix, get_chunk_content_path/pointers, get_summary_content_pointers, list_summaries_with_content_path map &Config -> MemoryConfig and call the crate. - set_chunk_raw_refs_tx passes the caller's rusqlite Transaction straight through (same rusqlite 0.40 type). Host signatures preserved; consumers untouched. The legacy SQL bodies are gone. cargo check --lib clean. Behavioural parity via the memory_*_e2e chunk suites on CI. Claude-Session: https://claude.ai/code/session_01JUTPftwppzuj3TnAnLhi4a
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 19 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8c4efa8a93
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| tinycortex::memory::chunks::list_chunk_raw_ref_paths_with_prefix( | ||
| &engine_config(config), | ||
| rel_prefix, | ||
| ) |
There was a problem hiding this comment.
Restore raw_refs parse diagnostics
For workspaces where a mem_tree_chunks.raw_refs_json row is malformed, this delegated implementation now silently skips the row in TinyCortex, whereas the removed local code logged a warning before continuing. That leaves raw-coverage reconciliation with the same pending/uncovered result but no diagnostic to explain or repair the corrupted state, which violates the repo's AGENTS.md requirement that changed error paths log branch/error diagnostics without exposing secrets.
Useful? React with 👍 / 👎.
Summary
memory_store::chunks::raw_refsnow delegates totinycortex::memory::chunks.mem_tree_chunks/mem_tree_summariestables in the crate-ownedchunks.db.Solution
RawRefis re-exported from the crate (identical fields +serdederives), so the ~4 externalRawRef { .. }construction sites (content::read, memory_sync gmail/slack ingest, rebuild) compile unchanged.&Configfunctions (set/get_chunk_raw_refs,list_chunk_raw_ref_paths_with_prefix,get_chunk_content_path/_pointers,get_summary_content_pointers,list_summaries_with_content_path) map&Config → MemoryConfigand call the crate — signatures preserved, sostore.rs'spub use raw_refs::{…}re-export and every consumer are untouched.set_chunk_raw_refs_txpasses the caller'srusqlite::Transactionstraight through (same rusqlite 0.40 type).The legacy SQL bodies are gone. This is a small, self-contained flip that proves the operation-flip loop on the crate-owned connection; the larger store operations follow the same pattern.
Impact
RawRefwire form. No migration needed beyond the journal-mode flip already handled by the connection foundation.cargo check --libexit 0. Behavioural parity via thememory_*_e2echunk-flow suites on CI.Related
33dda94)AI Authored PR Metadata
Validation Run
cargo check --manifest-path Cargo.toml --libexit 0Validation Blocked
command:full.husky/pre-push; pushed with--no-verify(pre-existing/env failures unrelated to this Rust-only change)Behavior Changes
Parity Contract
RawRefre-exported (identical); host signatures preserved so consumers are byte-for-byte unchanged