prepping for SPA conversion
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
**Phase 75 final verification pass — all green, no fixes needed**
|
||||
|
||||
- Verified (both tasks already complete in `complete/`): `buildSessionTranscript()` + transcript-posting `saveAsDoc()` in `app.js`; new suite `tests/e2e/test_save_doc_session.py`; updated phase-59 expectation in `test_response_to_docs.py`.
|
||||
- `uv run pytest tests/e2e/test_save_doc_session.py -v --no-cov` → 2 passed (multi-turn save → edit-out → push, git-verified byte-exact; earlier-bubble button saves whole session; no thinking-block leak)
|
||||
- Regressions in isolation: `test_response_to_docs.py` 4 passed; `test_chat_rag.py` 3 passed; `test_cache_busting.py` 4 passed
|
||||
- `uv run pytest --cov=app --cov-report=term-missing` → 1548 passed; `app/` coverage 99% (>90% floor)
|
||||
- `uv run ruff check .` → All checks passed; `uv run pyright` → 0 errors, 0 warnings
|
||||
|
||||
Completion criteria:
|
||||
1. N-turn transcript in order, prefilled in doc-edit, edit-out + push lands exactly in `BOR_DOCS_REPO` (git `show`/`rev-parse`, sha7 == tip) — ✅
|
||||
2. Phase-59 single-turn behavior preserved in transcript shape — ✅
|
||||
3. Full suite green, coverage >90%, ruff + pyright clean — ✅
|
||||
4. Atomic unsigned commit `0e4651c feat(docs): save the whole chat session as a doc` (GPG-signed: N) — ✅; phase dir move is the harness's (task files already in `complete/`; `00_phase.md` left for the harness)
|
||||
|
||||
Notable: no defects found; only uncommitted items are harness runtime artifacts (task-file move, `.agents/reports/`), left untouched per protocol.
|
||||
|
||||
Next pending phase: **none** — `todo/` holds only phase 75; the pipeline is complete once the harness archives it.
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
........................................................................ [ 4%]
|
||||
........................................................................ [ 9%]
|
||||
........................................................................ [ 13%]
|
||||
........................................................................ [ 18%]
|
||||
........................................................................ [ 23%]
|
||||
........................................................................ [ 27%]
|
||||
........................................................................ [ 32%]
|
||||
........................................................................ [ 37%]
|
||||
........................................................................ [ 41%]
|
||||
........................................................................ [ 46%]
|
||||
........................................................................ [ 51%]
|
||||
........................................................................ [ 55%]
|
||||
........................................................................ [ 60%]
|
||||
........................................................................ [ 65%]
|
||||
........................................................................ [ 69%]
|
||||
........................................................................ [ 74%]
|
||||
........................................................................ [ 79%]
|
||||
........................................................................ [ 83%]
|
||||
........................................................................ [ 88%]
|
||||
........................................................................ [ 93%]
|
||||
........................................................................ [ 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 177 0 100%
|
||||
app/api/chats.py 110 0 100%
|
||||
app/api/config.py 7 0 100%
|
||||
app/api/doc_drafts.py 93 0 100%
|
||||
app/api/docs.py 50 0 100%
|
||||
app/api/git_sources.py 212 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 101 0 100%
|
||||
app/config.py 140 0 100%
|
||||
app/core/__init__.py 0 0 100%
|
||||
app/core/auth.py 20 0 100%
|
||||
app/core/caching.py 108 0 100%
|
||||
app/core/debugging.py 29 2 93%
|
||||
app/core/docs_push.py 39 0 100%
|
||||
app/core/logging.py 13 0 100%
|
||||
app/db.py 21 0 100%
|
||||
app/main.py 52 0 100%
|
||||
app/models.py 86 0 100%
|
||||
app/rag/__init__.py 0 0 100%
|
||||
app/rag/agent.py 222 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 180 3 98%
|
||||
app/rag/llm.py 216 0 100%
|
||||
app/rag/overview.py 71 0 100%
|
||||
app/rag/prompts.py 88 0 100%
|
||||
app/rag/retriever.py 150 3 98%
|
||||
app/rag/scaffolding.py 55 0 100%
|
||||
app/rag/source_removal.py 41 0 100%
|
||||
app/rag/sources_meta.py 16 0 100%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/rag/summarizer.py 24 0 100%
|
||||
app/schemas.py 210 0 100%
|
||||
-----------------------------------------------
|
||||
TOTAL 2989 12 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
All done. Final report:
|
||||
|
||||
**Phase 75, Task 02 — complete** (commit `0e4651c` `feat(docs): save the whole chat session as a doc`, `--no-gpg-sign`)
|
||||
|
||||
- Added `tests/e2e/test_save_doc_session.py` (bare-repo fixture, git as source of truth):
|
||||
- `test_full_session_save_and_edit_out`: 3 distinct on-topic turns (turn 1 with `think out loud`) → save on last bubble → prefilled body is `## 1./## 2./## 3.` in order, byte-exact vs the deterministic mock, thinking-scratchpad-free, title = last question → delete section-2 block → push → `git show bor-docs:<path>` equals the EDITED body byte-for-byte (section 2's Q+A provably absent, sections 1/3 byte-exact, UI sha7 = `git rev-parse bor-docs`).
|
||||
- `test_earlier_bubble_button_saves_whole_session`: first bubble's button still drafts the whole 3-section transcript (A6), title unchanged; cancel leaves the branch tip untouched.
|
||||
- No `app/` code touched (task 01's frontend work + updated phase-59 E2E expectation were uncommitted and are included in this one atomic phase commit, plus the phase-74 leftover file moves and reports per house convention).
|
||||
|
||||
**Results**
|
||||
- `uv run pytest tests/e2e/test_save_doc_session.py --no-cov` → 2 passed (isolation)
|
||||
- Regressions in isolation: `test_response_to_docs.py` 4 passed, `test_chat_rag.py` 3 passed, `test_cache_busting.py` 4 passed
|
||||
- `uv run pytest --cov=app --cov-report=term-missing` → 1548 passed, TOTAL 99% (>90%)
|
||||
- `uv run ruff check . && uv run pyright` → clean
|
||||
|
||||
**Decisions:** replayed answers via raw SSE (mock is a pure function of last question + context, so bytes match the browser's multi-turn render); `rstrip()` in the expected-transcript helper mirrors the draft API's `.strip()`; branch-tip helper tolerates an uncreated branch so test 2 passes alone or in order. Phase dir not moved — the harness owns that per task rules.
|
||||
|
||||
**Next pending task:** none in `.agents/phases/todo/75_save_doc_full_session/` after the harness moves this task file — phase 75 (and the todo queue) is complete.
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
........................................................................ [ 4%]
|
||||
........................................................................ [ 9%]
|
||||
........................................................................ [ 13%]
|
||||
........................................................................ [ 18%]
|
||||
........................................................................ [ 23%]
|
||||
........................................................................ [ 27%]
|
||||
........................................................................ [ 32%]
|
||||
........................................................................ [ 37%]
|
||||
........................................................................ [ 41%]
|
||||
........................................................................ [ 46%]
|
||||
........................................................................ [ 51%]
|
||||
........................................................................ [ 55%]
|
||||
........................................................................ [ 60%]
|
||||
........................................................................ [ 65%]
|
||||
........................................................................ [ 69%]
|
||||
........................................................................ [ 74%]
|
||||
........................................................................ [ 79%]
|
||||
........................................................................ [ 83%]
|
||||
........................................................................ [ 88%]
|
||||
........................................................................ [ 93%]
|
||||
........................................................................ [ 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 177 0 100%
|
||||
app/api/chats.py 110 0 100%
|
||||
app/api/config.py 7 0 100%
|
||||
app/api/doc_drafts.py 93 0 100%
|
||||
app/api/docs.py 50 0 100%
|
||||
app/api/git_sources.py 212 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 101 0 100%
|
||||
app/config.py 140 0 100%
|
||||
app/core/__init__.py 0 0 100%
|
||||
app/core/auth.py 20 0 100%
|
||||
app/core/caching.py 108 0 100%
|
||||
app/core/debugging.py 29 2 93%
|
||||
app/core/docs_push.py 39 0 100%
|
||||
app/core/logging.py 13 0 100%
|
||||
app/db.py 21 0 100%
|
||||
app/main.py 52 0 100%
|
||||
app/models.py 86 0 100%
|
||||
app/rag/__init__.py 0 0 100%
|
||||
app/rag/agent.py 222 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 180 3 98%
|
||||
app/rag/llm.py 216 0 100%
|
||||
app/rag/overview.py 71 0 100%
|
||||
app/rag/prompts.py 88 0 100%
|
||||
app/rag/retriever.py 150 3 98%
|
||||
app/rag/scaffolding.py 55 0 100%
|
||||
app/rag/source_removal.py 41 0 100%
|
||||
app/rag/sources_meta.py 16 0 100%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/rag/summarizer.py 24 0 100%
|
||||
app/schemas.py 210 0 100%
|
||||
-----------------------------------------------
|
||||
TOTAL 2989 12 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
Reference in New Issue
Block a user