|
| 1 | +## Summary |
| 2 | + |
| 3 | +Epic D — v0.2.1 operational maturity. **9 atomic commits** on `claude/v0.2.1-epic-d`, built off `claude/v0.2.0-epic-c` HEAD. **Non-breaking** — minor bump after 0.2.0. |
| 4 | + |
| 5 | +> **Merge order:** epic A → main, epic B (rebased) → main, epic C (rebased) → main → tag `v0.2.0`. Then this branch (rebased) → main → tag `v0.2.1`. |
| 6 | +
|
| 7 | +Plan: [`.docs/plans/2026-05-07-v0.2.1-epic-d-operational.md`](./.docs/plans/2026-05-07-v0.2.1-epic-d-operational.md) |
| 8 | + |
| 9 | +### What changed |
| 10 | + |
| 11 | +**Performance** |
| 12 | +- `perf(mcp)` — process-wide `Arc<Mutex<rusqlite::Connection>>` cache keyed by state path. First call opens; later calls reuse. Eliminates per-call PRAGMA + migrations replay. |
| 13 | + |
| 14 | +**User-facing DX** |
| 15 | +- `feat(export)` — `task-journal export --format sqlite` produces a clean VACUUM-based snapshot, streamable to stdout for `> backup.sqlite`. Round-trips through `task-journal pack` from a fresh XDG. |
| 16 | +- `feat(cli)` — `task-journal pending list` and `pending retry`. Surface auto-capture-hook failures that used to sit silently in `pending/`. `attempts` counter; rename to `<id>.dead.json` after 3 failures so they stop being retried but still appear in `list`. |
| 17 | + |
| 18 | +**Observability** |
| 19 | +- `feat(mcp)` — structured tracing with `correlation_id` per tool call. Two INFO log lines (start + ok / err) wrap each handler. Default `RUST_LOG=info` gives one greppable line per request. |
| 20 | +- `feat(mcp)` — graceful Ctrl-C / SIGTERM (Unix only) shutdown via `tokio::select!` between rmcp serve loop and `wait_for_shutdown_signal()`. |
| 21 | + |
| 22 | +**Quality** |
| 23 | +- `test(mcp)` — rmcp client + transport compile-and-shape integration test. Full E2E roundtrip deferred to follow-up `claude-memory-yj1.8` (needs `TaskJournalServer` extracted into a lib target — out of scope for D). |
| 24 | + |
| 25 | +**Release** |
| 26 | +- `release` — workspace version 0.2.0-rc.1 → 0.2.1; CHANGELOG entry. |
| 27 | + |
| 28 | +### Verification |
| 29 | + |
| 30 | +- `cargo fmt --all -- --check` ✅ |
| 31 | +- `cargo clippy --workspace --all-targets -- -D warnings` ✅ |
| 32 | +- `cargo test --workspace --all-targets` ✅ — **213 tests** (was 202 from epic C; +11 added by this PR) |
| 33 | +- `cargo bench --workspace --no-run` ✅ |
| 34 | +- `cargo build --workspace --release` ✅ — 0.2.1 binaries |
| 35 | + |
| 36 | +### New CLI surface |
| 37 | + |
| 38 | +| Command | Purpose | |
| 39 | +|---------|---------| |
| 40 | +| `task-journal export --format sqlite` | VACUUM-based clean SQLite snapshot to stdout | |
| 41 | +| `task-journal pending list` | List queued classifier failures | |
| 42 | +| `task-journal pending retry [--mock-*]` | Re-feed pending entries; mark dead after 3 | |
| 43 | + |
| 44 | +### New env vars |
| 45 | + |
| 46 | +None beyond what the existing `RUST_LOG` already controls. The structured-tracing output is tied to it. |
| 47 | + |
| 48 | +### Test plan |
| 49 | + |
| 50 | +- [ ] Branch CI green on three OS (`test`, `msrv`, `audit`, `benches-compile`, `coverage`). |
| 51 | +- [ ] Smoke run `task-journal-mcp` from a real MCP client; observe `tool_call start/ok` lines in stderr; SIGTERM exits 0 within ~1s. |
| 52 | +- [ ] `task-journal export --format sqlite > backup.sqlite` then `sqlite3 backup.sqlite '.schema'` shows the v001+v002 tables. |
| 53 | +- [ ] After dogfooding 0.2.0 + this branch for ~3 days, tag `v0.2.1` and `cargo publish` (after rebasing on main once epics A/B/C are landed). |
| 54 | + |
| 55 | +### Out of scope / deferred |
| 56 | + |
| 57 | +- `claude-memory-yj1.8` — extract `TaskJournalServer` into a `tj-mcp` library target. Unblocks the full E2E rmcp roundtrip test we deferred from D4. Tracked as a side-quest for a future epic. |
| 58 | +- Telemetry endpoint (still requires hosted backend). |
| 59 | +- `task-journal compact` (lifecycle archival of closed tasks) — wants a design pass, deferred. |
| 60 | + |
| 61 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
0 commit comments