fix(01): revise plans based on checker feedback
- Remove AbstractClickHouseIT and application-test.yml from Plan 01-01, move to Plan 01-03 Task 1 (reduces 01-01 from 15 to 13 files) - Change Plan 01-02 Task 1 tdd="true" to tdd="false" (compile-only verify) - Add DiagramRepository and MetricsRepository flush key_links to Plan 01-02 - Update VALIDATION.md: INGST-06 TTL maps to HealthControllerIT#ttlConfigured* instead of non-existent ClickHouseTtlIT Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,8 +18,6 @@ files_modified:
|
||||
- cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/DiagramRepository.java
|
||||
- cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/MetricsRepository.java
|
||||
- cameleer3-server-core/src/test/java/com/cameleer3/server/core/ingestion/WriteBufferTest.java
|
||||
- cameleer3-server-app/src/test/resources/application-test.yml
|
||||
- cameleer3-server-app/src/test/java/com/cameleer3/server/app/AbstractClickHouseIT.java
|
||||
autonomous: true
|
||||
requirements:
|
||||
- INGST-04
|
||||
@@ -46,9 +44,6 @@ must_haves:
|
||||
- path: "cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/ExecutionRepository.java"
|
||||
provides: "Repository interface for execution batch inserts"
|
||||
exports: ["insertBatch"]
|
||||
- path: "cameleer3-server-app/src/test/java/com/cameleer3/server/app/AbstractClickHouseIT.java"
|
||||
provides: "Shared Testcontainers base class for integration tests"
|
||||
min_lines: 20
|
||||
key_links:
|
||||
- from: "cameleer3-server-app/src/main/java/com/cameleer3/server/app/config/ClickHouseConfig.java"
|
||||
to: "application.yml"
|
||||
@@ -61,10 +56,10 @@ must_haves:
|
||||
---
|
||||
|
||||
<objective>
|
||||
Set up ClickHouse infrastructure, schema, WriteBuffer with backpressure, repository interfaces, and test infrastructure.
|
||||
Set up ClickHouse infrastructure, schema, WriteBuffer with backpressure, and repository interfaces.
|
||||
|
||||
Purpose: Establishes the storage foundation that all ingestion endpoints and future search queries depend on. The WriteBuffer is the central throughput mechanism -- all data flows through it before reaching ClickHouse.
|
||||
Output: Working ClickHouse via Docker Compose, DDL with TTL, WriteBuffer with unit tests, repository interfaces, Testcontainers base class for integration tests.
|
||||
Output: Working ClickHouse via Docker Compose, DDL with TTL, WriteBuffer with unit tests, repository interfaces.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@@ -147,7 +142,7 @@ Output: Working ClickHouse via Docker Compose, DDL with TTL, WriteBuffer with un
|
||||
</task>
|
||||
|
||||
<task type="auto" tdd="true">
|
||||
<name>Task 2: WriteBuffer, repository interfaces, IngestionConfig, ClickHouseConfig, and test infrastructure</name>
|
||||
<name>Task 2: WriteBuffer, repository interfaces, IngestionConfig, and ClickHouseConfig</name>
|
||||
<files>
|
||||
cameleer3-server-core/src/main/java/com/cameleer3/server/core/ingestion/WriteBuffer.java,
|
||||
cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/ExecutionRepository.java,
|
||||
@@ -155,9 +150,7 @@ Output: Working ClickHouse via Docker Compose, DDL with TTL, WriteBuffer with un
|
||||
cameleer3-server-core/src/main/java/com/cameleer3/server/core/storage/MetricsRepository.java,
|
||||
cameleer3-server-core/src/test/java/com/cameleer3/server/core/ingestion/WriteBufferTest.java,
|
||||
cameleer3-server-app/src/main/java/com/cameleer3/server/app/config/ClickHouseConfig.java,
|
||||
cameleer3-server-app/src/main/java/com/cameleer3/server/app/config/IngestionConfig.java,
|
||||
cameleer3-server-app/src/test/resources/application-test.yml,
|
||||
cameleer3-server-app/src/test/java/com/cameleer3/server/app/AbstractClickHouseIT.java
|
||||
cameleer3-server-app/src/main/java/com/cameleer3/server/app/config/IngestionConfig.java
|
||||
</files>
|
||||
<behavior>
|
||||
- WriteBuffer(capacity=10): offer() returns true for first 10 items, false on 11th
|
||||
@@ -168,7 +161,6 @@ Output: Working ClickHouse via Docker Compose, DDL with TTL, WriteBuffer with un
|
||||
- ExecutionRepository interface declares insertBatch(List of RouteExecution)
|
||||
- DiagramRepository interface declares store(RouteGraph) and findByContentHash(String)
|
||||
- MetricsRepository interface declares insertBatch(List of metric data)
|
||||
- AbstractClickHouseIT starts a Testcontainers ClickHouse, applies schema, provides JdbcTemplate
|
||||
</behavior>
|
||||
<action>
|
||||
1. Create WriteBuffer<T> in core module (no Spring dependency):
|
||||
@@ -199,23 +191,11 @@ Output: Working ClickHouse via Docker Compose, DDL with TTL, WriteBuffer with un
|
||||
5. Create ClickHouseConfig as @Configuration:
|
||||
- Exposes JdbcTemplate bean (Spring Boot auto-configures DataSource from spring.datasource)
|
||||
- No custom bean needed if relying on auto-config; only create if explicit JdbcTemplate customization required
|
||||
|
||||
6. Create application-test.yml for test profile:
|
||||
- Placeholder datasource config (overridden by Testcontainers in AbstractClickHouseIT)
|
||||
- ingestion: small buffer for tests (capacity=100, batch-size=10, flush-interval-ms=100)
|
||||
|
||||
7. Create AbstractClickHouseIT base class:
|
||||
- @Testcontainers + @Container with ClickHouseContainer("clickhouse/clickhouse-server:25.3")
|
||||
- @DynamicPropertySource to override spring.datasource.url/username/password
|
||||
- @SpringBootTest
|
||||
- @ActiveProfiles("test")
|
||||
- @BeforeAll: read clickhouse/init/01-schema.sql and execute it against the container via JDBC
|
||||
- Expose protected JdbcTemplate for subclasses
|
||||
</action>
|
||||
<verify>
|
||||
<automated>mvn test -pl cameleer3-server-core -Dtest=WriteBufferTest -q 2>&1 | tail -10</automated>
|
||||
</verify>
|
||||
<done>WriteBuffer passes all unit tests. Repository interfaces exist with correct method signatures. IngestionConfig reads from application.yml. AbstractClickHouseIT base class exists and can start a Testcontainers ClickHouse instance with schema applied.</done>
|
||||
<done>WriteBuffer passes all unit tests. Repository interfaces exist with correct method signatures. IngestionConfig reads from application.yml.</done>
|
||||
</task>
|
||||
|
||||
</tasks>
|
||||
@@ -228,7 +208,7 @@ Output: Working ClickHouse via Docker Compose, DDL with TTL, WriteBuffer with un
|
||||
</verification>
|
||||
|
||||
<success_criteria>
|
||||
WriteBuffer unit tests green. Project compiles. ClickHouse DDL defines all three tables with TTL and correct partitioning. Repository interfaces define batch insert contracts. Testcontainers base class ready for integration tests in Plan 02.
|
||||
WriteBuffer unit tests green. Project compiles. ClickHouse DDL defines all three tables with TTL and correct partitioning. Repository interfaces define batch insert contracts.
|
||||
</success_criteria>
|
||||
|
||||
<output>
|
||||
|
||||
Reference in New Issue
Block a user