test(02-09): pin Server/Web5 KeepAlive round-trip survival via instance uid
Demo images / Build & push demo images (push) Successful in 3m41s

Task 2 (no-op branch, per plan): Task 1's evidence positively proved
Server.vue and Web5.vue's instances already survive tab round-trips —
the "remounts" reading was a probe artifact (02-FINDINGS.md), not a real
defect. No change to DashboardRouterView.vue, dashboardViewWrappers.ts,
keepAliveRoutes.ts or Server.vue's KeepAlive/lifecycle wiring.

Lands 4 regression tests in keepAliveLifecycle.test.ts using Vue's own
component-instance identity (vm.$.uid) instead of a CSS selector, so the
pin can't inherit the same generic-.view-container ambiguity Task 1 found:
round-trip identity for Server (Test 1) and Web5 + a second tab (Test 2),
include-list correctness (Test 3), and the LRU cap staying intact (Test 4).
All four pass immediately against the unmodified code — that pass is
itself the pin, per the plan's explicitly anticipated no-change path.

Full suite green (95 files / 778 tests), type-check clean, build succeeds.
keepAliveTabs.test.ts confirmed byte-for-byte unmodified and still green.
No deploy: nothing in neode-ui/src changed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
archipelago
2026-07-31 05:50:55 -04:00
co-authored by Claude Fable 5
parent 550a2927b9
commit 3e3159fa95
2 changed files with 244 additions and 6 deletions
@@ -593,3 +593,41 @@ selector ambiguity entirely by using Vue's own component tree instead of a CSS s
permanent regression pin, confirms they pass immediately against the CURRENT, unmodified code
(itself the proof), and updates this section with the pre-existing-code pass observation. No
build/deploy/redeploy step is needed since nothing in `neode-ui/src` changes.
### Task 2 outcome (no-op branch, per this plan's own explicitly anticipated path)
Landed four new tests in `keepAliveLifecycle.test.ts`'s new `02-09 gap closure` describe block,
measuring component-instance identity via `vm.$.uid` (Vue's own internal per-instance id) rather
than any CSS selector:
- **Test 1 (the gap):** mounts the REAL `DashboardRouterView` + REAL `Server.vue` at
`/dashboard/server`, away-hops to a synthetic `/dashboard/settings`, returns, and asserts
`findComponent(Server).vm.$.uid` is IDENTICAL before and after. **Passed immediately, first
try, against the unmodified code** — no RED phase was possible or expected, because this is
the no-change branch: the plan's own instruction ("this branch is only available on positive
proof of survival... land Tests 1-4, they will pass immediately, which is itself the pin")
describes exactly this outcome. A failing-before-fix observation does not exist here because
there was never a fix.
- **Test 2 (no collateral damage):** the same round trip through the REAL `Web5.vue` (the other
surface this investigation implicates) plus a synthetic second tab, both keeping their
instance-uid / mount-count at exactly 1 across the round trip. **Passed immediately.**
- **Test 3 (registration is really the include list):** every `keepAliveIncludeNames()` entry is
a `KeepWrap:<path>` name for a registered path, contains no comma, and `/dashboard/server`'s and
`/dashboard/web5`'s wrapper names are both present. **Passed** (already true, unconditionally,
from the existing derivation in `dashboardViewWrappers.ts`).
- **Test 4 (the bound stays bound):** `shouldKeepAlive` still registers Server/Web5 and
`KEEP_ALIVE_MAX` is still 6, unchanged. **Passed** — the pre-existing 02-04 eviction test in the
same file (`visiting more distinct registered tabs than KEEP_ALIVE_MAX...`) is untouched and
still green, confirming the cap itself was never in question.
**Verification run:** full `npm test`**95 test files / 778 tests, all green** (no regressions
introduced by the new mocks added to this file's `vi.mock('@/api/rpc-client', ...)` Proxy
fallback and new `vi.mock('vue-i18n', ...)`, both additive). `npm run type-check` — clean.
`npm run build` — succeeds (`✓ built in 24.62s`); no bundle-content grep was performed because,
per the no-change branch, nothing in `neode-ui/src` differs from the last-deployed build, so
there is no new string to look for and no reason to redeploy. `keepAliveTabs.test.ts` — confirmed
byte-for-byte unmodified (`git diff --stat` empty) and still green (6/6 tests passing).
**No deploy performed.** D-15's dev-pair-only rule is satisfied vacuously: archi-dev-box already
runs the build this investigation probed against (unchanged), and archy-x250-dev's status is
unaffected either way by a change that never happened.