Skip to content

docs: reflect Signal-store read routing from whatsapp-rust#1222 - #484

Merged
jlucaso1 merged 2 commits into
mainfrom
claude/nifty-bohr-b619ej
Aug 7, 2026
Merged

docs: reflect Signal-store read routing from whatsapp-rust#1222#484
jlucaso1 merged 2 commits into
mainfrom
claude/nifty-bohr-b619ej

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

whatsapp-rust#1222 ("perf(sqlite): route Signal reads through the read pool") changed what SqliteStoreConfig::read_pool_size actually covers. Previously, only whatsapp-rust-chat-store's queries went through SharedSqlite::read — session, identity, sender-key, and pre-key lookups on the Signal decrypt path (get_session, load_identity, get_sender_key, load_prekey, and similar) stayed on the single write-path permit regardless of read_pool_size. That PR routed most of SqliteStore's own SignalStore/AppSyncStore/ProtocolStore/DeviceStore read methods through the reader pool too, deliberately holding back a handful whose stale answer would go out on the wire, fail an operation outright, or get promoted into a cache unconditionally (app-state sync key lookups, messageSecret reads, get_devices, etc.).

This is a real behavior change for anyone who has turned read_pool_size on: it now buys concurrency for the whole read surface, not just chat/message queries.

Changes

  • concepts/storage.mdx — added a note under the SqliteStoreConfig tuning section explaining the widened read_pool_size coverage and the reads deliberately excluded.
  • api/store.mdx — updated the SharedSqlite::read/run note to say that SqliteStore's own read methods now use read the same way whatsapp-rust-chat-store does, with the exceptions called out.

No changelog entries were touched, per instructions.


Generated by Claude Code


Summary by cubic

Update docs to reflect whatsapp-rust#1222: most of SqliteStore’s Signal-store reads now use the read pool, so SqliteStoreConfig::read_pool_size covers more than just whatsapp-rust-chat-store queries. Clarifies that some reads still queue on write-path permits (app-state sync key lookups, messageSecret, get_devices) and that stale reads can fail an operation outright.

Written for commit 1577f3c. Summary will update on new commits.

read_pool_size now also governs SqliteStore's own SignalStore/
AppSyncStore/ProtocolStore/DeviceStore reads (session, identity,
sender-key, pre-key lookups), not just whatsapp-rust-chat-store's
queries. Notes the deliberate exceptions kept on the write queue.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016x8h4pG6KBbRULQ1cBfzen
@mintlify

mintlify Bot commented Aug 7, 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 Aug 7, 2026, 6:21 PM

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

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The documentation clarifies SQLite read routing. It lists lookup paths that use the reader pool and reads that remain on the write queue for consistency.

Changes

SQLite read routing

Layer / File(s) Summary
Document SQLite read routing
api/store.mdx, concepts/storage.mdx
The documentation identifies SqliteStore lookups that use the reader pool and selected reads that remain on run or the write queue.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

I’m a rabbit with a careful pen,
Mapping reads from end to end.
Pools now guide the lookup flow,
Write queues hold what must stay slow.
Clearer docs hop into view—
A tidy trail for readers too!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the documentation change that reflects Signal-store read routing.

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.

@greptile-apps

greptile-apps Bot commented Aug 7, 2026

Copy link
Copy Markdown

Greptile Summary

The PR updates the SQLite storage documentation to reflect that read_pool_size now serves most Signal and related store reads.

  • Documents the expanded reader-pool coverage in the storage tuning guide.
  • Identifies consistency-sensitive reads that remain on the write path.
  • Aligns the SharedSqlite::read API guidance with the new routing behavior.

Confidence Score: 5/5

The documentation-only PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
api/store.mdx Updates SharedSqlite::read guidance and now includes all three reasons consistency-sensitive reads remain on run.
concepts/storage.mdx Explains the expanded read_pool_size coverage, concurrency implications, and deliberately excluded reads.

Reviews (2): Last reviewed commit: "docs: address review feedback on read-po..." | Re-trigger Greptile

Comment thread api/store.mdx Outdated

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

Actionable comments posted: 2

🤖 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 `@api/store.mdx`:
- Line 519: Update the permit-count wording in api/store.mdx:519 and
concepts/storage.mdx:968-970 to describe the write path's configured permits
rather than a single permit, while preserving any default-case qualification if
needed. Ensure both notes accurately reflect SqliteStoreConfig::pool_size, which
may be greater than one.

