{"record":{"id":"3367a9f8f12f57ea","repo":"alibaba/open-code-review","slug":"load-test-task-config-w","errorCode":null,"errorMessage":"load test task config: %w","messagePattern":"load test task config: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/opencodereview/llm_cmd.go","lineNumber":71,"sourceCode":"func runLLMTest() error {\n\tcfgPath, err := resolveConfigPath()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tappCfg, err := LoadAppConfig(cfgPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"load config: %w\", err)\n\t}\n\n\tep, err := llm.ResolveEndpoint(cfgPath)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve LLM endpoint: %w\", err)\n\t}\n\n\ttask, err := testconnection.LoadDefault()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"load test task config: %w\", err)\n\t}\n\tvar lang string\n\tif appCfg != nil {\n\t\tlang = appCfg.Language\n\t}\n\ttask.ApplyLanguage(lang)\n\n\ttimeout := 30 * time.Second\n\tif task.Timeout > 0 {\n\t\ttimeout = time.Duration(task.Timeout) * time.Second\n\t}\n\n\t// No retry collector: llm test is a connectivity probe, not a review, and the\n\t// retry report only describes ocr review.\n\tllmClient := llm.NewLLMClient(ep, nil)\n\n\tmessages := make([]llm.Message, 0, len(task.Messages))\n\tfor _, m := range task.Messages {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/alibaba/open-code-review/blob/5cf97d0d15cbd41b602513c4be3bfec3cee5bf7f/cmd/opencodereview/llm_cmd.go#L53-L89","documentation":"This error wraps a failure from testconnection.LoadDefault, which loads the built-in default test-conversation task used by `ocr llm test`. This is an internal fixture/config load, so failure usually means the embedded task resource is unavailable or an on-disk override of the test task is unreadable or malformed.","triggerScenarios":"Running `ocr llm test` when testconnection.LoadDefault() returns an error — e.g. a custom test-task file overriding the default is missing fields, has invalid syntax, or the embedded default cannot be unmarshalled.","commonSituations":"Users who customized the test task file and introduced a schema error; packaging/bundling issues in development builds where embedded assets are absent.","solutions":["If you overrode the test task file, fix its syntax/fields to match the expected schema.","Delete or rename your custom test-task override so the built-in default loads.","Reinstall/rebuild the binary to restore the embedded default task.","Read the wrapped cause after 'load test task config:' for the exact parse error and line."],"exampleFix":"// before (test task missing messages)\ntimeout = 30\n// after\ntimeout = 30\n[[messages]]\nrole = \"user\"\ncontent = \"Say hello.\"","handlingStrategy":"fallback","validationCode":"task, err := testconnection.LoadDefault()\nif err != nil {\n    // fall back to a minimal built-in probe instead of failing\n    task = &testconnection.Task{Timeout: 30, Messages: []testconnection.Message{{Role: \"user\", Content: \"ping\"}}}\n}","typeGuard":null,"tryCatchPattern":"task, err := testconnection.LoadDefault()\nif err != nil {\n    return fmt.Errorf(\"load test task config: %w\", err)\n}","preventionTips":["Do not override the default test task file unless following the documented schema.","Validate any custom task file after edits (syntax + required fields).","Reinstall the binary if embedded assets appear missing."],"tags":["config","llm","cli"],"backgroundTag":"config-load-failed","analyzedSha":"5cf97d0d15cbd41b602513c4be3bfec3cee5bf7f","analyzedAt":"2026-09-02T02:08:09.116Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}