mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
45d6caf723
The API Pydantic schema had a MaxLen(1000) constraint on observation content while the database uses SQLAlchemy's Text type (unlimited). This mismatch caused validation errors when observations exceeded 1000 characters (e.g., JSON schemas with 1458+ chars). Removed the MaxLen constraint to match the DB schema. Retained: - BeforeValidator(str.strip) for whitespace cleaning - MinLen(1) to ensure non-empty content Added comprehensive tests to verify: - Long content (10K+ chars) is accepted - Very long content (50K+ chars) is accepted - Empty/whitespace-only content is still rejected - Whitespace stripping still works Fixes #385 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>