Skip to content

feat: Replace DuckDB with SQLite for check-run telemetry storage - #431

Merged
Ziinc merged 4 commits into
mainfrom
claude/sqlite-telemetry-db-c10x2k
Sep 6, 2026
Merged

Ziinc merged 4 commits into
mainfrom
claude/sqlite-telemetry-db-c10x2k

Conversation

@Ziinc

@Ziinc Ziinc commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Store OTel log records directly in dated SQLite databases
(.treq/telemetry-YYYY-MM-DD.db) instead of per-job JSONL files read
through DuckDB. Cross-date queries ATTACH every dated database into a
unioned logs view, and the SQL explorer stays read-only while the
attach itself happens server-side.

@Ziinc Ziinc changed the title Replace DuckDB with SQLite for check-run telemetry storage feat: Replace DuckDB with SQLite for check-run telemetry storage Sep 5, 2026
Store OTel log records directly in dated SQLite databases
(.treq/telemetry-YYYY-MM-DD.db) instead of per-job JSONL files read
through DuckDB. Cross-date queries ATTACH every dated database into a
unioned logs view, and the SQL explorer stays read-only while the
attach itself happens server-side.
Drop the dynamic-linking workarounds that existed only to bundle and
verify libduckdb.{so,dylib}: the per-arch macOS Tauri configs that
bundled it as a Framework, the CI caching/verification steps for it,
and the DYLD_LIBRARY_PATH override for the sandboxed CLI test. SQLite
via rusqlite's "bundled" feature links statically, so none of this
applies anymore.
@Ziinc
Ziinc force-pushed the claude/sqlite-telemetry-db-c10x2k branch from 4b1c046 to 47a948d Compare September 5, 2026 14:01
CI caught "database is locked" when multiple check-run jobs write into
the same day's telemetry database at once: switching a brand-new
SQLite file to WAL mode takes an exclusive lock that isn't reliably
covered by busy_timeout's retry logic, so simultaneous first-time opens
could lose that race outright. Retry the open+configure step with a
short backoff instead of trusting busy_timeout alone, and add a
regression test that spins up several concurrent writers.
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

CI's macOS build was failing tauri's version-mismatch check: the Rust
tauri crate resolved to 2.11.5 and tauri-plugin-log to 2.9.1, while
the npm @tauri-apps/api and @tauri-apps/plugin-log packages were still
pinned to 2.10.x/2.8.0. Bump the npm packages to the matching minors.
@Ziinc
Ziinc merged commit 920cbb0 into main Sep 6, 2026
13 of 14 checks passed
@Ziinc
Ziinc deleted the claude/sqlite-telemetry-db-c10x2k branch September 6, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants