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: fix changelog, truncate snippets, validate dates, add size limits

Adam Eivy6c6b14cc1159
diff --git a/.changelog/v1.6.7.md b/.changelog/v1.6.7.md
index 1ef514fe98..6341662937 100644
--- a/.changelog/v1.6.7.md
+++ b/.changelog/v1.6.7.md
@@ -8,16 +8,6 @@ Folder picker improvements for Windows: drive selector, home directory quick-nav
## Features
-### Identity Orchestrator & Chronotype (M42 P1)
-- Added unified Identity API (`GET /api/digital-twin/identity`) that tracks status of all Digital Twin subsystems (Genome, Chronotype, Aesthetics, Goals) in a single endpoint
-- Added Chronotype derivation engine that reads 5 sleep markers (CLOCK, DEC2, PER2, CRY1, MTNR1B) and 2 caffeine markers (CYP1A2, ADA) from genome data to classify chronotype as morning/intermediate/evening with confidence scoring
-- Weighted genetic scoring: CRY1 (0.30) > CLOCK (0.25) > PER2 (0.20) > MTNR1B (0.15) > DEC2 (0.10), combined with optional behavioral input for composite classification
-- Personalized schedule recommendations (wake/sleep times, peak focus windows, exercise windows) based on chronotype
-- Caffeine cutoff recommendations based on CYP1A2 fast/slow metabolizer status
-- Meal timing recommendations based on MTNR1B variant affecting glucose response
-- `PUT /api/digital-twin/identity/chronotype` accepts behavioral overrides (preferred wake/sleep times, focus windows) that blend with genetic data
-- `POST /api/digital-twin/identity/chronotype/derive` for force re-derivation after genome updates
-
### FolderPicker: Windows drive navigation
- Added drive selector bar showing all available Windows drives (A–Z) so users can navigate between drives without typing paths
- Active drive is visually highlighted with the accent color
diff --git a/client/src/components/digital-twin/tabs/TasteTab.jsx b/client/src/components/digital-twin/tabs/TasteTab.jsx
index 94cf7fc161..d801dd5bcf 100644
--- a/client/src/components/digital-twin/tabs/TasteTab.jsx
+++ b/client/src/components/digital-twin/tabs/TasteTab.jsx
@@ -222,7 +222,7 @@ export default function TasteTab({ onRefresh }) {
await api.submitBehavioralFeedback({
contentType: 'taste_summary',
validation,
- contentSnippet: summary,
+ contentSnippet: summary?.slice(0, 2000),
context: `Taste section: ${sectionId}`,
providerId: selectedProvider?.providerId,
model: selectedProvider?.model
diff --git a/client/src/components/digital-twin/tabs/TestTab.jsx b/client/src/components/digital-twin/tabs/TestTab.jsx
index ead9f68bd0..d91a43c544 100644
--- a/client/src/components/digital-twin/tabs/TestTab.jsx
+++ b/client/src/components/digital-twin/tabs/TestTab.jsx
@@ -77,7 +77,7 @@ export default function TestTab({ onRefresh }) {
await api.submitBehavioralFeedback({
contentType: 'test_response',
validation,
- contentSnippet: response,
+ contentSnippet: response?.slice(0, 2000),
context: `Test: ${testName} | Model: ${model}`,
providerId,
model
diff --git a/package-lock.json b/package-lock.json
index 060f0c42f1..25aef0cbcf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos",
- "version": "1.8.3",
+ "version": "1.8.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos",
- "version": "1.8.3",
+ "version": "1.8.4",
"license": "MIT",
"dependencies": {
"express": "^4.21.2",
diff --git a/package.json b/package.json
index 15730a7ad6..2d593e5fa4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "portos",
- "version": "1.8.3",
+ "version": "1.8.4",
"private": true,
"description": "Local dev machine App OS portal",
"author": "Adam Eivy (@antic|@atomantic)",
diff --git a/server/lib/digitalTwinValidation.js b/server/lib/digitalTwinValidation.js
index 4699f56970..5c1de7ac43 100644
--- a/server/lib/digitalTwinValidation.js
+++ b/server/lib/digitalTwinValidation.js
@@ -411,8 +411,8 @@ export const tasteAnswerInputSchema = z.object({
questionId: z.string().min(1),
answer: z.string().min(1).max(10000),
source: z.enum(['core', 'follow_up', 'personalized']).optional(),
- generatedQuestion: z.string().optional(),
- identityContextUsed: z.array(z.string()).optional()
+ generatedQuestion: z.string().max(2000).optional(),
+ identityContextUsed: z.array(z.string().max(1000)).max(50).optional()
});
export const tastePersonalizedQuestionInputSchema = z.object({
diff --git a/server/lib/identityValidation.js b/server/lib/identityValidation.js
index fae38e00f1..c04a7d0730 100644
--- a/server/lib/identityValidation.js
+++ b/server/lib/identityValidation.js
@@ -17,7 +17,14 @@ export const chronotypeBehavioralInputSchema = z.object({
// --- Longevity Schemas ---
export const birthDateInputSchema = z.object({
- birthDate: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'Must be YYYY-MM-DD format')
+ birthDate: z.string()
+ .regex(/^\d{4}-\d{2}-\d{2}$/, 'Must be YYYY-MM-DD format')
+ .refine((value) => {
+ const date = new Date(value);
+ if (Number.isNaN(date.getTime())) return false;
+ const [y, m, d] = value.split('-').map(Number);
+ return date.getUTCFullYear() === y && date.getUTCMonth() + 1 === m && date.getUTCDate() === d;
+ }, 'Must be a valid calendar date')
});
// --- Goal Schemas ---
diff --git a/server/services/identity.js b/server/services/identity.js
index f4ffe604fd..598a8c20d3 100644
--- a/server/services/identity.js
+++ b/server/services/identity.js
@@ -556,7 +556,6 @@ export async function getIdentityStatus() {
}
identity.updatedAt = new Date().toISOString();
- await saveJSON(IDENTITY_FILE, identity);
return identity;
}