{"record":{"id":"552f9c231fdad979","repo":"sipeed/picoclaw","slug":"save-results-w","errorCode":null,"errorMessage":"save results: %w","messagePattern":"save results: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/membench/main.go","lineNumber":265,"sourceCode":"\t\t\tir, err := IngestSeahorse(ctx, samples, dbPath)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"ingest seahorse: %w\", err)\n\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\") {","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/membench/main.go#L247-L283","documentation":"Context wrapper in runEval around SaveResults: evaluation completed, but writing the per-run eval_*.json results file into flagOut failed — typically a disk/permission problem or an unwritable output path. Only the 'save results' phase is added here; the wrapped cause carries the OS-level detail.","triggerScenarios":"Thrown at cmd/membench/main.go:265 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify --out exists and is writable","Check disk space","Ensure no other process holds a lock on the results file","Unwrap with errors.Is/fs.ErrPermission to classify the failure"],"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"}