57 Commits
Author SHA1 Message Date
pnoker 66aab58f20 build: standardize repository tooling and quality gates 2026-09-02 20:51:10 +08:00
pnoker 51edc7c198 refactor(common): rename resource registrar module 2026-09-01 23:42:00 +08:00
pnoker eae86b58fc refactor(storage)!: unify platform persistence on reactive postgresql
- migrate auth, manager, data, and agentic persistence to R2DBC
- hard cut pagination, facade, gateway, web, and CLI contracts
- remove legacy database and TSDB adapters and document validation gates

BREAKING CHANGE: platform persistence now requires PostgreSQL 18 with TimescaleDB and the new reactive API contracts.
2026-09-01 22:03:16 +08:00
pnoker 11640cf6ac build: deploy dc3-db artifacts and document store selection env
- include dc3-db in the make deploy artifact set alongside common/mq/tsdb
- sample DC3_DB_TYPE/DC3_TSDB_TYPE and external-store ports in .env.example
- expose mysql/mariadb/tdengine/influxdb/iotdb/jaeger in the compose stacks
- update AGENTS.md module map and module-ownership guidance
- add the missing AGPL header to the oracle driver service
2026-08-25 19:27:57 +08:00
pnoker edadfa0a06 feat(tsdb): rewire the data center onto the tsdb port and retire the repository module
Phase 1b of docs/design/tsdb-abstraction.md: every point-value read and
write now flows through the dc3-tsdb port, and dc3-common-repository is
deleted outright (no compat aliases).

Write path — new PointValueIngestService orchestration in dc3-common-data:
the stale-owner lease guard leaves the history INSERT's cross-schema join
and resolves the active owner per distinct device through the existing
DeviceFacade.getActiveOwner chain; a caffeine-backed ingest idempotency
window (dc3.data.ingest.*, marked only after both writes commit) absorbs
MQ redeliveries now that the message_id unique index is retired; the
batch lands via TsdbStore.append (natural series+time upsert, INGEST_ORDER
kept for the fenced dc3_point_latest upsert).

Read path — history via last(), page() resolves name/enable filters to
series keys through relational metadata (tenant-wide when unrestricted,
cursor offset emulation capped at 10k) with count() for totals; the alarm
window backend becomes TsdbWindowDataSource over aggregate()/history().

Dashboards — all nine data-side hypertable statements move to the S13
analytics facet (count/bucketedCount/countByDimension/latencyHistogram/
lastSeenPerSeries) plus the dc3_point_latest projection for latestStream;
the manager topology statement crosses into the data center via a new
ListSeriesVolumes RPC backed by the new S13-5 seriesCounts primitive (a
point shared by several devices needs per-series counts, which
single-dimension grouping cannot reconstruct); both cross-schema joins
are gone.

Port/adapter — seriesCounts added with a TCK case (23 total); series
filters compile to row-value IN lists chunked at 500 pairs; bootstrap
adds the quality column idempotently and retires uk_point_value_event so
existing deployments converge on the new upsert; the adapter binds the
application-provided tsdbDataSource bean (the history dynamic-datasource
entry) instead of the routing primary.

Timestamps — BO<->Instant conversion is pinned to
TimeConstant.DEFAULT_ZONEID (the platform canonical zone the latest
projection type handler already writes with); the design note's "lock
UTC" is amended accordingly, together with the lease-guard and S13-5
deviations recorded in §6.2.

Seed/deploy — 05-iot-dc3-history.sql gains the quality column and swaps
the unique index; compose carries DC3_TSDB_TYPE; make deploy publishes
dc3-tsdb.

Also fixed along the way: root pom never managed dc3-mq-core (latent,
masked by full-reactor builds); PointValueMapper ran unrouted on the
master datasource (now @DS("history")); latestStream name enrichment
looked up a Long-keyed map with String keys.

Gates: tsdb TCK 23/23, dc3-common-data 262/262, e2e 26/26 including the
unmodified PostgresHypertableIT; full reactor green except dc3-mq-tck's
kafka/pulsar container-startup flake, reproduced identically twice and
unrelated to this change.
2026-08-20 21:58:01 +08:00
pnoker d003291f81 refactor(build): extract the mq family into a top-level dc3-mq aggregator
The broker-selection family (port + six certified adapters + tck) is a
deployment selection, not shared plumbing, so it moves out of dc3-common
into a top-level dc3-mq aggregator beside dc3-api — the same standing as
the gRPC contract layer, and a template for future pluggable families
(storage is next on the design board).

- dc3-common-mq -> dc3-mq/dc3-mq-core (port: API + core runtime)
- dc3-common-mq-{rabbitmq,kafka,rocketmq,pulsar,activemq,mqtt,tck} ->
  dc3-mq/dc3-mq-{...}; no compatibility aliases — every coordinate is
  renamed everywhere in one commit (business poms, coverage, root
  dependency management)
