aminghadersohi commented on PR #44575:
URL: https://github.com/apache/superset/pull/44575#issuecomment-5797453111

   Measured all **72 registered tools**, not only chart tools, comparing the 
pre-change serializer at `f8f293d266` with `90fe26612e`. Same registered tool 
models/config on both sides; complete serialized entries including metadata; 
compact JSON (`ensure_ascii=False`, `separators=(',', ':')`), UTF-8 bytes, and 
**tiktoken 0.14.0 / cl100k_base**. Tokens are BPE estimates, not 
Claude-tokenizer counts.
   
   **Totals (sum of individual entries): 531,433 → 348,099 bytes (−34.50%); 
126,042 → 81,354 tokens (−35.45%).** Four tools shrink, two are unchanged, and 
**66 grow**. Every increase is identified by its positive deltas below. The 
additional large win outside the original three is `update_chart_preview`: 
−49,943 bytes / −12,275 tokens.
   
   The increases total +12,210 bytes / +3,421 tokens across those 66 tools. The 
largest individual increase is `manage_native_filters`, +706 bytes / +210 
tokens, ending at 6,544 bytes / 1,438 tokens. These are small absolute 
increases from retaining nullable alternatives, `$defs`/`$ref` wrappers, and 
reference-sibling metadata that the old pass discarded. They are accepted costs 
of preserving the original published schema, not repeated-model expansion; 
reinstating the old simplification would lose fidelity. No growing entry 
exceeds 6,544 bytes or 1,438 tokens, so no material delivery-size regression 
was found and no additional runtime change was needed.
   
   Added `test_tool_inventory.py`: 72 independent byte/token budget cases, 72 
complete-schema/non-mutation checks, and an inventory-completeness check so new 
tools cannot silently escape coverage. **207 inventory/search tests and 178 
execution tests pass**; all applicable branch-file pre-commit hooks pass. 
Injecting schema growth into `get_database_info` makes its budget case fail as 
expected.
   
   <details>
   <summary>Full inventory: every tool, including all 66 increases</summary>
   
   | Tool | Bytes before → after | Δ bytes | Tokens before → after | Δ tokens |
   |---|---:|---:|---:|---:|
   | `add_chart_to_existing_dashboard` | 1,259 → 1,372 | +113 | 281 → 312 | +31 
|
   | `apply_dashboard_filters` | 2,553 → 2,789 | +236 | 560 → 625 | +65 |
   | `create_dataset` | 1,491 → 1,648 | +157 | 321 → 365 | +44 |
   | `create_theme` | 920 → 989 | +69 | 203 → 221 | +18 |
   | `create_virtual_dataset` | 2,887 → 3,536 | +649 | 618 → 792 | +174 |
   | `delete_chart` | 877 → 946 | +69 | 192 → 210 | +18 |
   | `delete_dashboard` | 878 → 955 | +77 | 188 → 206 | +18 |
   | `duplicate_dashboard` | 1,645 → 1,728 | +83 | 340 → 359 | +19 |
   | `execute_sql` | 1,791 → 1,970 | +179 | 377 → 429 | +52 |
   | `find_users` | 1,319 → 1,384 | +65 | 301 → 320 | +19 |
   | `generate_bug_report` | 2,040 → 2,426 | +386 | 449 → 559 | +110 |
   | `generate_chart` | 97,013 → 49,531 | -47,482 | 23,543 → 11,849 | -11,694 |
   | `generate_dashboard` | 3,047 → 3,296 | +249 | 637 → 709 | +72 |
   | `generate_explore_link` | 96,581 → 49,230 | -47,351 | 23,478 → 11,806 | 
