phase: 119_name_signal_read_chips
Build and Push Containers / build-and-push-app (push) Successful in 2m1s
Build and Push Containers / build-and-push-db (push) Successful in 18s

All verification complete. Final report:

**Phase 119 final verification pass — all criteria verified, one stale pin fixed.**
- Verified implementation of all 6 tasks: D1 component name-hit rule (`name_hit` flag, titles never matched, retired length tie-break), D2 `BOR_NAME_HIT_BONUS` (0.005 default, 0 = byte-identical kill switch, negative fails startup, selection-layer only, `eval_retrieval` `suggested:` line), D3 suggested-folder lines (after `SUGGEST_INTRO`, before first block), D4 cite-discipline `SUGGEST_INTRO` sentence (PERSONA/LOW/`TOOLS_SECTION` byte-pins intact), D5 `done.sources` = read docs only (frontend no-op on empty confirmed), D6 mock `repeat your folder map` echo + new suite + telemetry.
- Battery (replica restored per skill, fingerprint docs=1000/chunks=8866 verified, `eval_retrieval --from-file tests/fixtures/retrieval_battery.txt` re-run): **GATE PASS** — gitea README #4 in suggested top-5, forgejo 5/5 (README #1), gateway README in top-5 (#4), qwen3.8-27b quadlets top-5, Mongolia HIGH/fts=5 unchanged.
- New E2E in isolation: `4 passed` ×2 (deterministic). All 27 modified E2E suites in isolation: 26 green; **1 stale pin fixed** — `test_source_chip_quality.py` durable-record order pin pre-dated the D1 re-rank (`aliases` stem sub-component name-hits `ssh_aliases.txt`, deterministically lifting `backups.md` over `kubernetes.md`; probe-verified 0.016277 vs 0.016036, 4/4 stable) — re-pinned with the phase-119 rationale; suite green ×2.
- Gates: `uv run pytest --cov=app --cov-report=term-missing` → **2547 passed, app coverage 99%** (>90%); `uv run ruff check .` → All checks passed; `uv run pyright` → 0 errors.
- Completion criteria: 1 ✅ (battery, recorded), 2 ✅ (folder lines; block/LOW byte-identical pins green), 3 ✅ (read-only chips, zero-read chips nothing, related row + durable record untouched — unit+E2E agree), 4 ✅ (all green), 5 → commit/phase-move left to the harness per pass rules (nothing committed).
- Deviations: battery output + real-model telemetry recorded in `.agents/reports/119_name_signal_read_chips/task06_battery_and_e2e.md` and `TOOL_CALLING_TESTING.md` §11 (task files in `complete/` are immutable to this pass); gateway canonical doc at #4 vs overview's #3 was already documented at task 06 (containment gate met).
- Next pending phase: **none** — `todo/` holds only phase 119.
This commit is contained in:
2026-09-16 15:50:48 -04:00
parent 795fb56425
commit a5b63f83ad
89 changed files with 4377 additions and 655 deletions
@@ -0,0 +1,10 @@
All verification complete. Final report:
**Phase 119 final verification pass — all criteria verified, one stale pin fixed.**
- Verified implementation of all 6 tasks: D1 component name-hit rule (`name_hit` flag, titles never matched, retired length tie-break), D2 `BOR_NAME_HIT_BONUS` (0.005 default, 0 = byte-identical kill switch, negative fails startup, selection-layer only, `eval_retrieval` `suggested:` line), D3 suggested-folder lines (after `SUGGEST_INTRO`, before first block), D4 cite-discipline `SUGGEST_INTRO` sentence (PERSONA/LOW/`TOOLS_SECTION` byte-pins intact), D5 `done.sources` = read docs only (frontend no-op on empty confirmed), D6 mock `repeat your folder map` echo + new suite + telemetry.
- Battery (replica restored per skill, fingerprint docs=1000/chunks=8866 verified, `eval_retrieval --from-file tests/fixtures/retrieval_battery.txt` re-run): **GATE PASS** — gitea README #4 in suggested top-5, forgejo 5/5 (README #1), gateway README in top-5 (#4), qwen3.8-27b quadlets top-5, Mongolia HIGH/fts=5 unchanged.
- New E2E in isolation: `4 passed` ×2 (deterministic). All 27 modified E2E suites in isolation: 26 green; **1 stale pin fixed** — `test_source_chip_quality.py` durable-record order pin pre-dated the D1 re-rank (`aliases` stem sub-component name-hits `ssh_aliases.txt`, deterministically lifting `backups.md` over `kubernetes.md`; probe-verified 0.016277 vs 0.016036, 4/4 stable) — re-pinned with the phase-119 rationale; suite green ×2.
- Gates: `uv run pytest --cov=app --cov-report=term-missing` → **2547 passed, app coverage 99%** (>90%); `uv run ruff check .` → All checks passed; `uv run pyright` → 0 errors.
- Completion criteria: 1 ✅ (battery, recorded), 2 ✅ (folder lines; block/LOW byte-identical pins green), 3 ✅ (read-only chips, zero-read chips nothing, related row + durable record untouched — unit+E2E agree), 4 ✅ (all green), 5 → commit/phase-move left to the harness per pass rules (nothing committed).
- Deviations: battery output + real-model telemetry recorded in `.agents/reports/119_name_signal_read_chips/task06_battery_and_e2e.md` and `TOOL_CALLING_TESTING.md` §11 (task files in `complete/` are immutable to this pass); gateway canonical doc at #4 vs overview's #3 was already documented at task 06 (containment gate met).
- Next pending phase: **none** — `todo/` holds only phase 119.
@@ -0,0 +1,104 @@
........................................................................ [ 2%]
........................................................................ [ 5%]
........................................................................ [ 8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 16%]
........................................................................ [ 19%]
........................................................................ [ 22%]
........................................................................ [ 25%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 33%]
........................................................................ [ 36%]
........................................................................ [ 39%]
........................................................................ [ 42%]
........................................................................ [ 45%]
........................................................................ [ 48%]
........................................................................ [ 50%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 59%]
........................................................................ [ 62%]
........................................................................ [ 65%]
........................................................................ [ 67%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 76%]
........................................................................ [ 79%]
........................................................................ [ 81%]
........................................................................ [ 84%]
........................................................................ [ 87%]
........................................................................ [ 90%]
........................................................................ [ 93%]
........................................................................ [ 96%]
........................................................................ [ 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 52 0 100%
app/api/chat.py 226 1 99%
app/api/chats.py 110 0 100%
app/api/config.py 13 0 100%
app/api/doc_drafts.py 99 0 100%
app/api/docs.py 156 1 99%
app/api/git_sources.py 232 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 33 0 100%
app/api/sync.py 139 0 100%
app/api/tokens.py 40 0 100%
app/api/ui_settings.py 55 0 100%
app/config.py 231 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 45 0 100%
app/core/caching.py 124 0 100%
app/core/debugging.py 29 2 93%
app/core/docs_push.py 39 0 100%
app/core/errors.py 5 0 100%
app/core/logging.py 13 0 100%
app/core/rate_limit.py 44 0 100%
app/core/security_headers.py 20 0 100%
app/core/theming.py 38 0 100%
app/core/tokens.py 44 0 100%
app/db.py 22 0 100%
app/main.py 66 0 100%
app/models.py 128 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 347 1 99%
app/rag/archive_upload.py 134 0 100%
app/rag/chunker.py 206 4 98%
app/rag/doc_dates.py 18 0 100%
app/rag/folder_summaries.py 123 0 100%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 219 3 99%
app/rag/llm.py 244 1 99%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 102 0 100%
app/rag/retriever.py 242 3 99%
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 330 0 100%
--------------------------------------------------
TOTAL 4269 16 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
WARNING: there is a new pyright version available (v1.1.411 -> v1.1.414).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
validation OK
@@ -0,0 +1,19 @@
**Task 01 complete — component name-hit rule (phase-119 D1, LOCKED A2)**
Implemented:
- `name_hit_tokens`: class-agnostic candidates (all normalized tokens ≥4, dotted whole + versioned join); digit filter moved to the match side
- `_name_hit_chunks`: two-class rule via new `_name_parts`/`_name_token_matches` — digit-bearing → prefix of normalized part/stem; digitless → equals part/stem/stem sub-component; titles never matched; ranking (matched-token count desc, catalog order) — length tie-break retired; cap 10 and LATERAL representative fetch unchanged
- `RetrievedChunk.name_hit: bool = False` (after `is_summary`); `fuse()` double-hit merge ORs the flag in so the flag survives fusion
- Module/function docstrings re-cut for the two-class rule + title-exclusion guard
Test/lint/coverage (all green):
- `uv run pytest tests/unit/test_retriever.py -v` → 64 passed (new pins: digitless part/stem/sub-component hits, "deploy"/"Deployments" precision, `qwen38` prefix vs mid-word miss, short tokens, count-then-catalog ranking with the old-order flip, cap, flag-through-fuse)
- `uv run pytest --cov=app --cov-report=term` → 2514 passed, app/ TOTAL 99% (>90%)
- `uv run ruff check . && uv run pyright` → clean, 0 errors
Decisions:
- `fuse()` OR-propagation (documented in docstring) so task-02's bonus input is visible on merged double-hit rows
- Phase-106 recency owner-scenario re-pinned: the `retention*` docs are now legitimate name hits, margin 0.00262816 → exactly 1/63−1/70 = 0.00158730; flip-safety bar (margin > zero-age boost) kept at 2.27×, A still first
- Integration name-hit suite updated: `llama.cpp.md` now also name-hits (question names it), limit-test stems renamed to prefix form
Next pending task: `.agents/phases/todo/119_name_signal_read_chips/02_name_hit_bonus.md`
@@ -0,0 +1,103 @@
........................................................................ [ 2%]
........................................................................ [ 5%]
........................................................................ [ 8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 17%]
........................................................................ [ 20%]
........................................................................ [ 22%]
........................................................................ [ 25%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 34%]
........................................................................ [ 37%]
........................................................................ [ 40%]
........................................................................ [ 42%]
........................................................................ [ 45%]
........................................................................ [ 48%]
........................................................................ [ 51%]
........................................................................ [ 54%]
........................................................................ [ 57%]
........................................................................ [ 60%]
........................................................................ [ 63%]
........................................................................ [ 65%]
........................................................................ [ 68%]
........................................................................ [ 71%]
........................................................................ [ 74%]
........................................................................ [ 77%]
........................................................................ [ 80%]
........................................................................ [ 83%]
........................................................................ [ 85%]
........................................................................ [ 88%]
........................................................................ [ 91%]
........................................................................ [ 94%]
........................................................................ [ 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 52 0 100%
app/api/chat.py 225 1 99%
app/api/chats.py 110 0 100%
app/api/config.py 13 0 100%
app/api/doc_drafts.py 99 0 100%
app/api/docs.py 156 1 99%
app/api/git_sources.py 232 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 33 0 100%
app/api/sync.py 139 0 100%
app/api/tokens.py 40 0 100%
app/api/ui_settings.py 55 0 100%
app/config.py 224 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 45 0 100%
app/core/caching.py 124 0 100%
app/core/debugging.py 29 2 93%
app/core/docs_push.py 39 0 100%
app/core/errors.py 5 0 100%
app/core/logging.py 13 0 100%
app/core/rate_limit.py 44 0 100%
app/core/security_headers.py 20 0 100%
app/core/theming.py 38 0 100%
app/core/tokens.py 44 0 100%
app/db.py 22 0 100%
app/main.py 66 0 100%
app/models.py 128 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 317 1 99%
app/rag/archive_upload.py 134 0 100%
app/rag/chunker.py 206 4 98%
app/rag/doc_dates.py 18 0 100%
app/rag/folder_summaries.py 123 0 100%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 219 3 99%
app/rag/llm.py 244 1 99%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 100 0 100%
app/rag/retriever.py 234 3 99%
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 330 0 100%
--------------------------------------------------
TOTAL 4221 16 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
WARNING: there is a new pyright version available (v1.1.411 -> v1.1.414).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
validation OK
@@ -0,0 +1,17 @@
All green. Final report:
**Implemented (task 02 — bounded name-hit bonus, D2/LOCKED A3)**
- `app/config.py`: `name_hit_bonus: float = 0.005` (`BOR_NAME_HIT_BONUS`) with validator (negative → `ValueError` naming the field; `0` = legal kill switch); `.env.example` entry next to `BOR_RECENCY_BOOST`.
- `app/rag/retriever.py`: new shared `_selection_order(chunks, bonus)` walk (first-seen-chunk rank semantics, best-cosine tracking, effective = best + bonus once per name-hit doc); `select_suggested`/`select_related`/`weak_hit_titles` gain `bonus: float | None = None` (settings default); dormant `select_documents*` untouched; module docstring updated.
- `scripts/eval_retrieval.py`: prints ` suggested: 1. src/path 2. …` per question (bonus included) + `name_hit_bonus=` in the header; smoke-tested live.
- Tests: config default/override/kill-switch/negative; retriever lift, non-lift past the gap, once-per-doc, golden pre-phase byte-identity (pinned list), exclusion under bonus, titles order, A8 inputs untouched (13 new tests).
**Gates (all green)**
- `uv run pytest tests/unit/test_retriever.py tests/unit/test_config.py -v` → 135 passed
- `uv run pytest --cov=app --cov-report=term-missing` → 2577 passed, TOTAL 99% (>90%)
- `uv run ruff check .` → clean; `uv run pyright` → 0 errors
- `uv run pytest tests/e2e/test_summary_seed_context.py -v --no-cov` → 2 passed (neighbor suite unaffected)
**Decisions**: re-sort is skipped entirely when `bonus==0` or no name-hit chunk exists — the LOCKED A3 byte-identical kill switch holds on any input; the D2 key `(−effective, −best_cosine, path, first_seen)` applies only when the bonus is active. No commits made (harness owns them).
**Next pending task**: `03_suggested_folder_context.md` (D3 — suggested-folder lines in the HIGH prompt).
@@ -0,0 +1,104 @@
........................................................................ [ 2%]
........................................................................ [ 5%]
........................................................................ [ 8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 17%]
........................................................................ [ 19%]
........................................................................ [ 22%]
........................................................................ [ 25%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 34%]
........................................................................ [ 37%]
........................................................................ [ 39%]
........................................................................ [ 42%]
........................................................................ [ 45%]
........................................................................ [ 48%]
........................................................................ [ 51%]
........................................................................ [ 54%]
........................................................................ [ 56%]
........................................................................ [ 59%]
........................................................................ [ 62%]
........................................................................ [ 65%]
........................................................................ [ 68%]
........................................................................ [ 71%]
........................................................................ [ 74%]
........................................................................ [ 76%]
........................................................................ [ 79%]
........................................................................ [ 82%]
........................................................................ [ 85%]
........................................................................ [ 88%]
........................................................................ [ 91%]
........................................................................ [ 94%]
........................................................................ [ 96%]
........................................................................ [ 99%]
....... [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 52 0 100%
app/api/chat.py 225 1 99%
app/api/chats.py 110 0 100%
app/api/config.py 13 0 100%
app/api/doc_drafts.py 99 0 100%
app/api/docs.py 156 1 99%
app/api/git_sources.py 232 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 33 0 100%
app/api/sync.py 139 0 100%
app/api/tokens.py 40 0 100%
app/api/ui_settings.py 55 0 100%
app/config.py 231 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 45 0 100%
app/core/caching.py 124 0 100%
app/core/debugging.py 29 2 93%
app/core/docs_push.py 39 0 100%
app/core/errors.py 5 0 100%
app/core/logging.py 13 0 100%
app/core/rate_limit.py 44 0 100%
app/core/security_headers.py 20 0 100%
app/core/theming.py 38 0 100%
app/core/tokens.py 44 0 100%
app/db.py 22 0 100%
app/main.py 66 0 100%
app/models.py 128 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 317 1 99%
app/rag/archive_upload.py 134 0 100%
app/rag/chunker.py 206 4 98%
app/rag/doc_dates.py 18 0 100%
app/rag/folder_summaries.py 123 0 100%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 219 3 99%
app/rag/llm.py 244 1 99%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 100 0 100%
app/rag/retriever.py 242 3 99%
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 330 0 100%
--------------------------------------------------
TOTAL 4236 16 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
WARNING: there is a new pyright version available (v1.1.411 -> v1.1.414).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
validation OK
@@ -0,0 +1,19 @@
All gates green. Final report:
**Task 03 — suggested-folder context in the grounded prompt (phase 119, D3, LOCKED A4)**
Implemented:
- `app/rag/agent.py`: new pure helper `suggested_folder_lines(db, suggested, max_lines=5, max_entries=8)` next to the `ls` helpers — one line per distinct parent folder (`<source>/<prefix>/: …`, root `<source>/: …`), `group_folder_listing` entry order (subfolders `name/ (N docs)`, singular `(1 doc)`, then files by relative filename), owning suggested doc excluded, ` +N more` with exact remainder
- `app/rag/prompts.py`: `build_high_prompt(..., folder_lines=())` — lines ride after `SUGGEST_INTRO`, before the first block, plain lines; empty ⇒ byte-identical phase-118 (pinned)
- `app/api/chat.py`: `plan_turn` gains `folder_lines` (HIGH branch only; LOW byte-identical); endpoint computes the same `select_suggested` walk + `suggested_folder_lines` before `plan_turn`; TurnPlan/durable record/log line untouched
- Tests: 8 helper tests (`test_agent.py`), 4 placement/byte-identity tests (`test_prompts.py`), 4 plan_turn/endpoint pass-through tests + `_FakeSession.execute` (`test_chat_gate.py`; same fake-session fix in `test_chat_cancel.py`, `test_embed_question_length.py`, `test_source_chip_quality.py`); re-cut the two full-HIGH-prompt pins in `tests/integration/test_kb_overview_api.py` to include the folder lines
Verification:
- `uv run pytest tests/unit/test_agent.py tests/unit/test_prompts.py tests/unit/test_chat_gate.py -v` → 223 passed
- `uv run pytest --cov=app --cov-report=term-missing` → 2543 passed, **99%** on `app/`
- `uv run ruff check . && uv run pyright` → All checks passed / 0 errors
- Criterion check: 5 suggested docs spanning 3 folders ⇒ exactly 3 correctly-shaped lines (canonical README name lands in the prompt); `tests/e2e/test_summary_seed_context.py --no-cov` → 2 passed (mock unaffected)
Notable decisions: subfolder entries are source-relative (`a/b/ (2 docs)`) to read exactly like the model's own `ls` output; file entries are basenames (the `<source>/<prefix>/:` header supplies the folder). Empty-folder lines render header-only (`src/f/:`), the `ls` empty-level precedent.
Next pending task: `.agents/phases/todo/119_name_signal_read_chips/04_cite_discipline_copy.md`
@@ -0,0 +1,104 @@
........................................................................ [ 2%]
........................................................................ [ 5%]
........................................................................ [ 8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 16%]
........................................................................ [ 19%]
........................................................................ [ 22%]
........................................................................ [ 25%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 33%]
........................................................................ [ 36%]
........................................................................ [ 39%]
........................................................................ [ 42%]
........................................................................ [ 45%]
........................................................................ [ 48%]
........................................................................ [ 50%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 59%]
........................................................................ [ 62%]
........................................................................ [ 65%]
........................................................................ [ 67%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 76%]
........................................................................ [ 79%]
........................................................................ [ 82%]
........................................................................ [ 84%]
........................................................................ [ 87%]
........................................................................ [ 90%]
........................................................................ [ 93%]
........................................................................ [ 96%]
........................................................................ [ 99%]
....................... [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 52 0 100%
app/api/chat.py 226 1 99%
app/api/chats.py 110 0 100%
app/api/config.py 13 0 100%
app/api/doc_drafts.py 99 0 100%
app/api/docs.py 156 1 99%
app/api/git_sources.py 232 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 33 0 100%
app/api/sync.py 139 0 100%
app/api/tokens.py 40 0 100%
app/api/ui_settings.py 55 0 100%
app/config.py 231 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 45 0 100%
app/core/caching.py 124 0 100%
app/core/debugging.py 29 2 93%
app/core/docs_push.py 39 0 100%
app/core/errors.py 5 0 100%
app/core/logging.py 13 0 100%
app/core/rate_limit.py 44 0 100%
app/core/security_headers.py 20 0 100%
app/core/theming.py 38 0 100%
app/core/tokens.py 44 0 100%
app/db.py 22 0 100%
app/main.py 66 0 100%
app/models.py 128 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 347 1 99%
app/rag/archive_upload.py 134 0 100%
app/rag/chunker.py 206 4 98%
app/rag/doc_dates.py 18 0 100%
app/rag/folder_summaries.py 123 0 100%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 219 3 99%
app/rag/llm.py 244 1 99%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 102 0 100%
app/rag/retriever.py 242 3 99%
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 330 0 100%
--------------------------------------------------
TOTAL 4269 16 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
WARNING: there is a new pyright version available (v1.1.411 -> v1.1.414).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
validation OK
@@ -0,0 +1,14 @@
Task 04 complete — all green. Report:
**Implemented (phase-119 D4, LOCKED A5 — cite-discipline copy)**
- `app/rag/prompts.py`: `SUGGEST_INTRO` final sentence replaced verbatim with the LOCKED A5 discipline sentence (retires phase-118 "Cite the document(s) you used, by path."); constant docstring + `build_high_prompt` docstring updated (live confabulation closed, phase-118 sentence retired).
- `tests/unit/test_prompt_lock.py`: `SUGGEST_INTRO` anchors re-cut (sha256 `c6ffbb19…3302`, len 460; prefix anchor unchanged — only the final sentence moved); substring pin re-pointed + retirement `not in` assertion. `PERSONA`/`TOOLS_SECTION`/LOW anchors untouched, pass unchanged.
- `tests/unit/test_prompts.py`: new pins — HIGH prompt carries the sentence exactly once, inside `<documents>` after the start-here framing and before the first block (plain + folder-line builds; absent when no blocks); absent from all LOW builds; retired sentence gone.
- E2E audit: no e2e test referenced the old sentence (mock keys off markers, as expected).
**Results**
- `uv run pytest tests/unit/test_prompts.py tests/unit/test_prompt_lock.py -v` → 56 passed
- `uv run pytest --cov=app --cov-report=term-missing` → 2545 passed, coverage 99% (gate >90%)
- `uv run ruff check .` → clean; `uv run pyright` → 0 errors, 0 warnings
**Deviations:** none. Next pending task: `.agents/phases/todo/119_name_signal_read_chips/05_chips_read_only.md` (D5 — `done.sources` = read docs only).
@@ -0,0 +1,104 @@
........................................................................ [ 2%]
........................................................................ [ 5%]
........................................................................ [ 8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 16%]
........................................................................ [ 19%]
........................................................................ [ 22%]
........................................................................ [ 25%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 33%]
........................................................................ [ 36%]
........................................................................ [ 39%]
........................................................................ [ 42%]
........................................................................ [ 45%]
........................................................................ [ 48%]
........................................................................ [ 50%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 59%]
........................................................................ [ 62%]
........................................................................ [ 65%]
........................................................................ [ 67%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 76%]
........................................................................ [ 79%]
........................................................................ [ 82%]
........................................................................ [ 84%]
........................................................................ [ 87%]
........................................................................ [ 90%]
........................................................................ [ 93%]
........................................................................ [ 96%]
........................................................................ [ 99%]
......................... [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 52 0 100%
app/api/chat.py 226 1 99%
app/api/chats.py 110 0 100%
app/api/config.py 13 0 100%
app/api/doc_drafts.py 99 0 100%
app/api/docs.py 156 1 99%
app/api/git_sources.py 232 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 33 0 100%
app/api/sync.py 139 0 100%
app/api/tokens.py 40 0 100%
app/api/ui_settings.py 55 0 100%
app/config.py 231 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 45 0 100%
app/core/caching.py 124 0 100%
app/core/debugging.py 29 2 93%
app/core/docs_push.py 39 0 100%
app/core/errors.py 5 0 100%
app/core/logging.py 13 0 100%
app/core/rate_limit.py 44 0 100%
app/core/security_headers.py 20 0 100%
app/core/theming.py 38 0 100%
app/core/tokens.py 44 0 100%
app/db.py 22 0 100%
app/main.py 66 0 100%
app/models.py 128 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 347 1 99%
app/rag/archive_upload.py 134 0 100%
app/rag/chunker.py 206 4 98%
app/rag/doc_dates.py 18 0 100%
app/rag/folder_summaries.py 123 0 100%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 219 3 99%
app/rag/llm.py 244 1 99%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 102 0 100%
app/rag/retriever.py 242 3 99%
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 330 0 100%
--------------------------------------------------
TOTAL 4269 16 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
WARNING: there is a new pyright version available (v1.1.411 -> v1.1.414).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
validation OK
@@ -0,0 +1,10 @@
All gates green. Final verification complete — the diff includes earlier phase-119 tasks' uncommitted work (harness makes the atomic commit at phase completion).
**Report**
- **Implemented (task 05, D5, LOCKED A1):** `app/api/chat.py` — done-frame citation walk now `holder.read_docs` only (deduped by `(source, path)`, read order); `plan.suggested_docs` removed from `cited_docs`; durable record (`query_log.sources` + per-turn log line = suggested + related + read) and `related` tier dedupe unchanged; deflected `[]` unchanged; module docstring, `TurnPlan.suggested_docs` comment, and done-section comments re-cut for A1 (phase-118 A4 union retired, zero-read chips nothing).
- **Pins re-targeted:** `test_chat_gate.py` (zero-read ⇒ `[]` + contrast vs A4 union; new multi-read read-order pin; new read-related-is-chip-not-nearby pin; `_CannedLLM` gained `read_paths`), `test_source_chip_quality.py` (2 A4-union pins), `test_chat_cancel.py` (completed-turn pin), integration: `test_chat_api.py` (10 spots), `test_auth_api.py` (2), `test_kb_overview_api.py` (`_cited_docs` → retrieval-reconstructed `_suggested_docs`).
- **Frontend:** audit only — `appendSources`/`addSources` already no-op on empty; no ≥1-chip assumptions; no change.
- **Results:** `uv run pytest tests/unit/test_chat_gate.py -v` → 58 passed; `uv run pytest --cov=app --cov-report=term-missing` → 2547 passed, app coverage 99% (>90%); `uv run ruff check .` → clean; `uv run pyright` → 0 errors, 0 warnings.
- **Notes:** E2E suites (mock LLM does read) still carry retired-A4 pins — re-targeting is task 06's explicit scope; left untouched. PLAN.md untouched per A6.
- **Next pending task:** `.agents/phases/todo/119_name_signal_read_chips/06_e2e_retarget_and_battery.md`
@@ -0,0 +1,104 @@
........................................................................ [ 2%]
........................................................................ [ 5%]
........................................................................ [ 8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 16%]
........................................................................ [ 19%]
........................................................................ [ 22%]
........................................................................ [ 25%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 33%]
........................................................................ [ 36%]
........................................................................ [ 39%]
........................................................................ [ 42%]
........................................................................ [ 45%]
........................................................................ [ 48%]
........................................................................ [ 50%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 59%]
........................................................................ [ 62%]
........................................................................ [ 65%]
........................................................................ [ 67%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 76%]
........................................................................ [ 79%]
........................................................................ [ 81%]
........................................................................ [ 84%]
........................................................................ [ 87%]
........................................................................ [ 90%]
........................................................................ [ 93%]
........................................................................ [ 96%]
........................................................................ [ 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 52 0 100%
app/api/chat.py 226 1 99%
app/api/chats.py 110 0 100%
app/api/config.py 13 0 100%
app/api/doc_drafts.py 99 0 100%
app/api/docs.py 156 1 99%
app/api/git_sources.py 232 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 33 0 100%
app/api/sync.py 139 0 100%
app/api/tokens.py 40 0 100%
app/api/ui_settings.py 55 0 100%
app/config.py 231 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 45 0 100%
app/core/caching.py 124 0 100%
app/core/debugging.py 29 2 93%
app/core/docs_push.py 39 0 100%
app/core/errors.py 5 0 100%
app/core/logging.py 13 0 100%
app/core/rate_limit.py 44 0 100%
app/core/security_headers.py 20 0 100%
app/core/theming.py 38 0 100%
app/core/tokens.py 44 0 100%
app/db.py 22 0 100%
app/main.py 66 0 100%
app/models.py 128 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 347 1 99%
app/rag/archive_upload.py 134 0 100%
app/rag/chunker.py 206 4 98%
app/rag/doc_dates.py 18 0 100%
app/rag/folder_summaries.py 123 0 100%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 219 3 99%
app/rag/llm.py 244 1 99%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 102 0 100%
app/rag/retriever.py 242 3 99%
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 330 0 100%
--------------------------------------------------
TOTAL 4269 16 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
WARNING: there is a new pyright version available (v1.1.411 -> v1.1.414).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
validation OK
@@ -0,0 +1,9 @@
**Task 06 complete — phase 119 finished (no pending tasks; 01–05 already in complete/, the pipeline gate moves 06).**
1. Mock trigger: `repeat your folder map` + `<documents>` → answer ends with ` (folders: …)` echoing the folder lines verbatim (omitted when none); docstring section added; phrase unique repo-wide.
2. New suite `tests/e2e/test_name_signal_read_chips.py` (7-doc tracked fixture `tests/fixtures/namekb`, all docs name-hits so the +0.005 bonus is uniform; `forgejo-home` engineered LAST of top-5, probe-verified, pinned via the app's real `select_suggested`/`select_related` for all 4 questions): (a) tail echo proves `Source: namekb/forgejo/forgejo-home.md` last, (b) single-read → exactly one chip `zz-folder-map.md` + deduped related row, (c) plain question → `done.sources==[]` + zero chips, (d) folder line `namekb/forgejo/: forgejo-nginx.md` verbatim. **4 passed × 3 isolated runs** (determinism confirmed).
3. All retired A4 pins re-targeted (full audit of every `done["sources"]`/`source-chip` hit: read-set or zero, durable pins untouched); **24 retargeted suites green in isolation**; fixed one missed stored-sources pin (`test_sources_midstream_bug`) and hardened 3 settle waits against the chip-wait-removal race (`test_chat_rag` flake, `test_retrieval_quality`, `test_document_dates`).
4. Battery (replica restored via restore-test-db; fingerprint verified docs=1000, chunks=8866; alembic upgraded 0011→0020): **GATE PASS** — gitea README #4 (exact), forgejo 5/5 README #1 (exact), gateway README in top-5 #4 (overview #3, containment met), qwen3.8-27b quadlets #1/#2, Mongolia HIGH fts=5 (unchanged).
5. Real-model telemetry: **PASS** 25/25, 10/10 tool-turns, wall 141.8s; read turns fired round-1 `read` with zero drill-downs (D3 effect) — recorded in `TOOL_CALLING_TESTING.md` §11 (telemetry-only).
6. **Full output + verdict recorded in `.agents/reports/119_name_signal_read_chips/task06_battery_and_e2e.md`** — deviation: the task says paste into the task file, but the harness forbids editing task/phase files (harness wins on mechanics; intent preserved in the report).
7. Gates: `uv run pytest --cov=app` → **2547 passed, app 99%**; `uv run ruff check .` clean; `uv run pyright` 0/0/0. No git add/commit performed (pipeline gate commits per AGENTS.md rule 8).
@@ -0,0 +1,104 @@
........................................................................ [ 2%]
........................................................................ [ 5%]
........................................................................ [ 8%]
........................................................................ [ 11%]
........................................................................ [ 14%]
........................................................................ [ 16%]
........................................................................ [ 19%]
........................................................................ [ 22%]
........................................................................ [ 25%]
........................................................................ [ 28%]
........................................................................ [ 31%]
........................................................................ [ 33%]
........................................................................ [ 36%]
........................................................................ [ 39%]
........................................................................ [ 42%]
........................................................................ [ 45%]
........................................................................ [ 48%]
........................................................................ [ 50%]
........................................................................ [ 53%]
........................................................................ [ 56%]
........................................................................ [ 59%]
........................................................................ [ 62%]
........................................................................ [ 65%]
........................................................................ [ 67%]
........................................................................ [ 70%]
........................................................................ [ 73%]
........................................................................ [ 76%]
........................................................................ [ 79%]
........................................................................ [ 81%]
........................................................................ [ 84%]
........................................................................ [ 87%]
........................................................................ [ 90%]
........................................................................ [ 93%]
........................................................................ [ 96%]
........................................................................ [ 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 52 0 100%
app/api/chat.py 226 1 99%
app/api/chats.py 110 0 100%
app/api/config.py 13 0 100%
app/api/doc_drafts.py 99 0 100%
app/api/docs.py 156 1 99%
app/api/git_sources.py 232 0 100%
app/api/health.py 10 0 100%
app/api/steering.py 42 0 100%
app/api/suggestions.py 33 0 100%
app/api/sync.py 139 0 100%
app/api/tokens.py 40 0 100%
app/api/ui_settings.py 55 0 100%
app/config.py 231 0 100%
app/core/__init__.py 0 0 100%
app/core/auth.py 45 0 100%
app/core/caching.py 124 0 100%
app/core/debugging.py 29 2 93%
app/core/docs_push.py 39 0 100%
app/core/errors.py 5 0 100%
app/core/logging.py 13 0 100%
app/core/rate_limit.py 44 0 100%
app/core/security_headers.py 20 0 100%
app/core/theming.py 38 0 100%
app/core/tokens.py 44 0 100%
app/db.py 22 0 100%
app/main.py 66 0 100%
app/models.py 128 0 100%
app/rag/__init__.py 0 0 100%
app/rag/agent.py 347 1 99%
app/rag/archive_upload.py 134 0 100%
app/rag/chunker.py 206 4 98%
app/rag/doc_dates.py 18 0 100%
app/rag/folder_summaries.py 123 0 100%
app/rag/git_sources.py 14 0 100%
app/rag/importer.py 219 3 99%
app/rag/llm.py 244 1 99%
app/rag/overview.py 71 0 100%
app/rag/prompts.py 102 0 100%
app/rag/retriever.py 242 3 99%
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 330 0 100%
--------------------------------------------------
TOTAL 4269 16 99%
coverage gate: app/ 99% (>90%) OK
All checks passed!
0 errors, 0 warnings, 0 informations
WARNING: there is a new pyright version available (v1.1.411 -> v1.1.414).
Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest`
validation OK
@@ -0,0 +1,130 @@
# Task 06 record — battery run 2026-09-16 + real-model telemetry (phase 119, D6)
**Deviation note:** the task says "paste the full output into this file"
(the task file), but the execution harness forbids editing task/phase
files. Per the harness conflict rule (harness wins on mechanics; the
intent is preserved), the full output + verdict are recorded HERE
(`.agents/reports/119_name_signal_read_chips/task06_battery_and_e2e.md`)
and summarized in the final report.
## Preconditions
- Replica restored via the `restore-test-db` skill (backup in
`/tmp/pre_restore_*.dump`): schema reset → single-transaction load of
`data/bor_live_kb_replica.dump.sql` (96 MB) → **fingerprint verified:
docs=1000, chunks=8866,
sources=deploy,homelab,homepage,ServMon,skills,vibe-bot,
alembic=0011** — exact 2026-09-05 snapshot match.
- Dump older than head (0011 vs 0020) → `uv run alembic upgrade head`
ran clean (0011 → 0020), per the skill's rule.
- Note (reported with the numbers, per the task): the replica predates
the phase-118 markdown-summary backfill (markdown `summary` NULL, no
markdown `is_summary` chunks) — the measured numbers below are the
same-state baseline the phase overview measured against.
## Battery
`uv run python -m scripts.eval_retrieval --from-file tests/fixtures/retrieval_battery.txt`
(new tracked file: the three phase-119 name questions + the 2026-09-05
incident regression + the deflection sanity). Full output:
```
eval: threshold=0.62 vector_candidates=100 lexical_candidates=30 rrf_k=60 recency_boost=0.0007 recency_half_life_days=365 name_hit_bonus=0.005
question: 'How do I deploy gitea?'
gate: best_cosine=0.8527 fts_hits=38 -> HIGH (answer)
1. deploy/Deployments/reeseapps/gitea/app/playbook.yaml cosine=0.7640 fts=1 effective=0.03056 created=2026-09-16 (playbook)
2. deploy/Deployments/reeseapps/gateway/README.md cosine=0.7737 fts=1 effective=0.02902 created=2026-09-16 (Proxy Server)
3. homelab/active/container_gitea/gitea.md cosine=0.7610 fts=1 effective=0.02561 created=2026-09-16 (Gitea)
4. homelab/active/kubernetes_gitea/gitea-values.yaml cosine=0.7232 fts=1 effective=0.02512 created=2026-09-16 (gitea-values)
5. deploy/Deployments/reeseapps/gitea/app/gitea-postgres.env.j2 cosine=0.7158 fts=1 effective=0.02495 created=2026-09-16 (gitea-postgres.env)
suggested: 1. deploy/Deployments/reeseapps/gitea/app/playbook.yaml 2. deploy/Deployments/reeseapps/gitea/app/gitea-postgres.env.j2 3. deploy/Deployments/reeseapps/gateway/README.md 4. deploy/Deployments/reeseapps/gitea/README.md 5. deploy/Deployments/reeseapps/gitea/app/gitea-web.env.j2
question: 'How do I deploy forgejo?'
gate: best_cosine=0.7878 fts_hits=37 -> HIGH (answer)
1. homelab/templates/container/foobar.md cosine=0.7878 fts=0 effective=0.01709 created=2026-09-16 (Podman foobar)
2. deploy/Deployments/reeseapps/forgejo/README.md cosine=0.0000 fts=1 effective=0.01709 created=2026-09-16 (Reeseapps Forgejo)
3. deploy/Deployments/reeseapps/README.md cosine=0.7857 fts=0 effective=0.01683 created=2026-09-16 (Deployments)
4. deploy/Deployments/reeseapps/forgejo/app/forgejo-app.container cosine=0.0000 fts=1 effective=0.01683 created=2026-09-16 (forgejo-app)
5. homelab/active/container_bifrost/bifrost.md cosine=0.7674 fts=0 effective=0.01657 created=2026-09-16 (Podman bifrost)
suggested: 1. deploy/Deployments/reeseapps/forgejo/README.md 2. deploy/Deployments/reeseapps/forgejo/app/forgejo-app.container 3. deploy/Deployments/reeseapps/forgejo/app/forgejo-app.env.j2 4. deploy/Deployments/reeseapps/forgejo/app/forgejo-postgres.container 5. deploy/Deployments/reeseapps/forgejo/app/forgejo-postgres.env.j2
question: 'How do I set up the gateway?'
gate: best_cosine=0.7815 fts_hits=37 -> HIGH (answer)
1. homelab/active/device_shelly/shelly.md cosine=0.6940 fts=1 effective=0.02509 created=2026-09-16 (Shelly Devices)
2. deploy/Deployments/reeseapps/forgejo/app/forgejo.network cosine=0.6726 fts=1 effective=0.02050 created=2026-09-16 (forgejo)
3. homelab/active/device_framework_16/framework_16.md cosine=0.7815 fts=0 effective=0.01709 created=2026-09-16 (Framework Laptop 16)
4. deploy/Deployments/delta/istio/gateway-metallb.yaml cosine=0.0000 fts=1 effective=0.01709 created=2026-09-16 (gateway-metallb)
5. homelab/active/device_home_assistant/home_assistant.md cosine=0.7751 fts=0 effective=0.01683 created=2026-09-16 (Home Assistant)
suggested: 1. homelab/active/device_shelly/shelly.md 2. deploy/Deployments/delta/istio/gateway-metallb.yaml 3. deploy/Deployments/delta/istio/test-gateway.yaml 4. deploy/Deployments/reeseapps/gateway/README.md 5. deploy/Deployments/reeseapps/gateway/certbot/playbook.yaml
question: 'Do you have notes on the qwen 3.8 27b model?'
gate: best_cosine=0.7484 fts_hits=31 -> HIGH (answer)
1. deploy/Deployments/reeseapps/ai/deployments/epic/quadlets/qwen3.8-27b-epic-vulkan.container cosine=0.7401 fts=1 effective=0.03322 created=2026-09-16 (qwen3.8-27b-epic-vulkan)
2. deploy/Deployments/reeseapps/ai/deployments/juggernaut/quadlets/qwen3.8-27b-juggernaut-vulkan.container cosine=0.7141 fts=1 effective=0.03058 created=2026-09-16 (qwen3.8-27b-juggernaut-vulkan)
3. homelab/active/container_localai/localai.md cosine=0.6836 fts=1 effective=0.02570 created=2026-09-16 (Local AI with Anything LLM)
4. homelab/active/software_ai_stack/ai_stack.md cosine=0.7027 fts=1 effective=0.02545 created=2026-09-16 (Self Hosted AI Stack)
5. deploy/Deployments/reeseapps/ai/deployments/turbo/quadlets/qwen3.8-flash-next.container cosine=0.6674 fts=1 effective=0.02491 created=2026-09-16 (qwen3.8-flash-next)
suggested: 1. deploy/Deployments/reeseapps/ai/deployments/epic/quadlets/qwen3.8-27b-epic-vulkan.container 2. deploy/Deployments/reeseapps/ai/deployments/juggernaut/quadlets/qwen3.8-27b-juggernaut-vulkan.container 3. deploy/Deployments/reeseapps/ai/deployments/turbo/quadlets/qwen3.8-flash-next.container 4. homelab/active/container_localai/localai.md 5. homelab/active/software_ai_stack/ai_stack.md
question: 'What is the capital of Mongolia?'
gate: best_cosine=0.6070 fts_hits=5 -> HIGH (answer)
1. deploy/Deployments/reeseapps/README.md cosine=0.5589 fts=1 effective=0.02382 created=2026-09-16 (Deployments)
2. homelab/active/container_nginx/nginx.md cosine=0.6070 fts=0 effective=0.01709 created=2026-09-16 (Ngnix)
3. homelab/active/container_localai/localai.md cosine=0.0000 fts=1 effective=0.01709 created=2026-09-16 (Local AI with Anything LLM)
4. homelab/active/os_arch/arch-workstation.md cosine=0.6057 fts=0 effective=0.01683 created=2026-09-16 (Workstation)
5. homelab/active/software_k3s/k3s.md cosine=0.0000 fts=1 effective=0.01683 created=2026-09-16 (K3S)
suggested: 1. deploy/Deployments/reeseapps/README.md 2. homelab/active/container_nginx/nginx.md 3. homelab/active/container_localai/localai.md 4. homelab/active/os_arch/arch-workstation.md 5. homelab/active/software_k3s/k3s.md
```
**Verdict: GATE PASS.**
- gitea: canonical `deploy/Deployments/reeseapps/gitea/README.md` in
the suggested top-5 at **#4** — exact match with the overview's
post-phase numbers (playbook, gitea-postgres.env.j2, gateway README,
gitea README #4, gitea-web.env.j2).
- forgejo: **5/5 forgejo-tree, README #1** — exact match.
- gateway: canonical `deploy/Deployments/reeseapps/gateway/README.md`
in the suggested top-5 at **#4** (the overview measured #3 — same doc
family: shelly.md, the two istio gateway yamls, README, the certbot
playbook; the 0.005 bonus is an owner-tunable starting point, so the
battery records the realized margin — containment gate met).
- qwen 3.8 27b: the `qwen3.8-27b` quadlets stay in the suggested top-5
(#1 epic, #2 juggernaut) — the digit-bearing prefix rule unchanged.
- Mongolia: verdict **HIGH, fts_hits=5** — unchanged from the pre-phase
replica run (the name-hit change moved nothing).
## Real-model telemetry (NOT a gate — no tool-copy change)
`uv run python -m scripts.agent_realmodel_check --restore --mode
fixture`: **PASS** — 10/10 answered, caps=0, tool-turns=10/10, 25/25
executed (100 %), contract 25/25 (100 %), wall 141.8 s (turbo).
Recorded in `TOOL_CALLING_TESTING.md` §11 (telemetry-only header; the
four conditions read under the phase-118 A7 semantics). Per-turn
reading: all four designed read turns (04/05/06/09) fired a single
round-1 `read` with no `ls` drill-downs (the D3 intended effect);
turn 08 flipped from a zero-call summary answer to a round-1 read;
listing turns drilled +4 calls total vs the phase-118 run; wall
+20.1 % (at the edge of the ~20 % band, just above the 97–135 s turbo
range — endpoint-load variance).
## E2E
- New suite `tests/e2e/test_name_signal_read_chips.py` — 4 tests,
green in isolation, **run twice** (determinism: the mock's md5
embeddings make the pinned tiers byte-stable):
`uv run pytest tests/e2e/test_name_signal_read_chips.py -v --no-cov`
→ 4 passed (9.01 s), 4 passed (9.04 s), 4 passed (9.11 s, post-lint).
- Every retired-A4 pin re-targeted (audit rule applied to every
`done["sources"]` / `source-chip` hit); each retargeted suite green
in isolation (24 suites run individually, all passing;
`test_sources_midstream_bug::test_nav_switch_before_first_token_
completes` had one missed stored-sources pin — fixed, re-run green).
- Two latent settle races surfaced by the chip-wait removal and fixed:
`test_chat_rag::test_chat_logs_query` (observed flake — the
query_log row is written before the done frame; the bubble-text wait
lands before it) and the weak `#send-btn` enabled waits in
`test_retrieval_quality` (the in-flight Stop control is enabled too)
→ both now wait on the `#send-label` = "Send" recovery;
`test_document_dates` got the same hardening.
## Gates
- `uv run pytest --cov=app --cov-report=term-missing` → **2547 passed,
app coverage 99 %** (>90 %).
- `uv run ruff check .` → All checks passed. `uv run pyright` → 0
errors, 0 warnings, 0 informations.