From fbb8421efbbd8efd44698985ac68d46125f0bea9 Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sun, 6 Sep 2026 14:29:17 -0700 Subject: [PATCH] refactor(runtime): align fallback epoch comment and test preamble Match the file's `// Why:` comment convention on the inherited publication epoch, and drop a redundant duplicate mocks import in the lineage regression test while keeping the required side-effect order. No behavior change. --- ...ca-runtime-create-runtime-owned-mobile-session-terminal.ts | 2 +- .../runtime-owned-terminal-publication-lineage.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/runtime/orca-runtime-create-runtime-owned-mobile-session-terminal.ts b/src/main/runtime/orca-runtime-create-runtime-owned-mobile-session-terminal.ts index 1e0cffe0315..31fb8a90ab0 100644 --- a/src/main/runtime/orca-runtime-create-runtime-owned-mobile-session-terminal.ts +++ b/src/main/runtime/orca-runtime-create-runtime-owned-mobile-session-terminal.ts @@ -120,7 +120,7 @@ export class OrcaRuntimeWithCreateRuntimeOwnedMobileSessionTerminal extends Orca } const next: RuntimeMobileSessionTabsSnapshot = { worktree: worktreeId, - // A fallback adds a surface without retiring the renderer that will publish its next tabs. + // Why: a fresh epoch retires the current publisher, so clients drop its later tab updates. publicationEpoch: existing?.publicationEpoch ?? `headless:${Date.now().toString(36)}`, snapshotVersion: (existing?.snapshotVersion ?? 0) + 1, // Why: activating the new tab also focuses its group, so a "+" targeting a specific split group makes that group active too. diff --git a/src/main/runtime/runtime-owned-terminal-publication-lineage.test.ts b/src/main/runtime/runtime-owned-terminal-publication-lineage.test.ts index 4c6b5c92e0a..2df5abf00da 100644 --- a/src/main/runtime/runtime-owned-terminal-publication-lineage.test.ts +++ b/src/main/runtime/runtime-owned-terminal-publication-lineage.test.ts @@ -1,9 +1,9 @@ import { expect, it, vi } from 'vitest' import type { RuntimeMobileSessionTabsResult } from '../../shared/runtime-types' -await import('./orca-runtime-test-mocks.spec') -await import('./orca-runtime-test-lifecycle.spec') +// Fragments stay side-effect ordered: mocks, then lifecycle, then fixtures. const { OrcaRuntimeService } = await import('./orca-runtime-test-mocks.spec') +await import('./orca-runtime-test-lifecycle.spec') const { store, TEST_WORKTREE_ID } = await import('./orca-runtime-test-fixtures.spec') it.each(['renderer:active-generation', 'headless:active-generation'])(