refactor(cli): relocate test-only decodeSchemaMetaIndexLookup to test helpers

This commit is contained in:
玉澜 committed 2026-08-04 11:16:21 +08:00
1 parent 772bf462ee
commit 082a9bb93a
2 files changed
+8 -8

No files matched your search

-8
View File
@@ -217,14 +217,6 @@ func commandMetaLookupFromIndex(index SchemaMetaIndexSnapshot) (map[string]Comma
return registerCommandMetaAliases(lookup, metas), nil
}
func decodeSchemaMetaIndexLookup(data []byte) (map[string]CommandMeta, error) {
index, err := DecodeSchemaMetaIndex(data)
if err != nil {
return nil, err
}
return commandMetaLookupFromIndex(index)
}
// ValidateSchemaMetaIndexAgainstSnapshot proves the summary index matches the
// Identity / Safety / Selection projection of every ToolSpec in a Catalog
// snapshot (generation-time gate before writing the index).
@@ -173,3 +173,11 @@ func walkLeafCommands(cmd *cobra.Command, fn func(*cobra.Command)) {
walkLeafCommands(sub, fn)
}
}
func decodeSchemaMetaIndexLookup(data []byte) (map[string]CommandMeta, error) {
index, err := DecodeSchemaMetaIndex(data)
if err != nil {
return nil, err
}
return commandMetaLookupFromIndex(index)
}