feat(schema): retire schema_hints and gate Catalog on ContractFinal only
Remove schema_hints as a generation input so Catalog delivery depends solely on leaf ContractFinal and ProductDecl; migrate policy and contract tests to embedded catalog introspection and fix publicShortcutCount for chat-list. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0119f6e2a8
commit
e29354ca70
47 files changed
+557
-20147
No files matched your search
@@ -277,17 +277,18 @@ func TestCrossPlatformCoverageMetadataSourceAndPathEdges(t *testing.T) {
|
||||
if err := os.MkdirAll(products, 0o700); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := loadSources(Options{Root: root, ProductsDir: "products", HintsDir: "missing"}); err == nil || !strings.Contains(err.Error(), "walk Agent hint") {
|
||||
t.Fatalf("missing hints directory error = %v", err)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(products, "skip.txt"), []byte("x"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
same := filepath.Join(root, "same.md")
|
||||
if err := os.WriteFile(same, []byte("same"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
files, err := loadSources(Options{Root: root, ProductsDir: "products", SkillPath: "same.md", IntentGuidePath: "same.md"})
|
||||
files, err := loadSources(Options{Root: root, ProductsDir: "products", SkillPath: "same.md", IntentGuidePath: "same.md", HintsDir: "missing"})
|
||||
if err != nil || len(files) != 1 {
|
||||
t.Fatalf("absent HintsDir should be skipped: %#v, %v", files, err)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(products, "skip.txt"), []byte("x"), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
files, err = loadSources(Options{Root: root, ProductsDir: "products", SkillPath: "same.md", IntentGuidePath: "same.md"})
|
||||
if err != nil || len(files) != 1 {
|
||||
t.Fatalf("deduplicated sources = %#v, %v", files, err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user