Incremental Database Remote Fixtures
The old checked-in mock event-log repositories are obsolete. Development and test fixtures now model the current storage format directly: a git remote that tracks a rendered incremental-database snapshot.
Available Fixtures
1. Empty Incremental Database Remote
- Location:
backend/tests/mock-incremental-database-remote - Contents: Only the rendered
_metafiles required to open an empty local database snapshot - Use case: Fresh-start bootstrap flows and tests that want a clean rendered remote
2. Populated Incremental Database Remote
- Location:
backend/tests/mock-incremental-database-remote-populated - Contents: Rendered
config,all_events, andevents_countgraph nodes plus metadata - Use case: Development and bootstrap tests that need realistic graph state immediately after sync
How They Are Materialized
The fixture directories are tracked as plain rendered snapshot trees, not as checked-in git object stores.
During development setup, scripts/materialize-incremental-database-remote.sh turns one of those trees into a real git remote by:
- Initializing a local bare repository.
- Creating a temporary worktree.
- Copying the rendered fixture tree into that worktree.
- Committing it on the current hostname branch (
<hostname>-main).
The same idea is used in backend tests via backend/tests/stub_incremental_database_remote.js.
Switching Fixtures In Development
Using the Populated Fixture (Default)
./scripts/run-development-server
Using the Empty Fixture
VOLODYSLAV_USE_EMPTY_INCREMENTAL_DATABASE_REMOTE=1 ./scripts/run-development-server
Fixture Contents
Populated Fixture Includes
- Sample events: 3 entries covering mood, exercise, and work
- Configuration: Help text plus 6 shortcuts (
breakfast,lunch,dinner,coffee,tea,gym) - Derived graph state:
all_events,config, andevents_countare already materialized in the rendered snapshot
Development Workflow
- Default development: use the populated incremental-database remote for realistic state after the first sync.
- Bootstrap testing: use the empty fixture to exercise fresh-start behavior.
- Fixture tuning: edit
backend/tests/mock-incremental-database-remote-populatedwhen you want development startup to restore different rendered graph state.