Skip to content

improvement(clickhouse): expand block templates and skills, normalize tool versions - #5246

Merged
waleedlatif1 merged 3 commits into
stagingfrom
worktree-validate-clickhouse
Jun 27, 2026
Merged

improvement(clickhouse): expand block templates and skills, normalize tool versions#5246
waleedlatif1 merged 3 commits into
stagingfrom
worktree-validate-clickhouse

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Validated the full ClickHouse integration (26 tools, block, 26 internal proxy routes, contracts) against ClickHouse's official API/docs and Sim conventions — all SQL statements and system-table columns confirmed, tool↔route↔contract shapes aligned, SQL-injection defenses verified
  • Expanded ClickHouseBlockMeta templates from 3 to 9 (schema docs, scheduled table maintenance, partition retention cleanup, long-running-query alerts, table provisioning, weekly storage growth report)
  • Added document-schema and maintain-tables skills (now 5 total, each grounded in tools.access and verified against real, attested ClickHouse use cases)
  • Normalized tool version from '1.0' to '1.0.0' across all 26 tools for repo consistency

Type of Change

  • Improvement

Testing

  • bun run lint clean
  • ClickHouse utils tests pass (6/6)
  • TypeScript compiles clean (no new errors)
  • bun run check:api-validation passes

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

… tool versions
- Expand ClickHouseBlockMeta templates from 3 to 9 (schema docs, table maintenance, partition retention, long-running-query alerts, table provisioning, storage growth report)
- Add document-schema and maintain-tables skills (now 5, all grounded in tools.access)
- Normalize tool version '1.0' to '1.0.0' across all 26 tools for repo consistency
@vercel

vercelBot commented Jun 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
docsSkippedSkippedJun 27, 2026 8:45pm

Request Review

@cursor

cursorBot commented Jun 27, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Metadata and prompt-only changes; no tool routes, params, or execution logic modified. Partition-drop guidance is stricter in new skill text but does not change server-side safeguards.

Overview
Expands ClickHouse block metadata so users get more starter workflows and agent playbooks, without changing block operations or tool APIs.

ClickHouseBlockMeta grows from 3 to 9 templates (schema documentation, nightly OPTIMIZE, partition retention cleanup, long-running query Slack alerts, table provisioning from a spec, weekly storage reports). New emcn icons back those entries. Two new skillsdocument-schema and maintain-tables — guide agents through introspection/docs and maintenance; maintain-tables explicitly requires a caller-supplied retention cutoff before any partition drops.

All 26 ClickHouse tools have version normalized from '1.0' to '1.0.0' for consistency with the rest of the repo (metadata only).

Reviewed by Cursor Bugbot for commit 0c5d816. Configure here.

@greptile-apps

greptile-appsBot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR expands the ClickHouse integration metadata and normalizes its tool versions. The main changes are:

  • Added new ClickHouse workflow templates for schema docs, maintenance, retention, alerts, provisioning, and reporting.
  • Added ClickHouse skills for schema documentation and table maintenance.
  • Updated ClickHouse tool versions from 1.0 to 1.0.0.
  • Added more icon imports for the new templates.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

FilenameOverview
apps/sim/blocks/blocks/clickhouse.tsAdds ClickHouse templates, skills, and matching template icons.
apps/sim/tools/clickhouse/count-rows.tsUpdates the ClickHouse Count Rows tool version string.
apps/sim/tools/clickhouse/create-database.tsUpdates the ClickHouse Create Database tool version string.
apps/sim/tools/clickhouse/create-table.tsUpdates the ClickHouse Create Table tool version string.
apps/sim/tools/clickhouse/delete.tsUpdates the ClickHouse Delete tool version string.
apps/sim/tools/clickhouse/describe-table.tsUpdates the ClickHouse Describe Table tool version string.
apps/sim/tools/clickhouse/drop-database.tsUpdates the ClickHouse Drop Database tool version string.
apps/sim/tools/clickhouse/drop-partition.tsUpdates the ClickHouse Drop Partition tool version string.
apps/sim/tools/clickhouse/drop-table.tsUpdates the ClickHouse Drop Table tool version string.
apps/sim/tools/clickhouse/execute.tsUpdates the ClickHouse Execute tool version string.
apps/sim/tools/clickhouse/insert-rows.tsUpdates the ClickHouse Insert Rows tool version string.
apps/sim/tools/clickhouse/insert.tsUpdates the ClickHouse Insert tool version string.
apps/sim/tools/clickhouse/introspect.tsUpdates the ClickHouse Introspect tool version string.
apps/sim/tools/clickhouse/kill-query.tsUpdates the ClickHouse Kill Query tool version string.
apps/sim/tools/clickhouse/list-clusters.tsUpdates the ClickHouse List Clusters tool version string.
apps/sim/tools/clickhouse/list-databases.tsUpdates the ClickHouse List Databases tool version string.
apps/sim/tools/clickhouse/list-mutations.tsUpdates the ClickHouse List Mutations tool version string.
apps/sim/tools/clickhouse/list-partitions.tsUpdates the ClickHouse List Partitions tool version string.
apps/sim/tools/clickhouse/list-running-queries.tsUpdates the ClickHouse List Running Queries tool version string.
apps/sim/tools/clickhouse/list-tables.tsUpdates the ClickHouse List Tables tool version string.
apps/sim/tools/clickhouse/optimize-table.tsUpdates the ClickHouse Optimize Table tool version string.
apps/sim/tools/clickhouse/query.tsUpdates the ClickHouse Query tool version string.
apps/sim/tools/clickhouse/rename-table.tsUpdates the ClickHouse Rename Table tool version string.
apps/sim/tools/clickhouse/show-create-table.tsUpdates the ClickHouse Show Create Table tool version string.
apps/sim/tools/clickhouse/table-stats.tsUpdates the ClickHouse Table Stats tool version string.
apps/sim/tools/clickhouse/truncate-table.tsUpdates the ClickHouse Truncate Table tool version string.
apps/sim/tools/clickhouse/update.tsUpdates the ClickHouse Update tool version string.

Reviews (3): Last reviewed commit: "improvement(clickhouse): make long-runni..." | Re-trigger Greptile

Comment threadapps/sim/blocks/blocks/clickhouse.ts Outdated
Comment threadapps/sim/blocks/blocks/clickhouse.ts
…p guidance
Address Greptile P1 review: tighten the partition-retention and kill-query
templates/skill so agent guidance requires an explicit retention cutoff and
elapsed-time threshold, lists/verifies targets first, defaults to alert-only,
and never drops a partition or kills a query without confirmation.
@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 5cfc0af. Configure here.

Comment threadapps/sim/blocks/blocks/clickhouse.ts
Address Greptile P1: the kill-query path is a low-level primitive (like
drop_table/delete) and shouldn't carry tool-specific kill policy. Remove the
autonomous-kill suggestion from the scheduled template so no shipped template
steers an agent toward killing a query unattended; alert a human instead. The
kill tool stays available for explicit manual use.
@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@greptile

@waleedlatif1

Copy link
Copy Markdown
CollaboratorAuthor

@cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0c5d816. Configure here.

@waleedlatif1
waleedlatif1 merged commit d493263 into stagingJun 27, 2026
16 checks passed
@waleedlatif1
waleedlatif1 deleted the worktree-validate-clickhouse branch June 27, 2026 20:56
Sign up for freeto 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

@waleedlatif1