In `@concepts/storage.mdx`:
- Around line 968-970: Update the final sentence of the Note to limit the
concurrency claim to pooled reads, replacing “the whole read surface” with “most
of the read surface” or equivalent wording such as “all reads routed through the
reader pool.” Preserve the preceding examples of reads that remain on the write
queue.
🪄 Autofix

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: ASSERTIVE

Plan: Pro Plus

Run ID: 19fff44c-c2db-4220-a7fe-8dd31f6d9de3

📥 Commits

Reviewing files that changed from the base of the PR and between 663a83d and 86f2b2b.

📒 Files selected for processing (2)
  • api/store.mdx
  • concepts/storage.mdx

Comment thread api/store.mdx Outdated
Comment thread concepts/storage.mdx

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 86f2b2b39f

ℹ️ 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".

Comment thread concepts/storage.mdx Outdated
</Note>

<Note>
As of [whatsapp-rust#1222](https://github.com/oxidezap/whatsapp-rust/pull/1222), `read_pool_size` also covers most of `SqliteStore`'s own `SignalStore`/`AppSyncStore`/`ProtocolStore`/`DeviceStore` reads, not just [`whatsapp-rust-chat-store`](/api/chat-store)'s queries. Session, identity, sender-key, and pre-key lookups on the decrypt path — `get_session`, `load_identity`, `get_sender_key`, `load_prekey`, and similar — now run on the reader pool instead of queueing behind `pool_size`'s single write permit, raising the ceiling on read concurrency during a write-behind flush. A handful of reads stay on the write queue by design because a stale answer would go out on the wire, fail an operation outright, or get promoted into a cache unconditionally — app-state sync key lookups, `messageSecret` reads, and `get_devices` among them. Widening `read_pool_size` past `0` now buys concurrency for the whole read surface, not just chat/message queries.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Split the read-pool guidance into concise sentences

Rewrite this note as several short, reader-focused sentences: it currently combines coverage, examples, performance effects, exceptions, and a summary in one very long sentence, while api/store.mdx:519 similarly extends an already long sentence. This makes the configuration guidance difficult to scan and violates the repository requirement to keep one idea per sentence.

AGENTS.md reference: AGENTS.md:L24-L25

Useful? React with 👍 / 👎.

Comment thread concepts/storage.mdx Outdated
</Note>

<Note>
As of [whatsapp-rust#1222](https://github.com/oxidezap/whatsapp-rust/pull/1222), `read_pool_size` also covers most of `SqliteStore`'s own `SignalStore`/`AppSyncStore`/`ProtocolStore`/`DeviceStore` reads, not just [`whatsapp-rust-chat-store`](/api/chat-store)'s queries. Session, identity, sender-key, and pre-key lookups on the decrypt path — `get_session`, `load_identity`, `get_sender_key`, `load_prekey`, and similar — now run on the reader pool instead of queueing behind `pool_size`'s single write permit, raising the ceiling on read concurrency during a write-behind flush. A handful of reads stay on the write queue by design because a stale answer would go out on the wire, fail an operation outright, or get promoted into a cache unconditionally — app-state sync key lookups, `messageSecret` reads, and `get_devices` among them. Widening `read_pool_size` past `0` now buys concurrency for the whole read surface, not just chat/message queries.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid claiming concurrency for the whole read surface

Replace “the whole read surface” with “most of the read surface” or similarly qualified wording. The same sentence explicitly states that app-state sync key, messageSecret, and get_devices reads remain on the write queue, so read_pool_size > 0 does not provide concurrency for the whole read surface and the conclusion can mislead readers sizing this pool.

Useful? React with 👍 / 👎.

- Note stale reads can fail an operation outright (api/store.mdx),
  matching the same claim already made in concepts/storage.mdx.
- Say "write-path permits" instead of "single permit" since pool_size
  can be configured above its default of 1.
- Say "most of the read surface" instead of "the whole read surface" —
  a handful of reads stay on the write queue by design.
- Split the two long notes into shorter, one-idea sentences.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016x8h4pG6KBbRULQ1cBfzen

jlucaso1 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Pushed 1577f3c addressing the review feedback from CodeRabbit, Greptile, and Codex:

  • api/store.mdx: noted that a stale read can also fail an operation outright, matching the parallel claim in concepts/storage.mdx.
  • Both notes: replaced "single permit"/"single write permit" with "write-path permits", since pool_size isn't necessarily 1.
  • concepts/storage.mdx: "the whole read surface" → "most of the read surface", since a handful of reads deliberately stay on the write queue.
  • Split both notes into shorter, one-idea-per-sentence prose per this repo's style guide.

Generated by Claude Code

@jlucaso1
jlucaso1 merged commit d19b0a1 into main Aug 7, 2026
4 checks passed
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