{"record":{"id":"da9ea2a0eb9c2714","repo":"sipeed/picoclaw","slug":"read-out-dir-w","errorCode":null,"errorMessage":"read out dir: %w","messagePattern":"read out dir: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/membench/main.go","lineNumber":278,"sourceCode":"\t\t}\n\t}\n\n\tallResults := append(tokenResults, llmResults...)\n\tif err := SaveResults(allResults, flagOut); err != nil {\n\t\treturn fmt.Errorf(\"save results: %w\", err)\n\t}\n\tif err := SaveAggregated(allResults, flagOut); err != nil {\n\t\treturn fmt.Errorf(\"save aggregated: %w\", err)\n\t}\n\n\tPrintComparison(tokenResults, llmResults)\n\treturn nil\n}\n\nfunc runReport(cmd *cobra.Command, args []string) error {\n\tentries, err := os.ReadDir(flagOut)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"read out dir: %w\", err)\n\t}\n\n\tvar allResults []EvalResult\n\tfor _, entry := range entries {\n\t\tif !entry.IsDir() && strings.HasPrefix(entry.Name(), \"eval_\") && strings.HasSuffix(entry.Name(), \".json\") {\n\t\t\tpath := filepath.Join(flagOut, entry.Name())\n\t\t\tvar r EvalResult\n\t\t\tdata, err := os.ReadFile(path)\n\t\t\tif err != nil {\n\t\t\t\tlog.Printf(\"WARN: read %s: %v\", path, err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tif err := json.Unmarshal(data, &r); err != nil {\n\t\t\t\tlog.Printf(\"WARN: parse %s: %v\", path, err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tallResults = append(allResults, r)\n\t\t}","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/membench/main.go#L260-L296","documentation":"Wrapped os.ReadDir failure at the top of runReport: the --out directory holding the eval_*.json artifacts cannot be listed (missing, not a directory, or unreadable). Nothing about individual result files has been checked yet — the report command cannot even start scanning.","triggerScenarios":"Thrown at cmd/membench/main.go:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the eval command first so --out is populated","Verify the --out path exists and is a readable directory","Check for typos in the --out flag value"],"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"}