Skip to content

explore cluster: an unrecognized dialect silently scans the whole table #313

Description

@marcociav-exmergo

_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions