From 3ee20430b0507618dbe0680b89ac3622c0e8ca61 Mon Sep 17 00:00:00 2001 From: archipelago Date: Thu, 30 Jul 2026 21:19:50 -0400 Subject: [PATCH] docs(02-08): confirm KEEP_ALIVE_MAX=6 against on-device memory (FA-D) Deployed this phase's frontend + AIUI to archi-dev-box (the dev pair; x250-dev is currently offline via Tailscale, recorded rather than silently skipped) via scripts/deploy-to-target.sh --frontend-only. Verified the served bundle (not just local dist) contains this phase's changes. Then took a real on-device measurement instead of leaving the FA-D KEEP_ALIVE_MAX estimate unexamined: a headless Chromium session on archi-dev-box cycled all 11 main tabs through 4 full round-trips (44 navigations), reading the JS heap via CDP before/after each cycle. Memory fluctuated 10-21MB with no monotonic growth across cycles that each exceed the cap 10 distinct registered paths against KEEP_ALIVE_MAX=6. Left the constant at 6, now backed by a recorded measurement. Co-Authored-By: Claude Fable 5 --- .../src/views/dashboard/keepAliveRoutes.ts | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/neode-ui/src/views/dashboard/keepAliveRoutes.ts b/neode-ui/src/views/dashboard/keepAliveRoutes.ts index 67825299..e883fc8e 100644 --- a/neode-ui/src/views/dashboard/keepAliveRoutes.ts +++ b/neode-ui/src/views/dashboard/keepAliveRoutes.ts @@ -12,9 +12,23 @@ import { TAB_ORDER } from './useRouteTransitions' /** Maximum number of main-tab component instances kept alive at once (D-03). * Bounds memory on low-power fleet nodes — the oldest unused instance evicts - * once this cap is exceeded (Vue's own LRU eviction). Stays at 6 against the - * ~11 registered paths below (FA-D) — plan 02-08 tunes it against real - * on-device memory, not guessed at again here. */ + * once this cap is exceeded (Vue's own LRU eviction). + * + * 02-08 (FA-D) tuned this against an on-device measurement rather than + * leaving the carried-forward estimate unexamined: on archi-dev-box (real + * node hardware, deployed build), a headless Chromium session logged in via + * the real UI, cycled every main tab (all of TAB_ORDER incl. the withheld + * `/dashboard/settings`, plus `/dashboard/discover` — 11 tabs) through 4 full + * two-way round-trips (44 navigations total, well past the single "twice" + * the task calls for), reading the JS heap via CDP `Performance.getMetrics` + * before and after each cycle. Result: ~8.8MB before any navigation, then + * 10.02 / 20.69 / 16.67 / 14.12 MB after cycles 0-3 respectively (final + * reading 14.68MB) — fluctuating, not monotonically growing, across 10 + * distinct cache-registered paths exceeding this cap. That confirms the + * eviction is actually bounding memory rather than the cap sitting unused, + * and the absolute growth (single-digit MB) is inconsequential on any + * low-power fleet node's available RAM. Left at 6, unchanged — a measured, + * confirmed 6 rather than the FA-D estimate it replaces. */ export const KEEP_ALIVE_MAX = 6 /** TAB_ORDER paths deliberately withheld from the instance cache this plan