From 961d1e45de3fb0cd549bfd8471e7c241a0f59e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=BCtke?= Date: Sun, 31 May 2026 23:15:37 +0000 Subject: [PATCH] fix(embed): make session maxDuration env-configurable via QMD_EMBED_MAX_DURATION_MS (#673) --- CHANGELOG.md | 12 ++++++++++++ src/store.ts | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3e8118..2a52053 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ ## [Unreleased] +### Fixed + +- The embed session `maxDuration` is now env-configurable via + `QMD_EMBED_MAX_DURATION_MS` (default: 30 min). This prevents large-corpus + embeddings from being aborted by the hardcoded 30-minute ceiling (#673). +- **build**: Remove `shell: true` from `spawnSync` in `scripts/build.mjs`. On + Windows, passing `shell: true` caused `cmd.exe` to misparse `process.execPath` + when the Node.js installation path contains spaces (e.g. + `C:\Program Files\nodejs\node.exe`). Since `run()` always receives a real + binary path + args array, no shell is needed — `spawnSync` can spawn + executables directly. (#681) + ## [2.5.3] - 2026-05-28 ### Features diff --git a/src/store.ts b/src/store.ts index 3f02770..7b5619c 100644 --- a/src/store.ts +++ b/src/store.ts @@ -1824,7 +1824,7 @@ export async function generateEmbeddings( } return { chunksEmbedded, errors: activeErrorCount(), failures: failureList() }; - }, { maxDuration: 30 * 60 * 1000, name: 'generateEmbeddings' }); + }, { maxDuration: Number(process.env.QMD_EMBED_MAX_DURATION_MS ?? 30 * 60 * 1000), name: 'generateEmbeddings' }); return { docsProcessed: totalDocs,