{"record":{"id":"c0b1572197939f7e","repo":"thedotmack/claude-mem","slug":"summary-watermark-bump-skipped-partial-write-row-marked","errorCode":null,"errorMessage":"Summary watermark bump skipped — partial write, row marked pending","messagePattern":"Summary watermark bump skipped — partial write, row marked pending","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/services/sync/ChromaSync.ts","lineNumber":567,"sourceCode":"      created_at_epoch: createdAtEpoch\n    };\n\n    const documents = this.formatSummaryDocs(stored);\n\n    logger.info('CHROMA_SYNC', 'Syncing summary', {\n      summaryId,\n      documentCount: documents.length,\n      project\n    });\n\n    // Only bump on a confirmed full write — see syncObservation() for rationale.\n    const written = await this.addDocuments(documents);\n    if (written === documents.length) {\n      ChromaSyncState.clearPending(project, 'summaries', [summaryId]);\n      ChromaSyncState.bump(project, 'summaries', summaryId);\n    } else {\n      ChromaSyncState.markPending(project, 'summaries', [summaryId]);\n      logger.warn('CHROMA_SYNC', 'Summary watermark bump skipped — partial write, row marked pending', {\n        summaryId,\n        project,\n        requested: documents.length,\n        written\n      });\n    }\n  }\n\n  private formatUserPromptDoc(prompt: StoredUserPrompt): ChromaDocument {\n    return {\n      id: `prompt_${prompt.id}`,\n      document: prompt.prompt_text,\n      metadata: {\n        sqlite_id: prompt.id,\n        doc_type: 'user_prompt',\n        memory_session_id: prompt.memory_session_id,\n        project: prompt.project,\n        platform_source: prompt.platform_source,","sourceCodeStart":549,"sourceCodeEnd":585,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d8bc9755e74915e5c3b999181e10a67c889bce2a/src/services/sync/ChromaSync.ts#L549-L585","documentation":"syncSummary writes the summary's documents; if addDocuments reports fewer writes than documents.length, the summaries watermark is not bumped, the row is marked pending, and this warning is logged so the next backfill retries it.","triggerScenarios":"addDocuments returns written < documents.length during a summary sync — partial batch acceptance or a failed document in the batch.","commonSituations":"Very large summary documents exceeding Chroma limits, transient Chroma connectivity drops mid-write, embedding failures for one chunk.","solutions":["Check addDocuments/Chroma logs for which document failed and why.","Let the pending flag drive the next backfill retry — no manual action strictly required.","Shrink summary chunk size so each batch is well under limits.","Confirm Chroma is reachable and the collection accepts the payload size."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const written = await this.addDocuments(documents);\nif (written !== documents.length) console.warn(`summary partial write ${written}/${documents.length}`);","typeGuard":null,"tryCatchPattern":"try { await syncSummary(...); }\ncatch (e) { /* pending mark ensures retry on next backfill */ }","preventionTips":["Keep summary chunks within Chroma payload limits","Monitor addDocuments return counts","Verify Chroma connectivity before large sync runs"],"tags":["sync","watermark","partial-write","chroma"],"backgroundTag":"database-write-failed","analyzedSha":"d8bc9755e74915e5c3b999181e10a67c889bce2a","analyzedAt":"2026-09-17T16:40:26.182Z","contentChangedAt":"2026-09-17T16:40:26.182Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}