{"record":{"id":"353b5084a8629079","repo":"sipeed/picoclaw","slug":"v0-v1-migration-failed-w","errorCode":null,"errorMessage":"V0→V1 migration failed: %w","messagePattern":"V0→V1 migration failed: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/config/config.go","lineNumber":1352,"sourceCode":"\t\t\t\tmap[string]any{\"path\": path},\n\t\t\t)\n\t\t\treturn nil, err\n\t\t}\n\n\t\tvar m map[string]any\n\t\tm, err = loadConfigMap(path)\n\t\tif err != nil {\n\t\t\tlogger.ErrorCF(\n\t\t\t\t\"config\",\n\t\t\t\tformatDiagnosticLogMessage(\"Failed to load config\", err),\n\t\t\t\tmap[string]any{\"path\": path},\n\t\t\t)\n\t\t\treturn nil, err\n\t\t}\n\n\t\tmigrateErr := migrateV0ToV1(m)\n\t\tif migrateErr != nil {\n\t\t\treturn nil, fmt.Errorf(\"V0→V1 migration failed: %w\", migrateErr)\n\t\t}\n\t\tmigrateErr = migrateV1ToV2(m)\n\t\tif migrateErr != nil {\n\t\t\treturn nil, fmt.Errorf(\"V1→V2 migration failed: %w\", migrateErr)\n\t\t}\n\t\tmigrateErr = migrateV2ToV3(m)\n\t\tif migrateErr != nil {\n\t\t\treturn nil, fmt.Errorf(\"V2→V3 migration failed: %w\", migrateErr)\n\t\t}\n\n\t\tvar migrated []byte\n\t\tmigrated, err = json.Marshal(m)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tcfg, err = loadConfig(migrated)\n\t\tif err != nil {","sourceCodeStart":1334,"sourceCodeEnd":1370,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/config/config.go#L1334-L1370","documentation":"Returned during config load when the on-disk config is an old V0 layout and migrateV0ToV1 fails to transform the parsed map (unrecognized V0 shapes, missing expected keys). The migration error is wrapped with %w; the config file is left unmodified and loading aborts.","triggerScenarios":"Thrown at pkg/config/config.go:1352 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped migration error for the offending key or structure","Back up and hand-edit the config to valid V0 (or current) format","Check the project's migration notes for which V0 fields the migrator requires"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}