personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(tests): stabilize two pre-existing flakes under full-suite load

Two unrelated-to-shim-removal pre-existing flakes surfaced during
baseline `make ci` verification and blocked the shim-removal lode.
Both are test-only fixes.

test_entity_intelligence was depending on a gitignored, shared
tests/fixtures/journal/indexer/journal.sqlite whose contents were
only populated if an earlier test happened to run scan_journal
against that fixture first. Replaced the autouse fixture with the
repo-standard journal_copy + scan_journal(..., full=True) pattern
so each test builds its own deterministic index.

test_cortex_client::test_wait_for_agents_missed_event_recovery had
a race between unlinking {use_id}_active.jsonl and writing
{use_id}.jsonl. Under make ci's coverage overhead, wait_for_uses()
could observe the gap and return empty completed. Reordered the
two ops so the terminal file exists before the active marker is
removed — matches the real production invariant relied on by
_find_use_file().

Co-authored-by: Codex <codex@openai.com>

+4 -6
+1 -1
tests/test_cortex_client.py
··· 602 602 def wait_and_complete(): 603 603 # Wait a bit then "complete" the agent by renaming file 604 604 time.sleep(0.3) 605 - (unified_dir / f"{use_id}_active.jsonl").unlink() 606 605 (unified_dir / f"{use_id}.jsonl").write_text('{"event": "finish"}\n') 606 + (unified_dir / f"{use_id}_active.jsonl").unlink() 607 607 608 608 completer = threading.Thread(target=wait_and_complete) 609 609 completer.start()
+3 -5
tests/test_entity_intelligence.py
··· 1 1 # SPDX-License-Identifier: AGPL-3.0-only 2 2 # Copyright (c) 2026 sol pbc 3 3 4 - import os 5 - 6 4 import pytest 7 5 8 6 from think.indexer.journal import ( 9 7 get_entity_intelligence, 10 8 get_entity_strength, 9 + scan_journal, 11 10 search_entities, 12 11 ) 13 12 14 13 15 14 @pytest.fixture(autouse=True) 16 - def fixture_journal(): 17 - os.environ["_SOLSTONE_JOURNAL_OVERRIDE"] = "tests/fixtures/journal" 18 - yield 15 + def indexed_journal(journal_copy): 16 + scan_journal(str(journal_copy), full=True) 19 17 20 18 21 19 class TestEntityStrength: