Document 31 modules that had no README: dc3-center-agentic, dc3-e2e,
common modules (agentic, sql, test, resource-registrar) and the facade
subsystem (api/grpc/local-auth/local-data/local-manager), plus 21
drivers. Content is grounded in each module's pom/yaml/source; WIP
skeleton drivers (can, dlms, ethernet-ip, iec104, lwm2m, zigbee) are
flagged as such.
Align CommandHistory/PointCommandHistory with the EventHistory pattern:
DB stores the enum index (SMALLINT via @EnumValue), gRPC carries int32,
JSON keeps enum name. Removes the lone string-code outlier in the schema.
- DO status/type/source: String code -> enum types
- VO type/source: String -> enum (status already enum); JSON stays name
- Builder: drop ofCode @AfterMapping (DO and VO now share enum type)
- RabbitMQ DTOs (CommandCall/PointCommandResult): status/source -> enum
- driver sendResult signatures: String status -> PointCommandStatusEnum
- gRPC command_history.proto status/source: string -> int32; server uses
getIndex()/ofIndex() to match EventHistoryServer
- tests updated to assert enum values
Add EVENT target type to AlarmTargetTypeFlagEnum, wire event report
into the alarm rule pipeline, add RabbitMQ contract E2E tests for
command call and event report, and create design documentation.
PostgresHypertableIT (2 tests):
- timescaledb hypertable accepts batched inserts and returns expected aggregates
(count / avg / min / max via simple SELECT) plus shows up in
timescaledb_information.hypertables
- hypertable enforces NOT NULL on the time column at insert time
RabbitDeliveryIT (6 tests):
- publisher confirm round-trips for routed messages and queue depth = 1
- mandatory=true unroutable messages return through the basic.return listener
- manual ack drains the queue exactly once (unacked redelivered, acked stays drained)
- waitForConfirms with no outstanding publishes completes synchronously
- exclusive queue rejects a second consumer on the same connection
- connection factory refuses invalid credentials on the fast path
RestAssuredHarnessIT (4 tests):
- rest-assured can call a stub HTTP server and decode JSON envelopes (R.ok / R.fail)
- request body and custom headers (X-DC3-Token) round-trip through assertions
- RestAssuredConfig can force a JSON parser when the server omits Content-Type
- response body can be extracted as a raw string for non-shape assertions
The full platform-image-driven user-flow scenarios (login, driver registration,
write point value, gateway 401, cross-tenant isolation, OFFLINE auto-status,
command round-trip, DLX requeue, agentic via WireMock, CSV import, token
rotation) will extend this harness once dc3-center-* and dc3-driver-* publish
immutable image tags suitable for CI. The infrastructure contracts pinned here
lock the assumptions those scenarios will rely on (timescale aggregation,
publisher confirms, rest-assured wiring).
@EnabledIfEnvironmentVariable(DC3_E2E) is now declared on each concrete IT
class because JUnit 5 evaluates the condition on the declared class only — the
abstract base BaseE2eIT comment now spells this out.
Run via DC3_E2E=true mvn -pl dc3-e2e -am verify.
E2eStack: singleton Testcontainers-driven stack that starts
- timescale/timescaledb-ha:pg18 (production-pinned), aliased dc3-postgres
- rabbitmq:3.13-management, aliased dc3-rabbitmq
on a shared docker network with reuse enabled. start() is idempotent and
exposes JDBC URL / AMQP host:port / credentials / container references for
downstream E2E tests.
BaseE2eIT: shared base class with @BeforeAll bootStack() and
@Tag("e2e") + @EnabledIfEnvironmentVariable(DC3_E2E=true|1|yes|on)
so non-E2E builds (no Docker, e.g. unit-test CI lanes) skip the suite by
default. Subclasses opt in by setting DC3_E2E.
HarnessSmokeIT (3 tests, gated):
- postgres is reachable and accepts simple queries
- rabbitmq is reachable and accepts the AMQP handshake
- start() is idempotent across repeated calls (containers stay running)
build: declare postgresql, rabbitmq testcontainers + amqp-client + postgres JDBC
driver as test scope so the harness can reach the stack without leaking E2E
deps into deployable artifacts. Replaces the .gitkeep placeholder put in by
S0 with the real harness module.
Run via DC3_E2E=true mvn -pl dc3-e2e -am verify.
Introduce two reactor modules that exist purely to host repository-wide
test concerns:
- dc3-coverage (packaging=pom) runs jacoco:report-aggregate against all
contributing modules and applies a tree-wide jacoco:check rule. The
aggregator excludes generated sources, deployable Application classes,
POJO entity packages and the third-party modbus4j sero utilities so
the percentage stays anchored on real business logic. Coverage gates
start at 0% and tighten in later stages as more tests land.
- dc3-e2e (packaging=jar) reserves a place for the docker-compose driven
end-to-end suite delivered in stage S8. Unit and integration phases
are skipped by default and only the e2e profile turns them on.
Both modules are wired into the root reactor.