Skip to content

feat(observe): make telemetry live#65

Merged
marquesds merged 1 commit into
mainfrom
marquesds/live-observability
Jun 18, 2026
Merged

feat(observe): make telemetry live#65
marquesds merged 1 commit into
mainfrom
marquesds/live-observability

Conversation

@marquesds

Copy link
Copy Markdown
Owner

Why

Kaizen could consume a full CPU core, the Web UI only looked live, details were missing, hooks obscured real tool activity, and project selection required a pasted absolute path.

What changed

  • Stream Web refreshes from cheap SQLite/WAL revision changes and preserve the selected session.
  • Add real session insights, keyboard-accessible detail, recent events, tool spans, touched files, and top tools.
  • Normalize hooks into ToolCall, ToolResult, and Lifecycle events for both Web and TUI.
  • Auto-detect the current project while ignoring invalid legacy registry roots.
  • Bound transcript tailing, serialize scans, batch SQLite derivation and Tantivy commits, and cap projector hydration.
  • Keep all runtime state and agent integration under the Kaizen home/user config; target repositories stay read-only.
  • Refresh user docs and remove stale behavior claims.

Proof

  • cargo nextest run --all-targets --no-default-features --features dev-fast: 534 passed, 3 skipped.
  • cargo test --all-targets --no-default-features --features dev-fast: passed.
  • cargo clippy --all-targets --no-default-features --features dev-fast -- -D warnings: passed.
  • cargo fmt --all -- --check, rustdoc, Quint specs, cargo audit, and cargo deny: passed.
  • Web: auto-selected Kaizen, rejected a stale rapid-switch response, opened details by keyboard, and updated 12,362 to 12,363 calls without reload.
  • TUI: rendered ToolCall/ToolResult/Lifecycle rows and exited cleanly.
  • CPU: final 15-second daemon sample was usually 0.0-0.4%, with bounded scan bursts peaking at 17.2%; explicit refresh completed in 0.56s. Previous forced refresh took about 101s and could saturate a core.
  • Read-only integration tests confirm no target-repository writes.

Trade-off

Active-session full-text search commits in bounded batches; Web and TUI use SQLite directly and remain live. Search flushes on session stop or the next event after the batch interval.

AI assistance

Codex implemented, tested, manually exercised, and reviewed this change.

Web and TUI could lag, hide tool semantics, require manual project paths, and spike CPU on every hook.\n\nStream SQLite changes, bound transcript ingestion and derived updates, batch search work, and expose session insights without writing target repositories.
@marquesds marquesds force-pushed the marquesds/live-observability branch from 63504e6 to bcc1c82 Compare June 18, 2026 23:16
@marquesds marquesds merged commit 7f1738a into main Jun 18, 2026
9 checks passed
@marquesds marquesds deleted the marquesds/live-observability branch June 18, 2026 23:28
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.

1 participant