Sql browse-commit emits a rowSelector-less WideRow config that authoring and runtime both reject — commit now fails loudly #552
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 (and verified live) by the #551 work.
RawBrowseCommitMapper.BuildSqlTagConfigproduces{"model":"WideRow","table":…,"columnName":…}with norowSelector— a shapeSqlTagConfigModel.ValidateandSqlEquipmentTagParserboth refuse. Such a tag has never been readable: before #551 the commit persisted it silently and the driver skipped it (BadNodeIdUnknown forever); since #551's service gate, the commit itself fails with an actionable message.So the gate moved the failure to the right place, but Sql browse-commit is now a flow that always fails at commit and needs its own fix. Candidates:
rowSelector(e.g. atopByTimestampchoice — needs a timestamp-column pick in the browse/commit UI), orEvery other browsable driver's commit-emitted config was verified passing the gate (MQTT both modes, MTConnect, and the rest) — Sql is the only offender; parity is pinned in
RawTagConfigGateTests.FIXED — merged to master as
1f351250(branch commit7498d39e).The browse session now STATES the row selector; the mapper never infers (the MQTT Sparkplug rule):
SqlBrowseSessioncomputes a per-tabletopByTimestampcandidate from the column metadata it already reads (_dialect.MapColumnType(DATA_TYPE) == DriverDataType.DateTime— type only, never name; all four dialects fold their date/time families onto that member). Tie-break on multiple candidates: first in catalog order, which every dialect'sListColumnsSqlalready guarantees (ORDER BY ORDINAL_POSITIONetc.) — stable across calls/connections/servers. No extra INFORMATION_SCHEMA round-trip (pinned by a command-count test). Stated as a newAddressFieldsentry via the new sharedSqlBrowseAddressFieldsconstants (Driver.Sql.Contracts), so producer and consumer can no longer drift on the key by coincidence.BuildSqlTagConfigwritesrowSelector: { topByTimestamp: <candidate> }. The emitted blob is double-accepted in tests bySqlTagConfigModel.Validate/TagConfigValidatorand the realSqlEquipmentTagParser, with a control asserting the pre-#552 bytes are refused by all three. The blob's top-leveltimestampColumn(source-timestamp) is deliberately NOT set — ordering by a column is not a claim that it timestamps the value.DescribeUncommittableLeafseam — the message names the leaf, the table, and the fix (awhereColumn/whereValueselector, whose value is data no browse can supply). The mapper still emits the wide-row shape (not the generic address key) so the table/column survive into the typed editor;Sql_refusal_and_the_emitted_blob_agreepins the two layers in step both directions.Falsified: candidate computation nulled → exactly the 3 candidate tests red; tie-break inverted → exactly 1 red; mapper stops writing the selector → 6 red. Verified on the merged tree: AdminUI 1262, Sql 363, Sql.Browser 79, ControlPlane 261 — all green. The
RawTagConfigGateTestsSql leg is flipped from records-the-gap to passes-the-gate.Residual found en route, filed separately:
RawBrowseCommitMapper's fallback comment cites aRawBrowseCommitMapperParityTestsguard that does not exist (#555).