Skip to content

fix(api): reject blank retain content#1685

Merged
benfrank241 merged 2 commits into
vectorize-io:mainfrom
xmh1011:fix/issue-1259-empty-retain-content
May 22, 2026
Merged

fix(api): reject blank retain content#1685
benfrank241 merged 2 commits into
vectorize-io:mainfrom
xmh1011:fix/issue-1259-empty-retain-content

Conversation

@xmh1011
Copy link
Copy Markdown
Contributor

@xmh1011 xmh1011 commented May 21, 2026

Summary

  • Reject empty and whitespace-only retain memory content at request validation time.
  • Preserve valid non-empty content without trimming.
  • Add HTTP regression coverage for blank content using the none-provider API fixture.
  • Include generated docs/provider formatting sync required by repository hooks.

Closes #1259.

Tests

  • HINDSIGHT_API_LLM_PROVIDER=none uv run pytest tests/test_none_llm_provider.py::test_http_retain_works tests/test_none_llm_provider.py::test_http_retain_rejects_blank_content -q
  • uv run ruff check hindsight_api/api/http.py tests/test_none_llm_provider.py
  • uv run ty check hindsight_api/api/http.py
  • ./scripts/generate-openapi.sh
  • ./scripts/generate-bank-template-schema.sh
  • ./scripts/generate-clients.sh
  • ./scripts/generate-docs-skill.sh
  • ./scripts/hooks/lint.sh

@benfrank241 benfrank241 merged commit 86b686c into vectorize-io:main May 22, 2026
58 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.

[Bug] v0.5.4: Empty/whitespace-only memory content is accepted instead of rejected 4xx

2 participants