feat(FN-3449): implement distributed task-id allocator with mesh API endpoi
Implements a distributed task-ID allocator with mesh networking endpoints for multi-project coordination (FN-3449), alongside substantial ChatView and GitManager mobile polish including improved iOS keyboard handling, rubber-band containment, scroll-drift fixes, and visual viewport stabilization. In Fusion-Task-Id: FN-3449
This commit is contained in:
@@ -496,8 +496,34 @@ export function defaultTestWorkerBudget(env = process.env) {
|
||||
|
||||
const { totalWorkers, concurrency } = defaultTestWorkerBudget(process.env);
|
||||
|
||||
const isolatedHomesToCleanup = new Set();
|
||||
|
||||
function cleanupIsolatedHomes() {
|
||||
for (const homePath of isolatedHomesToCleanup) {
|
||||
try {
|
||||
rmSync(homePath, { recursive: true, force: true });
|
||||
} catch {
|
||||
// Best-effort cleanup only.
|
||||
}
|
||||
isolatedHomesToCleanup.delete(homePath);
|
||||
}
|
||||
}
|
||||
|
||||
process.on("exit", cleanupIsolatedHomes);
|
||||
process.on("SIGINT", () => {
|
||||
cleanupIsolatedHomes();
|
||||
process.exit(130);
|
||||
});
|
||||
process.on("SIGTERM", () => {
|
||||
cleanupIsolatedHomes();
|
||||
process.exit(143);
|
||||
});
|
||||
|
||||
export function createIsolatedHomeEnv(env = process.env) {
|
||||
const isolatedHome = realpathSync(mkdtempSync(path.join(tmpdir(), "fusion-test-home-root-")));
|
||||
const rawIsolatedHome = mkdtempSync(path.join(tmpdir(), "fusion-test-home-root-"));
|
||||
const isolatedHome = realpathSync(rawIsolatedHome);
|
||||
isolatedHomesToCleanup.add(isolatedHome);
|
||||
|
||||
const nextEnv = {
|
||||
...env,
|
||||
HOME: isolatedHome,
|
||||
@@ -622,6 +648,7 @@ export function main(argv = process.argv.slice(2)) {
|
||||
recordCachePass(activePackages, packageDirByName, { noCache });
|
||||
} finally {
|
||||
rmSync(isolatedHome, { recursive: true, force: true });
|
||||
isolatedHomesToCleanup.delete(isolatedHome);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user