Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix([ref-watch-phosphene-strip-malloc-subprocess-env]): also strip Malloc* on Python execFile sites

[._.]/ Adam Eivy086daebe5329
diff --git a/server/lib/pythonSetup.js b/server/lib/pythonSetup.js
index 5d9f995770..5e5e43f566 100644
--- a/server/lib/pythonSetup.js
+++ b/server/lib/pythonSetup.js
@@ -89,7 +89,7 @@ const PYTHON_CANDIDATES = IS_WIN
export async function probePythonArch(pythonPath) {
const { stdout } = await execFileAsync(pythonPath, [
'-c', 'import platform; print(platform.machine())'
- ], { timeout: 10_000 }).catch(() => ({ stdout: '' }));
+ ], { env: stripDebugMallocEnv(process.env), timeout: 10_000 }).catch(() => ({ stdout: '' }));
return stdout.trim() || null;
}
@@ -163,7 +163,7 @@ export async function isFlux2VenvHealthy() {
if (cachedFlux2Healthy !== null) return cachedFlux2Healthy;
const py = resolveFlux2Python();
if (!py) { cachedFlux2Healthy = false; return false; }
- const ok = await execFileAsync(py, ['-c', 'from diffusers import Flux2KleinPipeline'], { timeout: 30_000 })
+ const ok = await execFileAsync(py, ['-c', 'from diffusers import Flux2KleinPipeline'], { env: stripDebugMallocEnv(process.env), timeout: 30_000 })
.then(() => true)
.catch(() => false);
cachedFlux2Healthy = ok;
@@ -203,7 +203,7 @@ export async function createVenv(basePython, targetDir) {
? join(targetDir, 'Scripts', 'python.exe')
: join(targetDir, 'bin', 'python3');
if (existsSync(venvPython)) return venvPython;
- await execFileAsync(basePython, ['-m', 'venv', targetDir], { timeout: 120_000 });
+ await execFileAsync(basePython, ['-m', 'venv', targetDir], { env: stripDebugMallocEnv(process.env), timeout: 120_000 });
if (!existsSync(venvPython)) {
throw new Error(`Venv created but interpreter missing at ${venvPython}`);
}
@@ -226,7 +226,7 @@ export async function probePythonHealth(pythonPath) {
' "imports": imports,',
'}))',
].join('\n');
- const { stdout } = await execFileAsync(pythonPath, ['-c', probe], { timeout: 30_000 });
+ const { stdout } = await execFileAsync(pythonPath, ['-c', probe], { env: stripDebugMallocEnv(process.env), timeout: 30_000 });
const data = JSON.parse(stdout.trim().split(/\r?\n/).pop());
const installed = [];
const missing = [];