-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Context
After pulling latest (Dec 5 model refinements), the Belief Pydantic validator for tags (List[str]) silently filters out non-string items during creation, which broke a quick test of tag-based listing in storage stubs. This propagates to agent tagging (e.g., PerceptionAgent) without warnings.
Steps to Reproduce
git pull origin main(post-Dec 5).- In a test script:
belief = Belief(..., tags=["user_pref", None, 123])→ Create via store. await store.list(tags=["user_pref"])stub → Misses belief (tags became ["user_pref"] only).- Check logs → No error; just quiet drop.
Expected vs Actual
- Expected: Validator raises ValidationError on invalid tags (e.g., None/int) for explicit debugging.
- Actual: Strips invalids silently → Subtle data loss, hard to trace in agent pipelines.
Logs/Screenshots
- Pydantic log (if verbose):
WARNING: Ignoring invalid tag 'None' in list. - Test output: showing len(tags) mismatch.
- Commit ref: Likely in belief.py @root_validator for tags.
Suggested Fix
Update validator to raise ValueError on non-str tags. Add a unit test in tests/core/models/test_belief.py for tag validation. Fix before Phase 4 agents rely on tags.
Reactions are currently unavailable