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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: resolve join(PATHS.data, TYPE) constants in the CATEGORIES coverage guard (#3285)
[._.]/ Adam Eivyf73498c9c1df
diff --git a/server/services/dataManager.categories.test.js b/server/services/dataManager.categories.test.jsindex 15f79143b7..61d6226fae 100644--- a/server/services/dataManager.categories.test.js+++ b/server/services/dataManager.categories.test.js@@ -15,7 +15,8 @@* 2. `DEFAULT_EXCLUDES` in services/backup.js — anchored rsync filter paths.* 3. Source scan of server/ + scripts/ for the ways a data dir is spelled* outside PATHS: `dataPath('name')`, `join(PATHS.data, 'name')`,- * `` `${PATHS.data}/name` ``, and `join(root, 'data', 'name')`.+ * `` `${PATHS.data}/name` ``, `join(root, 'data', 'name')`, and the+ * collection-store idiom `join(PATHS.data, TYPE)` with a const name.* 4. `data.reference/` — dirs seeded into `data/` on first install.*/@@ -39,6 +40,16 @@ const DATA_DIR_PATTERNS = [/,\s*'data',\s*'([a-z0-9._-]+)'/g];+// `join(PATHS.data, TYPE)` — the collection-store idiom, where the directory+// name is a module constant rather than an inline literal. Capture the+// identifier, then resolve it against its declaration in the same file.+const INDIRECT_DATA_DIR_PATTERN = /PATHS\.data,\s*([A-Z][A-Z0-9_]*)\s*\)/g;++function resolveConstant(source, identifier) {+ const declaration = new RegExp(`\\bconst\\s+${identifier}\\s*=\\s*'([a-z0-9._-]+)'`);+ return source.match(declaration)?.[1] ?? null;+}+function walkJsFiles(dir, out = []) {for (const entry of readdirSync(dir, { withFileTypes: true })) {if (entry.name === 'node_modules' || entry.name.startsWith('.')) continue;@@ -75,6 +86,9 @@ function discoverDataDirs() {add(match[1], relative(PATHS.root, file));}}+ for (const match of source.matchAll(INDIRECT_DATA_DIR_PATTERN)) {+ add(resolveConstant(source, match[1]), relative(PATHS.root, file));+ }}}diff --git a/server/services/dataManager.js b/server/services/dataManager.jsindex b1662b0975..aa574bd791 100644--- a/server/services/dataManager.js+++ b/server/services/dataManager.js@@ -36,6 +36,7 @@ export const CATEGORIES = {'browser-profile': { label: 'Browser Profile', description: 'Chrome/Chromium browser data', archivable: false, deletable: true },'calendar': { label: 'Calendar', description: 'Calendar sync data', archivable: true, deletable: false },'certs': { label: 'TLS Certificates', description: 'HTTPS certificate and private key — purging drops the install back to HTTP', archivable: false, deletable: false },+ 'commission-feedback': { label: 'Commission Feedback', description: 'Reactions on creative commissions (file mirror of the Postgres store)', archivable: true, deletable: false },'conflict-journal': { label: 'Conflict Journal', description: 'Peer-sync conflict history — diagnostics only, safe to purge', archivable: true, deletable: true },'cos': { label: 'Chief of Staff', description: 'Agent data, reports, memories', archivable: true, deletable: false },'creative': { label: 'Creative Ledger', description: 'Append-only ledger of creative generation runs', archivable: true, deletable: false },