diff --git a/events/0000000413.json b/events/0000000413.json new file mode 100644 index 0000000..a5d2c8b --- /dev/null +++ b/events/0000000413.json @@ -0,0 +1 @@ +{"data":{"body":{"criteria":["`cosine([1, 2, 3], [1, 2])` throws an Error whose message starts with `cosine:`, and `cosine([1, 0], [1, 0])` still returns 1.","`cosine([1, 0], [1, 0, 5])` throws an Error whose message starts with `cosine:`, and `cosine([0, 0], [0, 0])` still 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 fail on vectors of different lengths in the copilot diarizer"},"envelope":{"kind":"identity","signature":"0x94ced6213e9a0d776ff450ef06965b2cc8165efb652679a60beb0250427dfe0e61eac49b4282bccbb0e8476cac649ce82e29fbb3d415f9c3f56ac760835ccba91b"},"message":{"author":"0x08809b42d05ae9526f4aa4c9670ce168aac68919","bodyHash":"0x98a9c4b32c831fe60ae79a80de7eab8cf139d2f261a9b2b325c3bab2cadb108d","dedupHash":"0xacda8b768324df789f23abe30e9eb801ee5044034362aa631653f42310569c34","issuedAt":"1790928090","kind":1,"nonce":"13","origin":4,"project":"0x16d6e75341c5f21003a4d9e89b416a545f7335094d7df139fd20942c9b7fb2de","repo":"0x90a759ddaced884b468c522f85ec668e8d519bb91389041e0513c3ef0d1053e8"}},"eventHash":"0x006a73a072d58c6fa157a69eab8a086547e46fef1c29f4bee09805a060c68e0a","gatewaySignature":"0x8441c997c4c6205def86663b89fa4c0dce9eb4dceea240ef95b1af210733a6bd46a77300e073cbf920cd4e8c960a69cba9e09b0f56f0cebe7d19e0dfaf7cd6ba1b","prev":"0x0c78257bd973a6eee8816d7eef26027e7771b093faee3ba8f6d2871802a606a7","seq":413,"ts":1790928091,"type":"proposal","v":2}