feat: add durable provider cache

Add a private provider-neutral SQLite WAL cache with transactional migrations, retained raw payloads and tombstones, per-window opaque checkpoints, and reserved outbox/conflict tables.

Verify migrations, permissions, identity invariants, concurrent access, atomic pull-page rollback, and future-schema rejection with deterministic tests. No OAuth, networking, secrets, or Graph synchronization is included yet.
This commit is contained in:
2026-07-18 10:53:41 +01:00
parent cfca6ab6d0
commit 787daf00dd
9 changed files with 1794 additions and 24 deletions

View File

@@ -12,40 +12,48 @@ project(
)
inc = include_directories('include')
sqlite = dependency('sqlite3')
threads = dependency('threads')
nocal_sources = files(
'src/domain/calendar_transfer.cpp',
'src/domain/date.cpp',
'src/domain/event_query.cpp',
'src/domain/month_layout.cpp',
'src/storage/ics_store.cpp',
'src/storage/sync_cache.cpp',
'src/tui/Screen.cpp',
'src/tui/EventEditor.cpp',
'src/tui/Terminal.cpp',
'src/tui/TuiApp.cpp',
)
nocal_lib = static_library('nocal-core', nocal_sources, include_directories: inc)
nocal_lib = static_library('nocal-core', nocal_sources, include_directories: inc,
dependencies: sqlite)
nocal_dep = declare_dependency(include_directories: inc, link_with: nocal_lib,
dependencies: sqlite)
nocal_executable = executable('nocal', 'src/main.cpp', include_directories: inc,
link_with: nocal_lib, install: true)
nocal_executable = executable('nocal', 'src/main.cpp',
dependencies: nocal_dep, install: true)
domain_tests = executable('domain-tests', 'tests/domain_tests.cpp',
include_directories: inc, link_with: nocal_lib)
dependencies: nocal_dep)
test('domain', domain_tests)
calendar_transfer_tests = executable('calendar-transfer-tests',
'tests/calendar_transfer_tests.cpp', include_directories: inc,
link_with: nocal_lib)
'tests/calendar_transfer_tests.cpp', dependencies: nocal_dep)
test('calendar-transfer', calendar_transfer_tests)
ics_tests = executable('ics-tests', 'tests/ics_tests.cpp',
include_directories: inc, link_with: nocal_lib)
dependencies: nocal_dep)
test('ics-storage', ics_tests)
sync_cache_tests = executable('sync-cache-tests', 'tests/sync_cache_tests.cpp',
dependencies: [nocal_dep, threads])
test('sync-cache', sync_cache_tests)
tui_tests = executable('tui-tests', 'tests/tui_tests.cpp',
include_directories: inc, link_with: nocal_lib)
dependencies: nocal_dep)
test('tui', tui_tests)
tui_focus_tests = executable('tui-focus-tests', 'tests/tui_focus_tests.cpp',
include_directories: inc, link_with: nocal_lib)
dependencies: nocal_dep)
test('tui-focus', tui_focus_tests)
editor_tests = executable('editor-tests', 'tests/editor_tests.cpp',
include_directories: inc, link_with: nocal_lib)
dependencies: nocal_dep)
test('editor', editor_tests)
shell = find_program('sh')