aminghadersohi commented on code in PR #45504:
URL: https://github.com/apache/superset/pull/45504#discussion_r4331787487
##########
superset/mcp_service/dashboard/tool/get_dashboard_data.py:
##########
@@ -132,6 +132,17 @@ def _summarize_chart_data(
chart_id=result.chart_id,
chart_name=result.chart_name,
chart_type=result.chart_type,
+ fetch_row_limit=request.fetch_row_limit,
+ sample_rows_limit=request.sample_rows,
+ completeness_note=(
+ "Histogram bins may be computed from input rows capped by
fetch_row_limit. "
+ "A single output row and truncated=false do not establish
full-population "
+ "coverage or a defect in the saved chart. Verify the saved
configuration "
+ "and source aggregates before making a distribution claim."
+ if result.chart_type in {"histogram", "histogram_v2"}
+ else "sample_data contains example rows only; use row_count,
total_rows "
Review Comment:
Fixed in 5abef5933d0ec89a75a558a09b9be6f5ef7b817d using the suggested
conservative chart-type fallback. The warning includes box_plot and describes
distribution statistics rather than only histogram bins. ChartData does not
carry the executed operations into this summary, so this does not add an
operation-based detector.
Regression: test_box_plot_sample_exposes_input_fetch_limit failed in all
four cases against 3b40f8a29f and passed in the scoped run (361 passed),
covering caps of 3 and 500 and both result-layer branches. Command: `pytest -q
-m 'not manual and not llm_compliance'
tests/unit_tests/mcp_service/dashboard/tool/test_get_dashboard_data.py`.
Siblings checked:
- superset/mcp_service/chart/plugins/histogram.py — not affected: histogram
and histogram_v2 keep the same conservative warning.
- superset/common/form_data_query_context.py — not affected: histogram and
box-plot query builders retain their post-processing; this changes
interpretation guidance only.
- superset/mcp_service/chart/tool/get_chart_data.py — not affected: saved
and rebuilt query results keep their chart_type, and no retrieval limits are
changed.
##########
superset/mcp_service/dashboard/schemas.py:
##########
@@ -212,6 +212,19 @@ class ListDashboardsRequest(
):
"""Request schema for list_dashboards with clear, unambiguous types."""
+ edited_by_me: bool = Field(
+ default=False,
+ description=(
+ "Only dashboards where the current user is a direct USER editor "
+ "(the dashboard ownership representation). Does not include access
"
+ "inherited from roles or groups. Use this for dashboards I own. "
+ "Combining with created_by_me returns creator OR owner, not both."
+ ),
+ )
+
+ # Never silently discard a misspelled scope filter (e.g. owned_by_me).
+ model_config = ConfigDict(extra="forbid")
Review Comment:
Fixed in a11f4c1b43 by pairing UnknownFieldCheckMixin with extra="forbid".
Unknown owned_by_me and page_szie arguments suggest edited_by_me and page_size,
while additionalProperties remains false and both column aliases work.
Regression: test_list_dashboards_unknown_arguments_suggest_supported_fields
failed in both cases against 3b40f8a29f and passed in the scoped run (361
passed). The MCP-level test_list_dashboards_unknown_scope_never_reaches_dao
also checks the suggested spelling. Command: `pytest -q -m 'not manual and not
llm_compliance'
tests/unit_tests/mcp_service/dashboard/test_dashboard_schemas.py
tests/unit_tests/mcp_service/dashboard/tool/test_list_dashboards.py`.
Siblings checked:
- superset/mcp_service/chart/schemas.py — fixed in 69092bd509
- superset/mcp_service/dataset/schemas.py — fixed in 69092bd509
- superset/mcp_service/report/schemas.py — fixed in 69092bd509
- superset/mcp_service/database/schemas.py — fixed in 69092bd509
- superset/mcp_service/common/pagination_schemas.py — not affected: the
shared columns/select_columns alias is preserved; unrelated list families are
not changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]