Skip to content

docs(signal-protocol): document persisted skipped-key seeds - #474

Merged
jlucaso1 merged 3 commits into
mainfrom
claude/nifty-bohr-saooyw
Aug 5, 2026
Merged

docs(signal-protocol): document persisted skipped-key seeds#474
jlucaso1 merged 3 commits into
mainfrom
claude/nifty-bohr-saooyw

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follows up whatsapp-rust#1210, which changed how wacore-libsignal persists skipped out-of-order message keys and fixed a bug where a session holding one could never round-trip through the legacy v1 interop projection.

  • SessionMessageKeyMaterial: documented the move from Vec<u8> fields to fixed-width arrays, and corrected the claim that "exported records always use Derived" — a skipped key's seed is now persisted (session_structure::chain::MessageKey.seed, local field 100) and round-trips back out as Seed. Added a breaking-change note covering the array change, the removed MessageKeyGenerator::Keys variant, and the silent-seed-drop-on-downgrade behavior.
  • Legacy session v1 interop: updated the export section — ChainNotRepresentable::DerivedMessageKey used to fire for every skipped key (the projection was lossy from the first cycle); now it's limited to keys persisted before #1210 that never had a seed to retain. Added a note that CI now actually runs the legacy-session-interop test suite, which previously compiled away untested in every job.

Only advanced/signal-protocol.mdx changed — the parts of this feature already documented in detail there. No other doc surface references skipped-key material or this feature.

Test plan

  • Doc renders correctly (Mintlify preview / build)
  • Cross-references ([#1210] links, #session-and-sender-key-shapes anchor) resolve

Generated by Claude Code


Summary by cubic

Updates Signal Protocol docs to reflect persisted skipped-key seeds in wacore-libsignal. Skipped message keys now round-trip as seeds, and legacy v1 interop only errors for pre-#1210 seedless records.

  • Migration

    • SessionMessageKeyMaterial now uses fixed-width arrays; Seed([u8; 32]) can be exported. Match both Seed and Derived.
    • MessageKeyGenerator::Keys removed. Use MessageKeyGenerator::new_from_seed.
    • Downgrading to pre-#1210 drops seeds on write. Decrypt works, but export loses the seed.
    • Legacy v1 interop: only seedless (pre-#1210) skipped keys hit ChainNotRepresentable::DerivedMessageKey.
  • Refactors

    • Tightened prose in the persisted-seed and v1 interop sections to match the style guide; clarified that CI now runs the legacy-session-interop suite.

Written for commit 0ba7b05. Summary will update on new commits.

jlucaso1 and others added 2 commits August 5, 2026 14:23
SessionMessageKeyMaterial's Seed/Derived variants moved to fixed-width
arrays and the seed now round-trips through export instead of only
ever coming back as Derived. Update the legacy v1 interop section to
reflect that only seedless (pre-#1210) records still hit
ChainNotRepresentable::DerivedMessageKey.
SessionMessageKeyMaterial's Seed/Derived variants moved to fixed-width
arrays and the seed now round-trips through export instead of only
ever coming back as Derived. Update the legacy v1 interop section to
reflect that only seedless (pre-#1210) records still hit
ChainNotRepresentable::DerivedMessageKey.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mintlify

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

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

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

SessionMessageKeyMaterial now persists seeds with fixed-size fields and validates derived keys. Seeded skipped keys can round-trip through legacy-session export, while seedless derived keys remain rejected with typed errors.

Changes

Session key material interoperability

Layer / File(s) Summary
Persisted material representation
advanced/signal-protocol.mdx
SessionMessageKeyMaterial::Seed and Derived use fixed-size arrays. Seed-derived keys are validated against stored keys. MessageKeyGenerator::Keys is removed.
Legacy-session export handling
advanced/signal-protocol.mdx
Legacy export reports typed representability errors. Seeded skipped keys export successfully, while seedless derived keys remain rejected. CI runs the legacy interop suite.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Poem

A rabbit checks each seed in place,
With fixed-size keys and careful trace.
Seeded skips now hop back through,
Old derived skips still cannot do.
Typed errors guard the way—
Interop runs in CI today.

🚥 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 main documentation change: documenting persisted skipped-key seeds.

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.

@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: 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 `@advanced/signal-protocol.mdx`:
- Around line 1392-1395: Rewrite the documentation at
advanced/signal-protocol.mdx lines 1392-1395 and 1513-1518 into concise,
active-voice, reader-focused sentences using “you.” At lines 1392-1395, separate
seed persistence, corruption validation, legacy Derived behavior, and
downgrade/migration guidance; at lines 1513-1518, separately explain v1
projection limits, typed errors, seeded-key behavior, and CI coverage. Preserve
all existing behavioral guidance while limiting each sentence to one idea.
🪄 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: 88f14b09-7ad1-45d1-8596-deb04261340c

📥 Commits

Reviewing files that changed from the base of the PR and between e9a7287 and 6d55e8b.

📒 Files selected for processing (1)
  • advanced/signal-protocol.mdx

Comment thread advanced/signal-protocol.mdx Outdated
@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown

Greptile Summary

Updates the Signal Protocol documentation to explain persisted skipped-message-key seeds and their effect on legacy v1 interoperability.

  • Documents the fixed-width SessionMessageKeyMaterial variants and seed round-tripping behavior.
  • Adds migration guidance for direct consumers and downgrade behavior.
  • Clarifies that legacy v1 export rejects only seedless skipped keys persisted before upstream PR #1210.
  • Notes dedicated CI coverage for the optional legacy interop feature.

Confidence Score: 5/5

The documentation-only PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
advanced/signal-protocol.mdx Documents persisted skipped-key seeds, associated breaking API changes, downgrade behavior, and the narrower legacy-v1 export limitation.

Reviews (2): Last reviewed commit: "docs(signal-protocol): tighten prose per..." | Re-trigger Greptile

Split two dense multi-clause passages (persisted-seed behavior and
the legacy v1 export error) into shorter, one-idea sentences, per
this repo's active-voice/second-person style guideline.

Addresses CodeRabbit review comment on PR #474.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

@cubic-dev-ai cubic-dev-ai 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.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Documentation-only update describing already-merged code changes. No behavioral, operational, or security tradeoff to decide.

Re-trigger cubic

@jlucaso1
jlucaso1 merged commit ccb36d2 into main Aug 5, 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