fix(FN-000): skip qmd index mutations in test runs
Why: tests were leaking ~700 per-temp-dir collection registrations
into the user's global ~/.config/qmd/index.yml because searchWithQmd
and the agent-memory qmd path called execFile("qmd", ...) with the
real binary, bypassing shouldSkipBackgroundQmdRefresh() which only
guarded the schedule* wrappers.
Guard both direct-execFile paths under the same skip flag and fall
back to file-based agent memory search when skipping.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -452,6 +452,7 @@ export {
|
||||
buildQmdRefreshCommands,
|
||||
refreshQmdProjectMemoryIndex,
|
||||
scheduleQmdProjectMemoryRefresh,
|
||||
shouldSkipBackgroundQmdRefresh,
|
||||
installQmd,
|
||||
ensureQmdInstalled,
|
||||
ensureQmdInstalledAndRefresh,
|
||||
|
||||
@@ -857,6 +857,9 @@ function normalizeQmdSearchResultPath(rootDir: string, rawPath: unknown): string
|
||||
}
|
||||
|
||||
async function searchWithQmd(rootDir: string, options: MemorySearchOptions): Promise<MemorySearchResult[]> {
|
||||
if (shouldSkipBackgroundQmdRefresh()) {
|
||||
return [];
|
||||
}
|
||||
const command = "qmd";
|
||||
const limit = Math.max(1, Math.min(options.limit ?? 5, 20));
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user