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: derive LEV birth year from user's birth date

Adam Eivyeed38c3808b1
diff --git a/server/services/meatspace.js b/server/services/meatspace.js
index ccb0b2f40e..29ea14572e 100644
--- a/server/services/meatspace.js
+++ b/server/services/meatspace.js
@@ -36,7 +36,6 @@ const DEFAULT_CONFIG = {
};
const LEV_TARGET_YEAR = 2045;
-const LEV_BIRTH_YEAR = 1979;
const LEV_START_YEAR = 2000;
// === File I/O ===
@@ -161,9 +160,10 @@ export function computeDeathClock(birthDate, genomeAdjustedLE, lifestyleAdj) {
// === LEV Tracker ===
export function computeLEV(birthDate, adjustedLE) {
+ const birthYear = new Date(birthDate).getFullYear();
const now = new Date();
const currentYear = now.getFullYear() + now.getMonth() / 12;
- const ageAtLEV = LEV_TARGET_YEAR - LEV_BIRTH_YEAR;
+ const ageAtLEV = LEV_TARGET_YEAR - birthYear;
const yearsToLEV = LEV_TARGET_YEAR - currentYear;
const researchProgress = Math.round(((currentYear - LEV_START_YEAR) / (LEV_TARGET_YEAR - LEV_START_YEAR)) * 1000) / 10;
const onTrack = adjustedLE > ageAtLEV;
diff --git a/server/services/meatspace.test.js b/server/services/meatspace.test.js
index 24aca93083..44183c7e61 100644
--- a/server/services/meatspace.test.js
+++ b/server/services/meatspace.test.js
@@ -85,12 +85,12 @@ function computeDeathClock(birthDate, genomeAdjustedLE, lifestyleAdj) {
function computeLEV(birthDate, adjustedLE) {
const LEV_TARGET_YEAR = 2045;
- const LEV_BIRTH_YEAR = 1979;
const LEV_START_YEAR = 2000;
+ const birthYear = new Date(birthDate).getFullYear();
const now = new Date();
const currentYear = now.getFullYear() + now.getMonth() / 12;
- const ageAtLEV = LEV_TARGET_YEAR - LEV_BIRTH_YEAR;
+ const ageAtLEV = LEV_TARGET_YEAR - birthYear;
const yearsToLEV = LEV_TARGET_YEAR - currentYear;
const researchProgress = Math.round(((currentYear - LEV_START_YEAR) / (LEV_TARGET_YEAR - LEV_START_YEAR)) * 1000) / 10;
const onTrack = adjustedLE > ageAtLEV;