docs(plans): scrub LmxProxy references from design plans
Remove the LmxProxy work package (WP-8) from phase-3b, the CD-DCL-1..6 protocol details, Q9/Q-P3B-2 from the questions log, the LmxProxy component-design rows in requirements-traceability, and the inline mentions across phase-0, phase-4, the gRPC streaming plans, and the primary/backup data-connection plans.
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
Phase 3B brings the site cluster to life as a fully operational data collection, scripting, alarm evaluation, and health reporting platform. Upon completion, a site can:
|
||||
|
||||
- Communicate bidirectionally with the central cluster using all 8 message patterns.
|
||||
- Connect to OPC UA servers and LmxProxy endpoints, subscribe to tags, and deliver values to Instance Actors.
|
||||
- Connect to OPC UA servers, subscribe to tags, and deliver values to Instance Actors.
|
||||
- Execute scripts in response to triggers (interval, value change, conditional).
|
||||
- Evaluate alarm conditions, manage alarm state, and execute on-trigger scripts.
|
||||
- Compile and execute shared scripts inline.
|
||||
@@ -25,7 +25,7 @@ Phase 3B brings the site cluster to life as a fully operational data collection,
|
||||
| Component | Scope |
|
||||
|-----------|-------|
|
||||
| Central-Site Communication | Full — all 8 message patterns, correlation IDs, per-pattern timeouts, transport heartbeat |
|
||||
| Data Connection Layer | Full — IDataConnection, OPC UA adapter, LmxProxy adapter, connection actor, auto-reconnect, write-back, tag path resolution, health reporting |
|
||||
| Data Connection Layer | Full — IDataConnection, OPC UA adapter, connection actor, auto-reconnect, write-back, tag path resolution, health reporting |
|
||||
| Site Runtime | Full runtime — Script Actor, Alarm Actor, shared scripts, Script Runtime API (core operations), script trust model, site-wide Akka stream |
|
||||
| Health Monitoring | Site-side collection + central-side aggregation and offline detection |
|
||||
| Site Event Logging | Event recording, retention/purge, remote query with pagination |
|
||||
@@ -66,8 +66,8 @@ Each bullet extracted from docs/requirements/HighLevelReqs.md at the individual
|
||||
|
||||
### Section 2.4 — Data Connection Protocols
|
||||
|
||||
- [ ] `[2.4-1]` System supports OPC UA and LmxProxy (gRPC-based custom protocol with existing client SDK).
|
||||
- [ ] `[2.4-2]` Both protocols implement a common interface supporting: connect, subscribe to tag paths, receive value updates, and write values.
|
||||
- [ ] `[2.4-1]` System supports OPC UA.
|
||||
- [ ] `[2.4-2]` Protocol adapters implement a common interface supporting: connect, subscribe to tag paths, receive value updates, and write values.
|
||||
- [ ] `[2.4-3]` Additional protocols can be added by implementing the common interface.
|
||||
- [ ] `[2.4-4]` Data Connection Layer is a clean data pipe — publishes tag value updates to Instance Actors but performs no evaluation of triggers or alarm conditions.
|
||||
|
||||
@@ -221,15 +221,6 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
- [ ] `[KDD-ui-4]` Dead letter monitoring as a health metric.
|
||||
- [ ] `[KDD-ui-5]` Site Event Logging: 30-day retention, 1GB storage cap, daily purge, paginated queries with keyword search.
|
||||
|
||||
### LmxProxy Protocol Details
|
||||
|
||||
- [ ] `[CD-DCL-1]` LmxProxy: gRPC/HTTP/2 transport, protobuf-net code-first, port 5050.
|
||||
- [ ] `[CD-DCL-2]` LmxProxy: API key auth, session-based (SessionId), 30s keep-alive heartbeat via `GetConnectionStateAsync`.
|
||||
- [ ] `[CD-DCL-3]` LmxProxy: Server-streaming gRPC for subscriptions (`IAsyncEnumerable<VtqMessage>`), 1000ms default sampling, on-change with 0.
|
||||
- [ ] `[CD-DCL-4]` LmxProxy: SDK retry policy (exponential backoff via Polly) complements DCL's fixed-interval reconnect. SDK handles operation-level transient failures; DCL handles connection-level recovery.
|
||||
- [ ] `[CD-DCL-5]` LmxProxy: Batch read/write capabilities (ReadBatchAsync, WriteBatchAsync, WriteBatchAndWaitAsync).
|
||||
- [ ] `[CD-DCL-6]` LmxProxy: TLS 1.2/1.3, mutual TLS (client cert + key PEM), custom CA trust, self-signed for dev.
|
||||
|
||||
### Communication Component Design
|
||||
|
||||
- [ ] `[CD-Comm-1]` 8 distinct message patterns: Deployment, Instance Lifecycle, System-Wide Artifact, Integration Routing, Recipe/Command Delivery, Debug Streaming, Health Reporting, Remote Queries.
|
||||
@@ -282,7 +273,6 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
- [ ] `[CD-DCL-12]` Value update message format: tag path, value, quality (good/bad/uncertain), timestamp.
|
||||
- [ ] `[CD-DCL-13]` When Instance Actor stopped, DCL cleans up associated subscriptions.
|
||||
- [ ] `[CD-DCL-14]` On redeployment, subscriptions established fresh based on new configuration.
|
||||
- [ ] `[CD-DCL-15]` LmxProxy connection actor holds SessionId, starts 30s keep-alive timer on Connected state. On keep-alive failure, transitions to Reconnecting, client disposes subscriptions.
|
||||
|
||||
---
|
||||
|
||||
@@ -411,30 +401,6 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
|
||||
---
|
||||
|
||||
### WP-8: Data Connection Layer — LmxProxy Adapter
|
||||
|
||||
**Description**: Implement the LmxProxy adapter wrapping the existing `LmxProxyClient` SDK behind IDataConnection.
|
||||
|
||||
**Acceptance Criteria**:
|
||||
- Implements all IDataConnection methods mapped per docs/requirements/Component-DCL concrete type mappings.
|
||||
- Connect: calls `ConnectAsync`, stores SessionId.
|
||||
- Subscribe: calls `SubscribeAsync`, processes `IAsyncEnumerable<VtqMessage>` stream, forwards updates.
|
||||
- Write: calls `WriteAsync`.
|
||||
- Read: calls `ReadAsync`.
|
||||
- Configurable sampling interval (default 1000ms, 0 = on-change).
|
||||
- gRPC/HTTP/2 transport on configured port (default 5050).
|
||||
- API key authentication passed in ConnectRequest.
|
||||
- TLS support: TLS 1.2/1.3, mutual TLS, custom CA trust, self-signed for dev.
|
||||
- 30s keep-alive heartbeat via `GetConnectionStateAsync`. On failure, marks disconnected, disposes subscriptions.
|
||||
- SDK retry policy (Polly exponential backoff) retained for operation-level transient failures.
|
||||
- Batch operations exposed (ReadBatchAsync, WriteBatchAsync) for future use.
|
||||
|
||||
**Estimated Complexity**: L
|
||||
|
||||
**Requirements Traced**: `[2.4-1]`, `[2.4-2]`, `[CD-DCL-1]`, `[CD-DCL-2]`, `[CD-DCL-3]`, `[CD-DCL-4]`, `[CD-DCL-5]`, `[CD-DCL-6]`, `[CD-DCL-15]`
|
||||
|
||||
---
|
||||
|
||||
### WP-9: Data Connection Layer — Auto-Reconnect & Bad Quality Propagation
|
||||
|
||||
**Description**: Implement auto-reconnection at fixed interval with immediate bad quality propagation on disconnect.
|
||||
@@ -460,7 +426,6 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
**Acceptance Criteria**:
|
||||
- After reconnection, all subscriptions that were active before disconnect are re-subscribed.
|
||||
- Instance Actors require no action — they see quality return to good as fresh values arrive.
|
||||
- LmxProxy adapter: new session established, new subscriptions created (old session/subscriptions were disposed on disconnect).
|
||||
- OPC UA adapter: new session established, monitored items re-created.
|
||||
- Test: disconnect OPC UA server, reconnect, verify values resume without Instance Actor intervention.
|
||||
|
||||
@@ -476,7 +441,7 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
|
||||
**Acceptance Criteria**:
|
||||
- Instance Actor sends write request to DCL when script calls SetAttribute for data-connected attribute.
|
||||
- DCL writes value via appropriate protocol (OPC UA Write / LmxProxy WriteAsync).
|
||||
- DCL writes value via the appropriate protocol (e.g., OPC UA Write).
|
||||
- Write failure (connection down, device rejection, timeout) returned synchronously to calling script.
|
||||
- Successful write: in-memory value NOT optimistically updated. Value updates only when device confirms via existing subscription.
|
||||
- Write failures also logged to Site Event Logging.
|
||||
@@ -531,7 +496,7 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
- Tag value updates delivered directly to requesting Instance Actor.
|
||||
- When Instance Actor stopped (disable, delete, redeployment): DCL cleans up associated subscriptions.
|
||||
- On redeployment: subscriptions established fresh based on new configuration.
|
||||
- Protocol-agnostic — works for both OPC UA and LmxProxy.
|
||||
- Protocol-agnostic — works for OPC UA and any future protocol adapter.
|
||||
|
||||
**Estimated Complexity**: M
|
||||
|
||||
@@ -896,7 +861,7 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
|
||||
**Acceptance Criteria**:
|
||||
- IDataConnection interface defined in Commons (Phase 0 — REQ-COM-2).
|
||||
- OPC UA adapter and LmxProxy adapter both implement IDataConnection.
|
||||
- The OPC UA adapter implements IDataConnection.
|
||||
- Connection actor instantiates the correct adapter based on data connection protocol type from configuration.
|
||||
- Adding a new protocol requires only implementing IDataConnection and registering the adapter — no changes to connection actor or Instance Actor.
|
||||
|
||||
@@ -933,7 +898,6 @@ Constraints from CLAUDE.md Key Design Decisions (KDD) and Component-*.md (CD) th
|
||||
|------|---------------|
|
||||
| Connection Actor | State machine transitions (Connecting -> Connected -> Reconnecting), stash/unstash behavior, bad quality propagation on disconnect |
|
||||
| OPC UA Adapter | IDataConnection contract compliance, subscribe/unsubscribe, write |
|
||||
| LmxProxy Adapter | IDataConnection contract compliance, SessionId management, keep-alive, subscription stream processing |
|
||||
| Script Actor | Trigger evaluation (interval, value change, conditional), minimum time between runs, concurrent execution |
|
||||
| Alarm Actor | Condition evaluation (Value Match, Range Violation, Rate of Change), state transitions (normal->active, active->normal), no script on clear |
|
||||
| Script Runtime API | GetAttribute, SetAttribute (data-connected + static), CallScript, CallShared |
|
||||
@@ -1003,7 +967,6 @@ Phase 3B is complete when ALL of the following pass:
|
||||
| # | Question | Context | Impact | Status |
|
||||
|---|----------|---------|--------|--------|
|
||||
| Q-P3B-1 | What is the exact dedicated blocking I/O dispatcher configuration for Script Execution Actors? | KDD-runtime-3 says "dedicated blocking I/O dispatcher" — need Akka.NET HOCON config (thread pool size, throughput settings). | WP-15. Sensible defaults can be set; tuned in Phase 8. | Deferred — use Akka.NET default blocking-io-dispatcher config; tune during Phase 8 performance testing. |
|
||||
| Q-P3B-2 | Should LmxProxy adapter expose WriteBatchAndWaitAsync (write-and-poll handshake) through IDataConnection or as a protocol-specific extension? | CD-DCL-5 lists WriteBatchAndWaitAsync but IDataConnection only defines simple Write. | WP-8. Does not block core functionality. | Deferred — expose as protocol-specific extension method; not part of IDataConnection core contract. |
|
||||
| Q-P3B-3 | What is the Rate of Change alarm evaluation time window? | Section 3.4 says "changes faster than a defined threshold" but does not specify the time window (per-second? per-minute? configurable?). | WP-16. Needs a design decision for the evaluation algorithm. | Deferred — implement as configurable window (default: per-second rate). Document in alarm definition schema. |
|
||||
| Q-P3B-4 | How does the health report sequence number behave across failover? | Sequence number is monotonic within a singleton lifecycle. After failover, the new singleton starts at 1. Central must handle this. | WP-27, WP-28. Central should accept any report from a site marked offline regardless of sequence number. | Resolved in design — central accepts report when site is offline; for online sites, requires seq > last. On failover, site goes offline first (missed reports), so the reset is naturally handled. |
|
||||
|
||||
@@ -1123,7 +1086,6 @@ Codex received work package titles (not full acceptance criteria due to prompt s
|
||||
| 9 | UTC timestamps not covered | **False positive** — UTC is a Phase 0 convention (KDD-data-6). Message contracts in WP-1 specify "All timestamps in message contracts are UTC." Health report in WP-27 specifies "UTC from site clock." |
|
||||
| 10 | Event log schema and active-node behavior uncovered | **False positive** — WP-29 acceptance criteria list full schema and "Only active node generates and stores events. Event logs not replicated to standby." |
|
||||
| 11 | Remote query filters/pagination details uncovered | **False positive** — WP-31 acceptance criteria list all filter types, "default 500 events," and "continuation token." |
|
||||
| 12 | LmxProxy details uncovered in WP-8 | **False positive** — WP-8 acceptance criteria explicitly cover port, API key, SessionId, keep-alive, TLS, batch ops, Polly retry. |
|
||||
|
||||
### Step 2 — Negative Requirement Review
|
||||
|
||||
|
||||
Reference in New Issue
Block a user