Browse-commit parity guards overlap and one is misnamed; browser DriverType literals unguarded #558
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?
Test-hygiene residuals from #555:
DriverDispatchMapParityTests.Browse_commit_falls_back_to_the_generic_address_key_for_exactly_the_non_browsable_driversalready enumeratedDriverTypeNames.Allover the same seam the newRawBrowseCommitMapperParityTestsguards — but itsNonBrowsableDriverTypeslist is hand-authored AND misnamed: it really means "types that produce the generic key" (AbLegacyis genuinely non-browsable yet correctly absent because it has a typed branch). Consolidate the two classes (the new one's derivation +GenericKeyExemptionsnaming is the keeper) or rename/re-document the old list so the two cannot drift apart.OpcUaClientDriverBrowser.DriverTypeandGalaxyDriverBrowser.DriverTypereturn string literals ("OpcUaClient","GalaxyMxGateway") instead ofDriverTypeNamesconstants, unlikeSqlDriverBrowser/MqttDriverBrowser. Values match today; nothing guards it. Switch to the constants and/or add a reflection guard asserting everyIDriverBrowser.DriverTypeequals aDriverTypeNamesmember.Closed by merge
7482cf0c(branchfix/558-parity-guard-hygiene), verified by the 14-suite consolidated run (4,583 tests, 0 failures).One guard per seam. The browse-commit dispatch fact moved OUT of
DriverDispatchMapParityTestsintoRawBrowseCommitMapperParityTests(now 6 facts and the sole guard for the browse-commit seam);DriverDispatchMapParityTestsis now CsvColumnMap-only. The hand-maintainedNonBrowsableDriverTypeslist is deleted — the browsable set derives from the real production registration (runAddAdminUI(), read back theIDriverBrowser.DriverTypes), with the non-derivable universal-DiscoveryDriverBrowserarm covered byDriverTypeNames.Allenumeration +GenericKeyExemptions(Modbus, Calculation) + a fact that mechanically refutes any exemption the derived arm contradicts. Subsumption of the removed fact was proven before deletion (the moved fact reddens under the same neuters).Ordinal, not IgnoreCase, is load-bearing in the browser-key membership guard: a case-only typo in a browser's DriverType key is exactly the drift the guard exists to catch, and IgnoreCase would wave it through.
Browser DriverType literals → constants.
GalaxyDriverBrowserandOpcUaClientDriverBrowsernow useDriverTypeNames.Galaxy("GalaxyMxGateway" — exact match verified against the literal before substitution) andDriverTypeNames.OpcUaClient, closing the last string-literal drift channel into the derived guard.Falsification: each guard neutered in turn fails exactly its own tests; the stale-comment rewrite in
RawBrowseCommitMappernow states the guard's real claims instead of the retired hand-list's.