MTConnect driverDataType is a second, runtime-preferred spelling the AdminUI editor neither reads nor writes #550
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during #549.
MTConnectTagDefinitionFactoryreadsdriverDataTypeat HIGHER precedence thandataType(~line 78), butMTConnectTagConfigModelonly reads/writesdataType. Consequences: (1) a blob carrying"driverDataType": "Strng"is still accepted at authoring while the runtime rejects the tag — the residual slice of #549; (2) worse, a VALIDdriverDataTypesilently overrides whatever type the editor displays and saves, so the editor shows a lie.Fix must do BOTH halves together: read both spellings in runtime precedence order in
FromJson, and normalise ontodataTypeinToJson(dropping the alias), exactly as the model already does fordataItemId/address. Doing only one half silently retypes existing tags on their next save.FIXED — merged to master as
b50523b1(branch commits8971861b+a486a009).MTConnectTagConfigModelnow mirrors the runtime exactly, both halves in one commit:DataTypeKeys = ["driverDataType", "dataType"]walked with the runtime'sFirstNonBlankper-key semantics — absent/null/blank falls through, a NON-string token STOPS (the runtime'sstring?DTO deserialise throws on it, so it can never fall through), first non-blank string wins. Both the displayedDataTypeand theValidate()-judged raw token come from this one read.ToJson()drops every non-canonicalDataTypeKeysentry (loop keyed off the same array as the read, so a third spelling can never be read-but-not-dropped) and writesdataTypeas the enum name.driverDataType "Strng"…), not alwaysdataType.Falsified both half-fixes: read-only (no drop) → 9 red (no-drift + no-retype tests); drop-only (no precedence read) → 14 red (the
Int32-blob-saves-as-Stringretype test + alias rejection parity). Verified on the merged tree: AdminUI 1233, MTConnect 534 + 15 integration, ControlPlane 261 — all green.Residual found en route, filed separately: the CSV export/import round-trip preserves
driverDataTypein the free-form residual where it still out-ranks theMtDataTypecolumn — covered for the invalid case by #551's import gate; the valid-alias-shadows-the-column case is part of the new CSV-merge issue.