Skip to content

fix(desktop/windows): align memories paging with backend 500 cap - #10761

Merged
Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:fix/windows-memories-page-limit-500
Jul 28, 2026
Merged

Git-on-my-level merged 1 commit into
BasedHardware:mainfrom
Git-on-my-level:fix/windows-memories-page-limit-500

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 28, 2026 •

Copy link
Copy Markdown
Member

Summary

Fix-forward for main after #10750: Desktop Windows CI Typecheck · Lint · Test failed because two client paths still assumed the old first-page limit=5000 contract.

Changes

  • createGetMemoriesExecutor clamps max limit to 500 (matches backend hard page cap).
  • useMemories tests/comments updated for 500-row paging (no forced first-page 5000).

Product invariants affected

  • INV-CHAT-1

Failure-Class

Failure-Class: none

Verification

  • Targeted Windows vitest files: useMemories.test.ts, memoriesBulk.test.ts, productToolExecutorsTierB.test.ts (run in CI Desktop Windows lane).

Non-goals

No backend changes; no deploy.

Review in cubic

After BasedHardware#10750, Windows CI failed: get_memories tool still clamped to 5000
and useMemories tests still expected forced first-page 5000.

Failure-Class: none

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7cd92722c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

path: '/v1/tools/memories',
query: {
limit: clampInt(input.limit, 50, 1, 5000),
limit: clampInt(input.limit, 50, 1, 500),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the tools endpoint's 5000-item limit

When get_memories is called with a limit between 501 and 5000, this now silently returns at most 500 memories even though this executor calls /v1/tools/memories, whose route still accepts limit <= 5000 (backend/routers/tools.py:169-180) and whose service independently clamps at 5000 (backend/utils/retrieval/tool_services/memories.py:41-43). The new 500-row cap applies to /v3/memories, not this tools endpoint, so large explicit reads are truncated without any indication that another offset is required; keep this clamp aligned with the endpoint actually called, or page the tools endpoint internally.

AGENTS.md reference: AGENTS.md:L47-L47

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 8e118c3 into BasedHardware:main Jul 28, 2026
34 checks passed
undivisible pushed a commit to Archit-lal/omi that referenced this pull request Jul 29, 2026
…edHardware#10761)

After BasedHardware#10750, Windows CI failed: get_memories tool still clamped to 5000
and useMemories tests still expected forced first-page 5000.

Failure-Class: none
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