{"record":{"id":"1fb0e69c308de4b6","repo":"sipeed/picoclaw","slug":"save-aggregated-w","errorCode":null,"errorMessage":"save aggregated: %w","messagePattern":"save aggregated: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/membench/main.go","lineNumber":268,"sourceCode":"\t\t\t}\n\t\t\tif useLLM {\n\t\t\t\tresults := EvalSeahorseLLM(ctx, samples, ir, flagBudget, answerClient, judgeClient, flagConcurrency)\n\t\t\t\tllmResults = append(llmResults, results...)\n\t\t\t\tlog.Printf(\"seahorse-llm: evaluated %d samples\", len(results))\n\t\t\t} else {\n\t\t\t\tresults := EvalSeahorse(ctx, samples, ir, flagBudget)\n\t\t\t\ttokenResults = append(tokenResults, results...)\n\t\t\t\tlog.Printf(\"seahorse: evaluated %d samples\", len(results))\n\t\t\t}\n\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)","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/membench/main.go#L250-L286","documentation":"Context wrapper in runEval around SaveAggregated: the raw results saved fine, but writing the aggregated summary file to flagOut failed. Same failure class as the results save (permissions, disk, path issues); this wrapper tags the aggregation phase so the failing artifact is identifiable.","triggerScenarios":"Thrown at cmd/membench/main.go:268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions and disk space in --out","Verify the aggregated file path is not a directory or locked file","Re-run with a fresh --out directory if the current one is corrupt"],"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"}