Skip to content

fix(memory/sync): send fetch_type in Notion NOTION_FETCH_DATA args - #144

Open
YellowSnnowmann wants to merge 1 commit into
tinyhumansai:mainfrom
YellowSnnowmann:fix/notion-sync-fetch-type-5506
Open

fix(memory/sync): send fetch_type in Notion NOTION_FETCH_DATA args#144
YellowSnnowmann wants to merge 1 commit into
tinyhumansai:mainfrom
YellowSnnowmann:fix/notion-sync-fetch-type-5506

Conversation

@YellowSnnowmann

@YellowSnnowmann YellowSnnowmann commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Composio's NOTION_FETCH_DATA action now requires a fetch_type field. The memory-sync Notion provider's arguments() never sent it, so every periodic Notion memory sync failed with Following fields are missing: {'fetch_type'}.

This adds "fetch_type": "pages" to the sync provider's request args. It's unconditional because this path hardcodes filter: {value: "page"}, so "pages" is the only valid value (the agent-tool path's inference logic is deliberately not duplicated here).

The agent-tool path in OpenHuman already handles this via ensure_notion_fetch_type; only this memory-sync path was still missing the field.

Fixes tinyhumansai/openhuman#5506.

API Or Behavior Changes

None — internal request-args shape only. Adds a field the upstream Composio API now requires.

Tests

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • cargo build --all-targets
  • cargo test — 1396 tests, 0 failed

Added a body_partial_json matcher on the NOTION_FETCH_DATA mock in tests/composio_sync_mock.rs asserting the outgoing request carries fetch_type: "pages" (fails pre-fix), following the existing Slack/ClickUp request-body matcher pattern in the same file.

Documentation

None needed — internal provider request shape.

Summary by CodeRabbit

  • Bug Fixes
    • Improved Notion page synchronization by explicitly requesting page data during fetches.
    • Preserved existing pagination, filtering, and sorting behavior.

Composio's NOTION_FETCH_DATA now requires fetch_type; the memory-sync
Notion provider's arguments() omitted it, so every periodic sync 400s.

Closes #5506
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e85d66b6-7606-498f-8027-c32681d7d67e

📥 Commits

Reviewing files that changed from the base of the PR and between 4f6517c and b9b38fc.

📒 Files selected for processing (2)
  • src/memory/sync/composio/providers/notion.rs
  • tests/composio_sync_mock.rs

📝 Walkthrough

Walkthrough

The Notion memory sync request now includes fetch_type: "pages". The Composio sync mock validates that the request includes this required argument.

Changes

Notion memory sync

Layer / File(s) Summary
Notion request and mock validation
src/memory/sync/composio/providers/notion.rs, tests/composio_sync_mock.rs
The Notion fetch request adds fetch_type: "pages". The mock requires the same value.

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

Mergeability Score: ⚪ Minimal · up to b9b38

The Notion memory-sync request now includes the required page fetch type, restoring compatibility without changing public APIs, permissions, data scope, or deployment behavior; no actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: senamakel

Poem

I’m a rabbit with pages to fetch,
A missing field now passes the check.
The sync hops along,
With mock guards strong,
And Notion requests are in spec! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds and tests fetch_type for tinycortex, but provides no task-source audit or evidence that the submodule pointer was bumped [#5506]. Audit and patch the task-source path if required, and include the updated tinycortex submodule pointer.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding fetch_type to Notion NOTION_FETCH_DATA arguments.
Out of Scope Changes check ✅ Passed The provider change and mock validation directly support the linked issue and contain no unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@YellowSnnowmann
YellowSnnowmann marked this pull request as ready for review August 13, 2026 10:13
@tinysweeper

tinysweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown

What this change touches

2 files, +4 -1 across 2 components. The code graph knows nothing about these files yet — normal for newly added files, and a cold index otherwise.

flowchart LR
  n0["tests<br/>1 file +3 -0"]:::changed
  n1["src/memory/sync/composio/providers<br/>1 file +1 -1"]:::changed
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed. Grey: untouched, reached through an import or a call. Orange: has findings. Red: has a finding that blocks the merge.

Component Files Lines Findings
tests changed 1 +3 -0
src/memory/sync/composio/providers changed 1 +1 -1
Changed files

tests

  • tests/composio_sync_mock.rs

src/memory/sync/composio/providers

  • src/memory/sync/composio/providers/notion.rs

tinysweeper 0.1.0

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

tinysweeper found nothing blocking. Approving.

             $0.0077 · 10,747 in / 2,186 out · 9,038 cached (84%) · z-ai/glm-5.2
critique:    $0.0040 · 3,138 in  / 1,395 out · 2,765 cached (88%) · z-ai/glm-5.2
security:    $0.0011 · 3,096 in  / 203 out   · 2,729 cached (88%) · z-ai/glm-5.2
tests:       $0.0010 · 1,664 in  / 215 out   · 1,222 cached (73%) · z-ai/glm-5.2
description: $0.0006 · 2,004 in  / 82 out    · 1,726 cached (86%) · z-ai/glm-5.2

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Notion memory sync fails — tinycortex provider missing fetch_type in NOTION_FETCH_DATA args (ce98837 unfixed)

1 participant