chore(agent): track .agent/ planning tree in git
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:
@@ -0,0 +1,19 @@
|
||||
All green. Final report:
|
||||
|
||||
**Phase 39 (configurable brand) — final verification pass. All tasks were already in `complete/`; no code defects found, nothing needed fixing.**
|
||||
|
||||
- Verified: `GET /api/config` (public, exactly `{app_name, version}`), `brand.js` brand layer on all pages, `app.js`/`document.js` `window.BOR_BRAND` reads, Containerfile esbuild line, `.env.example` + README docs, story E2E, unsigned phase commit `fe55be0`.
|
||||
- Live-verified the viewer-title criterion (not covered by the E2E file) with a throwaway script: `Temp Verify Doc · Brain of Testy` and `Document not found · Brain of Testy` on a `BOR_APP_NAME="Brain of Testy"` instance (temp DB row seeded and removed).
|
||||
|
||||
**Test / lint / coverage results**
|
||||
- `uv run pytest` → 695 passed (unit+integration, exit 0)
|
||||
- `uv run pytest --cov=app --cov-report=term-missing` → 99% on `app/` (>90% ✓)
|
||||
- `uv run pytest tests/e2e/test_configurable_brand.py -v --no-cov` → 5 passed in isolation, deterministic (two consecutive runs)
|
||||
- `uv run pytest tests/e2e/test_smoke.py test_shared_header.py test_header_consistency.py test_chat_persistence.py --no-cov` → 16 passed (default-name regression)
|
||||
- `uv run ruff check . && uv run pyright` → clean (0 errors)
|
||||
|
||||
**Completion criteria:** /api/config default + key set ✓ · all "Brain of Testy" DOM assertions ✓ (E2E + live viewer check) · unset-var suites green unchanged ✓ · pytest/coverage/E2E gates ✓ · ruff+pyright ✓ · UI structure + no-CDN ✓ (local script only, no external tags, no landmark/contrast changes) · one `--no-gpg-sign` commit ✓; phase-dir move left to the harness.
|
||||
|
||||
**Deviations:** none. Owner's `TODO.md` Tuning-button bug and `NOTES.md` are pending future work, untouched.
|
||||
|
||||
**Next pending phase:** none — `todo/` contains only this phase (39).
|
||||
@@ -0,0 +1,59 @@
|
||||
........................................................................ [ 10%]
|
||||
........................................................................ [ 20%]
|
||||
........................................................................ [ 31%]
|
||||
........................................................................ [ 41%]
|
||||
........................................................................ [ 51%]
|
||||
........................................................................ [ 62%]
|
||||
........................................................................ [ 72%]
|
||||
........................................................................ [ 82%]
|
||||
........................................................................ [ 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 122 0 100%
|
||||
app/api/config.py 7 0 100%
|
||||
app/api/docs.py 23 0 100%
|
||||
app/api/git_sources.py 66 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 80 0 100%
|
||||
app/config.py 66 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 81 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 174 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 99 0 100%
|
||||
--------------------------------------------
|
||||
TOTAL 1754 12 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
@@ -0,0 +1,17 @@
|
||||
Task 01 complete. Final report:
|
||||
|
||||
**Implemented**
|
||||
- `app/api/config.py` — public, stateless `GET /api/config` returning exactly `{app_name, version}` (mirrors the `health.py` router pattern; `Settings` via `Depends`, codebase `# noqa: B008` convention)
|
||||
- `app/main.py` — `config_router` registered with the other `/api` routers, before the static mount
|
||||
- `tests/integration/test_api.py` — 2 new tests (health-test location/pattern): anonymous 200 + defaults (`"Brain of Reese"`, current `app_version`), key set == `{app_name, version}`, and `Settings` override (`app_name="Brain of Testy"`) via `dependency_overrides`
|
||||
|
||||
**Test / lint / coverage**
|
||||
- `uv run pytest --cov=app --cov-report=term-missing` → 685 passed, TOTAL **99%** (`app/api/config.py` 100%)
|
||||
- `uv run ruff check . && uv run pyright` → clean (0 errors)
|
||||
- Live check: `GET /api/config` → `200 {"app_name": "Brain of Reese", "version": "0.1.0"}`
|
||||
|
||||
**Decisions / deviations**
|
||||
- Added `# noqa: B008` to the task's suggested signature (B008 fires; matches the inline-`Depends` convention in `docs.py`/`steering.py`/`git_sources.py`)
|
||||
- No commit made — commit + phase-dir move are owned by task 03 per phase plan
|
||||
|
||||
**Next pending task:** `02_frontend_branding.md` (same phase)
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
........................................................................ [ 10%]
|
||||
........................................................................ [ 21%]
|
||||
........................................................................ [ 31%]
|
||||
........................................................................ [ 42%]
|
||||
........................................................................ [ 52%]
|
||||
........................................................................ [ 63%]
|
||||
........................................................................ [ 73%]
|
||||
........................................................................ [ 84%]
|
||||
........................................................................ [ 94%]
|
||||
..................................... [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 122 0 100%
|
||||
app/api/config.py 7 0 100%
|
||||
app/api/docs.py 23 0 100%
|
||||
app/api/git_sources.py 66 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 80 0 100%
|
||||
app/config.py 66 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 81 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 174 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 99 0 100%
|
||||
--------------------------------------------
|
||||
TOTAL 1754 12 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
All green. Task 02 is complete.
|
||||
|
||||
## Report — phase 39, task 02 (frontend branding)
|
||||
|
||||
**Implemented**
|
||||
- `frontend/assets/brand.js` (new classic script): synchronous `window.BOR_BRAND = "Brain of Reese"` at parse time; `fetch("/api/config", {cache:"no-store"})` → title replace, `.brand-text` bold-split (plain for non-`"Brain of "` names, HTML-escaped), TreeWalker text-node pass (script/style rejected), `aria-label`/`placeholder`/meta-`content` attribute pass; `console.warn` fallback, never breaks the page
|
||||
- All 6 pages load it first (task lists 5 + `git-sources.html`, which the phase's `frontend/*.html` glob and "every page" objective include)
|
||||
- `app.js`: lazy `brand()` — `SEND_STATUS` builders, `TYPING_LABEL()`, elapsed-hint + tool labels resolve the name **at call time** (module-eval freeze would break the rename)
|
||||
- `document.js`: both page titles use `brand()`; `Containerfile`: minify-only esbuild line (markdown.js pattern)
|
||||
- New `tests/unit/test_frontend_brand.py` (10 marker tests); updated 2 pre-existing source pins that asserted the literals this task moved
|
||||
|
||||
**Results**
|
||||
- `uv run pytest` → 695 passed; `--cov=app` → 99% (>90%)
|
||||
- `uv run ruff check . && uv run pyright` → clean
|
||||
- E2E isolated: `test_smoke.py` 3✓, `test_loading_feedback.py` 5✓, `test_chat_rag.py` 3✓, `test_shared_header.py` 6✓ (default name byte-identical)
|
||||
- Manual 24-check browser pass: `BOR_APP_NAME="Brain of Testy"` (all 6 pages + chat "is thinking" label), fetch-failure fallback, plain "ReeseBot" name — all green
|
||||
|
||||
**Notable**: call-time (not module-eval) brand reads — required so labels set after the fetch carry the new name; two old unit source-pins updated accordingly.
|
||||
|
||||
**Next pending**: `39_configurable_brand/03_e2e_docs_commit.md` (story E2E + `.env.example`/README + commit).
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
........................................................................ [ 10%]
|
||||
........................................................................ [ 20%]
|
||||
........................................................................ [ 31%]
|
||||
........................................................................ [ 41%]
|
||||
........................................................................ [ 51%]
|
||||
........................................................................ [ 62%]
|
||||
........................................................................ [ 72%]
|
||||
........................................................................ [ 82%]
|
||||
........................................................................ [ 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 122 0 100%
|
||||
app/api/config.py 7 0 100%
|
||||
app/api/docs.py 23 0 100%
|
||||
app/api/git_sources.py 66 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 80 0 100%
|
||||
app/config.py 66 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 81 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 174 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 99 0 100%
|
||||
--------------------------------------------
|
||||
TOTAL 1754 12 99%
|
||||
coverage gate: app/ 99% (>90%) OK
|
||||
All checks passed!
|
||||
0 errors, 0 warnings, 0 informations
|
||||
validation OK
|
||||
@@ -0,0 +1,21 @@
|
||||
All gates green and committed. Final report:
|
||||
|
||||
**Phase 39, task 03 — completed**
|
||||
|
||||
- `tests/e2e/test_configurable_brand.py` (5 tests): session fixture boots a **second app instance** (`BOR_APP_NAME="Brain of Testy"`, port `APP_PORT+1`, same DB/mock/auth env block as conftest) → asserts `/api/config` on both instances, index title/`.brand-text` bold-split/empty-state h1/`#messages` aria-label, sources + login page titles, one pre-token chat turn (`think out loud` marker) with `#send-status` = "Brain of Testy is thinking"; no-op regression pins the shared server's default "Brain of Reese" bytes
|
||||
- `.env.example` App section + README configuration reference: what `BOR_APP_NAME` affects, the default, the bold-split rule
|
||||
- Committed the whole phase (tasks 01+02 code: `GET /api/config`, `brand.js`, de-hard-coded app.js/document.js, Containerfile) + plan files via `git add -f`
|
||||
|
||||
**Results**
|
||||
- `uv run pytest tests/e2e/test_configurable_brand.py -v --no-cov` → 5 passed, **twice consecutively** (27.4s / 27.8s)
|
||||
- `uv run pytest --cov=app --cov-report=term-missing` → 695 passed, **99%** app coverage (>90%)
|
||||
- Brand-string suites in isolation: `test_smoke` 3 ✓, `test_shared_header` 6 ✓, `test_header_consistency` 3 ✓, `test_chat_persistence` 4 ✓
|
||||
- `uv run ruff check . && uv run pyright` → clean
|
||||
- Commit `fe55be0` `feat(brand): configurable app name — BOR_APP_NAME drives /api/config + the frontend brand layer` (`--no-gpg-sign`)
|
||||
|
||||
**Notes**
|
||||
- Playwright 1.62 Python has no `to_have_inner_html` — used a retrying `wait_for_function` helper
|
||||
- Phase-dir move to `complete/` is handled by the harness (per protocol I don't move task files); 01/02 already there, committed in place
|
||||
- Left uncommitted: `TODO.md` (new owner item for a future phase) and untracked `NOTES.md` (owner scratch); pre-existing todo→complete residue from phases 30–38 untouched
|
||||
|
||||
**Next pending task:** none in `todo/` after this — phase 39 is its last task; the new `TODO.md` item (Tuning-button auth flash) awaits a future roadmap commit.
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
........................................................................ [ 10%]
|
||||
........................................................................ [ 20%]
|
||||
........................................................................ [ 31%]
|
||||
........................................................................ [ 41%]
|
||||
........................................................................ [ 51%]
|
||||
........................................................................ [ 62%]
|
||||
........................................................................ [ 72%]
|
||||
........................................................................ [ 82%]
|
||||
........................................................................ [ 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 122 0 100%
|
||||
app/api/config.py 7 0 100%
|
||||
app/api/docs.py 23 0 100%
|
||||
app/api/git_sources.py 66 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 80 0 100%
|
||||
app/config.py 66 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 81 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 174 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 99 0 100%
|
||||
--------------------------------------------
|
||||
TOTAL 1754 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