fleet-memory/hindsight-api/hindsight_api/alembic/versions
Nicolò Boschi 90e370ef35
fix: misc fixes for observations and mental models (#209)
* fix: misc fixes for observations and mental models

* feat: improve graph retrieval for observations

- Update LinkExpansionRetriever to traverse through source_memory_ids
  for observation entity connections (avoiding data duplication)
- Remove entity link copy from world facts to observations in consolidator
- Add tests for link expansion graph retrieval
- Add directives_applied field to ReflectResult
- Include user's other changes (CLI, docs, client updates)

* fix: CI test failures

- Add mental_model_id parameter to create_mental_model function
- Fix ToolCallTrace not including reason field from ToolCall
- Improve test_link_expansion_observation_graph_retrieval to wait for consolidation with retry

* chore: reduce link expansion log verbosity

* Revert "chore: reduce link expansion log verbosity"

This reverts commit 3ce759391cead1012157785fa78fef16ef9bfe3b.

* feat: add semantic/temporal/entity links as fallback in graph retrieval

- Add fallback query for semantic, temporal, and entity links from memory_links
- Check both directions (outgoing and incoming links)
- Weight fallback results at 0.5x to prioritize entity links via unit_entities
- Fixes graph retrieval returning 0 when data has cross-cluster temporal connections

* fix: enable observations fixture for link expansion test

- Add enable_observations fixture to ensure observations are created
- Increase wait time from 10 to 30 seconds for CI reliability
2026-01-27 15:37:57 +01:00
..
5a366d414dce_initial_schema.py misc: add mcp integration tests and increase test coverage (#98) 2026-01-05 11:16:55 +01:00
b7c4d8e9f1a2_add_chunks_table.py misc: add mcp integration tests and increase test coverage (#98) 2026-01-05 11:16:55 +01:00
c8e5f2a3b4d1_add_retain_params_to_documents.py misc: add mcp integration tests and increase test coverage (#98) 2026-01-05 11:16:55 +01:00
d9f6a3b4c5e2_rename_bank_to_interactions.py feat: extensions (#54) 2025-12-22 11:05:23 +01:00
e0a1b2c3d4e5_disposition_to_3_traits.py misc: add mcp integration tests and increase test coverage (#98) 2026-01-05 11:16:55 +01:00
f1a2b3c4d5e6_add_memory_links_composite_index.py fix: improve mpfp retrieval (#146) 2026-01-12 18:58:05 +01:00
g2a3b4c5d6e7_add_tags_column.py feat: add memory tags (#152) 2026-01-13 18:28:40 +01:00
h3c4d5e6f7g8_mental_models_v4.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
i4d5e6f7g8h9_delete_opinions.py feat: introduce mental models (#132) 2026-01-16 11:16:41 +01:00
j5e6f7g8h9i0_mental_model_versions.py feat: improve mental model refresh and add directives (#166) 2026-01-19 11:38:35 +01:00
k6f7g8h9i0j1_add_directive_subtype.py feat: improve mental model refresh and add directives (#166) 2026-01-19 11:38:35 +01:00
l7g8h9i0j1k2_add_worker_columns.py feat: new 'worker' service (#176) 2026-01-20 10:17:56 +01:00
m8h9i0j1k2l3_mental_model_id_to_text.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
n9i0j1k2l3m4_learnings_and_pinned_reflections.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
o0j1k2l3m4n5_migrate_mental_models_data.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
p1k2l3m4n5o6_new_knowledge_architecture.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
q2l3m4n5o6p7_fix_mental_model_fact_type.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
r3m4n5o6p7q8_add_reflect_response_to_reflections.py feat: revisit mental models, directives and reflections (#179) 2026-01-22 17:13:16 +01:00
rename_personality_to_disposition.py misc: add mcp integration tests and increase test coverage (#98) 2026-01-05 11:16:55 +01:00
s4n5o6p7q8r9_add_consolidated_at_to_memory_units.py fix: improve mental model consolidation (#197) 2026-01-26 09:54:25 +01:00
t5o6p7q8r9s0_rename_mental_models_to_observations.py chore: internal renames (#204) 2026-01-27 09:53:28 +01:00
u6p7q8r9s0t1_mental_models_text_id.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
v7q8r9s0t1u2_add_max_tokens_to_mental_models.py fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00