mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
fix: preserve empty skill discovery roots (#384)
This commit is contained in:
@@ -138,7 +138,11 @@ func workspaceSkillDiscoveryRootsFromMetadata(metadata map[string]any) ([]string
|
|||||||
return []string{}, true
|
return []string{}, true
|
||||||
}
|
}
|
||||||
|
|
||||||
return normalizeWorkspaceSkillDiscoveryRoots(roots), true
|
normalized := normalizeWorkspaceSkillDiscoveryRoots(roots)
|
||||||
|
if normalized == nil {
|
||||||
|
return []string{}, true
|
||||||
|
}
|
||||||
|
return normalized, true
|
||||||
}
|
}
|
||||||
|
|
||||||
func withWorkspaceImagePreference(metadata map[string]any, image string) map[string]any {
|
func withWorkspaceImagePreference(metadata map[string]any, image string) map[string]any {
|
||||||
|
|||||||
@@ -163,6 +163,9 @@ func TestWorkspaceSkillDiscoveryRootsExplicitDisableRemainsPresent(t *testing.T)
|
|||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal("expected skill discovery roots key to remain present")
|
t.Fatal("expected skill discovery roots key to remain present")
|
||||||
}
|
}
|
||||||
|
if roots == nil {
|
||||||
|
t.Fatal("expected explicit disable to return a non-nil empty slice")
|
||||||
|
}
|
||||||
if len(roots) != 0 {
|
if len(roots) != 0 {
|
||||||
t.Fatalf("expected explicit disable with no roots, got %#v", roots)
|
t.Fatalf("expected explicit disable with no roots, got %#v", roots)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user