add phase 68 complete
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
All verification complete — everything is green, no defects found.
|
||||||
|
|
||||||
|
**Phase 68 (search_tool) — final verification pass: all criteria verified**
|
||||||
|
|
||||||
|
- Verified (all three task files already in `complete/`; no re-implementation needed): `search_documents` is the 3rd `AGENT_TOOLS` entry with locked shape; `grep_document` (case-insensitive fixed substring, 1-based lines, 20-match catalog-order cap, 200-char truncation, scoped single-doc, no-match/no-arg/unknown-doc refusals, counted in `tool_calls`, `read_docs` untouched); SSE `tool` frame `argument=pattern`; UI status `… is searching for <pattern>` + `🔎 Searching for` tool line with pattern in `<code>`, persisted/restored on reload.
|
||||||
|
- `uv run pytest --cov=app --cov-report=term-missing` → **1317 passed, TOTAL 99%** (>90% gate)
|
||||||
|
- `uv run ruff check . && uv run pyright` → clean (0 errors)
|
||||||
|
- `uv run pytest tests/e2e/test_search_tool.py -v --no-cov` → **3 passed** (DB up)
|
||||||
|
- Regressions in isolation: `test_agent_document_tools.py` **4 passed**, `test_agent_unlimited_tools.py` **4 passed**, plus task-03's `test_chat_rag.py` **3 passed**
|
||||||
|
- Commit `8cf3a82` `feat(agent): search_documents tool — …` exists, unsigned (`%G?=N`); phase dir move is the harness's job on success — left untouched
|
||||||
|
- Deviations: none. Untracked `NOTES.md` (owner scratch, outside commit path) and `.agent/reports/68_search_tool/*` (post-commit pipeline artifacts) left as-is; no extra commit added (one-commit-per-phase rule)
|
||||||
|
- Next pending phase: none — `todo/` contains only 68_search_tool
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
........................................................................ [ 5%]
|
||||||
|
........................................................................ [ 10%]
|
||||||
|
........................................................................ [ 16%]
|
||||||
|
........................................................................ [ 21%]
|
||||||
|
........................................................................ [ 27%]
|
||||||
|
........................................................................ [ 32%]
|
||||||
|
........................................................................ [ 38%]
|
||||||
|
........................................................................ [ 43%]
|
||||||
|
........................................................................ [ 49%]
|
||||||
|
........................................................................ [ 54%]
|
||||||
|
........................................................................ [ 60%]
|
||||||
|
........................................................................ [ 65%]
|
||||||
|
........................................................................ [ 71%]
|
||||||
|
........................................................................ [ 76%]
|
||||||
|
........................................................................ [ 82%]
|
||||||
|
........................................................................ [ 87%]
|
||||||
|
........................................................................ [ 92%]
|
||||||
|
........................................................................ [ 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 153 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 181 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 126 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 120 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 213 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/sources_meta.py 16 0 100%
|
||||||
|
app/rag/suggestions.py 27 0 100%
|
||||||
|
app/rag/summarizer.py 24 0 100%
|
||||||
|
app/schemas.py 205 0 100%
|
||||||
|
-----------------------------------------------
|
||||||
|
TOTAL 2635 12 99%
|
||||||
|
coverage gate: app/ 99% (>90%) OK
|
||||||
|
All checks passed!
|
||||||
|
0 errors, 0 warnings, 0 informations
|
||||||
|
validation OK
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
All green and committed. Final report:
|
||||||
|
|
||||||
|
**Phase 68 task 03 complete — `feat(agent): search_documents tool` (commit 8cf3a82)**
|
||||||
|
|
||||||
|
- **Mock search flow** (`tests/e2e/mock_llm.py`): `SEARCH_TRIGGER = "search your documents"` (checked before the `use your tools` flow, `think in paragraphs` convention) → req 1 streams only a `search_documents` tool_call with `{"pattern": "reese-sentinel-42"}` (id `call_0`); req 2 (a `tool`-role result recognized by its `source/path:line: text` shape or sentinel) answers deterministically `Found <first matched line[:80]>`; documented in the module docstring's marker list.
|
||||||
|
- **E2E suite** `tests/e2e/test_search_tool.py` (3 tests, green in isolation): live search flow (wire frame `argument = <sentinel>` ahead of first delta, recorded `#send-status` "… is searching for reese-sentinel-42", one `🔎 Searching for` line with sentinel in `<code>`, `Found …` echo in the bubble, no error banner, settled to idle); context accounting (search-only turn leaves `done.sources`/chips/`query_log.sources` at the retrieval baseline); search tool line re-renders after reload.
|
||||||
|
- **Fixture**: `tests/fixtures/search_docs/reese-notes.md` — one doc, sentinel on line 6, imported via the real importer (admin-import pipeline); cosine 0.51 → grounded.
|
||||||
|
- **Unit pins**: 11 new tests in `test_mock_tool_flow.py` (search/found steps, nested paths, catalog/read-result non-recognition, no-tools gates, no trigger shadowing either way).
|
||||||
|
- **Results**: `uv run pytest tests/e2e/test_search_tool.py -v --no-cov` → 3 passed; regressions in isolation: `test_agent_document_tools.py` 4 passed, `test_agent_unlimited_tools.py` 4 passed, `test_chat_rag.py` 3 passed; `uv run pytest --cov=app` → 1317 passed, TOTAL 99% (>90%); `uv run ruff check . && uv run pyright` → clean.
|
||||||
|
- **Decisions**: no existing suite pins an exact two-tool `tools` payload (the mock only checks presence), so none needed updating; no other suite's question/fixture text contains the trigger (repo grep + unit pins). Phase dir moved to `complete/` in the same commit, mirroring phases 66/67 (task files 01–03 in the commit; `00_phase.md` left for the harness/next sweep, exactly as 67's was).
|
||||||
|
- **Next pending task**: none — `todo/` holds only phase 68's `00_phase.md` (harness moves it on success); no further phases are scaffolded.
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
........................................................................ [ 5%]
|
||||||
|
........................................................................ [ 10%]
|
||||||
|
........................................................................ [ 16%]
|
||||||
|
........................................................................ [ 21%]
|
||||||
|
........................................................................ [ 27%]
|
||||||
|
........................................................................ [ 32%]
|
||||||
|
........................................................................ [ 38%]
|
||||||
|
........................................................................ [ 43%]
|
||||||
|
........................................................................ [ 49%]
|
||||||
|
........................................................................ [ 54%]
|
||||||
|
........................................................................ [ 60%]
|
||||||
|
........................................................................ [ 65%]
|
||||||
|
........................................................................ [ 71%]
|
||||||
|
........................................................................ [ 76%]
|
||||||
|
........................................................................ [ 82%]
|
||||||
|
........................................................................ [ 87%]
|
||||||
|
........................................................................ [ 92%]
|
||||||
|
........................................................................ [ 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 153 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 181 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 126 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 120 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 213 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/sources_meta.py 16 0 100%
|
||||||
|
app/rag/suggestions.py 27 0 100%
|
||||||
|
app/rag/summarizer.py 24 0 100%
|
||||||
|
app/schemas.py 205 0 100%
|
||||||
|
-----------------------------------------------
|
||||||
|
TOTAL 2635 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