{"record":{"id":"453eec4f060b6b00","repo":"thedotmack/claude-mem","slug":"push-response-did-not-ack-the-canary-op","errorCode":null,"errorMessage":"push response did not ack the canary op","messagePattern":"push response did not ack the canary op","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workers/sync-hub/canary/canary.ts","lineNumber":247,"sourceCode":"\t\tconst res = await fetch(`${this.args.hub}/v1/sync/ops`, {\n\t\t\tmethod: \"POST\",\n\t\t\theaders: { ...this.headers(deviceId), \"Content-Type\": \"application/json\" },\n\t\t\tbody: JSON.stringify({\n\t\t\t\tprotocol_version: 2,\n\t\t\t\tops: [{ body, operation_sha256: operationSha256 }],\n\t\t\t}),\n\t\t\tsignal: AbortSignal.timeout(this.args.timeoutMs),\n\t\t});\n\t\tthis.noteMode(res);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(`push ${res.status}: ${(await res.text().catch(() => \"\")).slice(0, 200)}`);\n\t\t}\n\t\tconst parsed = (await res.json()) as {\n\t\t\tacked: Array<{ operation_sha256: string; seq: string }>;\n\t\t\thead_seq: string;\n\t\t};\n\t\tconst ack = parsed.acked.find((a) => a.operation_sha256 === operationSha256);\n\t\tif (!ack) throw new Error(\"push response did not ack the canary op\");\n\t\treturn { seq: ack.seq, headSeq: parsed.head_seq, opSha: operationSha256 };\n\t}\n\n\tprivate async pull(\n\t\tdeviceId: string,\n\t\tsince: string,\n\t): Promise<{ ops: Array<{ seq: string; operation_sha256: string }>; headSeq: string }> {\n\t\tconst res = await fetch(`${this.args.hub}/v1/sync/changes?since=${since}&limit=500`, {\n\t\t\theaders: this.headers(deviceId),\n\t\t\tsignal: AbortSignal.timeout(this.args.timeoutMs),\n\t\t});\n\t\tthis.noteMode(res);\n\t\tif (!res.ok) {\n\t\t\tthrow new Error(`pull ${res.status}: ${(await res.text().catch(() => \"\")).slice(0, 200)}`);\n\t\t}\n\t\tconst parsed = (await res.json()) as {\n\t\t\tops: Array<{ seq: string; operation_sha256: string }>;\n\t\t\thead_seq: string;","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/thedotmack/claude-mem/blob/d768ba364302d12b76e69e4f021f0bb1d2d50ed6/workers/sync-hub/canary/canary.ts#L229-L265","documentation":"Error \"push response did not ack the canary op\" thrown in thedotmack/claude-mem.","triggerScenarios":"Fires in the sync-hub canary when the push endpoint returns 200 but the acknowledgment set does not contain the canary operation tuple, indicating an ack multiplicity/multiset bug or a hub that silently dropped the op. Guard at workers/sync-hub/canary/canary.ts:247 detects the protocol violation even though the HTTP status looked successful.","commonSituations":"See trigger scenarios.","solutions":["Check the sync-hub push handler for why the op was not acknowledged (validation failure, deduplication, or ack list bug).","Rerun the canary against a fresh hub state; if reproducible, compare the operation_sha256 sent with the acked array returned."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d768ba364302d12b76e69e4f021f0bb1d2d50ed6","analyzedAt":"2026-08-12T23:52:55.241Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}