fix(sandbox): serialize registry mutations and lock usage

This commit is contained in:
Peter Steinberger
2026-02-18 04:55:33 +01:00
parent 28bac46c92
commit 35016a380c
3 changed files with 18 additions and 10 deletions

View File

@@ -70,7 +70,7 @@ function isRegistryFile<T extends RegistryEntry>(value: unknown): value is Regis
}
async function withRegistryLock<T>(registryPath: string, fn: () => Promise<T>): Promise<T> {
const lock = await acquireSessionWriteLock({ sessionFile: registryPath });
const lock = await acquireSessionWriteLock({ sessionFile: registryPath, allowReentrant: false });
try {
return await fn();
} finally {