Skip to content

Harden ontology handling for Zep-backed simulations#204

Open
nativ3ai wants to merge 2 commits into666ghj:mainfrom
nativ3ai:fix/zep-ontology-sanitization
Open

Harden ontology handling for Zep-backed simulations#204
nativ3ai wants to merge 2 commits into666ghj:mainfrom
nativ3ai:fix/zep-ontology-sanitization

Conversation

@nativ3ai
Copy link

Summary

  • normalize generated edge names to Zep-compatible SCREAMING_SNAKE_CASE before ontology submission
  • skip malformed ontology rows and invalid attribute/source-target entries instead of crashing on missing keys
  • allow the Vite dev server port to be overridden via MIROFISH_FRONTEND_PORT

Why

Running MiroFish against Grok-generated ontologies exposed two failure modes in the graph pipeline:

  1. mixed-case edge names such as ANALYzes are rejected by Zep
  2. malformed entity or edge rows from the ontology LLM output can trigger KeyError: 'name'

These changes make the pipeline tolerate that noise and keep the simulation workflow moving.

Validation

  • python3 -m py_compile backend/app/services/graph_builder.py backend/app/services/ontology_generator.py
  • verified the patched flow locally against Grok + Zep on real simulation runs

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Mar 16, 2026
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant