{"record":{"id":"e7ec4b5d9b9bf728","repo":"sipeed/picoclaw","slug":"expected-mapping-node-got-v","errorCode":null,"errorMessage":"expected mapping node, got %v","messagePattern":"expected mapping node, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/config_channel.go","lineNumber":415,"sourceCode":"\tcollectSensitive(reflect.ValueOf(b.extend), &values)\n\treturn values\n}\n\n// ChannelsConfig maps channel name to its Channel configuration.\n// Each Channel stores the full channel config in Settings and handles\n// JSON/YAML serialization (removing/keeping secure fields automatically).\n//\n//nolint:recvcheck\ntype ChannelsConfig map[string]*Channel\n\n// UnmarshalYAML implements yaml.Unmarshaler for ChannelsConfig.\n// This ensures that when loading security.yml, existing Channel instances\n// are properly merged rather than replaced with new ones.\nfunc (c *ChannelsConfig) UnmarshalYAML(value *yaml.Node) error {\n\t// yaml.Node Content for a mapping contains alternating key-value nodes\n\t// We need to iterate through them in pairs\n\tif value.Kind != yaml.MappingNode {\n\t\treturn fmt.Errorf(\"expected mapping node, got %v\", value.Kind)\n\t}\n\n\tif *c == nil {\n\t\t*c = make(ChannelsConfig)\n\t}\n\n\tfor i := 0; i < len(value.Content); i += 2 {\n\t\tif i+1 >= len(value.Content) {\n\t\t\tbreak\n\t\t}\n\t\tname := value.Content[i].Value\n\t\tnode := value.Content[i+1]\n\n\t\texistingBC := (*c)[name]\n\t\tif existingBC != nil {\n\t\t\t// Channel already exists - call UnmarshalYAML on it\n\t\t\t// This merges security.yml settings into existing config\n\t\t\tif err := existingBC.UnmarshalYAML(node); err != nil {","sourceCodeStart":397,"sourceCodeEnd":433,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/config_channel.go#L397-L433","documentation":"Error \"expected mapping node, got %v\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/config/config_channel.go:415 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}