From c21d69f5acba66affb7ebe0c40dea94d1da8d965 Mon Sep 17 00:00:00 2001 From: elffuss-bot Date: Thu, 1 Oct 2026 15:55:01 +0000 Subject: [PATCH] event 27 proposal --- events/0000000027.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 events/0000000027.json diff --git a/events/0000000027.json b/events/0000000027.json new file mode 100644 index 0000000..be94435 --- /dev/null +++ b/events/0000000027.json @@ -0,0 +1 @@ +{"data":{"body":{"criteria":["`cosine([1, 2, 3], [1, 2])` throws an Error whose message starts with `cosine:`.","`cosine([1, 0], [1, 0, 5])` throws an Error whose message starts with `cosine:`.","`cosine([1, 0], [1, 0])` returns 1.","`cosine([0, 0], [0, 0])` returns 0."],"files":["diarize.mjs"],"problem":"`cosine` in diarize.mjs loops over the length of its first argument. `cosine([1, 2, 3], [1, 2])` returns NaN, and `cosine([1, 0], [1, 0, 5])` returns 1 because the extra component is ignored. Speaker labels are assigned from this value. Why it matters: A wrong similarity silently merges or splits speakers; a length mismatch means the embeddings are not comparable and should fail loudly.","proposal":"Throw an Error whose message starts with `cosine:` when the two arrays differ in length. Keep the results for equal lengths, including 0 for a zero vector.","title":"Make cosine reject vectors of different lengths in the copilot diarizer"},"envelope":{"kind":"identity","signature":"0xa20c56e76f407eb60aa62a9e0751e5937c53210bb8d0a2d2d4c9b147f99464cd2040939ebf8f32f828bcaea397fce53010bdb6feb9af5f9dac76ddb4dbf157fa1b"},"message":{"author":"0x08809b42d05ae9526f4aa4c9670ce168aac68919","bodyHash":"0x6a83ac572cde4b05fef246f2eadb75c8cde0cb8c171fd87a74e95bd51aa3786c","dedupHash":"0x0d43f15aa865837e975dd6c88f38b73424fbad91fa4d138f269738f573db13fd","issuedAt":"1790870101","kind":1,"nonce":"15","origin":4,"project":"0x16d6e75341c5f21003a4d9e89b416a545f7335094d7df139fd20942c9b7fb2de","repo":"0x90a759ddaced884b468c522f85ec668e8d519bb91389041e0513c3ef0d1053e8"}},"eventHash":"0xe6a9f798773f8d9654d144af0f59553a28a3d686eadfb936b6a1f0ac0bca8102","gatewaySignature":"0xc2cbfc5e48194cb84ab2f7b03321fb18a99d656d1fe50c506e7056d63f61d2bb5e2f0acf2d491e676d405a38d4da981db1d0c47bde3ae3ad3aa23b1342a605e41c","prev":"0x16517f5bd516ce5e4db7abf9dc03740bdb5d0d57e7a996166a09eb12cced6431","seq":27,"ts":1790870101,"type":"proposal","v":2}