phase: 147_sync_changed_only
All defaults match. Verification complete — everything is green with no defects found. **Phase 147 final verification pass — report** - All 3 task files found in `complete/147_sync_changed_only/` → verification pass only; no code changes needed. - Verified: migration 0025 (`documents.file_hash` nullable String(64), no index) + model field; fast path at top of `_index_file` (streamed 1 MiB sha256 → row lookup → `_unchanged_doc`); stamping on all three branches' create/update + shared helper; pre-phase NULL-hash fallthrough; retriever/`content_hash` untouched. - **Tests:** `uv run pytest --cov=app --cov-report=term-missing` → 3438 passed, `app/` coverage **99%** (>90% ✓); `uv run pytest tests/e2e/test_sync_changed_only.py -v --no-cov` → 3 passed in isolation ✓; `uv run ruff check . && uv run pyright` → all checks passed, 0 errors ✓; prior-phase `tests/e2e/test_sync_button.py` → 3 passed (no regression) ✓. - **Completion criteria:** all 7 pass — (1) column + round-trip ✓ (2) unchanged text/image/garbage-PDF/pictorial-PDF cost zero LLM/extraction/vision, `summary.unchanged` counted, rows byte-still ✓ (3) changed file re-indexes + re-stamps; bytes-changed/content-same stamps only ✓ (4) backfill/D1/D4 + log wordings pinned verbatim ✓ (5) `content_hash`/retriever byte-identical ✓ (6) all gates green ✓ (7) no prior-phase behavior change ✓. - **Documentation:** full review of README.md (1,031 lines) and AGENTS.md against the code: every `.env.example`/code `BOR_*` var documented, all config defaults match `app/config.py`, quick-start/QA commands and referenced test files exist, `file://` URL + troubleshooting claims accurate; the phase's README "Updating the documents" edit is accurate. **Verified consistent — no changes needed.** - **Notable:** no live-infrastructure changes (dev Postgres container used for the standard test gates only). Working tree left uncommitted per harness protocol. - **Next pending phase:** `148_pdf_pages_in_sources`.
This commit is contained in:
@@ -187,8 +187,13 @@ catalog, git sources, tuning, and history stay admin-only.
|
||||
### Updating the documents
|
||||
|
||||
The knowledge base is refreshed by **re-running the import**. It is
|
||||
idempotent and delta-based (sha256 per file), so a refresh after a normal
|
||||
editing session takes seconds:
|
||||
idempotent and delta-based: each file's RAW BYTES are hashed (sha256,
|
||||
streamed) and checked against the last index's stamp *before* any
|
||||
extraction or vision work — an unchanged file costs one hash + one row
|
||||
lookup (no re-extract, no vision, no re-embed), while a changed file
|
||||
re-indexes fully. A refresh after a normal editing session takes
|
||||
seconds — pictorial PDFs included (their expensive first-index vision
|
||||
burns only once per file version):
|
||||
|
||||
```bash
|
||||
# After editing/adding/removing notes:
|
||||
|
||||
Reference in New Issue
Block a user