Files
superset2/tests/unit_tests
Amin Ghadersohi f43ed34a28 refactor(mcp): consolidate DatasetContext builder; expose resolver methods as public API
- Move build_dataset_context_from_orm from compile.py into dataset_validator.py
  as the single authoritative ORM→DatasetContext converter; fixes a latent bug
  where the compile.py copy used `or ""` for database_name but _get_dataset_context
  could pass None to the required str field
- Simplify DatasetValidator._get_dataset_context to delegate to the shared helper
- Rename DatasetValidator._get_canonical_column_name / _get_canonical_metric_name /
  _normalize_filters to drop the underscore prefix — these are the public API that
  all seven plugins call, and the _ convention implied (incorrectly) that they were
  private implementation details
- Annotate native_viz_types as ClassVar[Mapping[str, str]] in the Protocol,
  BaseChartPlugin, and all 7 concrete plugins — prevents accidental mutation of the
  shared default dict and matches the read-only contract (Mapping, not dict)
- Update all call sites (7 plugins + 3 test files) to use the new names/import path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-30 19:31:32 +00:00
..