Skip to content

[codex] add token-efficient ClickHouse log helpers#125

Draft
parithosh wants to merge 1 commit into
docs/devnet-debug-runbook-improvementsfrom
codex/clickhouse-log-helpers
Draft

[codex] add token-efficient ClickHouse log helpers#125
parithosh wants to merge 1 commit into
docs/devnet-debug-runbook-improvementsfrom
codex/clickhouse-log-helpers

Conversation

@parithosh

Copy link
Copy Markdown
Member

Summary

  • add ClickHouse Python log helper presets for hosted devnet and local Kurtosis OTel logs
  • add compact helpers for source discovery, field counts, severity coverage, samples, error rows, and before/after context
  • update ClickHouse docs/examples and devnet runbooks to prefer helpers before raw SQL
  • add focused Python helper tests for SQL generation, compact output, severity fallback, and validation errors

Why

Runbooks were spending too many tokens hand-writing ClickHouse SQL for log triage, and severity detection was easy to get wrong for raw Docker logs. The helpers encode the known log sources, required scope filters, bounded time windows, body truncation, and structured-severity-first fallback logic behind the existing sandbox API. No new MCP tools are added.

Validation

  • python3 -m py_compile modules/clickhouse/python/clickhouse.py
  • go test -count=1 ./modules/clickhouse
  • go test ./runbooks ./modules/clickhouse ./pkg/server ./pkg/cli ./modules/dora
  • go test ./...
  • make lint
  • make test
  • make build-server build-panda
  • make docker-sandbox
  • exercised ./panda execute end-to-end through local server/proxy/sandbox with a mocked ClickHouse HTTP endpoint for log_sources, log_values, log_coverage, log_samples, log_errors, log_context, docs, and validation failures

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