Make the store movable and the CI gate actually runnable
CI was a workflow that could not run its own tests: pytest is not a dependency of anything, so a fresh clone fails with "No module named pytest". Test tooling now lives in the backend's dev extra, so CI and a new contributor install the same tools, and ruff is pinned there instead of drifting as a bare version in a workflow step. backup, restore and doctor move the store. Backup uses SQLite's own online API so a running server is safe, and the manifest records the schema version, row counts, sha256 and size read back from the copy. Restore verifies the digest, integrity_check, required tables and schema age before it touches the live file, and keeps what it replaces as .before-restore. Doctor separates broken from degraded. On the 906 MB baseline store (165,973 atoms) it reports no problems and one true warning: 21,362 picture atoms with no CLIP snapshot configured, so those atoms are findable only by the text already on them. The first version called that store healthy because it only complained about paths that were set and missing, never about a sense the store needs and never had. AGPL-3.0-only, because PyMuPDF is dual-licensed AGPL-or-commercial and the repository is public. A permissive license needs the Artifex commercial license bought first; the README says so rather than hiding it. Gates: 253 tests pass; ruff clean repo-wide (17 errors at HEAD); mypy unchanged from HEAD on touched files; pyright 0 errors on the new files; backup 4.0s and restore 2.8s on real data with counts verified equal.
This commit is contained in:
1 parent
922d01202f
commit
07825913fe
10 files changed
+1234
-11
No files matched your search
@@ -17,9 +17,10 @@ jobs:
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: pip
|
||||
- run: pip install -e ./backend
|
||||
# pytest and ruff come from the dev extra, so CI matches a fresh clone.
|
||||
- run: pip install -e "./backend[dev]"
|
||||
- run: python -m pytest -q
|
||||
- run: pip install ruff==0.16.10 && ruff check backend/src bench
|
||||
- run: ruff check backend/src bench
|
||||
|
||||
mcp:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in new issue
Block a user