feat(lid-pn): make add_lid_pn_mapping pub for embedder-learned sources - #1013
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesVisibility Change
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 `@src/client/lid_pn.rs`:
- Around line 151-156: The visibility-rationale note above add_lid_pn_mapping is
using plain // comments between the #[cfg_attr] attribute and the public
function, so it won’t show up in rustdoc and breaks doc-comment placement. Move
that rationale into the existing /// doc comment for add_lid_pn_mapping so the
public API guidance is documented for external consumers, and keep the attribute
immediately followed by the function signature.
🪄 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: Repository UI (base), Organization UI (inherited)
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 30dfc979-354d-4405-b27b-189638197fdf
📒 Files selected for processing (1)
src/client/lid_pn.rs
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Confidence score: 5/5
- Safe to merge after the addressed issues were fixed.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Embedders can learn LID-PN pairs from sources the library does not process itself (e.g. app-state ContactAction mutations carry lidJid/pnJid). Exposing the durable learn path lets them feed those through cache, store, write policy, and session migration instead of writing the backend mapping table behind the cache's back.
332f36b to
8b10753
Compare
Embedders can learn LID-PN pairs from sources the library does not process itself — e.g. app-state
ContactActionmutations carrylidJid/pnJidfor the user's address-book contacts, which never hit the message/usync learning paths.Exposing the durable learn path (
add_lid_pn_mapping) lets an embedder feed those pairs through the cache, store, the #1011 source-aware write policy, and session migration, instead of writing the backend mapping table behind the cache's back (which would bypass the write policy entirely).One-line visibility change plus a comment documenting the rationale; no behavior change.