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

address review: deduplicate supported memory drill types into POST_SUPPORTED_MEMORY_TYPES constant

Adam Eivy582c02d60c66
diff --git a/server/lib/postValidation.js b/server/lib/postValidation.js
index 11409bd4dd..4294aaaf5d 100644
--- a/server/lib/postValidation.js
+++ b/server/lib/postValidation.js
@@ -33,6 +33,8 @@ const llmResponseSchema = z.object({
const MATH_DRILL_TYPES = ['doubling-chain', 'serial-subtraction', 'multiplication', 'powers', 'estimation'];
const LLM_DRILL_TYPES = ['word-association', 'story-recall', 'verbal-fluency', 'wit-comeback', 'pun-wordplay', 'what-if', 'alternative-uses', 'story-prompt', 'invention-pitch', 'reframe'];
const MEMORY_DRILL_TYPES = ['memory-fill-blank', 'memory-sequence', 'memory-element-flash'];
+// Memory drills supported by the POST runner (client-side scoring with string comparison)
+const POST_SUPPORTED_MEMORY_TYPES = ['memory-sequence', 'memory-element-flash'];
const DRILL_TYPES = [...MATH_DRILL_TYPES, ...LLM_DRILL_TYPES, ...MEMORY_DRILL_TYPES];
const drillTypeConfigSchema = z.object({
@@ -194,4 +196,4 @@ export const trainingEntrySchema = z.object({
totalMs: z.number().min(0),
});
-export { LLM_DRILL_TYPES, MATH_DRILL_TYPES, MEMORY_DRILL_TYPES };
+export { LLM_DRILL_TYPES, MATH_DRILL_TYPES, MEMORY_DRILL_TYPES, POST_SUPPORTED_MEMORY_TYPES };
diff --git a/server/services/meatspacePost.js b/server/services/meatspacePost.js
index e019bab1f0..9621058dcf 100644
--- a/server/services/meatspacePost.js
+++ b/server/services/meatspacePost.js
@@ -9,7 +9,7 @@ import { writeFile } from 'fs/promises';
import { join } from 'path';
import { randomUUID } from 'crypto';
import { PATHS, ensureDir, readJSONFile } from '../lib/fileUtils.js';
-import { LLM_DRILL_TYPES, MEMORY_DRILL_TYPES } from '../lib/postValidation.js';
+import { LLM_DRILL_TYPES, MEMORY_DRILL_TYPES, POST_SUPPORTED_MEMORY_TYPES } from '../lib/postValidation.js';
const MEATSPACE_DIR = PATHS.meatspace;
const SESSIONS_FILE = join(MEATSPACE_DIR, 'post-sessions.json');
@@ -108,7 +108,7 @@ export async function submitPostSession(sessionData) {
}
// Memory drills: trust client-side scoring only for supported types
- if (rest.type === 'memory-sequence' || rest.type === 'memory-element-flash') {
+ if (POST_SUPPORTED_MEMORY_TYPES.includes(rest.type)) {
return { ...rest, score: t.score || 0 };
}
// Unsupported memory drills (e.g. memory-fill-blank): preserve data, zero score