{"record":{"id":"0f95aaf237af7284","repo":"sipeed/picoclaw","slug":"ingest-seahorse-w","errorCode":null,"errorMessage":"ingest seahorse: %w","messagePattern":"ingest seahorse: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/membench/main.go","lineNumber":161,"sourceCode":"\t}\n\tlog.Printf(\"Loaded %d samples from %s\", len(samples), flagData)\n\n\tfor _, mode := range modes {\n\t\tswitch mode {\n\t\tcase \"legacy\":\n\t\t\tlegacy := NewLegacyStore()\n\t\t\tfor i := range samples {\n\t\t\t\tlegacy.IngestSample(&samples[i])\n\t\t\t}\n\t\t\tlog.Printf(\"legacy: ingested %d samples\", len(samples))\n\t\tcase \"seahorse\":\n\t\t\tdbPath := filepath.Join(flagOut, \"seahorse.db\")\n\t\t\tif err := os.MkdirAll(flagOut, 0o755); err != nil {\n\t\t\t\treturn fmt.Errorf(\"create out dir: %w\", err)\n\t\t\t}\n\t\t\t_, 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}\n\t}\n\treturn nil\n}\n\nfunc runEval(cmd *cobra.Command, args []string) error {\n\tif flagData == \"\" {\n\t\treturn fmt.Errorf(\"--data is required\")\n\t}\n\tmodes := modesFromFlag()\n\tif len(modes) == 0 {\n\t\treturn nil\n\t}\n\n\tctx := context.Background()\n\tsamples, err := LoadDataset(flagData)\n\tif err != nil {","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/membench/main.go#L143-L179","documentation":"Context wrapper in runIngest around IngestSeahorse: the seahorse store could not be built at dbPath — the cause (embedded via %w) is typically a database open/write failure, embedding/LLM call failure, or schema error. This layer only tags the ingest-seahorse phase; the real diagnosis lives in the wrapped error.","triggerScenarios":"Thrown at cmd/membench/main.go:161 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error to identify whether DB creation, schema setup, or ingestion failed","Verify the --out directory is writable and seahorse.db is not locked by another process","If ingestion calls embeddings/LLMs, check endpoint availability and API keys","Remove a stale/corrupt seahorse.db and re-run"],"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"}