RawBrowseCommitMapper's fallback comment cites a parity guard (RawBrowseCommitMapperParityTests) that does not exist #555
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 #552.
RawBrowseCommitMapper.BuildTagConfig's unknown-driver fallback comment claims: "Every BROWSABLE driver is handled above — guarded by RawBrowseCommitMapperParityTests, which enumerates DriverTypeNames.All rather than trusting this comment." No such test class exists anywhere undertests/(verified by grep).RawTagConfigGateTestscovers 9 driver types by hand-writtenInlineData, not by enumeration — so a newly-added browsable driver whose leaves fall into the generic{"address": …}shape would not be caught.Fix: write the test the comment describes,
DriverTypeNames.All-driven (the pattern exists inDriverFormMapParityTests/DriverDispatchMapParityTests), asserting every browsable driver type has a dedicatedBuildTagConfigbranch (or is deliberately exempted with a reason). Alternatively correct the comment — but the enumeration guard is the better close, since the comment's claim is exactly the invariant worth pinning.FIXED — merged to master as
4f1c83a7(branch commit0e9d977f).RawBrowseCommitMapperParityTestsnow exists and holds the mapper to what the comment used to merely claim, with the browsable set DERIVED, not hand-listed: the test runs the productionAddAdminUI()registration and reads back every registeredIDriverBrowser.DriverType— the exact setBrowserSessionServiceindexes — and asserts each gets a typed (non-generic)BuildTagConfigbranch. The universalDiscoveryDriverBrowserarm is NOT derivable from the AdminUI assembly (it needs the runtime drivers + the Host'sIDriverFactory; AdminUI deliberately has no runtime-driver edge since #526), so it is covered by enumeratingDriverTypeNames.Allwith aGenericKeyExemptionslist (Modbus, Calculation — each with its reason) plus a fact that mechanically refutes any exemption the derived arm contradicts. The stale comment is rewritten to state exactly these two claims and the residual trust.Falsified three ways: disabling the Sql branch → red naming Sql (the DI derivation is not vacuous); disabling the MTConnect branch → red naming MTConnect (the enumeration half earns its place — no bespoke registration would catch it); adding a bogus Sql exemption → the contradiction fact red quoting the reason. AdminUI.Tests 1430 green on the merged tree.
Residuals found en route, filed: #558 (parity-guard consolidation + browser DriverType literals).