fix: normalize LLM profile fields at one boundary - #737
Merged
Conversation
This was referenced Jul 22, 2026
brovzar-lab
pushed a commit
to brovzar-lab/MiroFish-Lemon
that referenced
this pull request
Jul 28, 2026
Brings in: Zep memory cap for long runs (OOM fix, PR 666ghj#730), zep-cloud 3.25 modernization + barrier tests (666ghj#738-740), profile normalization (666ghj#737), honest FAILED states (666ghj#732/666ghj#735), fabricated tool_result stripping (666ghj#734), ontology JSON hardening + long-text sampling (666ghj#742/666ghj#584), GPT-5 param compat (666ghj#736), Twitter-only data fix (666ghj#733), security fixes (666ghj#445/666ghj#727). Conflict resolutions: - llm_client.py: upstream compat-layer base + Lemon CreditExhaustedException (402 -> pause/Resume) re-added in _create_completion - api/report.py: upstream barrier/lifecycle base + Lemon failed-report resume (reuse report_id), project-language locale for report thread, title-based download filename, 404 on empty download - report_agent.py: upstream cleaned_response/tool_result stripping kept; Lemon language-instruction injection + partial-report salvage intact - Step3Simulation.vue: upstream authoritative runner_status (drops Lemon platformsCompleted shortcut, superseded by the Zep ingestion barrier) 139 backend tests pass; vite build clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OasisAgentProfile.__post_init__list[str]Why
PR #161 correctly identified that structured JSON values can reach fields later treated as strings. Its original implementation repeated slightly different coercion rules during parsing, object construction, and serialization; it could emit the literal text
None, leave nested topics unstable, and did not normalize MBTI.The maintained version establishes one canonical object boundary so every downstream serializer sees the same valid profile shape.
Validation
uv run pytest -q tests/test_profile_field_normalization.py— 4 passedNone, Unicode, nested dictionaries/lists, direct construction, Twitter CSV, and Reddit JSONgit diff --checkpassedPreserves the original contributor commit and supersedes #161.
Fixes #154
🤖 Sent by the MiroFish repository maintenance agent.