chore(agent): track .agent/ planning tree in git
Build and Push Containers / build-and-push-app (push) Successful in 12s
Build and Push Containers / build-and-push-db (push) Successful in 10s

Remove the blanket .agent/ gitignore so the phase roadmap, user
stories, reports, and PLAN.md are versioned with the code. Only
runtime artifacts (.agent/phase-sessions/, .agent/pipeline.log)
remain ignored. Update AGENTS.md git protocol rule to match.
This commit is contained in:
2026-09-01 10:18:22 -04:00
parent 5fa620fde5
commit 4971e2859d
818 changed files with 23964 additions and 4 deletions
@@ -0,0 +1,14 @@
All green and committed. Final report:
**Phase 16 (Admin Sign-In) — complete**
- **Verified pre-existing work:** backend (fail-loud config, `core/auth.py`, `/api/login|logout|whoami`, `require_admin` on `/api/docs` + `/api/steering`, SessionMiddleware) and frontend (login page, chat auth gating incl. restore path, `#sources-gate`) + unit/integration/E2E tests were in tree but uncommitted/unverified.
- **Implemented the gaps:** `.env.example` auth section; README "Admin & sign-in" (setup one-liner, fail-loud, anon-vs-admin table, config rows); task-11 regression adaptations — `test_steering`, `test_import_documents`, `test_document_back_navigation` (form login via `auth_helpers`), `test_header_consistency` (auth-link presence in both states, heights unchanged).
- **Fixed previously-completed suites broken by the new gating:** `test_chat_persistence`, `test_document_viewer`, `test_dark_tech_theme`, `test_responsive_polish`, `test_retrieval_quality` (login + signed-cookie httpx).
- **Kept `itsdangerous` direct dep** (starlette 1.6 made it an optional `full` extra — without it `SessionMiddleware` import crashes); added explanatory pyproject comment.
- Tests: `uv run pytest --cov=app` → **270 passed, 99% coverage** (>90%); `uv run ruff check .` clean; `uv run pyright` 0 errors.
- E2E in isolation: `test_admin_auth.py` **6/6**; regressions green — steering 4, import 3, back-nav 2, header 3, chat_rag 5, viewer 7; plus chat_persistence 4, dark_theme 6, responsive 7, retrieval 4, smoke 3, chips 4, loading 5, deflection 3, long 2.
- Startup criteria: no env → `RuntimeError` naming `BOR_ADMIN_PASSWORD, BOR_SESSION_SECRET` (exit 1); set → serves (health 200, anon `/api/docs` 403, login 204+cookie, admin 200, whoami admin). Login page UI check: landmarks, labeled input, ≥44px, focus-visible 3px, role=alert, AA tokens, no CDN — all verified.
- Commit `cbc263a` (`--no-gpg-sign`, exact phase message; included pyproject/uv.lock); phase file left in `todo/` for the harness.
- **Deviations:** PLAN.md revisions from task 9 **not applied** (executor rule forbids editing `.agent/PLAN.md` — needs harness/owner follow-up); itsdangerous dep as above.
- **Next pending phase:** none — 16 is the last in `todo/`.
@@ -0,0 +1,34 @@
_______________ 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 90 0 100%
app/api/docs.py 23 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 33 0 100%
app/api/suggestions.py 8 0 100%
app/config.py 55 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 20 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 36 0 100%
app/models.py 46 0 100%
app/rag/__init__.py 0 0 100%
app/rag/chunker.py 206 4 98%
app/rag/importer.py 150 5 97%
app/rag/llm.py 94 0 100%
app/rag/prompts.py 44 0 100%
app/rag/retriever.py 102 3 97%
app/rag/suggestions.py 27 0 100%
app/schemas.py 59 0 100%
--------------------------------------------
TOTAL 1089 14 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK