Skip to content

feat(db): wal mode and inferred response shapes in block_schema_cache#1

Merged
gandarfh merged 2 commits into
mainfrom
fix/sqlite-wal-journal-mode
Jun 10, 2026
Merged

feat(db): wal mode and inferred response shapes in block_schema_cache#1
gandarfh merged 2 commits into
mainfrom
fix/sqlite-wal-journal-mode

Conversation

@gandarfh

Copy link
Copy Markdown
Member

What

Foundation for typed ref resolution by external read-only consumers (the language server):

  • WAL journal mode on the app database: readers are never blocked by the app's writes (the default rollback journal could block either side). Regression test asserts the mode after init.
  • block_schema_cache (migration 015): on every successful run that carries an alias, the result-save path derives the structural skeleton of the response JSON (objects keep keys, arrays keep one sampled element, scalars become type names — no data stored) and upserts it keyed by (file_path, alias). Rows carry cache_schema_version; readers treat a different version as a cache miss and the cache rebuilds on the next run instead of migrating in place.

Shape derivation is pure and unit-tested; an integration test covers the upsert/read roundtrip including latest-wins overwrite and version filtering. Full crate suite: 1107 green.

Consumers

The language server reads shapes to resolve {{alias.path}} fields (hover types, field completion, typo squiggles); the desktop app gains a refresh notification to the server in a follow-up.

@gandarfh
gandarfh force-pushed the fix/sqlite-wal-journal-mode branch from 9bc15d6 to cbef5a5 Compare June 10, 2026 21:49
@gandarfh
gandarfh merged commit 6e2f97d into main Jun 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant