# Release v1.14.4 - Changelog

Released: 2026-02-27

## Overview

Genome migration cleanup — completed the meatspace data migration so genome, ClinVar, and epigenetic services read/write from the correct `data/meatspace/` directory, with all stale path references updated across services, routes, client navigation, and documentation.

## Features

- **Apple Health ingest pipeline** — `POST /api/health/ingest` accepts Health Auto Export JSON, validates with Zod, deduplicates by metric+timestamp, and persists to day-partitioned files at `data/health/2026-02-27.json`
- **Apple Health query service** — `GET /api/health/metrics/:name/daily` returns aggregated daily values, `GET /api/health/metrics/:name` returns summary stats, `GET /api/health/range` returns available data range
- **Apple Health correlation endpoint** — `GET /api/health/correlation` merges HRV, steps, alcohol, and blood test data for cross-domain health analysis
- **System health namespace relocation** — moved system health endpoints from `/api/health` and `/api/health/system` to `/api/system/health` and `/api/system/health/details` to free the `/api/health` namespace for Apple Health data
- **Data backup engine** — rsync-based incremental backup from `./data/` to a configured external drive path, with SHA-256 manifest generation for integrity verification after each snapshot
- **Backup REST API** — `GET /api/backup/status`, `POST /api/backup/run`, `GET /api/backup/snapshots`, `POST /api/backup/restore` with Zod request validation
- **Backup cron scheduler** — daily backup at 2 AM (configurable via `settings.backup.cronExpression`), registered with the existing eventScheduler and started at server boot
- **Backup client API** — `getBackupStatus`, `triggerBackup`, `getBackupSnapshots`, `restoreBackup` added to `client/src/services/api.js` for widget consumption
- **BackupWidget dashboard component** — health status indicator (green/yellow/red), manual "Backup Now" trigger with toast feedback, expandable snapshot list, inline restore panel with dry-run preview and selective subdirectory filter

- **Cross-domain insights engine** — `insightsService.js` with 5 exported functions: genome-health correlations (rule-based, groups markers by clinical category and matches blood test values), taste-identity theme generation (LLM, cached to `data/insights/themes.json`), and cross-domain narrative (LLM, cached to `data/insights/narrative.json` with previousText for diff)
- **Insights REST API** — `GET /api/insights/genome-health`, `GET /api/insights/themes`, `POST /api/insights/themes/refresh`, `GET /api/insights/narrative`, `POST /api/insights/narrative/refresh` — all endpoints degrade gracefully with `{ available: false, reason }` when source data is missing
- **Insights client API** — `getGenomeHealthCorrelations`, `getInsightThemes`, `refreshInsightThemes`, `getInsightNarrative`, `refreshInsightNarrative` added to `client/src/services/api.js`
- **Insights dashboard UI** — tabbed page at `/insights/:tab` with four deep-linked views: Overview (3 clickable domain summary cards), Genome-Health (category-grouped marker cards with confidence badges, blood value matching, collapsible provenance), Taste-Identity (LLM theme cards with evidence lists and refresh), Cross-Domain (narrative with ReactDiffViewer diff toggle on refresh)
- **Insights shared components** — `ConfidenceBadge` (color-coded strong/moderate/weak/significant), `InsightCard` (shared card shell with badge and source tags), `ProvenancePanel` (collapsible references), `EmptyState` (guided empty states with nav links)
- **Insights navigation** — "Insights" sidebar entry with Lightbulb icon, alphabetically positioned between Instances and MeatSpace
- **Unified search API** — `GET /api/search?q=<query>` fans out keyword search to Brain (inbox/people/projects/ideas/links), CoS Memory (BM25), Apps, History, and Health metrics in parallel via Promise.allSettled for fault isolation. Returns `{ query, sources }` with categorized results, each including id/title/snippet/url/type fields. Sources with zero results are omitted.
- **Search client function** — `search(q)` added to `client/src/services/api.js` for use by the overlay component
- **Cmd+K search overlay** — Spotlight-style modal mounted in Layout, available from every page; Cmd+K/Ctrl+K opens overlay with debounced search-as-you-type (300ms), results grouped by source with Lucide icons and highlighted keyword snippets, full keyboard navigation (arrows/Enter/Escape), deep-link navigation on selection, body scroll lock, and React portal for z-index isolation

- **MeatSpace Import tab** — wired existing ImportTab component into MeatSpace page routing, sidebar nav, and tab bar at `/meatspace/import`
- **Health JSON import UI** — added JSON file upload section to ImportTab for Health Auto Export JSON files, with success/error display showing metrics processed, records ingested/skipped, and days affected

## Fixes

- **HRV metric name mismatch** — Health Auto Export JSON uses `heart_rate_variability` but queries expected `heart_rate_variability_sdnn`; added metric name normalization on JSON ingest and query-time alias fallback so existing imported data displays correctly
- **Claude Code nesting detection in agent spawner** — strip `CLAUDECODE` env var from child processes so CoS agents, Brain, Runner, and Digital Twin CLI spawns don't fail with "cannot be launched inside another Claude Code session" when PortOS server runs within a Claude Code terminal

## Improvements

- **Genome migration: service data paths** — updated `genome.js`, `clinvar.js`, and `epigenetic.js` services to use `PATHS.meatspace` instead of `PATHS.digitalTwin`, completing the migration from digital-twin to meatspace storage
- **Genome migration: route comments** — updated all 18 JSDoc comments in `server/routes/genome.js` to reference `/api/meatspace/genome` (was `/api/digital-twin/genome`)
- **Genome migration: client navigation** — IdentityTab "View Full Genome" button now navigates to `/meatspace/genome` (was broken `/digital-twin/genome` dead link)
- **Genome migration: documentation** — updated `docs/API.md` and `docs/features/identity-system.md` to reflect meatspace paths for genome data files and API routes
- **Genome migration: data files** — moved `genome.json`, `genome-raw.txt`, `clinvar-index.json`, `clinvar-meta.json` from `data/digital-twin/` to `data/meatspace/` so the server reads them correctly
