refactor(agents): migrate .agent/ planning tree to .agents/

Standardize on the .agents/ directory (shared with project skills):
phases/, user_stories/, reports/, screenshots/, validate.sh, and
phase-sessions/ + pipeline.log all move to .agents/ (git mv preserves
history; runtime artifacts move alongside).

Updates every reference in AGENTS.md, README.md, .gitignore, app
docstrings, and test story headers. Historical KB content in data/
and the runtime pipeline.log transcript are left untouched.
This commit is contained in:
2026-09-05 10:57:07 -04:00
parent 766702c750
commit dbf2af26c6
1118 changed files with 664 additions and 664 deletions
@@ -0,0 +1,8 @@
**Phase 35 (git-sources-admin) — final verification pass: all criteria verified, one defect fixed.**
- **Verified:** migration 0006 at head; `git_sources` table with `uq_git_sources_url` (uuid PK, timestamptz `added_at`); admin CRUD API (403/201/409/422/404, env fallback, no credential echo); `effective_git_sources` resolver shared by sync + CLI with `origin=db|env` logs and fail-loud on both-empty; `/git-sources.html` gate/list/add/remove/env-note/hint; `#nav-git-sources` on all five pages (order Chat→Sources→Git sources→Tuning, active on its own page); README/`.env.example` fallback docs; no external refs (no CDN); UI structure (landmarks, labels, full-width table w/ caption+scope, aria-live, focus-visible).
- **Defect fixed:** the phase commit had missed the `scripts/import_docs.py` resolver hookup (committed code still read `settings.git_source_list`). Amended into the phase commit → `1925bb6 feat(sources): admin page to add and remove git sources (TODO.md L4)` (`--no-gpg-sign`), now atomic.
- **Tests:** `uv run pytest` → 594 passed; `uv run pytest --cov=app` → **99%** (>90%; new modules 100%); `uv run pytest tests/e2e/test_git_sources_admin.py -v --no-cov` → 6 passed; regressions in isolation all green (nav_consistency 6, sync_button 3, shared_header 6, header_consistency 3, tuning_nav_link 4, smoke 3).
- **Lint/types:** `uv run ruff check . && uv run pyright` → clean (0 errors).
- **Completion criteria:** all 9 ✅ (commit present; `00_phase.md` left in `todo/` for the harness to move).
- **Next pending phase:** `36_summary_in_viewer`.
@@ -0,0 +1,56 @@
........................................................................ [ 12%]
........................................................................ [ 24%]
........................................................................ [ 36%]
........................................................................ [ 48%]
........................................................................ [ 60%]
........................................................................ [ 72%]
........................................................................ [ 84%]
........................................................................ [ 96%]
.................. [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 103 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 44 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 72 0 100%
app/config.py 64 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 42 0 100%
app/models.py 58 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 11 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 118 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 64 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 81 0 100%
--------------------------------------------
TOTAL 1533 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,17 @@
All gates green. Task 01 complete.
**Implemented**
- `app/models.py`: `GitSource` model (`git_sources`: UUID PK, unique `url` TEXT, `added_at` TIMESTAMPTZ `now()`), docstring per phase 35 + A13.
- `alembic/versions/0006_git_sources.py`: chains off `0005`, creates table + unique index `uq_git_sources_url`; `downgrade()` drops index + table (A13 reversible).
- `tests/integration/test_migration_0006.py`: 5-test schema contract (up: columns/PK/default/unique index, added_at server default, duplicate → IntegrityError, down: dropped, round-trip) following the 0004/0005 pattern.
- Fixed latent defect in `tests/integration/test_migration_0005.py`: it asserted `_version == "0005"` after upgrading to **head** (broken by any new migration) and its round-trip depended on test order — now targets `0005` explicitly, mirroring the 0004 test.
**Results**
- `uv run alembic upgrade head` → dev DB at `0006 (head)`; table verified (uuid/text/timestamptz, `uq_git_sources_url` unique).
- `uv run pytest` → 569 passed, exit 0.
- `uv run pytest --cov=app --cov-report=term-missing` → TOTAL **99%** (>90%), models.py 100%.
- `uv run ruff check .` → All checks passed; `uv run pyright` → 0 errors.
**Decisions**: used `postgresql.UUID(as_uuid=True)` + `op.create_index(..., unique=True)` per the task's explicit DDL (`CREATE UNIQUE INDEX uq_git_sources_url`). No commit — that's task 06.
**Next pending task**: `.agents/phases/todo/35_git_sources_admin/02_git_sources_api.md`.
@@ -0,0 +1,53 @@
........................................................................ [ 12%]
........................................................................ [ 25%]
........................................................................ [ 37%]
........................................................................ [ 50%]
........................................................................ [ 63%]
........................................................................ [ 75%]
........................................................................ [ 88%]
................................................................. [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 103 0 100%
app/api/docs.py 23 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 67 0 100%
app/config.py 64 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 40 0 100%
app/models.py 58 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/importer.py 173 3 98%
app/rag/llm.py 118 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 64 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 68 0 100%
--------------------------------------------
TOTAL 1458 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,18 @@
Task 02 complete — all gates green. Final report:
**Implemented**
- `app/schemas.py`: `GitSourceIn` (before-trim validator, 1–500), `GitSourceOut` (nullable `id`/`added_at` for env rows), `GitSourceList` (`sources` + `from_env`)
- `app/api/git_sources.py` (new): admin-only `GET/POST/DELETE` under `/api/git-sources` behind `require_admin`; `URL_RE` shape check (`https?://`, `ssh://`, `git@`); generic 409 (pre-check + unique-index IntegrityError backstop) and 422 — neither echoes the URL; env-fallback listing (`from_env=true`, null ids) only while the table is empty; rows ordered `(added_at, id)`
- `app/main.py`: router registered alongside the others
- `tests/integration/test_git_sources_api.py` (new): 14 tests — 403 on all routes anonymous; env-fallback/empty-env/DB-wins GET semantics; 201 trimmed create; 409 duplicate (incl. concurrent-insert backstop via blinded pre-check); 422 bad shape/blank/>500 with no-input-echo assertions; 204/404 delete with fallback restore
**Results**
- `uv run pytest tests/integration/test_git_sources_api.py -v --no-cov` → 14 passed
- `uv run pytest` → 583 passed
- `uv run pytest --cov=app --cov-report=term-missing` → 99% total (git_sources.py 100%, schemas.py 100%)
- `uv run ruff check .` → clean; `uv run pyright` → 0 errors
- Dev DB verified at `0006 (head)` with `uq_git_sources_url`
**Decisions:** 409 uses pre-check *plus* DB-index backstop (race-safe, both paths tested); no other deviations.
**Next pending task:** `.agents/phases/todo/35_git_sources_admin/03_sync_and_importer_use_db.md`
@@ -0,0 +1,55 @@
........................................................................ [ 12%]
........................................................................ [ 24%]
........................................................................ [ 37%]
........................................................................ [ 49%]
........................................................................ [ 61%]
........................................................................ [ 74%]
........................................................................ [ 86%]
........................................................................ [ 98%]
....... [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 103 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 44 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 67 0 100%
app/config.py 64 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 42 0 100%
app/models.py 58 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/importer.py 173 3 98%
app/rag/llm.py 118 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 64 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 81 0 100%
--------------------------------------------
TOTAL 1517 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,16 @@
All gates green. Task complete.
**Report — task 03 (sync + import_docs resolve the effective list)**
- New `app/rag/git_sources.py::effective_git_sources(db)` → `(urls, "db"|"env")`: DB rows in `(added_at, id)` order win; `BOR_GIT_SOURCES` (via `Settings.git_source_list`, reused) only while the table is empty; both-empty → `([], "env")`.
- `app/api/sync.py::_run_sync`: opens a short `SessionLocal()` around the resolver; log now `sync: started repos=N origin=db|env`; fail-loud message extended to `no git sources configured (git_sources table empty and BOR_GIT_SOURCES unset)`.
- `scripts/import_docs.py::_resolve_sources`: resolves through the same function (short session, no DB-down branch); logs `git sources: N repo(s) origin=db|env` before the clone loop; `--source` still short-circuits.
- Tests: new `tests/unit/test_git_sources.py` (3 branches + order-by assertion, stubbed session); `test_sync_api.py` re-pointed at the **real** resolver + real `git_sources` table (truncate fixture, `_stub_env`, seeded rows) with new DB-over-env and env-fallback scenarios asserting origin in logs; `test_import_docs_git.py` stubs the resolver per its no-real-DB style + new DB-over-env scenario.
**Results**
- `uv run pytest --cov=app --cov-report=term-missing`: 590 passed, TOTAL 99% (new module + sync.py 100%)
- `uv run ruff check . && uv run pyright`: clean (0 errors)
**Notes:** no commit made — phase 35's single `--no-gpg-sign` commit belongs to task 06 (prior tasks 01/02 are also uncommitted). API GET fallback (task 02) left as-is — the resolver signature can't carry its `id`/`added_at`, and the task allows it.
**Next pending task:** `.agents/phases/todo/35_git_sources_admin/04_admin_page.md`
@@ -0,0 +1,56 @@
........................................................................ [ 12%]
........................................................................ [ 24%]
........................................................................ [ 36%]
........................................................................ [ 48%]
........................................................................ [ 61%]
........................................................................ [ 73%]
........................................................................ [ 85%]
........................................................................ [ 97%]
.............. [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 103 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 44 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 72 0 100%
app/config.py 64 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 42 0 100%
app/models.py 58 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 11 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 118 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 64 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 81 0 100%
--------------------------------------------
TOTAL 1533 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,14 @@
**Task 04 complete — `/git-sources.html` admin page**
- `frontend/git-sources.html`: soft-gated manager — gate (phase-16 pattern, `?next=/git-sources.html`), env-fallback note, add form (visible label, `maxlength=500`), full-width URL/Added/Actions table, empty state, sync hint box (`role=note`), identical phase-34 header (nav link arrives in task 05)
- `frontend/assets/git-sources.js`: boot via `initSharedHeader()` (one whoami); list render textContent-only (credential-safe), env rows get a "from .env" tag (no Remove); add = never-stale button + 422-shape-aware inline `role=alert` + focus-new-row; remove = confirm → DELETE with per-row error on failure; load failure = `role=alert` + retry; `role=status` announcer
- `frontend/assets/styles.css`: `.git-source-*` rules (phase-08 AA pairs, ≥44px targets, mono URL cells, wrapper horizontal scroll, mobile stacking)
- Deviations (task said "no Python change"): Containerfile stage-1 gains `git-sources.js` bundle + page `cp` (**required** by the hermetic `test_containerfile_assets.py` glob), one-line `HTML_PAGES` addition in `app/core/caching.py` (phase-33 contract — without it the immutable 1y asset cache would pin stale CSS on the new page), and the new page added to the parameterized no-CDN/versioned/asset/no-emoji integration guards (phase-16/27 precedent)
**Results**
- `uv run pytest` → **594 passed** (exit 0)
- `uv run pytest --cov=app --cov-report=term-missing` → **TOTAL 99%** (>90%)
- `uv run ruff check .` → clean; `uv run pyright` → 0 errors, 0 warnings
- Live smoke (dev server + Playwright): anon gate, real-form login round-trip, env fallback, add/409/422, remove accept+cancel, landmarks, mobile 375px (no overflow, 58px header) — all OK; dev DB left clean
**Next pending task:** `05_nav_link.md` (admin-only "Git sources" nav link on all five pages + `header.js` reveal)
@@ -0,0 +1,56 @@
........................................................................ [ 12%]
........................................................................ [ 24%]
........................................................................ [ 36%]
........................................................................ [ 48%]
........................................................................ [ 60%]
........................................................................ [ 72%]
........................................................................ [ 84%]
........................................................................ [ 96%]
.................. [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 103 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 44 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 72 0 100%
app/config.py 64 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 42 0 100%
app/models.py 58 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 11 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 118 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 64 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 81 0 100%
--------------------------------------------
TOTAL 1533 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,20 @@
Task 05 complete. Final report:
**Implemented**
- `#nav-git-sources` link (after `#nav-sources`, `hidden` by default, phase-35 + owner-permission-2026-08-26 comment) in all five headers: index, sources, document, tuning, git-sources — nav order Chat → Sources → Git sources → Tuning
- `git-sources.html` link carries `is-active` + `aria-current="page"` (the only page that does)
- `header.js`: `navGitSources.hidden = !admin` on the same cached whoami (no extra request) + file-header comment updated
- **Defect fix (introduced by the 4th pill):** admin bar overflowed at 360/375/768px — tightened the ≤640px and ≤900px responsive squeeze in `styles.css` (nav pills, gaps, icon pills); verified no overflow 360–1280px in both auth states
**Gates**
- `uv run pytest` → 594 passed
- `uv run pytest --cov=app --cov-report=term` → **99%** (>90% gate)
- `uv run ruff check .` → clean; `uv run pyright` → 0 errors
- E2E in isolation: shared_header (10), responsive_polish, header_consistency, tuning_nav_link, global_tuning, admin_auth, cache_busting, sync_button (3), document_viewer (7), steering (4), smoke (3) — all green
- Smoke: anonymous never sees the link (all 5 pages, no flash); admin sees it on all 5; click-through + `is-active` verified
**Notes / deviations**
- `test_nav_consistency.py`: 4/6 pass; the 2 inventory tests diff only on **login.html** (not in this task's five-file list) — its nav-inventory update is explicitly task 06's scope
- `test_sync_button.py` fails only when batched in one pytest process with other suites (documented port-8123 isolation design); green in isolation
**Next pending task:** `.agents/phases/todo/35_git_sources_admin/06_e2e_and_docs.md`
@@ -0,0 +1,56 @@
........................................................................ [ 12%]
........................................................................ [ 24%]
........................................................................ [ 36%]
........................................................................ [ 48%]
........................................................................ [ 60%]
........................................................................ [ 72%]
........................................................................ [ 84%]
........................................................................ [ 96%]
.................. [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 103 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 44 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 72 0 100%
app/config.py 64 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 42 0 100%
app/models.py 58 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 11 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 118 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 64 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 81 0 100%
--------------------------------------------
TOTAL 1533 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,15 @@
**Task 06 complete — Phase 35 (git sources admin) closed.**
- Wrote `tests/e2e/test_git_sources_admin.py` (6 tests, story gate): anonymous gate + no-API-calls + 403s on all three routes + hidden nav link on all five pages; admin nav-link visibility + click→`is-active`; seeded-row rendering (mono URL, dates, labeled Remove); add/duplicate(409)/invalid(422)/remove(accept+cancel) never-stale lifecycle with DELETE-request tracking; env-fallback rows + `#git-sources-env-note`; page a11y/no-CDN (landmarks, label, ≥80%-width table, 44px targets, 3px focus-visible, aria-live).
- Updated `test_nav_consistency.py` for the fourth nav link (Chat, Sources, Git sources, Tuning; `#nav-git-sources` in the anonymous hidden set).
- Fixed task-05 defect: `login.html` was missing `#nav-git-sources`, breaking phase 34's identical-header contract — added it.
- Docs: `.env.example` + README (4 sections + settings table) now document `BOR_GIT_SOURCES` as the empty-table fallback, the admin page as the primary surface.
**Results (all green):**
- `uv run pytest tests/e2e/test_git_sources_admin.py -v --no-cov` → 6 passed (isolation); regressions in isolation: `test_nav_consistency` 6, `test_sync_button` 3, `test_shared_header` 6, `test_header_consistency` 3, `test_tuning_nav_link` 4, `test_smoke` 3.
- `uv run pytest --cov=app --cov-report=term-missing` → 594 passed, **99%** on `app/` (new API + resolver 100%).
- `uv run ruff check . && uv run pyright` → clean.
**Decisions:** Containerfile staged with the commit (esbuild bundle + page copy for the new page — required by the build, not in the task's file list); my suite truncates `git_sources` before *and after* each test (a leftover row had flipped the sync suite to the DB list and failed it). Phase dir left for the harness to move. Commit `495a771` (`--no-gpg-sign`).
**Next pending:** `.agents/phases/todo/36_summary_in_viewer/`.
@@ -0,0 +1,56 @@
........................................................................ [ 12%]
........................................................................ [ 24%]
........................................................................ [ 36%]
........................................................................ [ 48%]
........................................................................ [ 60%]
........................................................................ [ 72%]
........................................................................ [ 84%]
........................................................................ [ 96%]
.................. [100%]
=============================== warnings summary ===============================
.venv/lib/python3.13/site-packages/fastapi/testclient.py:1
/var/home/ducoterra/Projects/Personal/brain_of_reese/.venv/lib/python3.13/site-packages/fastapi/testclient.py:1: StarletteDeprecationWarning: Using `httpx` with `starlette.testclient` is deprecated; install `httpx2` instead.
from starlette.testclient import TestClient as TestClient # noqa
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================ tests coverage ================================
_______________ coverage: platform linux, python 3.13.13-final-0 _______________
Name Stmts Miss Cover
--------------------------------------------
app/__init__.py 1 0 100%
app/api/__init__.py 0 0 100%
app/api/auth.py 22 0 100%
app/api/chat.py 103 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 44 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 8 0 100%
app/api/sync.py 72 0 100%
app/config.py 64 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 0 100%
app/core/caching.py 92 0 100%
app/core/debugging.py 29 2 93%
app/core/logging.py 13 0 100%
app/db.py 21 0 100%
app/main.py 42 0 100%
app/models.py 58 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 11 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 118 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 64 0 100%
app/rag/retriever.py 94 3 97%
app/rag/suggestions.py 27 0 100%
app/rag/summarizer.py 24 0 100%
app/schemas.py 81 0 100%
--------------------------------------------
TOTAL 1533 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK