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,16 @@
Final verification pass — no defects found; everything is already green.
**Verified (phase 49 — retry answer, redo-in-place):**
- `runTurn(text, {reask})` extraction, `appendRetryButton` (not admin-gated, one-per-bubble), `markLastRetryable` (remove-then-append on done/fallback/stop/restore), `retryLastTurn` (in-flight no-op, stale-click guard, pop→save→rerun) all present in `frontend/assets/app.js` per task pins
- Unit source pins in `tests/unit/test_frontend_feedback.py`; `.retry-btn` CSS family in `styles.css`; 4-test E2E suite exists
**Results (exact commands):**
- `uv run pytest --cov=app --cov-report=term-missing` → 902 tests passed; TOTAL **99%** (criterion >90% ✓)
- `uv run pytest tests/e2e/test_retry_answer.py -v --no-cov` → **4 passed** in isolation (DB up)
- Regressions in isolation: `test_chat_rag.py` 3 passed, `test_chat_persistence.py` 4 passed, `test_stop_generation.py` 3 passed
- `uv run ruff check . && uv run pyright` → All checks passed / 0 errors
**Completion criteria:** all 8 met — retry on last bubble (all states) / redo-in-place (DOM + `bor.chat.v1`) / in-flight no-op ✓ (E2E-verified); commit `6832957` atomic, message per overview, `--no-gpg-sign` (G?=N), working tree clean; phase dir already in `complete/`.
**Deviations:** none — verification-only pass, no code changes needed.
**Next pending phase:** `50_chat_history` (then `51_share_chat`).
@@ -0,0 +1,63 @@
........................................................................ [ 7%]
........................................................................ [ 15%]
........................................................................ [ 23%]
........................................................................ [ 31%]
........................................................................ [ 39%]
........................................................................ [ 47%]
........................................................................ [ 55%]
........................................................................ [ 63%]
........................................................................ [ 71%]
........................................................................ [ 79%]
........................................................................ [ 87%]
........................................................................ [ 95%]
..................................... [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 131 0 100%
app/api/config.py 7 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 143 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 81 0 100%
app/config.py 79 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 44 0 100%
app/models.py 60 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 78 0 100%
app/rag/archive_upload.py 128 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 189 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 65 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 109 0 100%
-----------------------------------------------
TOTAL 2004 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK
@@ -0,0 +1,9 @@
**Phase 49 · Task 01 — Retry button (redo in place): complete.**
- `app.js`: extracted `runTurn(text, { reask = false })` from `handleSend` (turn body moved verbatim; `reask` skips the user append + persistence save point 1); added `retryLastTurn` (in-flight no-op, stale-click guard, pop → **save** → DOM remove → `runTurn(text, { reask: true })`), `appendRetryButton` (house `appendTuneButton` pattern, **not** admin-gated, one per bubble, aria-hidden redo glyph + "Retry" name), `markLastRetryable` (remove-then-append; call sites: `done`, empty-fallback, stop-finalize, end of `restoreConversation`), `lastBrainWrap` tracking, header contract note.
- `styles.css`: `.retry-btn` = exact `.tune-btn` family (≥44px, ink-soft → ink hover, 14px glyph) + mobile 44px pin. `index.html`: messages-section comment documents the meta-row actions (Tune — admin; Retry — every visitor).
- Unit pins added in `test_frontend_feedback.py` (7 tests). Two phase-42/20 pins revised in place (house precedent): the turn handler is now `runTurn` (`test_frontend_scroll.py`, `test_sources_midstream.py`).
- Verified in a real browser via throwaway smoke script: last-bubble-only button, in-flight no-op, redo-in-place (DOM + storage, question never duplicated, pop saved before rerun), fresh answer lands in place with the button, restore re-marks.
- `uv run pytest --cov=app`: **901 passed**, TOTAL **99%** (>90%). `uv run ruff check . && uv run pyright`: clean.
- E2E in isolation: `test_chat_rag.py` 3 passed (byte-identical send path), `test_chat_persistence.py` 4 passed, `test_stop_generation.py` 3 passed, `test_loading_feedback.py` 5 passed.
- No deviations; no commit made (phase commit is task 02's). Next pending task: `.agent/phases/todo/49_retry_answer/02_e2e_retry_answer.md`.
@@ -0,0 +1,63 @@
........................................................................ [ 7%]
........................................................................ [ 15%]
........................................................................ [ 23%]
........................................................................ [ 31%]
........................................................................ [ 39%]
........................................................................ [ 47%]
........................................................................ [ 55%]
........................................................................ [ 63%]
........................................................................ [ 71%]
........................................................................ [ 79%]
........................................................................ [ 87%]
........................................................................ [ 95%]
..................................... [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 131 0 100%
app/api/config.py 7 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 143 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 81 0 100%
app/config.py 79 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 44 0 100%
app/models.py 60 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 78 0 100%
app/rag/archive_upload.py 128 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 189 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 65 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 109 0 100%
-----------------------------------------------
TOTAL 2004 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. Report:
**Implemented**
- `tests/e2e/test_retry_answer.py` (new, mock-only, no login): all four contract tests — redo-in-place on a completed grounded turn (last-bubble-only button, old wrap removed, question unduplicated, `[u1,b1,u2,b2']` storage, new bubble carries Retry), redo of a phase-48 stopped partial (fresh full `done` answer, no `stopped` marker), redo of a deflected answer (chips re-rendered), and Retry inert while a turn is in flight (no second turn/duplication).
**Test / lint / coverage**
- `uv run pytest tests/e2e/test_retry_answer.py -v --no-cov` → 4 passed in isolation
- Regressions in isolation: `test_chat_rag.py` 3 passed · `test_chat_persistence.py` 4 passed · `test_stop_generation.py` 3 passed
- `uv run pytest --cov=app --cov-report=term-missing` → 901 passed, TOTAL 99% (>90%)
- `uv run ruff check . && uv run pyright` → clean (0 errors)
- Commit `6832957` `feat(chat): retry the last answer — …` with `--no-gpg-sign`; working tree clean
**Notable decisions**
- Deflected turns carry weak-hit source chips per A8 (server contract) — removed an initial "no source chips" assertion.
- Old-vs-fresh bubble identity proved via a test-only `data-retry-marker` attribute (mock answers are byte-stable, so text alone can't distinguish a redo of the same question).
- Phase dir move to `complete/` left to the harness per task-executor rules; nothing under `.agent/` needed committing (gitignored, PLAN.md unchanged).
**Next pending task:** `50_chat_history/01_saved_chat_model.md`
@@ -0,0 +1,63 @@
........................................................................ [ 7%]
........................................................................ [ 15%]
........................................................................ [ 23%]
........................................................................ [ 31%]
........................................................................ [ 39%]
........................................................................ [ 47%]
........................................................................ [ 55%]
........................................................................ [ 63%]
........................................................................ [ 71%]
........................................................................ [ 79%]
........................................................................ [ 87%]
........................................................................ [ 95%]
..................................... [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 131 0 100%
app/api/config.py 7 0 100%
app/api/docs.py 23 0 100%
app/api/git_sources.py 143 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 81 0 100%
app/config.py 79 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 44 0 100%
app/models.py 60 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 78 0 100%
app/rag/archive_upload.py 128 0 100%
app/rag/chunker.py 206 4 98%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 173 3 98%
app/rag/llm.py 189 0 100%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 65 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 109 0 100%
-----------------------------------------------
TOTAL 2004 12 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
validation OK