Skip to content

fix(python-client): restore memory listing filter parity - #5140

Merged
nicoloboschi merged 1 commit into
vectorize-io:mainfrom
rudycelekli:fix/python-memory-filter-parity-20261002
Oct 6, 2026
Merged

nicoloboschi merged 1 commit into
vectorize-io:mainfrom
rudycelekli:fix/python-memory-filter-parity-20261002

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Problem

The API, generated Python client and TypeScript convenience wrapper already support document_id, state and consolidation_state, but Hindsight.list_memories/alist_memories reject them with TypeError. Python convenience users cannot inspect one document, invalidated facts or failed/pending consolidation without dropping down to the generated API.

Change

Expose and forward all three existing filters in both synchronous and asynchronous wrappers. Append arguments to preserve existing positional calls, document semantics and keep omitted fields absent. Add actual HTTP query serialization for all six state/consolidation combinations and reserved characters in document IDs, an omitted-filter control and a sync/async family guard.

TypeScript listMemories already forwards documentId/state/consolidationState. This restores the existing wrapper contract and does not introduce an endpoint or server behavior.

Verification

  • Regression before the fix on upstream main: 8 failed, 1 passed.
  • Focused regression and related client suites after the fix: 56 passed on CPython 3.13.5.
  • Changed-file Ruff check, new test formatting and git diff --check pass.
  • Baseline-aware ty check: pristine main and this patch each report the same 15 diagnostic messages, with no added diagnostic.
  • Repository code-review checklist and independent parent review completed with no actionable findings.
PYTHONPATH=hindsight-clients/python python -m pytest hindsight-clients/python/tests/test_list_memory_filter_parity.py hindsight-clients/python/tests/test_list_time_window_mapping.py hindsight-clients/python/tests/test_async_sync_parity.py -q -o addopts=

Required scripts/hooks/lint.sh was attempted; frozen dependency synchronization fails because the sparse checkout lacks workspace member hindsight-all, before lint jobs start. Full server, database and LLM integration suites were not run. These tests exercise the actual imported SDK and generated transport against local aiohttp HTTP routes. GitHub CI is separate from these local checks.

Prepared with AI assistance.

@github-actions github-actions Bot added the core label Oct 2, 2026
Signed-off-by: Rudy Celekli <47457359+rudycelekli@users.noreply.github.com>
@nicoloboschi
nicoloboschi force-pushed the fix/python-memory-filter-parity-20261002 branch from 4ed5211 to 94c5cec Compare October 6, 2026 08:55
@nicoloboschi
nicoloboschi merged commit 8caf4a7 into vectorize-io:main Oct 6, 2026
99 of 100 checks passed
@nicoloboschi nicoloboschi mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants