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: hold the fallback pm2 name to the same predicate as the model's (#5657)

Adam Eivy8fa2cce95513
diff --git a/server/services/aiDetect.js b/server/services/aiDetect.js
index e3d5fc992b..484d2809c3 100644
--- a/server/services/aiDetect.js
+++ b/server/services/aiDetect.js
@@ -43,11 +43,12 @@ const DEFAULT_START_COMMAND = 'npm run dev';
// The scanned directory's name is operator-supplied rather than model output,
// but it still becomes a pm2 argv token when the model gives no usable name —
-// so hold it to the same shape PM2_PROCESS_NAME_PATTERN demands (no leading
-// separator, bounded length) instead of passing a raw slug through.
+// so hold the fallback to the SAME predicate the model's answer must satisfy
+// (a directory literally named `all` would otherwise reintroduce the reserved
+// every-process target through the back door).
const fallbackProcessName = (dirName) => {
const slug = dirName.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+/, '').slice(0, 64);
- return slug || 'app';
+ return isUsablePm2ProcessName(slug) ? slug : 'app';
};
/**