Skip to content

fix(sdk): adapt client timestamp boundaries - #327

Draft
jlucaso1 wants to merge 1 commit into
mainfrom
agent/sdk-timestamp-migration
Draft

jlucaso1 wants to merge 1 commit into
mainfrom
agent/sdk-timestamp-migration

Conversation

@jlucaso1

@jlucaso1 jlucaso1 commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Update the WhatsApp SDK lockfile pin to 14661bb40 and adapt the client to the SDK's millisecond Timestamp type. Convert at SDK boundaries so IPC dates and stored timestamps retain their existing representation. Keep the existing wall clock and use integer milliseconds directly where the client already expects them.

Validation

  • Workspace check with all targets passed against both SDK revisions, 08f07dd9e and 14661bb40.
  • Core unit tests passed on the final source. The 251 passing tests include coverage of the SDK timestamp range and signed epoch milliseconds. Two tests were ignored.
  • For the size A/B, the client source is fixed. The two lockfiles vary only by the SDK revision. Cargo manifests and build flags stay unchanged.

Release blocker

The daemon release link on 08f07dd9e and the chat-store test link on 14661bb40 both fail on sqlite3_progress_handler. The current SDK selects Diesel 2.4, which references that symbol during SQLite connection cleanup. The existing bundled SQLite configuration defines SQLITE_OMIT_PROGRESS_CALLBACK, so the symbol is absent.

This draft contains the timestamp migration independently of the SQLite compatibility decision. The accumulated size comparison still requires working release links with a common configuration.


Summary by cubic

Adapts the client to the SDK's millisecond Timestamp type, converting at the SDK boundary so IPC dates and stored timestamps keep their existing UTC representation.

  • Pins the WhatsApp SDK lockfile to 14661bb40.
  • Adds crates/core/src/time.rs with from_sdk and now_utc conversion helpers.
  • Uses .as_millis() and the SDK's now_millis() where integer milliseconds are needed.
  • Updates tests to build SDK timestamps through the new helper.

Release blocker

The daemon release link and chat-store test link fail on sqlite3_progress_handler because the SDK now selects Diesel 2.4, which references that symbol while the bundled SQLite config omits it.

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

View guided diff Turn on auto-fix

@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The timestamp changes appear safe to merge; jlucaso1's separately acknowledged SQLite link failure still blocks release.

Summary

This PR adapts the client to the SDK's millisecond timestamps while keeping existing dates in storage and messages between processes.

  • The client keeps its UTC dates while using the SDK’s millisecond timestamps.

No new actionable issues found. Tests were not run during this review.

Known release blocker: jlucaso1 explicitly deferred the sqlite3_progress_handler link failure pending a SQLite compatibility decision.

Reviews (1) · Last reviewed commit: "fix(sdk): adapt client timestamp boundar..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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