- dc3-common sheds eight modules back to plain shared plumbing; the
  device-access dc3-common-mqtt stays by design (protocol stack, not a
  broker selection)
- Java packages deliberately stay io.github.pnoker.common.mq.* — the
  facade modules set the precedent that packages do not track module
  homes, keeping this a pom-only, zero-source refactor
- make deploy now publishes dc3-api + dc3-common + dc3-mq (third-party
  driver authors compile against the port transitively)
- docs/mq-brokers.md and the design's module layout follow the new home

Verified: full-repo test-compile green; constant/data/driver/manager
unit suites unchanged and green (255/144/291); the rabbitmq contract
suite passes 12/12 from the new coordinates against a live broker,
proving adapter wiring survived the move.
2026-08-20 12:23:09 +08:00
pnoker b26c0000be feat(release): add release backfill tool and docs-linked release footer 2026-08-19 17:02:35 +08:00
pnoker 90a7db4d6b merge: integrate upstream deployment docs and validation targets 2026-08-19 14:30:34 +08:00
pnoker 2426d1b47f ci(docs): enforce documentation consistency 2026-08-19 00:06:14 +08:00
pnoker 6e9c38d80f feat(deploy): add k8s and helm manifests and make targets 2026-08-18 22:07:49 +08:00
pnoker fd159b7a36 fix(database): repair and validate PostgreSQL initialization 2026-08-18 08:15:12 +08:00
pnoker aec6ebfc76 refactor(logging): standardize application logging 2026-08-18 08:14:52 +08:00
pnoker a58064cc5c ci(release): verify releases before publishing artifacts 2026-08-12 01:04:49 +08:00
Henry Zhang d06abff597 chore(docs): move docs site to standalone pnoker/iot-dc3-docs repo (#177)
* chore(docs): move docs site to standalone pnoker/iot-dc3-docs repo

The VitePress docs site now lives in pnoker/iot-dc3-docs and serves docs.dc3.site from there. Remove the in-repo docs/ and all docs-only build/deploy wiring so nothing dangles.

- delete docs/ (source moved to pnoker/iot-dc3-docs)

- delete .github/workflows/docs.yml (deploy owned by iot-dc3-docs)

- drop npm /docs dependabot block; clean codeql/.gitignore docs paths

- remove Makefile docs-* targets

- relocate AI testing policy into dc3-web/tests/ so the required Web guardrail test is self-contained (was reading ../docs/...)

- rewire README image refs (7 READMEs) and in-repo doc links (README.ai.md, AGENTS.md, dc3/doc/README.md) to https://docs.dc3.site / the new repo

dc3/doc/{TITLE,CHANGE,USAGE}.md STAY - release tooling (make changelog, docker-ci) regenerates them; the docs repo snapshots them.

* fix(docs): repair pre-existing broken doc links found during migration

- 8 READMEs: /en|zh/introduction/technology-stack -> /en|zh/development/technology-stack (page lives under development/, not introduction/)

- dc3-web/tests/README.md: ../docs/test-debugging.md (missing) -> https://docs.dc3.site/en/frontend/test-debugging
2026-08-06 14:54:17 +08:00
pnoker e3d335b56d build(docs): add makefile targets and pin node version
Add docs-dev, docs-build, docs-preview, and docs-version make targets. Pin
Node 22 LTS via .nvmrc. Bump pnpm packageManager to 11.17.0.
2026-07-24 12:08:08 +08:00
pnoker 99811cdea7 chore: consolidate dc3-web config and legal files into root
Since dc3-web is now part of the monorepo, remove duplicated files
and centralize project-wide configuration at the root level.

.gitignore:
- Merge dc3-web-specific patterns (dist/, coverage/, .vite/, *.tsbuildinfo,
  components.d.ts, .eslintcache, src-tauri/, *.db, *.sqlite, etc.) into root
- Add missing root patterns (*.crt, *.csr, *.backup, .history/, Sublime Text)
- Delete dc3-web/.gitignore

Makefile:
- Auto-generate GROUP_SERVICES_drivers from dc3-driver/ directory wildcard
- Replace 33 hand-written RUN_MODULE_ mappings with 5 explicit + foreach loop
- Fix catch-all %: rule to reject typos instead of silently succeeding

dc3-web/ legal files (7 files deleted):
- CODE_OF_CONDUCT.md, CONTRIBUTING.md — older versions, root has newer
- COPYRIGHT, LICENSE-AGPL.txt, SECURITY.md — identical to root
- LICENSE.txt — older version, root has v2026.5
- LICENSE — Apache 2.0 from standalone era, no longer applicable under AGPL
2026-07-13 19:31:43 +08:00
Henry Zhang 72a5fceac0 chore: consolidate CI, docs, and issue templates (#99)
* ci(dependabot): add cargo ecosystem, groups, and clean up stale docker directories

* docs(ai): add spring-ai-deep-dive cross-references in en and zh indexes

* docs(community): add english FAQ and frontend developer guide

* chore(issue-templates): translate all templates to english

* ci(docker): add 20 missing driver images to Dockerfile, compose, and Makefile

* fix(docs): remove Vue template syntax from panorama SVGs so they render

* docs(ai): add spring-ai-deep-dive pages in en and zh
2026-06-28 23:42:04 +08:00
pnoker a32354c602 chore(git): rewrite tag.sh to semver on main with dry-run 2026-06-26 14:26:04 +08:00
Vickey 74feecdaf4 feat(auth): annotate all endpoints with x-dc3-ai and add ratchet annotation gate 2026-06-19 09:05:59 +08:00
pnoker d828b57a03 feat(agentic): annotate all endpoints with x-dc3-ai and add ratchet annotation gate 2026-06-19 08:39:52 +08:00
pnoker 44fa6ac4da feat(data): annotate all endpoints with x-dc3-ai and add ratchet annotation gate 2026-06-19 08:33:08 +08:00
pnoker 04313eb9f8 feat(manager): annotate all endpoints with x-dc3-ai and add ratchet annotation gate 2026-06-19 08:22:07 +08:00
pnoker 12d611d315 feat(registrar): add controller annotation gate and make target 2026-06-19 07:48:42 +08:00
pnoker 35d985e2f3 build: add compose shortcut targets and drop commit-msg lint hook
Generate <op>-<stack>[-<registry>] compose shortcuts and test/coverage
targets in the Makefile, remove the install-hooks target and the
.githooks commit-msg linter, and document the design.
2026-06-18 18:42:20 +08:00
Vickey 88284e4a86 chore(build): trim Makefile targets and phony list
Remove the test/coverage, app/dev, and compose-* alias targets along
with their check-* guards, and drop the matching .PHONY and MVN_SUB
entries. Reorder deploy and install-hooks under the trimmed target set.
2026-06-18 15:45:56 +08:00
pnoker 7a2cc9b8fa chore(compose): streamline environment defaults 2026-06-11 15:04:01 +08:00
Vickey 8a2a87f96c docs(openapi): add API documentation guide, export tooling, and conventions
- Add docs/development/api-documentation.md describing the Swagger UI layout,
  per-center grouping, auth headers, and production exposure.
- Add a `make openapi` target + dc3/bin/export_openapi.sh to snapshot each
  center's OpenAPI JSON from a running stack.
- Update AGENTS.md: OpenAPI/Swagger conventions, and correct the enum-suffix
  examples (multi-valued sets use *TypeEnum, not *FlagEnum).
2026-06-09 15:52:46 +08:00
pnoker b256be7098 fix(build): default MVN_SETTINGS to .mvn/settings.xml and repair test compilation
Makefile now defaults MVN_SETTINGS to .mvn/settings.xml (Aliyun mirror) so
`make package` works without manual settings override. Also fix pre-existing
test compilation errors where service method signatures gained tenantId
parameters but the corresponding test mocks were not updated.

- Makefile: MVN_SETTINGS ?= .mvn/settings.xml
- pom.xml: re-apply dependency version bumps (surefire 3.5.6, jacoco 0.8.15,
  tools.jackson 3.1.4, jaxb 4.0.9, jna 5.19.0, graalvm 1.1.1,
  maven-dependency-plugin 3.11.0)
- Fix 7 test files with missing tenantId parameters in service mock calls
2026-06-07 01:31:09 +08:00
pnoker 5a3ab1440a test: improve backend test coverage governance 2026-05-19 18:19:12 +08:00
pnoker 83ee84773a build: refactor Dockerfile, Makefile and compose files
Parametrize JDK/JRE base images via build args in Dockerfile, replace
hardcoded GC/dump env vars with per-service path variables, fix APM
port. Simplify Makefile registry options to global|cn, add SERVICES
and GROUP selectors for targeted compose operations.
2026-05-17 22:16:30 +08:00
pnoker a9c1908797 build: refine Dockerfile comments and dockerignore scope
Exclude Docker/compose/CI files from builder stage context to avoid
unnecessary cache invalidation. Update Dockerfile comments for
Podman compatibility. Remove package dependency from build target.
2026-05-17 19:18:24 +08:00
pnoker addbeea20b build: update Makefile and Maven settings
Update Makefile help text to reflect consolidated optional compose
stack. Remove Aliyun mirror from Maven settings.
2026-05-17 19:03:33 +08:00
pnoker 9123b480f4 test(e2e): stabilize infrastructure harness 2026-05-14 21:29:08 +08:00
pnoker 1f30422a07 test(public): cover arithmetic, codec, decode, json and key utilities
Add the first batch of unit tests under dc3-common-public covering the
core "stateless function" surface used everywhere else in the platform:

- ArithmeticUtilTest: precise add/subtract/multiply/divide/round across
  BigDecimal/float/double overloads, plus scale-bound rejections and
  division by zero.
- DecodeUtilTest: UTF-8 round-trips, MD5 stability and salting,
  Base64 byte/string round-trips and hex en/decoding.
- HmacAuthSignerTest: enabled/disabled state derivation from the secret,
  hex digest stability, mismatched-payload + mismatched-secret behavior,
  null-payload guards and constant-time verification on length mismatch.
- JsonUtilTest: parseObject/parseArray from String/byte[]/InputStream/
  TypeReference, isJson validation, toJsonString/Bytes round-trip and
  unknown-property tolerance.
- KeyUtilTest: AES and RSA encrypt/decrypt round-trips, JWT signing
  followed by salt/subject/tenant rejection paths.

The Makefile test/test-it/test-e2e/coverage targets get an explicit
-Dmaven.test.skip=false override because .mvn/maven.config sets the
flag globally so `mvn package` does not run tests; without the override
the new targets would silently produce empty reports.

dc3-common-public/pom.xml declares spring-boot-starter-test test-scope.

Verified locally: 77 new test cases run via `make test`, all green.
2026-05-13 14:01:26 +08:00
Vickey efd26c645b ci: add unit, integration and e2e workflows with makefile targets
Wire the test toolchain into developer-facing entry points and CI:

- Makefile gains test, test-it, test-e2e and coverage targets; the help
  banner advertises them alongside the existing build commands so
  contributors do not need to memorise the underlying mvn invocations.
- A new Test workflow runs three sequenced jobs: unit (mvn test, skipping
  the integration phase), integration (mvn verify, skipping unit phase,
  running with TESTCONTAINERS_REUSE_ENABLE=true), and a final coverage
  job that downloads both jacoco .exec artifacts and rebuilds the
  aggregate report from dc3-coverage.
- A new E2E workflow runs make test-e2e on develop/release/main pushes
  and on manual dispatch, with a 90 minute timeout that accommodates
  cold compose start-up plus the full critical path battery.
- The existing CI workflow keeps its fast-fail compile job unchanged so
  PR feedback latency stays low; tests are now owned exclusively by
  the new Test workflow.
2026-05-13 13:08:28 +08:00
pnoker 4b04c4f7da build(git): add commit message validation hook 2026-05-09 21:17:28 +08:00
pnoker 6ba1fed607 feat(release): generate changelog from git commits 2026-05-09 20:44:53 +08:00
pnoker 35685a5987 refactor(container): remove redundant podman scripts 2026-05-09 18:49:52 +08:00
pnoker 8fa1f0c152 refactor(container): deduplicate aliyun compose stacks 2026-05-09 18:49:52 +08:00
pnoker e47299a327 chore: remove format and format-check targets from Makefile 2026-05-07 23:55:32 +08:00
pnoker 19ba57f430 chore(build): add format and format-check targets to Makefile 2026-05-07 16:44:09 +08:00
pnoker ca38651909 feat: add .env file for Docker Compose configuration and update usage instructions 2026-04-21 01:11:59 +08:00
pnoker ea17c86387 chore: update version to 2026.4.19 across all modules and adjust branch settings in codeql.yml 2026-04-19 13:45:21 +08:00
Vickey 64c6f911fe chore: replace Apache-2.0 license headers with AGPL-3.0 in compose files and gateway config 2025-08-26 22:03:42 +08:00
pnoker d85c477ec5 feat: config makefile 2024-06-19 01:14:34 +08:00
pnoker 85d2becd26 refactor: move driver SDK into dc3-common module to simplify dependency configuration 2024-01-03 00:27:33 +08:00
pnoker 721add4497 refactor(auth): extract token controller request/response into dedicated VO classes 2023-09-19 23:25:58 +08:00
pnoker f0703d85a2 chore: update copyright headers across all modules to honor open-source contributors 2023-03-13 23:48:52 +08:00
pnoker c2a15d73e9 chore: reorganize api files into idea/ subdirectory and remove obsolete bin scripts 2023-03-09 02:03:31 +08:00
pnoker d113db8cb1 refactor: migrate base package from com.dc3 to io.github.pnoker 2022-11-18 21:14:54 +08:00