From 67fc11818542b8c907bc031afaa69d5d77666ccc Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Sat, 7 Feb 2026 17:56:35 -0500 Subject: [PATCH] fix: add caf audio extension regression coverage (#10982) (thanks @succ985) --- CHANGELOG.md | 1 + src/media/mime.test.ts | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62ab432f89..c2e71dbc23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ Docs: https://docs.openclaw.ai - Cron: scheduler reliability (timer drift, restart catch-up, lock contention, stale running markers). (#10776) Thanks @tyler6204. - Cron: store migration hardening (legacy field migration, parse error handling, explicit delivery mode persistence). (#10776) Thanks @tyler6204. - Memory: set Voyage embeddings `input_type` for improved retrieval. (#10818) Thanks @mcinteerj. +- Media understanding: recognize `.caf` audio attachments for transcription. (#10982) Thanks @succ985. - Telegram: auto-inject DM topic threadId in message tool + subagent announce. (#7235) Thanks @Lukavyi. - Security: require auth for Gateway canvas host and A2UI assets. (#9518) Thanks @coygeek. - Cron: fix scheduling and reminder delivery regressions; harden next-run recompute + timer re-arming + legacy schedule fields. (#9733, #9823, #9948, #9932) Thanks @tyler6204, @pycckuu, @j2h4u, @fujiwara-tofu-shop. diff --git a/src/media/mime.test.ts b/src/media/mime.test.ts index df9f9c4f00..9798e1f5e5 100644 --- a/src/media/mime.test.ts +++ b/src/media/mime.test.ts @@ -1,6 +1,6 @@ import JSZip from "jszip"; import { describe, expect, it } from "vitest"; -import { detectMime, extensionForMime, imageMimeFromFormat } from "./mime.js"; +import { detectMime, extensionForMime, imageMimeFromFormat, isAudioFileName } from "./mime.js"; async function makeOoxmlZip(opts: { mainMime: string; partPath: string }): Promise { const zip = new JSZip(); @@ -96,3 +96,17 @@ describe("extensionForMime", () => { expect(extensionForMime(undefined)).toBeUndefined(); }); }); + +describe("isAudioFileName", () => { + it("matches known audio extensions", () => { + const cases = [ + { fileName: "voice.mp3", expected: true }, + { fileName: "voice.caf", expected: true }, + { fileName: "voice.bin", expected: false }, + ] as const; + + for (const testCase of cases) { + expect(isAudioFileName(testCase.fileName)).toBe(testCase.expected); + } + }); +});