|
2026-11-19
| ||
| 16:52 | • Closed ticket [2ad667b78b]: Storage: user database ~/.pic/pic.sqlite with picu_ tables plus 2 other changes artifact: 08243fb863 user: dmestas | |
| 15:56 | • New ticket [2ad667b78b]. artifact: 401122cd43 user: dmestas | |
Storage: user database ~/.pic/pic.sqlite with picu_ tables
Tables: picu_setting(key, value, updated_ms), picu_catalog(provider, sz, models (sqlar), checked_ms, last_modified_ms, etag), picu_trust(path, trusted, decided_ms), picu_scoped_model(position, pattern), picu_workspace(path, journal, last_used_ms).
- settings.json and models-store.json are imported in one transaction on first open, then deleted. - main.c setting()/set_setting() and catalog.c/catalog_fetch.c switch to the tables; keys keep Pi's names (defaultModel, defaultThinkingLevel, thinkingLevel:<provider/id>). - Every table carries the picu_ prefix (journal: pic_, libfossil: fsl*) so one file can hold everything later.
Done when: no pic code writes under ~/.pic except pic.sqlite; tests cover the migration, concurrent processes and the catalog refresh.
Plan: https://artifacts.craftdesign.group/v/-DvLRzrfEh1mIldmhMgfG#06c5bdb18c04b6b8d28d045ed9812ef5c91f2f85f57c6feb26b574cb21cec0ef (section 1)
Landed in 26395fd45988: ~/.pic/pic.sqlite with picu_ tables (settings, catalog cache with sqlar compression, trust, scoped models, workspaces); settings.json and models-store.json migrate and are removed; pic settings command; tests isolated from the real ~/.pic. CI and Fil-C green.