fix: tighten CLI contract validation (#3874)
This commit is contained in:
@@ -111,8 +111,10 @@ export class RuntimeClient {
|
||||
id: response.id,
|
||||
ok: true,
|
||||
result: {
|
||||
// Why: remote status proves the paired runtime is reachable, not
|
||||
// that this client machine has a local Orca desktop process.
|
||||
app: {
|
||||
running: true,
|
||||
running: false,
|
||||
pid: null
|
||||
},
|
||||
runtime: {
|
||||
|
||||
@@ -74,6 +74,7 @@ describe('CLI remote WebSocket transport', () => {
|
||||
const client = new RuntimeClient('/tmp/unused', 5_000, barePayload)
|
||||
const status = await client.getCliStatus()
|
||||
|
||||
expect(status.result.app).toEqual({ running: false, pid: null })
|
||||
expect(status.result.runtime.reachable).toBe(true)
|
||||
expect(status.result.runtime.runtimeId).toBe('runtime-ws-2')
|
||||
})
|
||||
@@ -95,6 +96,7 @@ describe('CLI remote WebSocket transport', () => {
|
||||
const client = new RuntimeClient(userDataPath, 5_000, null, 'remote-dev')
|
||||
const status = await client.getCliStatus()
|
||||
|
||||
expect(status.result.app).toEqual({ running: false, pid: null })
|
||||
expect(status.result.runtime.reachable).toBe(true)
|
||||
expect(status.result.runtime.runtimeId).toBe('runtime-env-1')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user