@@ -1,36 +0,0 @@
1-# Audit Report — mini-coder v0.2.0
2-
3-**Date:** 2026-03-21
4-**Auditor:** Claude Code (automated audit)
5-**Scope:** Full codebase review + multi-provider interactive testing + fixes
6-
7----
8-
9-## Summary
10-
11-### How I tested
12-
13-- **Code review:** Read every module in `src/` (~15k lines across 130 files). Ran full static check suite (`prettier`, `typecheck`, `lint`, `knip`, `jscpd`, `test`).
14-- **Multi-provider testing:** Exercised all 5 SDK paths — one-shot and interactive multi-turn sessions with tool calling via tmux:
15- - `zen/claude-haiku-4-5` — `@ai-sdk/anthropic` via Zen
16- - `zen/gemini-3-flash` — `@ai-sdk/google` via Zen
17- - `zen/gpt-5.4-nano` — `@ai-sdk/openai` responses endpoint via Zen
18- - `zen/kimi-k2.5` — `@ai-sdk/openai-compatible` via Zen
19- - `anthropic/claude-haiku-4-5` — direct Anthropic OAuth
20-- **Static analysis results:** 296 tests pass, 0 lint issues, 0 type errors, 0 unused exports, 1 minor test-file code clone (0.10%).
21-
22-### Changes made
23-
24-1. **Fixed double prompt glyph after ESC interrupt** — Root cause: the shared `ReadableStream` on stdin and `watchForCancel`'s own `process.stdin.on("data")` listener were racing for the same ESC byte, causing `readline()` to receive a ghost ESC and return `{type: "interrupt"}` immediately. Fix: added a gating mechanism (`_stdinGated`) so the ReadableStream drops data while the turn watcher is active.
25-
26-2. **Fixed leading blank lines in one-shot output** — Models like Kimi/MiniMax that emit leading whitespace in text deltas produced blank lines in one-shot mode. Fix: `trimStart()` on the `responseText` in one-shot output path. (Interactive mode already handles this via `StreamRenderContent.appendTextDelta`'s leading `trimStart`.)
27-
28-3. **Auto-title sessions from first user message** — Added `autoTitleSession()` that sets the session title to the first line of the first user message (truncated to 60 chars). Called after each successful turn; `setSessionTitle` uses `WHERE title = ''` to only set it once. Session list is now much more useful.
29-
30-4. **Extracted `mapAssistantParts` helper** — Factored the 9-line boilerplate shared between `stripToolRuntimeInputFields` (shared.ts) and `normalizeOpenAICompatibleToolCallInputs` (openai.ts) into a reusable `mapAssistantParts(messages, transform)` function. Eliminates the jscpd clone.
31-
32-5. **Removed MiniMax blank lines from KNOWN_ISSUES** — No longer applicable after fix #2.
33-
34-### Overall assessment
35-
36-The codebase is in excellent shape. All provider paths work correctly. Architecture closely follows the core idea. Remaining known issues are tracked in `docs/KNOWN_ISSUES.md`.