phase: 139_read_range_tool_lines
All verification is complete and green. Phase 139's three tasks (01–03) were already implemented in prior passes; this was the final verification pass, and every gate holds. ## Phase 139 — final verification report **Verified in working tree (no code changes needed):** - `readRangeSuffix` single-source-of-truth helper in `app.js` + byte-identical parity copy in `shared.js` (EN-dash ` (lines N–M)`, `(from line N)`, `(first N lines)`, `Number.isInteger(x) && x >= 1` guard mirroring the server's `_whole_line_number`) - `appendToolLine(wrap, name, argument, offset = null, limit = null)` — `<span class="read-range">` sibling after `<code>`, only when suffix non-empty; `shared.js` `addToolLines` parity - Live `tool` branch: guarded `ev.offset`/`ev.limit`, additive `toolAcc` records (non-range keeps pre-phase shape), status label carries the suffix (A2); restore path passes stored `t.offset`/`t.limit` through, phase-95 truncation note untouched - E2E: `SAME_FILE_TRIGGER` mock flow (same file read twice, offsets 10/20 then 40/15) + 3-test Playwright suite **Test / lint / coverage results:** - `uv run pytest` (unit + integration): **3283 passed, 9 skipped, 0 failed** - `uv run pytest --cov=app --cov-report=term-missing`: **TOTAL 99%** (>90% gate) - `uv run pytest tests/e2e/test_read_range_tool_lines.py -v --no-cov`: **3 passed** in isolation - `uv run ruff check .`: clean; `uv run pyright`: **0 errors, 0 warnings** **Completion criteria:** 1. Range read renders `(lines N–M)` live; two same-file reads show DIFFERENT ranges — ✅ (E2E test 1) 2. Plain read byte-identical; phase-87/117 pins + emoji guard pass unedited — ✅ (E2E test 2 + full suite) 3. Suffix survives save → restore on chat page + shared page — ✅ (E2E test 3) 4. Full suite green, coverage >90%, E2E isolated green, ruff + pyright clean — ✅ 5. Commit + phase move — left to the harness per executor rules (no `git add`/`commit` run) **Notable:** the missing pytest summary line on one run was a transient output-buffering artifact, confirmed by re-run; DB was already up and healthy. **Next pending phase:** `140_pictorial_pdf_pages`
This commit is contained in:
@@ -59,6 +59,7 @@ SHARED_OUT_KEYS = {"title", "messages"}
|
||||
#: Phase 95 (task 02): the CURRENT full tool-entry shape — the additive
|
||||
#: truncation fields ride each record (a pre-phase-95 entry WITHOUT them
|
||||
#: still validates — the backward-compat pin in test_schemas.py).
|
||||
#: Phase 139 (task 02): the additive range fields join the same entries.
|
||||
FULL_BRAIN: dict[str, Any] = {
|
||||
"who": "brain",
|
||||
"text": "Your k3s cluster runs on three nodes — you've got this.",
|
||||
@@ -78,6 +79,12 @@ FULL_BRAIN: dict[str, Any] = {
|
||||
"deflected": False,
|
||||
"suggestions": ["What ports does Traefik expose?"],
|
||||
"thinking": "The kubernetes doc covers the cluster layout…",
|
||||
# Phase 139 (task 02): the read's requested range joins the same
|
||||
# entries (additive — the truncation-fields precedent above): a
|
||||
# save → restore round-trip keeps it, so the restore path and the
|
||||
# shared page re-render the "(lines 42–71)" suffix. A pre-phase-139
|
||||
# entry WITHOUT the keys still validates (test_schemas.py's
|
||||
# backward-compat pin) and stores nulls.
|
||||
"tools": [
|
||||
{
|
||||
"name": "read",
|
||||
@@ -85,6 +92,8 @@ FULL_BRAIN: dict[str, Any] = {
|
||||
"truncated": True,
|
||||
"chars_shown": 128_000,
|
||||
"chars_total": 204_000,
|
||||
"offset": 42,
|
||||
"limit": 30,
|
||||
},
|
||||
{
|
||||
"name": "ls",
|
||||
@@ -92,6 +101,8 @@ FULL_BRAIN: dict[str, Any] = {
|
||||
"truncated": False,
|
||||
"chars_shown": None,
|
||||
"chars_total": None,
|
||||
"offset": None,
|
||||
"limit": None,
|
||||
},
|
||||
# Saved chats persisting the pre-phase-70 tool names still
|
||||
# validate — ``name`` is opaque to the API (no migration,
|
||||
@@ -102,6 +113,8 @@ FULL_BRAIN: dict[str, Any] = {
|
||||
"truncated": False,
|
||||
"chars_shown": None,
|
||||
"chars_total": None,
|
||||
"offset": None,
|
||||
"limit": None,
|
||||
},
|
||||
],
|
||||
"stopped": False,
|
||||
|
||||
Reference in New Issue
Block a user