fix(memory): unblock legacy chunk reembedding#123
Conversation
|
Warning Review limit reached
Next review available in: 31 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 Plus Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThe change adds legacy chunk-content fallback handling, refines re-embedding skip-marker semantics, broadens ChangesMemory compatibility behavior
Dependency and build alignment
OpenHuman ownership documentation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/openhuman-memory-migration.md`:
- Around line 7-10: Unify the sync ownership terminology across
docs/openhuman-memory-migration.md:7-10, docs/openhuman-memory/README.md:13,
docs/openhuman-memory/sources-registry-sync.md:194-195, and
docs/plan/05-openhuman-compat-matrix.md:74-77: describe TinyCortex as owning
only reusable provider fetch, pagination, and canonicalization pipeline
mechanics behind injected traits, while OpenHuman owns the live sync runner,
credentials, scheduling, policy, callbacks, RPC, and product events. Update each
site to remove any implication that TinyCortex owns or does not own the complete
sync responsibility, preserving the single pipeline-versus-runner contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 977a9e60-21e2-4947-9c13-5926249b30b5
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (14)
.cargo/config.toml.github/workflows/ci.ymlCargo.tomldocs/openhuman-memory-engine-spec.mddocs/openhuman-memory-migration.mddocs/openhuman-memory/README.mddocs/openhuman-memory/openhuman-code-reference.mddocs/openhuman-memory/sources-registry-sync.mddocs/plan/05-openhuman-compat-matrix.mdsrc/memory/chunks/embeddings.rssrc/memory/chunks/store_embed_tests.rssrc/memory/store/content/read.rssrc/memory/store/content/read_tests.rsvendor/tinyagents
|
| Filename | Overview |
|---|---|
| src/memory/chunks/embeddings.rs | Adds DELETE of matching skip marker after a successful embedding upsert, and widens the NOT EXISTS subquery filter to exclude both legacy reason strings so those chunks remain visible to the retry loop |
| src/memory/store/content/read.rs | Replaces hard errors for absent/empty content pointers with a fallback to read_legacy_chunk_preview; generates a distinct terminal error string for empty legacy content that is not matched by the LIKE exclusion patterns |
| src/memory/chunks/store_embed_tests.rs | Adds four new tests covering skip-marker clearing, both excluded LIKE patterns, the terminal legacy-empty case, and the non-legacy skip marker case |
| src/memory/store/content/read_tests.rs | Adds two integration tests: legacy content column fallback and exact terminal error string for empty legacy content |
| docs/openhuman-memory-migration.md | Documentation-only ownership boundary description refresh |
| docs/openhuman-memory/README.md | Documentation-only boundary wording update |
| docs/openhuman-memory/sources-registry-sync.md | Documentation-only ownership wording update |
| docs/plan/05-openhuman-compat-matrix.md | Documentation-only pipeline ownership clarification |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[read_chunk_body] --> B{raw refs present?}
B -- yes --> C[read_chunk_body_from_raw]
B -- no --> D{content pointer row exists?}
D -- yes, non-empty path --> E[read_chunk_file]
D -- no row --> F[read_legacy_chunk_preview]
D -- empty path --> F
F --> G{get_chunk returns Some?}
G -- no --> H["bail: no content pointer or raw refs\n(LIKE-excluded → retry)"]
G -- yes --> I{chunk.content empty?}
I -- yes --> J["bail: legacy chunk content empty\n(NOT excluded → terminal)"]
I -- no --> K[return chunk.content]
E --> L[upsert embedding]
K --> L
L --> M[DELETE matching skip marker]
M --> N[chunk no longer in reembed work queue]
Reviews (5): Last reviewed commit: "fix(memory): keep empty legacy chunks te..." | Re-trigger Greptile
953afeb to
e681073
Compare
e681073 to
700bf8b
Compare
Summary
Verification
Relation to source retrieval work
The
mem_srcsource-retrieval fix has been split into focused PR #124. OpenHuman's current local integration branch can temporarily point athobertrand-hub/tinycortex:integration/openhuman-memory-repairuntil the legacy andmem_srcfixes are merged upstream and the submodule pointer is rebased onto upstreammain.