-11,672 |
   | `get_annotation_layer_info` | 712 → 803 | +91 | 158 → 181 | +23 |
   | `get_chart_data` | 2,526 → 2,709 | +183 | 554 → 608 | +54 |
   | `get_chart_info` | 3,279 → 3,462 | +183 | 721 → 777 | +56 |
   | `get_chart_preview` | 3,027 → 3,300 | +273 | 661 → 744 | +83 |
   | `get_chart_sql` | 1,780 → 1,905 | +125 | 390 → 428 | +38 |
   | `get_chart_type_schema` | 701 → 701 | +0 | 149 → 149 | +0 |
   | `get_compatible_dimensions` | 1,236 → 1,385 | +149 | 242 → 281 | +39 |
   | `get_compatible_metrics` | 1,227 → 1,370 | +143 | 243 → 282 | +39 |
   | `get_dashboard_data` | 2,188 → 2,295 | +107 | 484 → 514 | +30 |
   | `get_dashboard_datasets` | 911 → 998 | +87 | 195 → 218 | +23 |
   | `get_dashboard_info` | 2,818 → 2,953 | +135 | 609 → 648 | +39 |
   | `get_dashboard_layout` | 1,356 → 1,467 | +111 | 284 → 314 | +30 |
   | `get_database_info` | 1,222 → 1,299 | +77 | 277 → 298 | +21 |
   | `get_dataset_info` | 2,126 → 2,201 | +75 | 507 → 528 | +21 |
   | `get_instance_info` | 604 → 710 | +106 | 127 → 156 | +29 |
   | `get_layer_annotation_info` | 905 → 996 | +91 | 196 → 219 | +23 |
   | `get_query_info` | 848 → 919 | +71 | 195 → 216 | +21 |
   | `get_report_info` | 1,159 → 1,232 | +73 | 248 → 269 | +21 |
   | `get_rls_filter_info` | 761 → 840 | +79 | 176 → 201 | +25 |
   | `get_role_info` | 675 → 744 | +69 | 156 → 177 | +21 |
   | `get_saved_query_info` | 935 → 1,016 | +81 | 224 → 247 | +23 |
   | `get_schema` | 876 → 941 | +65 | 183 → 202 | +19 |
   | `get_table` | 3,453 → 3,707 | +254 | 798 → 877 | +79 |
   | `get_tag_info` | 825 → 892 | +67 | 184 → 205 | +21 |
   | `get_task_info` | 888 → 957 | +69 | 200 → 221 | +21 |
   | `get_theme_info` | 809 → 880 | +71 | 173 → 194 | +21 |
   | `get_user_info` | 805 → 874 | +69 | 184 → 203 | +19 |
   | `health_check` | 590 → 590 | +0 | 127 → 127 | +0 |
   | `list_annotation_layers` | 2,245 → 2,540 | +295 | 499 → 574 | +75 |
   | `list_charts` | 4,635 → 4,946 | +311 | 1,030 → 1,118 | +88 |
   | `list_dashboards` | 4,120 → 4,419 | +299 | 918 → 1,000 | +82 |
   | `list_databases` | 3,119 → 3,386 | +267 | 694 → 767 | +73 |
   | `list_datasets` | 4,195 → 4,486 | +291 | 919 → 1,000 | +81 |
   | `list_layer_annotations` | 2,481 → 2,738 | +257 | 569 → 634 | +65 |
   | `list_metrics` | 1,527 → 1,708 | +181 | 315 → 368 | +53 |
   | `list_queries` | 2,555 → 2,812 | +257 | 577 → 648 | +71 |
   | `list_reports` | 3,458 → 3,717 | +259 | 776 → 847 | +71 |
   | `list_rls_filters` | 2,225 → 2,496 | +271 | 509 → 587 | +78 |
   | `list_roles` | 2,340 → 2,591 | +251 | 541 → 612 | +71 |
   | `list_saved_queries` | 2,524 → 2,801 | +277 | 581 → 656 | +75 |
   | `list_tags` | 2,671 → 2,918 | +247 | 634 → 705 | +71 |
   | `list_tasks` | 2,245 → 2,508 | +263 | 513 → 586 | +73 |
   | `list_themes` | 2,563 → 2,818 | +255 | 600 → 671 | +71 |
   | `list_users` | 2,512 → 2,763 | +251 | 580 → 650 | +70 |
   | `manage_dashboard_certification` | 1,633 → 1,792 | +159 | 359 → 400 | +41 |
   | `manage_dashboard_owners` | 1,943 → 2,032 | +89 | 420 → 441 | +21 |
   | `manage_dashboard_roles` | 1,693 → 1,780 | +87 | 360 → 381 | +21 |
   | `manage_native_filters` | 5,838 → 6,544 | +706 | 1,228 → 1,438 | +210 |
   | `open_sql_lab_with_context` | 1,489 → 1,668 | +179 | 319 → 372 | +53 |
   | `query_dataset` | 3,320 → 3,562 | +242 | 770 → 840 | +70 |
   | `remove_chart_from_dashboard` | 1,030 → 1,125 | +95 | 216 → 239 | +23 |
   | `restore_chart` | 892 → 963 | +71 | 195 → 214 | +19 |
   | `restore_dashboard` | 753 → 832 | +79 | 157 → 176 | +19 |
   | `save_sql_query` | 1,294 → 1,449 | +155 | 285 → 331 | +46 |
   | `update_chart` | 104,163 → 53,395 | -50,768 | 25,227 → 12,759 | -12,468 |
   | `update_chart_preview` | 102,352 → 52,409 | -49,943 | 24,838 → 12,563 | 
-12,275 |
   | `update_dashboard` | 3,598 → 3,983 | +385 | 726 → 843 | +117 |
   | `update_dataset_metric` | 2,477 → 2,972 | +495 | 554 → 688 | +134 |
   
   </details>
   
   **CI:** Re-read the rollup at `d6e5bafb`: **85 SUCCESS / 10 SKIPPED / 3 
NEUTRAL / 0 FAILURE / 0 PENDING**. `test-load-examples`, `testcontainers 
(starrocks, 15)`, `playwright-tests (chromium)`, `babel-extract`, and every 
other Playwright job all passed. Between `25e553307f` and that head, only 
pytest-mark formatting changed; the `tiktoken`/`regex` dependency pins did not 
change. This does not establish the cause of the earlier failures.
   
   The test-only follow-up head `90fe26612e` has a new CI run: 3 IN_PROGRESS / 
1 PENDING / 28 QUEUED / 3 SKIPPED as of 2026-09-23 15:14 UTC. Those new-head 
checks are not yet complete.
   


-- 
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]

Reply via email to