_sample_parts in explore/cluster.py dispatches per dialect and falls through
to return "", "", "no sample clause (unrecognized dialect)". Every shipped
connector has an entry, so nothing is broken today. The problem is what happens
to the next one: a connector added without an entry here does not fail, it
silently reads the whole table, bounded only by the cost gate.
That is the failure shape this codebase treats as worse than an error. The note
says "unrecognized dialect", but it is a note on a result that otherwise looks
completely normal, and the cost shows up as a larger bill rather than as a
refusal.
Two candidate fixes, either is fine:
- Make the fallthrough loud: raise, or return a note the caller escalates to a
warning on the envelope rather than an informational line.
- Assert coverage in the suite, the way other per-connector tables are covered:
a test that every name in the dialect registry has a sampling entry, so
omitting one fails at merge rather than at someone's month-end bill.
The second is cheaper and catches it earlier. Worth doing both.
_sample_partsinexplore/cluster.pydispatches per dialect and falls throughto
return "", "", "no sample clause (unrecognized dialect)". Every shippedconnector has an entry, so nothing is broken today. The problem is what happens
to the next one: a connector added without an entry here does not fail, it
silently reads the whole table, bounded only by the cost gate.
That is the failure shape this codebase treats as worse than an error. The note
says "unrecognized dialect", but it is a note on a result that otherwise looks
completely normal, and the cost shows up as a larger bill rather than as a
refusal.
Two candidate fixes, either is fine:
warning on the envelope rather than an informational line.
a test that every name in the dialect registry has a sampling entry, so
omitting one fails at merge rather than at someone's month-end bill.
The second is cheaper and catches it earlier. Worth doing both.