Commit Graph
3194 Commits
Author SHA1 Message Date
pnoker a558490b95 fix(test): adapt TokenController test to httpOnly cookie auth 2026-08-08 23:40:42 +08:00
pnoker a73ba1267a refactor(web,auth): httpOnly cookie auth + CSP + dedup + type debt
- token: httpOnly+Secure+SameSite cookie (backend Set/Clear + filter Cookie-first read), frontend axios drops X-Auth-Token, auth store uses sessionStorage flag, router guard checks flag
- security: CSP + nosniff + Referrer-Policy in index.html; delete dead getCookies/setCookies/removeCookies; remove Base64 obfuscation from storageUtil
- fix: 24 double-notification .catch failMessage removed (interceptor handles); storageUtil boolean get/set asymmetry fixed
- types: DeviceDetail/profile-detail/device-edit {} as any -> Partial<DeviceRecord>/DriverRecord/ProfileRecord
- dedup: API CRUD factory (11 modules), i18n confirmDelete interpolation (54 lines removed), CardShell unified + shared form-width mixin

Verification: vue-tsc green / 158 unit tests pass / mvn compile green
2026-08-08 18:40:58 +08:00
Henry Zhang 11fbf1d4bd feat(web): enable AI assistant with charted chat + enrich dashboard and entity data (#203)
AI assistant (was hidden in mock mode):
- Intercept /api/v3/agentic/chat/completions via a fetch mock (src/mock/fetch.ts); the assistant streams over raw fetch, not the axios adapter
- Keyword-aware scripted replies (temperature/energy/driver/point) emitting reasoning traces, text deltas and visualizations (line/area/column/bar/donut/stat/scatter)
- Show the assistant in mock builds (drop the isMock gate in Layout)
- Seed 4 multi-turn sessions (12 messages) with chart-bearing assistant replies + reasoning

Dashboard enrichment (home cards were sparse):
- Register the 8 insight endpoints the cards call (stream/device-stats/driver-stats/top/alert-aging/silent-sources/latency/activity) with realistic seed data so LiveDataFeed/AnalyticsTabs/SlaBadge/LatencyChart/ActivityHeatmap render content

Entity data (was thin):
- Drivers 8 -> 17, profiles 6 -> 14, points 18 -> 59, devices ~15 -> 65

Verification: vue-tsc green / 158 unit tests pass / build:mock succeeds
2026-08-08 00:39:41 +08:00
Henry Zhang 84110719ee feat(web): realistic mock demo + login-page entry and header icon fixes (#201)
Realistic mock:
- Generic CRUD registrar (crud.ts) + mutable in-memory db: full create/update/delete persistence for all entities
- Four structured seeds (auth/manager/data/agentic): real business data for 27 modules replacing the generic fallback stubs, with consistent relations
- Point-value 24h history curve (timeseries) + alarm/event/command history
- settings/business/agentic handlers covering all settings modules and special endpoints (tree/join queries)

Login page + header icons:
- Drop mock-mode pre-seeded token in main.ts and mock/index.ts so the demo starts at the login page (previously landed straight on home)
- Add Setting icon to the settings top-level menu (menuTree) and render icons on Layout dropdown sub-items (previously text-only)

Types: add [key:string]:unknown index signatures on entity interfaces in agentic.ts/common.ts (matches the existing DriverRecord convention)
Verification: vue-tsc green / 158 unit tests pass / build:mock succeeds / no internal address leaked in dist
2026-08-07 22:48:09 +08:00
pnokerandClaude Fable 5 c8e65ceafa ci(web): widen deploy-pages tolerance for Pages queue stalls
The first deploy after enabling the demo.dc3.site custom domain landed in
deployment_queued and was cancelled by the Pages backend. Bump error_count
(10→20) and timeout (10m→15m) so transient queue stalls can ride through
instead of aborting.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
v2026.8.6
2026-08-06 21:37:57 +08:00
Henry ZhangandClaude Fable 5 7802eeb999 feat(web): static mock demo deployable to demo.dc3.site (#199)
* feat(web): complete static mock demo for GitHub Pages

- register core/dashboard/dictionary handlers + seed data (driver/device/
  profile/point, dictionaries, dashboard stats/topology/alerts)
- fix router-guard timing: pre-seed auth at main.ts top level before router
  install, since the initial navigation runs as a microtask ahead of the
  async mock-chunk import
- hide agentic assistant in mock mode (its chat streams over raw fetch and
  bypasses the axios adapter)
- assetUrl helper for subpath-safe public assets
- GitHub Pages deploy workflow + public/CNAME (demo.dc3.site)
- unit tests covering the mock adapter

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(web): commit mock core handler skipped by core.* gitignore

The repo-root `core.*` rule (meant for JVM crash dumps) silently skipped
dc3-web/src/mock/handlers/core.ts during `git add`, so the PR build failed
type-check with "Cannot find module './handlers/core'". Force-add the file
and add a negation exception so it can't be dropped again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(web): drop `as never` cast in mock-adapter test

The AI guardrail forbids double-assertion / never-cast type laundering.
Use the real AxiosRequestConfig type and a single boundary cast to R
(the interceptor unwraps the envelope) instead of `request(config as never)`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 21:18:10 +08:00
Henry ZhangandClaude Fable 5 98d8eb80b1 refactor(api): type OAuth grant_type as proto enum (#198)
grant_type in GrpcMcpIntrospectDTO was a free-form string. Introduce
GrpcOAuthGrantType (GRPC_OAUTH_GRANT_TYPE_UNSPECIFIED / AUTHORIZATION_CODE
/ CLIENT_CREDENTIALS / REFRESH_TOKEN). Enum names are upper-case (Java
enum constants must be); the boundary converts to/from the lowercase
OAuth spec form (authorization_code) via toUpperCase / toLowerCase.
BO, DB and OAuth form parameter stay lowercase string.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 19:03:50 +08:00
Henry ZhangandClaude Fable 5 3f78487357 refactor(api): type MCP audit status as proto enum (#197)
audit status in GrpcMcpAuditCommand was a free-form string. Introduce
GrpcMcpAuditStatus (MCP_AUDIT_STATUS_UNSPECIFIED / SUCCESS / DENIED /
POLICY_DENIED / ERROR / UNKNOWN) — names match McpAuditStatusEnum values.
Server maps proto->DTO via name(); facade maps BO string->proto via
toGrpcAuditStatus. BO and DB stay string.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 18:21:20 +08:00
Henry ZhangandClaude Fable 5 4a69185d97 refactor(api): type MCP principal_type as proto enum (#196)
principal_type was a free-form string in GrpcMcpIntrospectDTO and
GrpcMcpAuditCommand. Introduce GrpcMcpPrincipalType
(MCP_PRINCIPAL_TYPE_UNSPECIFIED / USER / SERVICE_ACCOUNT / SYSTEM) —
names match PrincipalTypeEnum values, so the mapping is a direct
valueOf / name(). Server + facade convert at the proto boundary; BO,
gateway and HTTP header layer stay string.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 18:00:45 +08:00
Henry ZhangandClaude Fable 5 3a03962600 refactor(api): type MCP risk_level as proto enum (#195)
risk_level was a free-form string across GrpcMcpToolMetadataDTO,
GrpcMcpToolResolveDTO, GrpcMcpToolAuthorizeDTO and GrpcMcpAuditCommand.
Introduce GrpcMcpRiskLevel (MCP_RISK_LEVEL_UNSPECIFIED / LOW / MEDIUM /
HIGH) — names match McpRiskLevelEnum values, so the mapping is a direct
valueOf / name(). Server + facade convert at the proto boundary; the BO
and DB layer stay string.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 17:24:18 +08:00
Henry ZhangandClaude Fable 5 7c643a8e80 fix(api): dc3-api contract overhaul (auth JWT, history, presence, decision enum) (#193)
* fix(api): correct inverted enable_flag comment and document time unit

- tenant.proto enable_flag comment said "1 enabled, 0 disabled" but the
  actual EnableFlagEnum is ENABLE=0, DISABLE=1 — callers reading the
  comment would invert the flag. Correct it.
- base.proto create_time/operate_time are epoch milliseconds
  (LocalDateTimeUtil/Instant.toEpochMilli); document the unit so callers
  don't guess seconds vs millis.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(api): carry timestamp in point-value history; explicit bool presence

#5 Point-value history: the whole chain (proto -> gRPC server ->
PointValueService -> repository -> facades -> controller -> agentic tool)
returned List<String> and dropped create_time even though the DB row
already carried it. Switch to PointValueBO / FacadePointValueBO end to
end so callers receive each value with its timestamp.

#6 Field presence: GrpcR.ok and McpIntrospectDTO.active are now optional
bool, so "unset" is distinguishable from false on the wire.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(auth): unify JWT signing key, drop salt/password from token contract

The JWT signing key was per-principal — securityKey + ":" + salt, where
salt was the credential salt also carried through the gateway and the
token RPC. That makes the JWT key weak and widens salt exposure to every
gateway hop. Sign with the single configured securityKey (HS256) instead
and remove salt from the JWT path entirely:

- KeyUtil.generateToken/parserToken drop the salt parameter; the HMAC
  key is now just securityKey (must be >= 32 bytes for HS256).
- TokenService.generateToken/checkValid drop the salt parameter.
- token.proto GrpcLoginQuery drops salt and password — CheckValid only
  ever needed tenant, name and token.
- gateway FilterService, TokenGrpcFacade, TokenController adapted; the
  request header no longer feeds salt into validation.

The login-handshake salt (POST /token/salt, used to salt the password
client-side before verifyPassword) is unchanged — only the JWT signing
salt is removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(api): type MCP authorize decision as proto enum

The authorize-tool-call decision was a free-form string, so callers
could only compare it against literals with no compile-time check.
Introduce GrpcMcpDecision (MCP_DECISION_UNSPECIFIED / AUTHORIZED /
CONFIRM_REQUIRED / REJECTED) and type GrpcMcpToolAuthorizeDTO.decision
with it. Enum names match the existing auth-side literals, so the
mapping is a direct valueOf / name().

- McpRuntimeServer builds the enum via toGrpcDecision (unknown -> UNSPECIFIED).
- McpRuntimeGrpcFacade maps enum -> BO string via name().
- gateway unchanged: it receives the BO (string decision) through the facade.

The other string MCP fields (risk_level, status, grant_type,
principal_type) stay strings for now — their value sets are wider and
partly lowercase (OAuth grant_type), so they are a follow-up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(facade): align TokenLocalFacade with 3-arg checkValid (CI compile fix)

TokenLocalFacade (local impl) was missed when TokenFacade.checkValid
dropped salt; CI compiles facade-local-auth independently and caught
it. Align it + its test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 16:36:35 +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
Henry ZhangandClaude Fable 5 e2527af78d fix(agentic): run markdown sanitize test under jsdom (#176)
DOMPurify does not strip <script>/on* handlers under happy-dom (the
default vitest environment), so the "strips <script> tags" assertion
has been failing on main since the sanitizer switched to DOMPurify.
Production is unaffected — real browsers sanitize correctly. Pin this
single test file to jsdom via a per-file environment annotation and add
jsdom as a devDependency; all other tests stay on happy-dom.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 12:39:45 +08:00
Henry ZhangandClaude Fable 5 73ff48bcb9 style: reformat codebase (backend java/xml, docs, web) (#175)
* style(backend): reformat and rearrange java/xml sources

Apply code cleanup across dc3-common and dc3-driver: whitespace and
indent normalization, import sorting, member rearrangement, and javadoc
normalization. No semantic changes; compilation verified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* style(docs): reformat vitepress vue diagram components

Expand compact svg templates and normalize formatting across diagram
components, the seo module, and the theme stylesheet. No behavior
changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* style(docs): reformat markdown pages

Normalize markdown formatting. Restore the <script setup> component
imports that an earlier unused-import pass had wrongly stripped; every
<Diagram> tag now resolves to a backing import again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* style: reformat point view and trim pom whitespace

Normalize whitespace in the point view and drop trailing whitespace in
pom.xml. No behavior changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 12:13:36 +08:00
Henry ZhangandClaude Fable 5 7c76f19c1c build(deps): bump pnpm/action-setup to v6.0.10 (#171)
pnpm/action-setup was pinned to a commit running on the deprecated Node.js 20 runtime (GitHub forces Node 24 and emits a warning). Bump to v6.0.10 (0977fd9) which runs natively on Node 24, removing the deprecation warning. Updates docs.yml (1) + ci-web.yml (2).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 10:15:59 +08:00
Henry Zhang 22263fc48a fix(security): patch postcss/brace-expansion CVEs + link SECURITY.md (#168)
- VulnerabilitiesID: pnpm update postcss/brace-expansion (transitive)
  — dc3-web: postcss 8.5.19+/8.5.25, brace-expansion 2.1.4/5.0.9
  (CVE path-traversal / DoS); docs: postcss 8.5.25
- SecurityPolicyID: SECURITY.md add GitHub Security Advisory
  (private vulnerability reporting) link as preferred channel

Fixes 4 dependabot alerts (PostCSS ×2, brace-expansion ×2).
2026-08-05 01:46:00 +08:00
Henry ZhangandClaude Fable 5 4b8a18b100 fix(docs): restore 5-pillar nav and fix version switcher position (#167)
* fix(docs): restore consolidated 5-pillar navigation

The promote-develop-to-main merge (6a4bef72c) fused main's consolidated 5-pillar nav with develop's flat 6-pillar layout into 7 scattered pillars, undoing the consolidation in 261af5721.

Restore the 5-pillar design: architecture absorbs the Overview pillar (project-overview group); operations merges into Develop (运营 + deploy-ops groups); AI stands alone; quickstart moves under Develop. Drop the now-unused pillar.overview/pillar.operations i18n keys, which also removes the overview/operations English fallback in the header.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(docs): position version switcher between lang and theme toggles

The version switcher is injected via the nav-bar-content-after slot and rendered after the social links at the far right. Add flex order on desktop (>=960px) so it sits between the language switcher and the appearance toggle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 01:29:39 +08:00
Henry Zhang 49218df853 Merge pull request #164 from pnoker/chore/promote-develop-main-3
chore: promote develop → main (quality #160-163)
v2026.8.3
2026-08-03 23:23:24 +08:00
pnoker 056bd9ae21 Merge remote-tracking branch 'origin/develop' into chore/promote-develop-main-3 2026-08-03 21:57:03 +08:00
Henry Zhang 00c67406b0 refactor(quality): fix unused-param/confusing-sig/local-temp/js-comparison (12) (#163)
- unused-parameter (7 private/non-override): drop unused params in
  Snmp getConnector/buildTarget, Sl651 handleSl651Message,
  PointCommandValidator.validateWriteValue, TypedValueConverter
  finiteFloat/finiteDouble (+ cascade callers). 3 interface default
  methods kept (contract).
- confusing-method-signature (1): AuthenticGatewayFilterFactory
  <Object> → dedicated Config type; apply(Object)→apply(Config)
- local-temp-file-info-disclosure (1): FileUtil creates temp dirs
  with owner-only rwx------ via PosixFilePermissions (Windows fallback)
- js/comparison-between-incompatible-types (1): isNull drop redundant
  val === undefined (== null loose already covers it)

Behavior-preserving. Compile + test-compile clean.
2026-08-03 21:55:13 +08:00
Henry Zhang 4e2c5bc770 refactor(quality): fix 27 medium-risk CodeQL alerts (null/exception/boundary/exposure) (#162)
- non-null-boxed (7): GroupServiceImpl extract Byte→byte; DashboardServiceImpl
  Long→long for primitive id fields
- uncaught-number-format (7): try-catch parse failures in FINS/EthernetIP/BACnet/
  Dashboard (fall back to 0 / skip, matching existing pattern); remove dead
  unreachable outer catch in BACnet
- dereferenced-null (4): DeviceMetadata expand MapUtils.isEmpty to explicit
  null check for short-circuit clarity
- ignored-error-status (4): ConcurrentLinkedQueue.offer→add (unbounded, offer
  always true; add's boolean is "modified", not error)
- index-out-of-bounds (2): orderedMap(Object...) guard odd-length → IAE
- internal-rep-exposure (3): CoverageGapVO/Pages/DriverMetadata return
  unmodifiable views + addX/removeX mutators; migrate all callers + tests

Behavior-preserving. Compile clean (except bacnet4j pre-existing mirror miss).
2026-08-03 21:49:22 +08:00
Henry Zhang 8531e3b872 refactor(quality): migrate 23 deprecated API calls (#161)
- commons-lang3 3.20: StringUtils.equals/equalsIgnoreCase/contains/
  startsWith/removeEnd → Strings.CS/CI (16 calls)
- Jackson 2.19+: JsonNode.fields() → properties() (4, McpOpenApiAggregator)
- Spring AI 2.0: ToolCallAdvisor → ToolCallingAdvisor;
  toolCallbacks(provider) → tools(provider) (3, + tests)

Behavior-preserving. Compile clean.
2026-08-03 21:49:08 +08:00
Henry Zhang 852f0682d3 refactor(quality): fix 21 low-risk CodeQL quality alerts (#160)
- local-variable-is-never-read (3): dead host/port/database locals in
  AbstractJdbcDriverCustomService (subclasses read config themselves)
- unused-container (2): unused `valid` set in AlarmRuleTriggerServiceImpl;
  unused driverSenderService field/ctor param in CanDriver (+ test)
- unknown-javadoc-parameter (12): dangling ctor Javadoc on
  @RequiredArgsConstructor classes / stale @param
- call-to-object-tostring (3): @ToString on MessageHeader (root cause);
  field-log MetadataEventDTO instead of hash
- constant-comparison (1): DriverInitRunner == → >= (defensive)

No behavior change. Compile clean (agentic/can/data/auth/mqtt/driver/sql).
2026-08-03 21:49:03 +08:00
Henry Zhang 7ec7aa94ad Merge pull request #159 from pnoker/chore/promote-develop-main-2
chore: promote develop → main (security #157/#158, ci #155, setup #152/#153)
2026-08-03 20:32:42 +08:00
pnoker 4cd16d23d1 Merge remote-tracking branch 'origin/develop' into chore/promote-develop-main-2 2026-08-03 20:24:41 +08:00
Henry Zhang fa1cd49bac fix(security): harden log-injection + CAN command injection (#158)
* fix(security): sanitize agentic assistant HTML with DOMPurify (XSS)

RenderedAssistantMessage rendered model output via v-html after a
hand-rolled regex sanitizer that CodeQL flagged 5 ways: bad-tag-filter,
incomplete-multi-character-sanitization (on* attributes, javascript:),
incomplete-url-scheme-check (data:/vbscript:). Replace with DOMPurify,
which covers all these plus mutation XSS. Fixes CodeQL #2146-2150.

* fix(security): harden log-injection + CAN command injection

log-injection (7): pass user-derived log args (conversationId, model,
candidate/fallback) through LogSanitizer.sanitize in AgenticChatServiceImpl,
ChatClientFactory, AgenticChatRequestPreparer — strips CR/LF that could
forge log lines.

relative-path-command / command injection (2, CanDriver): executeCommand
runs `sh -c` with a command built from driver config (interfaceName) and
request data (canId/frame), so add a CAN_COMMAND_PATTERN whitelist
(^[A-Za-z0-9 _#,.=%/-]+$) rejecting shell metacharacters, and validate
interfaceName against ^[A-Za-z0-9_]+$ at all 3 entry points. Fixes
CodeQL #2173,#2172,#2120,#1514,#1513,#1022,#1017,#1016,#1014.

Verified: mvn compile agentic+can clean.
2026-08-03 19:46:42 +08:00
Henry Zhang 67526972aa fix(security): sanitize agentic assistant HTML with DOMPurify (XSS) (#157)
RenderedAssistantMessage rendered model output via v-html after a
hand-rolled regex sanitizer that CodeQL flagged 5 ways: bad-tag-filter,
incomplete-multi-character-sanitization (on* attributes, javascript:),
incomplete-url-scheme-check (data:/vbscript:). Replace with DOMPurify,
which covers all these plus mutation XSS. Fixes CodeQL #2146-2150.
2026-08-03 19:46:35 +08:00
7e116b9062 build(deps-dev): bump eslint-plugin-vue in /dc3-web (#140)
Bumps [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) from 10.9.2 to 10.10.0.
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Changelog](https://github.com/vuejs/eslint-plugin-vue/blob/master/CHANGELOG.md)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v10.9.2...v10.10.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-vue
  dependency-version: 10.10.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
Co-authored-by: pnoker <pnokers@gmail.com>
2026-08-03 14:36:11 +08:00
Henry Zhang 8ec3d38043 ci(backend): run backend CI on every PR (fix required-checks BLOCKED) (#155)
ci-backend.yml ignored dc3-web paths on pull_request, so npm-only
dependabot PRs never triggered backend CI — but compile/Unit/Integration/
coverage are required status checks, leaving those PRs perpetually
BLOCKED (had to --admin merge). Drop the pull_request paths-ignore so
every PR runs backend CI; keep it on push (a dc3-web-only push still
skips backend CI, which is fine — the PR already ran it).
2026-08-03 14:23:49 +08:00
Henry Zhang 4dd477163e build(deps): bump californium 4.0.0-M3 → 4.0.0-M6 + adapt CoapExchange import (#156)
M6 relocated CoapExchange from core.server.resources to core (verified
via compile). dc3-driver-coap uses only the core CoAP API
(CoapClient/Server/Endpoint/Resource/Configuration) and avoids the
DTLS/observe/MessageObserver areas where M3→M6 broke, so this single
import is the whole adaptation. Supersedes dependabot #81.

Gains: M4-M6 bugfixes (deferred CID records, CON notify reliability,
anonymous cipher-suite), Java 21 virtual-thread support, RFC 7252
compliance. 4.0.0 GA has no timeline; no reason to stall on M3.
2026-08-03 14:23:28 +08:00
dependabot[bot] f817ce4e28 build(deps): bump actions/setup-node from 6.5.0 to 7.0.0 (#153)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.5.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/249970729cb0ef3589644e2896645e5dc5ba9c38...820762786026740c76f36085b0efc47a31fe5020)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-03 13:32:43 +08:00
dependabot[bot] 7cf76107c9 build(deps): bump actions/setup-java from 4.8.0 to 5.7.0 (#152)
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4.8.0 to 5.7.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/c1e323688fd81a25caa38c78aa6df2d33d3e20d9...b6effb05e454b25005698d916606bdc6ffcbf961)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.7.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-08-03 13:32:38 +08:00
Henry Zhang 5e0003f019 build(deps): bump mybatis-plus 3.5.16 → 3.5.17 + adapt IService/ServiceImpl imports (#154)
mybatis-plus 3.5.17 fixes the JDK 9+ split-package conflict (#7027) by
relocating service classes from com.baomidou.mybatisplus.extension.service
to com.baomidou.mybatisplus.spring.service. Verified via the 3.5.17 jar:
only IService and ServiceImpl moved — Page, JacksonTypeHandler, chain
wrappers, Db, interceptors all stay in extension. Updated 112 imports.
Supersedes dependabot #141 (which failed compile on the same move).

Verified: mvn compile clean across every IService module (bacnet4j driver
excluded only due to a local mirror cache miss, unrelated to this change).
2026-08-03 13:31:22 +08:00
dependabot[bot]andHenry Zhang 231a44e3cb build(deps): bump com.squareup.okhttp3:okhttp-bom from 5.3.2 to 5.4.0 (#142)
Bumps [com.squareup.okhttp3:okhttp-bom](https://github.com/square/okhttp) from 5.3.2 to 5.4.0.
- [Changelog](https://github.com/lysine-dev/okhttp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/okhttp/compare/parent-5.3.2...parent-5.4.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp-bom
  dependency-version: 5.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:22:39 +08:00
dependabot[bot]andHenry Zhang ba2c522280 build(deps): bump actions/upload-pages-artifact from 3.0.1 to 5.0.0 (#135)
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3.0.1 to 5.0.0.
- [Release notes](https://github.com/actions/upload-pages-artifact/releases)
- [Commits](https://github.com/actions/upload-pages-artifact/compare/56afc609e74202658d3ffba0e8f6dda462b719fa...fc324d3547104276b827a68afc52ff2a11cc49c9)

---
updated-dependencies:
- dependency-name: actions/upload-pages-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:22:35 +08:00
dependabot[bot]andHenry Zhang 344e1b1072 build(deps): bump docker/metadata-action from 5.10.0 to 6.2.0 (#130)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.10.0 to 6.2.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/c299e40c65443455700f0fdfc63efafe5b349051...dc802804100637a589fabce1cb79ff13a1411302)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 6.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:22:30 +08:00
dependabot[bot]andHenry Zhang 152d6e9bf5 build(deps-dev): bump sass from 1.101.0 to 1.102.0 in /dc3-web (#139)
Bumps [sass](https://github.com/sass/dart-sass) from 1.101.0 to 1.102.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.101.0...1.102.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.102.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:11:56 +08:00
dependabot[bot]andHenry Zhang 69c43f3203 build(deps-dev): bump @playwright/test from 1.61.1 to 1.62.0 in /dc3-web (#138)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.61.1 to 1.62.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.61.1...v1.62.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-version: 1.62.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:11:52 +08:00
dependabot[bot]andHenry Zhang cce10d17e5 build(deps-dev): bump globals from 17.7.0 to 17.8.0 in /dc3-web (#137)
Bumps [globals](https://github.com/sindresorhus/globals) from 17.7.0 to 17.8.0.
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.7.0...v17.8.0)

---
updated-dependencies:
- dependency-name: globals
  dependency-version: 17.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:11:47 +08:00
dependabot[bot]andHenry Zhang e18dbef8d9 build(deps): bump tools.jackson.core:jackson-databind (#136)
Bumps [tools.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 3.1.4 to 3.1.5.
- [Commits](https://github.com/FasterXML/jackson/commits)

---
updated-dependencies:
- dependency-name: tools.jackson.core:jackson-databind
  dependency-version: 3.1.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:05:53 +08:00
dependabot[bot]andHenry Zhang 9b61f5720a build(deps): bump softprops/action-gh-release (#134)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from c12583777ecdfd3be55c69cf75464299dc01057e to 3d0d9888cb7fd7b750713d6e236d1fcb99157228.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/c12583777ecdfd3be55c69cf75464299dc01057e...3d0d9888cb7fd7b750713d6e236d1fcb99157228)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-version: 3d0d9888cb7fd7b750713d6e236d1fcb99157228
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:05:49 +08:00
dependabot[bot]andHenry Zhang 02b8bf95af build(deps): bump ossf/scorecard-action (#131)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 99c09fe975337306107572b4fdf4db224cf8e2f2 to 4eaacf0543bb3f2c246792bd56e8cdeffafb205a.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/99c09fe975337306107572b4fdf4db224cf8e2f2...4eaacf0543bb3f2c246792bd56e8cdeffafb205a)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 4eaacf0543bb3f2c246792bd56e8cdeffafb205a
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henry Zhang <pnokers@icloud.com>
2026-08-03 12:05:45 +08:00
Henry Zhang 8a333a2791 chore(ci): route dependabot PRs to develop (#151)
dependabot.yml had no target-branch, so updates targeted the default
branch (main). main is the release branch and was red — compiler fixes
lived only on develop — which left every open dependabot PR BLOCKED.
Set target-branch: develop on all five ecosystems so upgrades land on
the integration branch first, get validated, then promote to main.
2026-08-03 11:52:54 +08:00
Henry Zhang bb0f40bde8 Merge pull request #150 from pnoker/chore/promote-develop-to-main
chore: promote develop → main (sync CI fixes, fuse docs nav)
2026-08-03 11:51:11 +08:00
pnoker 6a4bef72c5 chore: promote develop to main and fuse docs navigation
Brings develop's compiler/CI fixes into main (main was red; the fixes
in PR#88-91 lived only on develop). This unblocks the dependabot PRs
that target main.

Resolves the docs/.vitepress/config.mts merge conflict by fusing both
navigation designs into 7 pillars (总览·架构·驱动·AI·基础·开发·运维):
develop's overview/operations pillars + main's standalone AI pillar.
- Keeps develop's version-switcher (version.mts/VersionSwitcher/VersionBanner)
- AdSense stays dropped per main's earlier perf decision (drop AdSense)
- technology-stack remains under 开发, since the develop-side rename to
  introduction/ was not carried through the merge (file still at development/)
2026-08-03 11:24:25 +08:00
pnoker a1876727d1 refactor(data): remove PointValueJob, hand ingestion to buffer
Point-value ingestion is now driven by PointValueIngestBuffer workers, so the Quartz 5s tick job is removed; ScheduleForDataServiceImpl only registers the hourly maintenance job; HourlyJobForData test migrated to its own file.
v2026.7.27
2026-07-27 01:34:34 +08:00
pnoker 6293bbdd19 refactor(data): route point value ingestion through bounded buffer
PointValueReceiver offers every message to PointValueIngestBuffer (ack on accept, nack-requeue when full) and switches to the high-throughput listener container factory; drops the speed-threshold dual path.
2026-07-27 01:34:34 +08:00
pnoker f8ddcf5877 feat(data): add PointValueIngestBuffer with bounded queue and backpressure
Bounded ArrayBlockingQueue plus worker threads draining on a size-or-time trigger; offer returns false when full so the receiver can nack-requeue; a failed save re-queues the batch for retry. PointValueServiceImpl.savePointValuesToRepository wraps failures into RepositoryException so the buffer can re-queue instead of silently dropping.
2026-07-27 01:34:33 +08:00
pnoker c02fc3b3fb refactor(data): extend PointBatchProperties for bounded ingest buffer
Replace speed/interval threshold with queueCapacity, batchSize, flushIntervalMillis and workerCount for the new bounded ingest buffer.
2026-07-27 01:34:32 +08:00
pnoker 18eac7871a test(driver): add point value buffer unit tests
PointValueBufferTest covers CRUD/eviction with temp SQLite; BufferServiceImplTest mocks RabbitTemplate for offer/republish/backoff/disabled
2026-07-26 00:13:31 +08:00