Skip to content

fix(email): default EmailMessage.sent_at to now() when omitted (sibling of openhuman#5169) - #133

Merged
M3gA-Mind merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/email-sent-at-serde-default
Jul 30, 2026
Merged

fix(email): default EmailMessage.sent_at to now() when omitted (sibling of openhuman#5169)#133
M3gA-Mind merged 1 commit into
tinyhumansai:mainfrom
M3gA-Mind:fix/email-sent-at-serde-default

Conversation

@M3gA-Mind

Copy link
Copy Markdown
Collaborator

Summary

EmailMessage::sent_at had no serde default, so an email payload omitting sent_at hard-rejected the whole thread with missing field 'sent_at'. This is the email-arm counterpart of the chat fix in openhuman#5169ChatMessage::timestamp already tolerates the missing field via #[serde(default = "chrono_now")]; email did not.

Change

src/memory/ingest/canonicalize/email.rs:

  • Add a local chrono_now() default helper (mirrors chat.rs).
  • Add #[serde(default = "chrono_now")] to sent_at, so an omitted field falls back to Utc::now() instead of rejecting.

email_tests.rs: 3 regression tests — missing_sent_at_defaults_to_now, null_sent_at_defaults_to_now, and explicit_sent_at_still_parses (guards the default from masking a real value).

Behaviour is otherwise unchanged: an explicit sent_at (epoch-ms or RFC 3339) still parses exactly as before.

Tests

Regression tests mirror the chat-arm ones added in openhuman#5169. Not run locally (no-local-build policy); relying on CI.

Related

Note: the openhuman submodule pin bump + merge are intentionally deferred to the maintainer.

An email payload missing `sent_at` hard-rejected the entire thread with
`missing field 'sent_at'` — the same failure mode the chat arm fixed in
openhuman#5169. Mirror `ChatMessage::timestamp`: add a `chrono_now` serde
default on `sent_at`, plus missing/null/explicit regression tests.

Refs tinyhumansai/openhuman#5281, tinyhumansai/openhuman#5169

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

M3gA-Mind has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 25 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: CHILL

Plan: Pro

Run ID: 6f65e517-9c0f-490e-9760-bae211001c4f

📥 Commits

Reviewing files that changed from the base of the PR and between e5753bb and 33041ad.

📒 Files selected for processing (2)
  • src/memory/ingest/canonicalize/email.rs
  • src/memory/ingest/canonicalize/email_tests.rs

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

@M3gA-Mind
M3gA-Mind merged commit 115e4bb into tinyhumansai:main Jul 30, 2026
8 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.

invalid chat payload: missing field 'timestamp' — chat message schema mismatch

1 participant