Skip to content

test(mcp): refresh native tool inventory for PNG chart previews - #45511

Merged
rusackas merged 1 commit into
masterfrom
ultraset-native-tool-inventory-growth-test-failure
Oct 20, 2026
Merged

rusackas merged 1 commit into
masterfrom
ultraset-native-tool-inventory-growth-test-failure

Conversation

@sadpandajoe

Copy link
Copy Markdown
Member

SUMMARY

tests/unit_tests/mcp_service/test_native_tool_surface.py::test_native_inventory_report_matches_registered_tools has been failing on master since #44558 ("feat(mcp): add caller-scoped PNG chart previews", 1e18d01), which turns the required unit-tests-required check red.

Root cause: #44558 added a PNGPreview variant to ChartPreviewContent and a png format to GetChartPreviewRequest in superset/mcp_service/chart/schemas.py. The output schemas of generate_chart, update_chart and get_chart_preview each grew by 496 bytes, which exceeds the inventory's headroom of 2% or 200 bytes. The PR did not regenerate tests/unit_tests/mcp_service/native_tool_inventory.json. Its CI could not catch that: the last CI run on the PR (head 1478574) used base cb8ff28 from 2026-10-09, which came before the native tool inventory and its test were added (#45081 / #45084, 2026-10-10). So the PR was green on a stale base and merged without being checked against the inventory. The earlier master commit #44657 also touched chart/schemas.py, but regenerating the inventory at its head gives a file identical to the recorded one, so all of the growth comes from #44558.

The growth is intended: it is the new PNG preview variant. As the test's docstring describes for intentional changes, this PR regenerates the recorded inventory with SUPERSET_MCP_UPDATE_TOOL_INVENTORY=1. Only generate_chart, update_chart, get_chart_preview and the catalog totals change. No other tool's entry changes, and no code or test logic changes.

TESTING INSTRUCTIONS

  1. Check out this branch and install the backend dev requirements.
  2. Run pytest tests/unit_tests/mcp_service/test_native_tool_surface.py. Every test passes, including test_native_inventory_report_matches_registered_tools, which fails on current master.
  3. Optionally, run SUPERSET_MCP_UPDATE_TOOL_INVENTORY=1 pytest tests/unit_tests/mcp_service/test_native_tool_surface.py::test_native_inventory_report_matches_registered_tools and confirm git diff is empty. The committed inventory is exactly what the generator produces.

ADDITIONAL INFORMATION

🤖 Generated with Claude Code

#44558 added the PNGPreview variant to ChartPreviewContent and the png
format to get_chart_preview, growing the generate_chart, update_chart and
get_chart_preview schemas by 496 bytes each. Its PR CI ran on a base that
predated the native tool inventory check, so the recorded inventory was
never regenerated and test_native_inventory_report_matches_registered_tools
fails on master. Regenerate it with SUPERSET_MCP_UPDATE_TOOL_INVENTORY=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sadpandajoe sadpandajoe added the ai:fix-master generated by AI to fix master branch label Oct 20, 2026
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt PR Risk: Low Risk

  • The PR appears safe to merge; the visible changes update tool-inventory size metrics and show no functional code changes.

Assessed commit: b88192cf89b0

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.64%. Comparing base (1e18d01) to head (b88192c).

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #45511       +/-   ##
===========================================
+ Coverage   65.15%   83.64%   +18.49%     
===========================================
  Files        3053     3053               
  Lines      200638   200638               
  Branches    46820    46820               
===========================================
+ Hits       130717   167827    +37110     
+ Misses      66981    29566    -37415     
- Partials     2940     3245      +305     
Flag Coverage Δ
hive 34.91% <ø> (ø)
mysql 52.87% <ø> (ø)
postgres 52.88% <ø> (-0.01%) ⬇️
presto 36.66% <ø> (ø)
python 87.16% <ø> (+34.00%) ⬆️
sqlite 52.64% <ø> (ø)
unit 81.30% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

rebenitez1802 added a commit that referenced this pull request Oct 20, 2026
Master's PNG chart previews (#44558) grew the chart tool definitions
without refreshing the native tool inventory, which fails the unit suite
once merged here. Apply the generate_chart, get_chart_preview and
update_chart entries from #45511 unchanged and recompute the catalog
totals to include this branch's get_dashboard_info growth.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@rusackas rusackas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, exactly the mechanical regeneration described, only the three touched tools' entries and the catalog totals changed. Good catch on why #44558's own CI missed this (stale base predating the inventory test).

@rusackas
rusackas merged commit 3c42a68 into master Oct 20, 2026
79 checks passed
@rusackas
rusackas deleted the ultraset-native-tool-inventory-growth-test-failure branch October 20, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai:fix-master generated by AI to fix master branch size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_native_inventory_report_matches_registered_tools fails on master after PNG chart previews

2 participants