fix: keep scoped RPC tests native-free

This commit is contained in:
Brennan Benson
2026-08-10 04:48:04 -07:00
parent 9202192f10
commit ac82bc16f8
5 changed files with 11 additions and 8 deletions
+2 -3
View File
@@ -11,7 +11,6 @@ import {
import type { FeatureInteractionId } from '../../../shared/feature-interactions'
import { errorResponse, successResponse } from './errors'
import { ALL_RPC_METHODS } from './methods'
import { emulatorProbe, emulatorProbeError } from '../../emulator/emulator-probe'
import type { OrcaRuntimeService } from '../orca-runtime'
import {
@@ -26,7 +25,7 @@ import { OrchestrationLegacyCompatibility } from './orchestration-legacy-compati
import type { RpcDispatchStreamingOptions } from './dispatcher-stream-options'
import { invalidArgumentResponse, mapDispatcherError } from './dispatcher-error-response'
export type DispatcherOptions = { runtime: OrcaRuntimeService; methods?: readonly RpcAnyMethod[] }
export type DispatcherOptions = { runtime: OrcaRuntimeService; methods: readonly RpcAnyMethod[] }
export class RpcDispatcher {
private readonly runtime: OrcaRuntimeService
@@ -34,7 +33,7 @@ export class RpcDispatcher {
private readonly orchestrationMutations: OrchestrationMutationExecutor
private readonly legacyOrchestration: OrchestrationLegacyCompatibility
constructor({ runtime, methods = ALL_RPC_METHODS }: DispatcherOptions) {
constructor({ runtime, methods }: DispatcherOptions) {
this.runtime = runtime
this.registry = buildRegistry(methods)
this.orchestrationMutations = getOrchestrationMutationExecutor(runtime)
+2 -1
View File
@@ -13,6 +13,7 @@ import {
type RuntimeMetadataOwnershipWatch
} from './runtime-metadata-ownership-watch'
import { RpcDispatcher } from './rpc/dispatcher'
import { ALL_RPC_METHODS } from './rpc/methods'
import type { RpcRequest, RpcResponse } from './rpc/core'
import { errorResponse } from './rpc/errors'
import type { RpcMessageContext, RpcTransport } from './rpc/transport'
@@ -559,7 +560,7 @@ export class OrcaRuntimeRpcServer {
metadataOwnershipPollMs = RUNTIME_METADATA_OWNERSHIP_POLL_MS
}: OrcaRuntimeRpcServerOptions) {
this.runtime = runtime
this.dispatcher = new RpcDispatcher({ runtime })
this.dispatcher = new RpcDispatcher({ runtime, methods: ALL_RPC_METHODS })
this.userDataPath = userDataPath
this.pid = pid
this.platform = platform