Skip to content

docs: document critical app-state sync deadline - #384

Merged
jlucaso1 merged 2 commits into
mainfrom
claude/nifty-bohr-bkcktd
Jul 5, 2026
Merged

docs: document critical app-state sync deadline#384
jlucaso1 merged 2 commits into
mainfrom
claude/nifty-bohr-bkcktd

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Documents the reliability fix from whatsapp-rust#974, which was just merged.
  • Adds a new "Critical app-state sync (pairing bootstrap)" subsection under Connection Lifecycle in concepts/architecture.mdx, right after the existing "Offline sync" subsection.
  • Explains the single 180s CRITICAL_SYNC_TIMEOUT_SECS deadline (matching WhatsApp Web's WAWebSyncBootstrap) that now bounds the whole critical app-state sync path at pairing/reconnect: the watchdog-first arming, the 10s auto-shared-key grace, and the deadline-bounded AppStateSyncKeyRequest fallback that lets a late or never-auto-shared key still recover on the same connection instead of stalling until the watchdog forces a reconnect.
  • Also notes that non-critical app-state sync callers (background regular collections, group server_sync, ib dirty-resync) are unaffected and keep the fixed 10s key wait.

No other user-facing behavior changed in the source PR (the rest of the diff is internal signature changes and a new regression test), so no other doc pages needed updates.

Test plan

  • mint broken-links (if available) to confirm no broken links were introduced
  • Visual review of the new subsection under Core Concepts → Architecture → Connection Lifecycle

🤖 Generated with Claude Code


Generated by Claude Code


Summary by cubic

Document the critical app-state sync deadline for pairing bootstrap. A single 180s window covers the watchdog, a 10s key-share grace, and a deadline-bounded AppStateSyncKeyRequest, so late or missing keys can recover on the same connection. Adds a "Critical app-state sync (pairing bootstrap)" subsection under Connection Lifecycle and notes that non-critical sync keeps the fixed 10s key wait.

  • Bug Fixes
    • Restored the dropped sentence about single-device peer-message session locking in "Per-device session locks".
    • Restored the "App state sync protocol" wording for the appstate module comment.

Written for commit c250cd1. Summary will update on new commits.

Adds a "Critical app-state sync (pairing bootstrap)" subsection under
Connection Lifecycle describing the 180s critical-sync deadline, the
10s auto-shared-key grace, and the deadline-bounded AppStateSyncKeyRequest
fallback that lets a late/never-auto-shared key still recover on the
same connection instead of stalling to the watchdog reconnect.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jlucaso1, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: c1a649d9-8f6a-4cf6-9b4c-03b4be24d23b

📥 Commits

Reviewing files that changed from the base of the PR and between fa5819a and c250cd1.

📒 Files selected for processing (1)
  • concepts/architecture.mdx

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.

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

No issues found across 1 file

Confidence score: 5/5

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

Auto-approved: Adds documentation for critical app-state sync deadline. No code changes, only a new subsection in an architecture doc.

Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Jul 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR documents the reliability fix from whatsapp-rust#974, adding a "Critical app-state sync (pairing bootstrap)" subsection under Connection Lifecycle in concepts/architecture.mdx. It also fixes a missing newline at the end of the file.

  • Explains the single 180-second CRITICAL_SYNC_TIMEOUT_SECS deadline that bounds the whole critical-sync path: the watchdog arm, the 10 s KEY_SHARE_GRACE_SECS auto-key wait, and the deadline-bounded explicit AppStateSyncKeyRequest fallback for late or missing keys.
  • Clarifies that non-critical sync callers (background collections, server_sync, ib dirty-resync) are unaffected and still use the fixed 10 s key wait.

Confidence Score: 5/5

Documentation-only change; no executable code is touched and the new subsection accurately reflects the described upstream behavior.

The change adds a single new documentation subsection and fixes a missing trailing newline. The prose faithfully captures the 180 s deadline, the 10 s key-share grace, and the explicit key-request fallback, with no contradictions found in the surrounding context. No logic, APIs, or configuration values are modified.

No files require special attention.

Important Files Changed

Filename Overview
concepts/architecture.mdx Adds "Critical app-state sync (pairing bootstrap)" subsection documenting the 180s deadline, 10s key-share grace, and deadline-bounded key-request fallback; also fixes missing trailing newline.

Reviews (2): Last reviewed commit: "fix: restore accidentally-dropped peer-l..." | Re-trigger Greptile

Comment thread concepts/architecture.mdx Outdated
Comment thread concepts/architecture.mdx Outdated
@mintlify

mintlify Bot commented Jul 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 Jul 5, 2026, 9:09 PM

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

…ment

Greptile caught two regressions introduced in the previous commit while
transcribing the file: the "appstate" module comment was mistakenly
changed from "App state sync protocol" to "App state management", and
the sentence documenting single-device peer-message session locking
was silently dropped from the "Per-device session locks" section.
Neither was an intentional change; both are restored verbatim.

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

Auto-approved: Documentation-only change: adds a new subsection on critical app-state sync timing to the architecture docs. No code or logic changes.

Re-trigger cubic

@jlucaso1
jlucaso1 merged commit 93df57d into main Jul 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.

1 participant