From 15d456a0e167e5608a746b00bbbfbedc61eef92f Mon Sep 17 00:00:00 2001 From: Merge Sim Date: Mon, 31 Aug 2026 16:07:48 -0700 Subject: [PATCH] fix(native-chat): gate Windows capability on process identity --- src/main/runtime/orca-runtime.test.ts | 7 +++++++ src/main/windows/windows-process-table.test.ts | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/src/main/runtime/orca-runtime.test.ts b/src/main/runtime/orca-runtime.test.ts index 9d93d56dafa..bc609e10657 100644 --- a/src/main/runtime/orca-runtime.test.ts +++ b/src/main/runtime/orca-runtime.test.ts @@ -2126,6 +2126,13 @@ describe('OrcaRuntimeService', () => { expect(status.minCompatibleMobileVersion).toBeGreaterThanOrEqual(0) }) + it('fails closed for structured sessions on Windows without native creation-time proof', () => { + setPlatform('win32') + onTestFinished(resetPlatform) + + expect(createRuntime().getStatus().capabilities).not.toContain('agent-session.structured.v1') + }) + it('reports the configured Windows terminal shell on status', () => { const runtime = new OrcaRuntimeService({ ...store, diff --git a/src/main/windows/windows-process-table.test.ts b/src/main/windows/windows-process-table.test.ts index 609de009820..a23146005a9 100644 --- a/src/main/windows/windows-process-table.test.ts +++ b/src/main/windows/windows-process-table.test.ts @@ -411,6 +411,9 @@ describe('resolving the native reader', () => { } ]) expect(isWindowsProcessTableAvailable()).toBe(true) + // The pinned relay artifact exposes only getProcessList; it must not be + // mistaken for a PID-reuse-safe reader merely because rows are available. + expect(isWindowsProcessStartTimeAvailable()).toBe(false) }) it('asks the addon for memory and command line, as the package path does', async () => { @@ -425,6 +428,7 @@ describe('resolving the native reader', () => { // Memory | CommandLine. A bare snapshot would silently drop the command // line every agent-recognition caller matches on first. expect(addon.getProcessList).toHaveBeenCalledWith(expect.any(Function), 3) + expect(isWindowsProcessStartTimeAvailable()).toBe(false) }) it('reaches the CIM scan when neither the package nor the addon is present', async () => {