personal memory agent
Testing#
Test Structure#
- Framework: pytest with coverage reporting
- Unit Tests:
tests/root directory- Fast, no external API calls
- Use
tests/fixtures/journal/mock data - Test individual functions and modules
- Integration Tests:
tests/integration/subdirectory- Test real backends (Anthropic, OpenAI, Google)
- Require API keys in
.env - Test end-to-end workflows
- Naming: Files
test_*.py, functionstest_* - Fixtures: Shared fixtures in
tests/conftest.py
Fixture Journal#
# Use comprehensive mock journal data for testing
os.environ["_SOLSTONE_JOURNAL_OVERRIDE"] = "tests/fixtures/journal"
# Now all journal operations work with test data
The tests/fixtures/journal/ directory contains a complete mock journal structure with sample facets, agents, transcripts, and indexed data for testing.
Running Tests#
make testfor unit testsmake test-appsto run app testsmake test-integrationfor integration testsmake test-allto run all tests (core + apps + integration)make test-only TEST=pathto run specific testsmake coverageto generate a coverage reportmake cibefore committing (formats, lints, tests)- Always run
sol restart-conveyafter editingconvey/orapps/to reload code - Use
sol screenshot <route>to capture UI screenshots for visual testing
Worktree Development#
Run the full stack (supervisor + callosum + sense + cortex + convey) against test fixture data:
make dev # Start stack (Ctrl+C to stop)
In a second terminal, take screenshots or hit endpoints:
export _SOLSTONE_JOURNAL_OVERRIDE=tests/fixtures/journal
export PATH=$(pwd)/.venv/bin:$PATH
sol screenshot / -o scratch/home.png
curl -s http://localhost:$(cat tests/fixtures/journal/health/convey.port)/
Notes:
- Agents won't execute without API keys — this is expected in worktrees
- Output artifacts go in
scratch/(git-ignored) - Service logs:
tests/fixtures/journal/health/<service>.log make devwrites runtime artifacts (stats cache, health logs, task logs) into the fixtures journal — these are covered bytests/fixtures/journal/.gitignoreand should never be committed