Document prompt-owned schemas and finalize migration

This commit is contained in:
2026-11-20 15:46:39 +00:00
parent 9bed36282a
commit e9a12d43c2
16 changed files with 174 additions and 106 deletions

View File

@@ -25,3 +25,13 @@ func TestCloneTrustedPreservesTypesAndDetaches(t *testing.T) {
t.Fatal("nil/empty shape changed")
}
}
func TestCloneTrustedDetachesCycles(t *testing.T) {
original := map[string]any{}
original["self"] = original
copy := CloneTrusted(original).(map[string]any)
copy["self"].(map[string]any)["changed"] = true
if copy["changed"] != true || original["changed"] != nil {
t.Fatal("cyclic copy did not preserve its cycle independently")
}
}