sadpandajoe opened a new pull request, #45511:
URL: https://github.com/apache/superset/pull/45511
### 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", 1e18d01d7), 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
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [x] Has associated issue: Fixes #45510
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]