4.7 KiB
v3 Batch 1 — greenfield schema + RawPath identity rewiring
Branch: v3/batch1-schema-identity → master
Plan: docs/plans/2026-07-15-v3-batch1-schema-identity-plan.md · Design: docs/plans/2026-07-15-raw-uns-two-subtree-v3-design.md
Greenfield, compatibility-breaking. The config schema and every identity seam now speak RawPath
(<Folder/…>/<Driver>/<Device>/<TagGroup/…>/<Tag>). The full solution builds and all macOS-safe
tests pass; the OPC UA address space is deliberately dark (drivers connect, no tag variables
materialize) until Batch 4.
What changed
- Schema (greenfield): new
RawFolder/TagGroup/UnsTagReference; reshapedDriverInstance(−NamespaceId, +RawFolderId?),Tag(raw-only: reqDeviceId, +TagGroupId?, −DriverInstanceId/EquipmentId/FolderPath, keptWriteIdempotent),Equipment(−driver/device binding);Namespace/NamespaceKind/EquipmentImportBatchretired. Single squashedV3Initialmigration (stored procs audited — the vestigial generation-model procs were rewritten to v3-valid stubs;sp_ComputeGenerationDiffdiffs the new tables). - Identity: new
Commons/Types/RawPaths.cshelper;TagConfigIntentshedsFullName;EquipmentTagRefResolver<TDef>is byName(RawPath)-only (blob-fallback deleted); newRawTagEntry(RawPath, TagConfig, WriteIdempotent, DeviceName)delivery record. All 8 drivers re-keyed: the per-driver*EquipmentTagParserbecame*TagDefinitionFactory.FromTagConfig, optionsTags→RawTags,TagConfigkey normalization (nodeId/attributeRef;deviceHostAddressdropped). - Endpoint → DeviceConfig: new
DriverDeviceConfigMerger(Commons) merges DriverConfig + per-device DeviceConfig; multi-device drivers reconstruct theirDevices[]from Device rows; the artifact injects the merged config +rawTagsat spawn. - Pipeline:
ConfigComposersnapshots the new tables;DeploymentArtifactflattens per-driverRawTagEntrylists keyed by RawPath (viaRawPathResolver) + emits an empty (dark) equipment-tag plan set;AddressSpaceComposer/walker compose folders + VirtualTags + ScriptedAlarms only;DriverHostActormaps re-keyed to RawPath;DraftValidatorgainsRawNameInvalid/HistorianTagnameTooLong/UnsEffectiveNameCollision. - AdminUI (compile-only stubs): Namespace pages → retired banners; driver pages dropped the
pre-declared Tags editor + NamespaceId;
UnsTreeServicetag-authoring returns "moved to the Raw tree (/raw) in v3 Batch 2". (Batch 2/3 build the real/raw+ reference UI.)
Verification gate (all four items)
- Build + test green. Full solution builds (0 errors). macOS-safe unit suites: Commons 196, Core 260, Core.Abstractions 134, Configuration 107, Runtime 355 (42 dark-Batch-4 skips), ControlPlane 78, OpcUaServer 335 (4 skips), AdminUI 507 (3 skips), + all 8 driver unit suites (Modbus 315, S7 264, AbCip 342, AbLegacy 213, TwinCAT 192, FOCAS 272, OpcUaClient 138, Galaxy 313) and the 6 driver IntegrationTests projects compile. Enum-serialization round-trip coverage preserved.
- Fresh-DB migration.
V3Initialapplies clean to a scratch DB;SchemaComplianceTests8/8. - docker-dev boot (live). Volume wiped →
V3Initialapplied → both central nodes reached Akka Up → a seeded Modbus driver spawned and connected to the10.100.0.35:5020fixture (DriverInstance MAIN-modbus: connected), deployment sealed (acks=2); AdminUI HTTP 200 on/,/clusters,/unswith 0 unhandled exceptions. - Dark address space (Client.CLI browse). Recursive browse of
opc.tcp://localhost:4840: the raw tagHR200and the driver have 0 occurrences; the custom namespacens=2holds only the emptyOtOpcUaroot — no authored variables materialize (Batch 4 lights them up).
AdminUI Batch-1 stubs (Batch 2/3 replace)
Namespace pages (NamespaceEdit, ClusterNamespaces) → banners; the 8 driver pages' pre-declared Tags
editors + Namespace bindings removed; DriverIdentitySection Namespace dropdown removed;
UnsTreeService.CreateTagAsync/UpdateTagAsync return the "moved to /raw" failure; per-equipment tag
lists empty.
Deferred (owned by later batches, not regressions)
/rawproject tree + reference-picker UI, dualns=Raw/ns=UNSnamespaces + tag-variable materialization,{{equip}}reference-relative resolution — Batches 2–4 (address space intentionally dark now).- User-facing docs beyond the
Configuration.mdv3 note (they describe the not-yet-built UI/address space) — updated as Batches 2–4 land. - Live driver IntegrationTests + one pre-existing
AbCip_Green_AgainstSimfixture-probe failure (AB CIP sim handshake — environment/fixture gate, untouched).