From 0dc21a21d4e823d0e434b8bf0301313a2d682348 Mon Sep 17 00:00:00 2001 From: Snider Date: Fri, 20 Feb 2026 00:28:46 +0000 Subject: [PATCH] docs: enrich TODO.md with Phase 0 hardening tasks Add Phase 0: ParseTranscript tests, ListSessions tests, tool extraction coverage, parsing benchmarks. Co-Authored-By: Virgil --- TODO.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index 5c0e070..c18b162 100644 --- a/TODO.md +++ b/TODO.md @@ -1,11 +1,23 @@ -# TODO.md -- go-session +# TODO.md — go-session + +Dispatched from core/go orchestration. Pick up tasks in order. + +--- + +## Phase 0: Hardening & Test Coverage + +- [ ] **Add parser tests** — Test `ParseTranscript()` with: minimal valid JSONL (1 user + 1 assistant message), tool call events (Bash, Read, Edit, Write, Grep, Glob, Task), truncated JSONL (incomplete last line), empty file, malformed JSON lines (should skip gracefully), very large session (1000+ events), nested tool results with arrays and maps. +- [ ] **Add ListSessions tests** — Test with: empty directory, single session, multiple sessions sorted by date, non-.jsonl files ignored. +- [ ] **Tool extraction coverage** — Test `extractToolInput()` for each supported tool type. Verify correct field extraction from JSON input. +- [ ] **Benchmark parsing** — `BenchmarkParseTranscript` with a 10MB JSONL file. Measure memory and time. +- [ ] **`go vet ./...` clean** — Fix any warnings. ## Phase 1: Parser Robustness - [ ] Handle truncated JSONL (incomplete final line, missing closing brace) - [ ] Handle very large sessions (streaming parse, avoid loading entire file into memory) - [ ] Handle non-standard tool formats (custom MCP tools, unknown tool names) -- [ ] Add graceful error recovery -- skip malformed lines, log warnings +- [ ] Add graceful error recovery — skip malformed lines, log warnings ## Phase 2: Analytics