Drop misleading Catalog-embed and HintFile naming now that assembly is declare→delivery and selection comes from ContractFinal. Co-authored-by: Cursor <cursoragent@cursor.com>
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
// Copyright 2026 Alibaba Group
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
package cli
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestDeliveryCatalogKeepsSpecializedAitableViewTextCommandSpecific(t *testing.T) {
|
|
loaded := mustDeliverySchemaCatalogMaps(t)
|
|
checked := 0
|
|
for canonical, tool := range loaded.Snapshot.Tools {
|
|
if !strings.HasPrefix(canonical, "aitable.view_get_") &&
|
|
!strings.HasPrefix(canonical, "aitable.view_update_") {
|
|
continue
|
|
}
|
|
checked++
|
|
if title := schemaString(tool["title"]); title == "get_views" || title == "update_view" {
|
|
t.Errorf("%s title leaked generic RPC metadata: %q", canonical, title)
|
|
}
|
|
provenance := schemaMap(tool["field_provenance"])
|
|
for _, field := range []string{"title", "description"} {
|
|
source := schemaString(provenance[field]["source"])
|
|
if source == "mcp_metadata" || source == "pinned_mcp_metadata" {
|
|
t.Errorf("%s %s still comes from generic RPC metadata: %#v", canonical, field, provenance[field])
|
|
}
|
|
}
|
|
}
|
|
if checked < 20 {
|
|
t.Fatalf("checked %d specialized AITable view tools, want the complete reviewed family", checked)
|
|
}
|
|
}
|