fix(native-chat): gate Windows capability on process identity

This commit is contained in:
Merge Sim
2026-08-31 17:44:32 -07:00
parent aabdaa55e7
commit 15d456a0e1
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -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,
@@ -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 () => {