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:
@@ -0,0 +1,21 @@
|
||||
All verification criteria are green — this pass required no code changes (work was already complete and committed).
|
||||
|
||||
## Phase 56 — Final verification report
|
||||
|
||||
**Verified (no defects found; nothing to fix):**
|
||||
- `app/config.py`: A9 family is the default (`_DEFAULT_IMPORT_EXTENSIONS`), validator accepts any well-formed extension, no "narrow-only" wording or `_ALLOWED_IMPORT_EXTENSIONS` references remain
|
||||
- `.env.example` L43–49: default list active + "any extension is allowed" comment
|
||||
- Fail-loud checked live: `md,sh` → `{.md, .sh}`; empty/`,,` → "must name at least one format"; `md,sh!`, `md,../x` → error names the offending token
|
||||
- Commit `d94f3d5` is GPG-unsigned (`%G?`=N), tree clean, `.agents/` untracked
|
||||
|
||||
**Test / lint results:**
|
||||
- `uv run pytest --cov=app --cov-report=term -q` → exit 0, 1124 passed (1 skip, 2 xfail), TOTAL coverage **99%** (>90%)
|
||||
- `uv run pytest tests/e2e/test_import_extensions_env.py -v --no-cov` → **2 passed** (DB up)
|
||||
- Regressions isolated: `test_import_documents.py` → 3 passed; `test_quadlet_jinja_import.py` → 4 passed
|
||||
- `uv run ruff check . && uv run pyright` → All checks passed; 0 errors
|
||||
|
||||
**Completion criteria:** all 8 ✅ (novel `.sh` import + Sources badge `sh`; fail-loud empty/malformed; `.env.example`; regressions; full suite + coverage; isolated E2E; lint/types; unsigned commit)
|
||||
|
||||
**Deviations:** none.
|
||||
|
||||
**Next pending phase:** `57_edit_document_summaries`
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
........................................................................ [ 6%]
|
||||
........................................................................ [ 13%]
|
||||
........................................................................ [ 20%]
|
||||
........................................................................ [ 26%]
|
||||
........................................................................ [ 33%]
|
||||
........................................................................ [ 40%]
|
||||
........................................................................ [ 46%]
|
||||
........................................................................ [ 53%]
|
||||
........................................................................ [ 60%]
|
||||
........................................................................ [ 66%]
|
||||
........................................................................ [ 73%]
|
||||
........................................................................ [ 80%]
|
||||
........................................................................ [ 87%]
|
||||
........................................................................ [ 93%]
|
||||
................................................................... [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/chats.py 110 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 89 0 100%
|
||||
app/config.py 80 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/logging.py 13 0 100%
|
||||
app/db.py 21 0 100%
|
||||
app/main.py 50 0 100%
|
||||
app/models.py 74 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/sources_meta.py 16 0 100%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/rag/summarizer.py 24 0 100%
|
||||
app/schemas.py 167 0 100%
|
||||
-----------------------------------------------
|
||||
TOTAL 2233 12 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
Everything is complete and green.
|
||||
|
||||
## Report — Task 01 (lift extension allowlist to a default)
|
||||
|
||||
**Implemented**
|
||||
- `app/config.py`: `_ALLOWED_IMPORT_EXTENSIONS` → `_DEFAULT_IMPORT_EXTENSIONS` (same A9+quadlet+j2 list; comment now states it is the built-in default & `.env.example` example, **not** a ceiling); validator `_import_extensions_known` rewritten — accepts any well-formed extension (`^[a-z0-9]{1,16}$` shape guard), fails loudly on empty list (`"import_extensions must name at least one format"`) and on malformed tokens (naming the offender, e.g. `sh!`, `/x`); field comment + constant docstring rewritten
|
||||
- `.env.example`: `BOR_IMPORT_EXTENSIONS=…` (full default list) is now an active line under a rewritten "Import scope" comment (any extension allowed, lowercase, no dot; shown value = A9 default)
|
||||
- Sweep: `scripts/import_docs.py` and `app/rag/importer.py` docstrings updated; `rg "narrow|_ALLOWED_IMPORT_EXTENSIONS"` leaves only accurate "may narrow" wording, no narrow-only claims, no old constant
|
||||
- `tests/unit/test_config.py`: default A9 pin kept; new/adjusted tests — `md,sh` → `{.md,.sh}` (novel accepted), `MD,.Py` → `{.md,.py}`, `""`/`" "`/`",,"` → startup error naming the field, `md,sh!` / `md,../x` → error naming the token
|
||||
|
||||
**Test / lint / coverage**
|
||||
- `uv run pytest tests/unit/test_config.py tests/unit/test_importer.py -v --no-cov` → 47 passed
|
||||
- `uv run pytest --cov=app` (full suite) → all passed (exit 0), TOTAL coverage **99%** (>90%)
|
||||
- `uv run ruff check .` → All checks passed; `uv run pyright` → 0 errors, 0 warnings
|
||||
|
||||
**Decisions**
|
||||
- No commit made: the phase's single atomic commit belongs to task 02 ("…regressions, atomic commit"); changes left in the working tree. `.agents/PLAN.md` is absent from this working copy (gitignored by design) — the phase file's owner-locked decisions were followed.
|
||||
|
||||
**Next pending task:** `.agents/phases/todo/56_import_extensions_env/02_e2e_extensions_env.md`
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
........................................................................ [ 6%]
|
||||
........................................................................ [ 13%]
|
||||
........................................................................ [ 20%]
|
||||
........................................................................ [ 26%]
|
||||
........................................................................ [ 33%]
|
||||
........................................................................ [ 40%]
|
||||
........................................................................ [ 46%]
|
||||
........................................................................ [ 53%]
|
||||
........................................................................ [ 60%]
|
||||
........................................................................ [ 67%]
|
||||
........................................................................ [ 73%]
|
||||
........................................................................ [ 80%]
|
||||
........................................................................ [ 87%]
|
||||
........................................................................ [ 93%]
|
||||
................................................................. [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/chats.py 110 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 89 0 100%
|
||||
app/config.py 80 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/logging.py 13 0 100%
|
||||
app/db.py 21 0 100%
|
||||
app/main.py 50 0 100%
|
||||
app/models.py 74 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/sources_meta.py 16 0 100%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/rag/summarizer.py 24 0 100%
|
||||
app/schemas.py 167 0 100%
|
||||
-----------------------------------------------
|
||||
TOTAL 2233 12 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
Task 02 complete — all gates green.
|
||||
|
||||
**Implemented**
|
||||
- `tests/fixtures/extension_kb/` — story-dedicated fixture: `homelab/scripts/uptime.sh` (sentinel `UPTIME-PROBE-SENTINEL-9c2f`, placed inside the mock's 24-token SUMMARY_MODE digest window) + `homelab/notes/note.md` control
|
||||
- `tests/integration/test_import_extensions_env.py` — in-process import vs mock LLM on a scratch uvicorn port: `md,sh` → `.sh` row + stem title + 768-dim chunks + byte-stable mock digest + `is_summary` chunk; `md` → no `.sh` row (narrowing preserved)
|
||||
- `tests/e2e/test_import_extensions_env.py` — admin Sources page lists the `.sh` row (path cell + title attr) with `.format-badge` = `sh` in the same-page modal (sentinel in `pre.doc-raw`); fresh anonymous context renders the gate with zero `/api/docs` requests (`page.on("request")` pin); rows deleted in `finally`, no absolute count assertions
|
||||
|
||||
**Results**
|
||||
- `uv run pytest tests/integration/test_import_extensions_env.py -v --no-cov` → 2 passed
|
||||
- `uv run pytest tests/e2e/test_import_extensions_env.py -v --no-cov` → 2 passed (isolated, DB up)
|
||||
- Regressions isolated: `test_import_documents.py` 3 passed, `test_quadlet_jinja_import.py` 4 passed
|
||||
- `uv run pytest --cov=app` → 1075 passed, TOTAL 99% (>90%); `uv run ruff check . && uv run pyright` → clean
|
||||
- Committed `d94f3d5` (`--no-gpg-sign`, phase overview's message); DB left clean (0 leftover `extension_kb` rows)
|
||||
|
||||
**Deviations**
|
||||
- `scripts/import_docs.py` (task 01's sweep) was included in the commit though the phase overview's `git add` list omits it — leaving it uncommitted would split the phase's change and dirty the tree.
|
||||
- Phase dir move to `complete/` left to the harness per pipeline rules (`.agents/` gitignored by owner instruction).
|
||||
|
||||
**Next pending task:** `.agents/phases/todo/57_edit_document_summaries/01_update_summary_api.md`
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
........................................................................ [ 6%]
|
||||
........................................................................ [ 13%]
|
||||
........................................................................ [ 20%]
|
||||
........................................................................ [ 26%]
|
||||
........................................................................ [ 33%]
|
||||
........................................................................ [ 40%]
|
||||
........................................................................ [ 46%]
|
||||
........................................................................ [ 53%]
|
||||
........................................................................ [ 60%]
|
||||
........................................................................ [ 66%]
|
||||
........................................................................ [ 73%]
|
||||
........................................................................ [ 80%]
|
||||
........................................................................ [ 87%]
|
||||
........................................................................ [ 93%]
|
||||
................................................................... [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/chats.py 110 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 89 0 100%
|
||||
app/config.py 80 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/logging.py 13 0 100%
|
||||
app/db.py 21 0 100%
|
||||
app/main.py 50 0 100%
|
||||
app/models.py 74 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/sources_meta.py 16 0 100%
|
||||
app/rag/suggestions.py 27 0 100%
|
||||
app/rag/summarizer.py 24 0 100%
|
||||
app/schemas.py 167 0 100%
|
||||
-----------------------------------------------
|
||||
TOTAL 2233 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