Add local SQLite materialization layer for dashboard#42
Conversation
Add a local SQLite database (via bun:sqlite) as an indexed materialized view store so the dashboard/report UX no longer depends on recomputing everything from raw JSONL logs on every request. New module at cli/selftune/localdb/ with: - schema.ts: 10 tables + 19 indexes mirroring canonical telemetry and local log shapes - db.ts: openDb() lifecycle with WAL mode, meta key-value helpers - materialize.ts: full rebuild and incremental materialization from JSONL source-of-truth logs - queries.ts: getOverviewPayload(), getSkillReportPayload(), getSkillsList() query helpers Raw JSONL logs remain authoritative — the DB is a disposable cache that can always be rebuilt. No new npm dependencies (bun:sqlite only). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Comment |
Auto-fix import ordering, formatting, and replace non-null assertions with optional chaining in tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This adds a local SQLite materialized view store for selftune's dashboard to eliminate the need to recompute everything from raw JSONL logs on every request. The implementation includes schema definitions (10 tables, 19 indexes), incremental materialization from authoritative JSONL sources, and query helpers (overview, skill report, skills list). All changes are covered by 26 unit tests and use bun:sqlite with no new npm dependencies. The database is treated as a disposable cache that can always be rebuilt from source logs.