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#
# The autouse set_test_journal_path fixture in tests/conftest.py does this
# for unit tests. Set it explicitly only when a test needs a different journal.
os.environ["SOLSTONE_JOURNAL"] = "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 editingsolstone/convey/orsolstone/apps/to reload code
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, hit endpoints:
export SOLSTONE_JOURNAL=tests/fixtures/journal
export PATH=$(pwd)/.venv/bin:$PATH
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