phase: 106_document_dates
Build and Push Containers / build-and-push-app (push) Successful in 4m35s
Build and Push Containers / build-and-push-db (push) Successful in 14s

Everything is verified green. Final report:

**Phase 106 — Document dates (final verification pass; all 10 tasks already complete)**

- Verified all phase artifacts: alembic `0020` (dev DB at `0020`), `doc_dates.py`, git `file_commit_dates`, importer `doc_dates_by_root`/`dates_updated`, both entry-point wirings, date APIs + tree `created_at`/`updated_at`, LLM surfaces (prompt block, `read` line 2, appended `ls` field), `apply_recency_boost` in `retrieve()`, UI columns/badge, admin editor, mock-LLM regex — all present and correct; no defects found, no fixes needed.
- `uv run pytest --cov=app --cov-report=term-missing` → **2299 passed, TOTAL 99%** (>90% ✓)
- `uv run pytest tests/e2e/test_document_dates.py -v --no-cov` → **6/6 passed** in isolation (DB up)
- 12 regression E2E suites (retrieval_quality, whole_document_context, agent_document_tools, ls_tree_drilldown, read_truncation_cap, kb_tree, kb_tree_nav, document_viewer, edit_summaries, import_documents, sync_button, hidden_folders_toggle, smoke) → **all green in isolation**
- `uv run ruff check .` → clean; `uv run pyright` → **0 errors, 0 warnings**

**Completion criteria:** 1) non-null `created_at` + 0020 upgrade/downgrade on dev DB ✓ (real-Alembic integration tests) 2) sync refresh/older/manual-persists/content-reset/no sources_meta bump ✓ 3) zip/tar mtime + future→today ✓ 4) LLM date surfaces + cross-check ✓ 5) UI Created/Updated/badge positions ✓ 6) admin editor set+revert round-trip ✓ 7) old-correct-beats-new-similar (defaults & boost-off) + near-tie + `BOR_RECENCY_BOOST=0` byte-identical ✓ 8) full gate ✓ 9) commit/phase-move — left to harness per instructions.

- **Notable:** recency default tuned 0.001 → **0.0007** (task 07 step 5 explicitly permits; measured margins recorded in `test_recency_boost.py` docstring).
- **Next pending phase:** none — `todo/` holds only this phase.
This commit is contained in:
2026-09-13 19:28:05 -04:00
parent cec819743d
commit ee3efb28c9
113 changed files with 8228 additions and 344 deletions
+9 -9
View File
@@ -848,7 +848,7 @@ def test_missing_folder_summaries_read_as_pending_and_self_heal(
src_row = page.locator("#folders-tbody tr")
expect(src_row.locator("a.folder-link")).to_have_text(SOURCE)
expect(src_row.locator("td:nth-child(2)")).to_have_text(str(N_FILES))
expect(src_row.locator("td:nth-child(3) span")).to_have_text(SUM_ROOT)
expect(src_row.locator("td:nth-child(4) span")).to_have_text(SUM_ROOT)
expect(page.locator(".kb-summary-pending")).to_have_count(0)
# The gap: delete the bravo row AND the source-root row directly
@@ -863,7 +863,7 @@ def test_missing_folder_summaries_read_as_pending_and_self_heal(
page.click("#nav-sources")
_wait_top_level(page)
src_row = page.locator("#folders-tbody tr")
s_span = src_row.locator("td:nth-child(3) span")
s_span = src_row.locator("td:nth-child(4) span")
expect(s_span).to_have_text(PENDING_COPY)
# Phase 99 (task 01): the marker toggles onto the cell's base
# .kb-desc-text span (the one-line clamp) — the class pair, exact.
@@ -886,13 +886,13 @@ def test_missing_folder_summaries_read_as_pending_and_self_heal(
bravo_row = rows.nth(1)
expect(alpha_row.locator("a.folder-link")).to_have_text(FOLDER_A)
# The intact folder: the stored line, never the marker.
expect(alpha_row.locator("td:nth-child(3) span")).to_have_text(SUM_ALPHA)
expect(alpha_row.locator("td:nth-child(3) span")).not_to_have_class(
expect(alpha_row.locator("td:nth-child(4) span")).to_have_text(SUM_ALPHA)
expect(alpha_row.locator("td:nth-child(4) span")).not_to_have_class(
"kb-summary-pending"
)
# The affected folder: the marker (copy + class + title) — the
# class pair with the phase-99 .kb-desc-text base span, exact.
b_span = bravo_row.locator("td:nth-child(3) span")
b_span = bravo_row.locator("td:nth-child(4) span")
expect(b_span).to_have_text(PENDING_COPY)
expect(b_span).to_have_class("kb-desc-text kb-summary-pending")
expect(b_span).to_have_attribute("title", PENDING_TITLE)
@@ -915,7 +915,7 @@ def test_missing_folder_summaries_read_as_pending_and_self_heal(
expect(bravo_row.locator(".kb-summary-status")).to_have_text(
"Description updated."
)
b_span = bravo_row.locator("td:nth-child(3) span")
b_span = bravo_row.locator("td:nth-child(4) span")
expect(b_span).to_have_text(MANUAL_BRavo)
expect(b_span).not_to_have_class("kb-summary-pending")
@@ -948,14 +948,14 @@ def test_missing_folder_summaries_read_as_pending_and_self_heal(
expect(page.locator("#kb-level-title")).to_have_text(SOURCE)
expect(page.locator("#kb-level-summary")).to_have_text(SUM_ROOT)
rows = page.locator("#folders-tbody tr")
expect(rows.nth(0).locator("td:nth-child(3) span")).to_have_text(SUM_ALPHA)
expect(rows.nth(1).locator("td:nth-child(3) span")).to_have_text(MANUAL_BRavo)
expect(rows.nth(0).locator("td:nth-child(4) span")).to_have_text(SUM_ALPHA)
expect(rows.nth(1).locator("td:nth-child(4) span")).to_have_text(MANUAL_BRavo)
expect(page.locator(".kb-summary-pending")).to_have_count(0)
# And at the top level: the source row's cell carries the
# regenerated root line, no marker.
page.locator("#kb-crumb a.kb-crumb-link").nth(0).click()
src_row = page.locator("#folders-tbody tr")
s_span = src_row.locator("td:nth-child(3) span")
s_span = src_row.locator("td:nth-child(4) span")
expect(s_span).to_have_text(SUM_ROOT)
expect(s_span).not_to_have_class("kb-summary-pending")
expect(page.locator(".kb-summary-pending")).to_have_count(0)