Skip to content

docs(changelog): group-devices memo behind topology generation (whatsapp-rust#824) - #302

Closed
jlucaso1 wants to merge 1 commit into
mainfrom
claude/eager-cerf-0xyrbp
Closed

docs(changelog): group-devices memo behind topology generation (whatsapp-rust#824)#302
jlucaso1 wants to merge 1 commit into
mainfrom
claude/eager-cerf-0xyrbp

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds changelog/2026-06-10-group-devices-memo.mdx documenting the per-group device-list memo introduced in whatsapp-rust#824
  • Registers the new entry at the top of the changelog navigation in docs.json

What changed in whatsapp-rust#824

The resolved (LID-converted) device list for group sends is now memoized per group behind a topology generation counter. A warm repeat send to an 800-member group drops from ~514 µs to ~161 ns (~3200×). Key design points covered in the changelog:

  • Enforced-by-construction write recording (DeviceRegistryCache + LidPnCache::add fused with DeviceTopology)
  • Scoped invalidation: unrelated-group write storms re-stamp instead of recomputing
  • GroupInfo Arc identity as a free invalidation signal for membership/metadata changes
  • Memo disabled when store-backed (shared external) caches are configured
  • Status path keeps the existing unmemoized resolution

No public API changes in the source PR.

https://claude.ai/code/session_01GEtwwd3bRNL1zxiUJtyoVe


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Added release notes documenting a performance improvement for group device sending operations through optimized caching mechanisms.

Adds changelog entry for whatsapp-rust#824 — per-group device list
memoized behind a DeviceTopology generation counter. Covers the 3200×
warm-send improvement, scoped invalidation, enforced-by-construction
write recording, and the shared-store opt-out.

https://claude.ai/code/session_01GEtwwd3bRNL1zxiUJtyoVe
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds documentation for a group device memoization performance optimization released June 10, 2026. It includes a detailed changelog entry explaining memoization strategy, validity conditions, topology tracking, and updates the docs navigation index.

Changes

Group device memoization documentation

Layer / File(s) Summary
Group device memoization changelog entry and navigation
changelog/2026-06-10-group-devices-memo.mdx, docs.json
New changelog document describes memoization of per-group resolved device lists as Arc<Vec<Jid>>, with memo validity tied to GroupInfo identity and topology generation counters. Documents topology-tracked invalidation enforced at device-registry and LID→PN mapping write points, disabled behavior for shared external caches, unchanged status-path handling, benchmark results, and confirms no breaking public API changes. Navigation entry added to docs.json.

Possibly related PRs

  • oxidezap/whatsapp-rust-docs#301: Both changelog entries document performance optimizations for group device resolution during sending—main PR via memoizing per-group resolved device lists, and retrieved PR via server-aware get_devices_from_registry lookup probing—so they relate to the same device-resolution path.

Poem

🐰 A memo springs forth in the garden of docs,
Device lists cached tight in responsive blocks,
Topology whispers when changes appear—
Performance blooms when invalidations are clear! 📝

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: documenting a group devices memoization feature behind topology generation, with a clear reference to the upstream issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/eager-cerf-0xyrbp

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
changelog/2026-06-10-group-devices-memo.mdx (1)

10-40: ⚡ Quick win

Consider using active voice and second person per documentation guidelines.

The coding guidelines require active voice and second person ("you") for documentation in MDX files. This changelog uses third person and passive constructions throughout (e.g., "The resolved device list is now memoized" rather than "You can now benefit from memoized device lists" or similar).

While changelogs traditionally use third-person narrative to describe system changes, the project's documentation guidelines explicitly apply to **/*.{md,mdx}. Consider either:

  • Rewriting in active voice with second person to align with guidelines, or
  • Clarifying whether changelogs are exempt from the general documentation voice guidelines.

Additionally, several sentences contain multiple ideas that could be split for clarity:

  • Line 10: Combines what the system did, what it fed, and the performance cost
  • Line 26: Packs invalidation logic, log checking, and re-stamping into one complex sentence
  • Line 28: Describes the store configuration, visibility issue, and disabling behavior in one sentence
🤖 Prompt for 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.

In `@changelog/2026-06-10-group-devices-memo.mdx` around lines 10 - 40, The
changelog uses passive/third-person voice; update it to active voice and second
person (use "you") or state that changelogs are exempt; reword sentences like
the ones describing memoization, scoped invalidation, and shared-store disabling
into direct instructions/benefits (e.g., "You get a memoized resolved device
list as an Arc<Vec<Jid>> tied to GroupInfo identity"), and split complex
sentences (the paragraphs that mention DeviceRegistryCache/LidPnCache tracking,
the re-stamp logic checking change logs, and the group_devices_memo_enabled
behavior for shared stores) into shorter lines so each idea maps to a single
sentence referencing the unique symbols GroupInfo, Arc<Vec<Jid>>,
DeviceRegistryCache, LidPnCache, resolve_skdm_targets,
group_devices_memo_enabled, and Client to keep readers clear about the specific
components and behaviors.

Source: Coding guidelines

🤖 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.

Nitpick comments:
In `@changelog/2026-06-10-group-devices-memo.mdx`:
- Around line 10-40: The changelog uses passive/third-person voice; update it to
active voice and second person (use "you") or state that changelogs are exempt;
reword sentences like the ones describing memoization, scoped invalidation, and
shared-store disabling into direct instructions/benefits (e.g., "You get a
memoized resolved device list as an Arc<Vec<Jid>> tied to GroupInfo identity"),
and split complex sentences (the paragraphs that mention
DeviceRegistryCache/LidPnCache tracking, the re-stamp logic checking change
logs, and the group_devices_memo_enabled behavior for shared stores) into
shorter lines so each idea maps to a single sentence referencing the unique
symbols GroupInfo, Arc<Vec<Jid>>, DeviceRegistryCache, LidPnCache,
resolve_skdm_targets, group_devices_memo_enabled, and Client to keep readers
clear about the specific components and behaviors.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f4b56495-a0e3-459c-a2fa-918685f0bfbc

📥 Commits

Reviewing files that changed from the base of the PR and between b6037c4 and 5843a53.

📒 Files selected for processing (2)
  • changelog/2026-06-10-group-devices-memo.mdx
  • docs.json

@mintlify

mintlify Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
whatsapp-rust 🟢 Ready View Preview Jun 10, 2026, 11:17 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants