Commit Graph

12 Commits

Author SHA1 Message Date
hsiegeln
c1bc32d50a feat(02-02): implement ELK diagram renderer with SVG/JSON content negotiation
- ElkDiagramRenderer: ELK layered layout (top-to-bottom) with JFreeSVG rendering
- Color-coded nodes: blue endpoints, green processors, red errors, purple EIPs, cyan cross-route
- Compound node support for CHOICE/SPLIT/TRY_CATCH swimlane groups
- DiagramRenderController: GET /api/v1/diagrams/{hash}/render with Accept header negotiation
- DiagramBeanConfig for Spring wiring
- 11 unit tests (layout, SVG structure, colors, compound nodes)
- 4 integration tests (SVG, JSON, 404, default format)
- Added xtext xbase lib dependency for ELK compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:17:13 +01:00
hsiegeln
f6ff279a60 feat(02-01): extend ingestion to populate Phase 2 columns with integration tests
- Refactored flattenProcessors to flattenWithMetadata (FlatProcessor record with depth/parentIndex)
- INSERT now populates 12 new columns: exchange_bodies, exchange_headers, processor_depths,
  processor_parent_indexes, processor_error_messages, processor_error_stacktraces,
  processor_input_bodies, processor_output_bodies, processor_input_headers,
  processor_output_headers, processor_diagram_node_ids, diagram_content_hash
- Exchange bodies/headers concatenated from all processor snapshots + route-level snapshots
- Null ExchangeSnapshot handled gracefully (empty string defaults)
- Headers serialized to JSON via Jackson ObjectMapper
- IngestionSchemaIT verifies 3-level tree metadata, body concatenation, null snapshot handling
- DiagramRenderer/DiagramLayout stubs created to fix pre-existing compilation error (Rule 3)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:15:41 +01:00
hsiegeln
c0922430c4 test(02-01): add failing IngestionSchemaIT for new column population
- Tests processor tree metadata (depths, parent indexes)
- Tests exchange body concatenation for search
- Tests null snapshot graceful handling
- AbstractClickHouseIT loads 02-search-columns.sql
- DiagramRenderer/DiagramLayout stubs to fix pre-existing compilation error

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:09:45 +01:00
hsiegeln
6df74505be feat(02-02): add ELK/JFreeSVG dependencies and core diagram rendering interfaces
- Add Eclipse ELK core + layered algorithm and JFreeSVG dependencies to app module
- Create DiagramRenderer interface in core with renderSvg and layoutJson methods
- Create DiagramLayout, PositionedNode, PositionedEdge records for layout data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 16:04:32 +01:00
hsiegeln
8fe65f083c feat(01-02): implement ingestion REST controllers with backpressure
- ExecutionController: POST /api/v1/data/executions (single or array)
- DiagramController: POST /api/v1/data/diagrams (single or array)
- MetricsController: POST /api/v1/data/metrics (array)
- All return 202 Accepted or 503 with Retry-After when buffer full
- Fix duplicate IngestionConfig bean (remove @Configuration, use @EnableConfigurationProperties)
- Fix BackpressureIT timing by using batch POST and 60s flush interval
- All 11 integration tests green

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:13:27 +01:00
hsiegeln
d55ebc1f57 test(01-02): add failing integration tests for ingestion endpoints
- ExecutionControllerIT: single/array POST, flush verification, unknown fields
- DiagramControllerIT: single/array POST, flush verification
- MetricsControllerIT: POST metrics, flush verification
- BackpressureIT: buffer-full returns 503, buffered data not lost

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:10:49 +01:00
hsiegeln
17a18cf6da feat(01-02): add IngestionService, ClickHouse repositories, and flush scheduler
- IngestionService routes data to WriteBuffer instances (core module, plain class)
- ClickHouseExecutionRepository: batch insert with parallel processor arrays
- ClickHouseDiagramRepository: JSON storage with SHA-256 content-hash dedup
- ClickHouseMetricsRepository: batch insert for agent_metrics table
- ClickHouseFlushScheduler: scheduled drain with SmartLifecycle shutdown flush
- IngestionBeanConfig: wires WriteBuffer and IngestionService beans

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:08:36 +01:00
hsiegeln
2d3fde3766 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
hsiegeln
b8a4739f72 feat(01-03): add test infrastructure, protocol version interceptor, and app bootstrap
- AbstractClickHouseIT base class with Testcontainers ClickHouse and schema init
- ProtocolVersionInterceptor validates X-Cameleer-Protocol-Version:1 on data/agent paths
- WebConfig registers interceptor with path patterns, excludes health/docs
- Cameleer3ServerApplication with @EnableScheduling and component scanning
- application-test.yml with small buffer config for tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:53:31 +01:00
hsiegeln
cc1c082adb feat(01-01): add WriteBuffer, repository interfaces, and config classes
- WriteBuffer<T> with offer/offerBatch/drain and backpressure (all tests green)
- ExecutionRepository, DiagramRepository, MetricsRepository interfaces
- MetricsSnapshot record for agent metrics data
- IngestionConfig for buffer-capacity/batch-size/flush-interval-ms properties
- ClickHouseConfig exposing JdbcTemplate bean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:49:25 +01:00
hsiegeln
96c52b88d1 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
hsiegeln
db17f02fcc Scaffold cameleer3-server project structure
Some checks failed
CI / build (push) Failing after 3s
Multi-module Maven project (server-core + server-app) with Spring Boot 3.4.3,
Gitea CI workflow, and dependency on cameleer3-common from Gitea Maven registry.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 10:06:17 +01:00