feat(01-01): add ClickHouse dependencies, Docker Compose, schema, and app config
- Add clickhouse-jdbc, springdoc-openapi, actuator, testcontainers deps
- Add slf4j-api to core module
- Create Docker Compose with ClickHouse service on ports 8123/9000
- Create ClickHouse DDL: route_executions, route_diagrams, agent_metrics
- Configure application.yml with datasource, ingestion buffer, springdoc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:47:20 +01:00
|
|
|
-- Cameleer3 ClickHouse Schema
|
|
|
|
|
-- Tables for route executions, route diagrams, and agent metrics.
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS route_executions (
|
|
|
|
|
execution_id String,
|
|
|
|
|
route_id LowCardinality(String),
|
|
|
|
|
agent_id LowCardinality(String),
|
|
|
|
|
status LowCardinality(String),
|
|
|
|
|
start_time DateTime64(3, 'UTC'),
|
|
|
|
|
end_time Nullable(DateTime64(3, 'UTC')),
|
|
|
|
|
duration_ms UInt64,
|
|
|
|
|
correlation_id String,
|
|
|
|
|
exchange_id String,
|
test(01-03): add integration tests for health, OpenAPI, protocol version, forward compat, and TTL
- HealthControllerIT: health returns 200, no protocol header needed, TTL verified
- OpenApiIT: api-docs returns OpenAPI spec, swagger UI accessible
- ProtocolVersionIT: missing/wrong header returns 400, correct header passes, excluded paths work
- ForwardCompatIT: unknown JSON fields do not cause deserialization errors
- Fix testcontainers version to 2.0.3 (docker-java 3.7.0 for Docker Desktop 29.x compat)
- Fix ClickHouse schema: TTL with toDateTime() cast, non-nullable error columns for tokenbf_v1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:03:00 +01:00
|
|
|
error_message String DEFAULT '',
|
|
|
|
|
error_stacktrace String DEFAULT '',
|
feat(01-01): add ClickHouse dependencies, Docker Compose, schema, and app config
- Add clickhouse-jdbc, springdoc-openapi, actuator, testcontainers deps
- Add slf4j-api to core module
- Create Docker Compose with ClickHouse service on ports 8123/9000
- Create ClickHouse DDL: route_executions, route_diagrams, agent_metrics
- Configure application.yml with datasource, ingestion buffer, springdoc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:47:20 +01:00
|
|
|
-- Nested processor executions stored as parallel arrays
|
|
|
|
|
processor_ids Array(String),
|
|
|
|
|
processor_types Array(LowCardinality(String)),
|
|
|
|
|
processor_starts Array(DateTime64(3, 'UTC')),
|
|
|
|
|
processor_ends Array(DateTime64(3, 'UTC')),
|
|
|
|
|
processor_durations Array(UInt64),
|
|
|
|
|
processor_statuses Array(LowCardinality(String)),
|
|
|
|
|
-- Metadata
|
|
|
|
|
server_received_at DateTime64(3, 'UTC') DEFAULT now64(3, 'UTC'),
|
|
|
|
|
-- Skip indexes
|
|
|
|
|
INDEX idx_correlation correlation_id TYPE bloom_filter GRANULARITY 4,
|
|
|
|
|
INDEX idx_error error_message TYPE tokenbf_v1(32768, 3, 0) GRANULARITY 4
|
|
|
|
|
)
|
|
|
|
|
ENGINE = MergeTree()
|
|
|
|
|
PARTITION BY toYYYYMMDD(start_time)
|
|
|
|
|
ORDER BY (agent_id, status, start_time, execution_id)
|
test(01-03): add integration tests for health, OpenAPI, protocol version, forward compat, and TTL
- HealthControllerIT: health returns 200, no protocol header needed, TTL verified
- OpenApiIT: api-docs returns OpenAPI spec, swagger UI accessible
- ProtocolVersionIT: missing/wrong header returns 400, correct header passes, excluded paths work
- ForwardCompatIT: unknown JSON fields do not cause deserialization errors
- Fix testcontainers version to 2.0.3 (docker-java 3.7.0 for Docker Desktop 29.x compat)
- Fix ClickHouse schema: TTL with toDateTime() cast, non-nullable error columns for tokenbf_v1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:03:00 +01:00
|
|
|
TTL toDateTime(start_time) + toIntervalDay(30)
|
feat(01-01): add ClickHouse dependencies, Docker Compose, schema, and app config
- Add clickhouse-jdbc, springdoc-openapi, actuator, testcontainers deps
- Add slf4j-api to core module
- Create Docker Compose with ClickHouse service on ports 8123/9000
- Create ClickHouse DDL: route_executions, route_diagrams, agent_metrics
- Configure application.yml with datasource, ingestion buffer, springdoc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:47:20 +01:00
|
|
|
SETTINGS ttl_only_drop_parts = 1;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS route_diagrams (
|
|
|
|
|
content_hash String,
|
|
|
|
|
route_id LowCardinality(String),
|
|
|
|
|
agent_id LowCardinality(String),
|
|
|
|
|
definition String,
|
|
|
|
|
created_at DateTime64(3, 'UTC') DEFAULT now64(3, 'UTC')
|
|
|
|
|
)
|
|
|
|
|
ENGINE = ReplacingMergeTree(created_at)
|
|
|
|
|
ORDER BY (content_hash);
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS agent_metrics (
|
|
|
|
|
agent_id LowCardinality(String),
|
|
|
|
|
collected_at DateTime64(3, 'UTC'),
|
|
|
|
|
metric_name LowCardinality(String),
|
|
|
|
|
metric_value Float64,
|
|
|
|
|
tags Map(String, String),
|
|
|
|
|
server_received_at DateTime64(3, 'UTC') DEFAULT now64(3, 'UTC')
|
|
|
|
|
)
|
|
|
|
|
ENGINE = MergeTree()
|
|
|
|
|
PARTITION BY toYYYYMMDD(collected_at)
|
|
|
|
|
ORDER BY (agent_id, metric_name, collected_at)
|
test(01-03): add integration tests for health, OpenAPI, protocol version, forward compat, and TTL
- HealthControllerIT: health returns 200, no protocol header needed, TTL verified
- OpenApiIT: api-docs returns OpenAPI spec, swagger UI accessible
- ProtocolVersionIT: missing/wrong header returns 400, correct header passes, excluded paths work
- ForwardCompatIT: unknown JSON fields do not cause deserialization errors
- Fix testcontainers version to 2.0.3 (docker-java 3.7.0 for Docker Desktop 29.x compat)
- Fix ClickHouse schema: TTL with toDateTime() cast, non-nullable error columns for tokenbf_v1
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:03:00 +01:00
|
|
|
TTL toDateTime(collected_at) + toIntervalDay(30)
|
feat(01-01): add ClickHouse dependencies, Docker Compose, schema, and app config
- Add clickhouse-jdbc, springdoc-openapi, actuator, testcontainers deps
- Add slf4j-api to core module
- Create Docker Compose with ClickHouse service on ports 8123/9000
- Create ClickHouse DDL: route_executions, route_diagrams, agent_metrics
- Configure application.yml with datasource, ingestion buffer, springdoc
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:47:20 +01:00
|
|
|
SETTINGS ttl_only_drop_parts = 1;
|