testing/cross_backend/full_spine_mount.ts

The full live RPC mount for fuz_app's own spine test binary — the complete action set testing_spine_server.ts exposes on a single RPC endpoint, in one place.

Where default_spine_surface.ts defines the declared surface (create_spine_surface_spec / spine_rpc_endpoints — the create_standard_rpc_actions bundle the spec-derived suites auto-enumerate), this module defines its superset: the standard bundle plus the families the binary live-mounts but keeps off the declared surface —

  • the _testing_* daemon-token backdoors (create_testing_actions),
  • the full cell verb set (CRUD + grant + field + item + audit),
  • the opt-in actor_lookup / actor_search resolvers,
  • the _testing_origin_check probe the origin conformance table drives,
  • the _testing_shorten_credential_expiry seam the credential-deadline suite drives,
  • the _testing_action_manifest backdoor, appended last (it dumps the live method set for the cross-impl manifest-parity gate, so it must enumerate every method above it).

Single-sourcing the mount here lets the binary, the in-process parity setup, and the spine_method_coverage reconciliation test all build the same list — so a method can never be mounted in one place and forgotten in another.

The binary's WS endpoint serves the same list: build_full_spine_mount builds it once and hands the WS mount the protocol actions plus every RPC action, twinning the Rust testing_spine_stub, which compiles one action registry and serves it on both transports. The reconciliation test enumerates build_full_spine_rpc_actions with stub deps and asserts the live method set equals the tagged coverage manifest; see src/test/cross_backend/spine_method_coverage.ts.

view source

Declarations
#

5 declarations

build_full_spine_mount
#

testing/cross_backend/full_spine_mount.ts view source

(deps: AppDeps, options: FullSpineMountOptions): FullSpineMount import {build_full_spine_mount} from '@fuzdev/fuz_app/testing/cross_backend/full_spine_mount.js';

Build the full live mount for both of the spine binary's endpoints: the RPC list, and the WS list that serves the same actions behind the protocol actions.

The Rust testing_spine_stub serves one action registry on RPC and WS, so mounting the full list on WS keeps the two spines' WS method sets equal — the cell verbs among them, whose dispatcher-charged rate limit describe_ws_action_rate_limit_cross_tests drives over a socket. The one difference is cancel: a registered protocol action on TS, read-loop-owned (never dispatched) on Rust.

deps

the backend AppDeps

type AppDeps

options

daemon-token state + optional WS notification sender

returns

FullSpineMount

the RPC and WS action lists, built once and sharing handler instances

build_full_spine_rpc_actions
#

testing/cross_backend/full_spine_mount.ts view source

(deps: AppDeps, options: FullSpineMountOptions): RpcAction[] import {build_full_spine_rpc_actions} from '@fuzdev/fuz_app/testing/cross_backend/full_spine_mount.js';

Build the complete live RPC action list the spine test binary mounts on its single endpoint: the declared create_standard_rpc_actions bundle plus the off-surface families (_testing_* backdoors, cells, actor resolvers).

Mirrors the previous inline assembly in testing_spine_server.ts exactly — session_options is pinned to spine_session_options (the binary's cookie config) and roles to spine_roles (carrying cell_editor), so the only runtime-varying inputs are the daemon-token state + notification sender.

deps

the backend AppDeps (stub deps suffice for method enumeration)

type AppDeps

options

daemon-token state + optional WS notification sender

returns

RpcAction[]

every RpcAction the binary exposes, in mount order

create_spine_live_rpc_endpoints
#

testing/cross_backend/full_spine_mount.ts view source

(): RpcEndpointSpec[] import {create_spine_live_rpc_endpoints} from '@fuzdev/fuz_app/testing/cross_backend/full_spine_mount.js';

The spine binary's whole live RPC mount as an endpoint list, built on stub deps for method resolution only — no handler built here ever runs.

What a suite resolving off-surface methods takes as its live_rpc_endpoints (the conformance table, the differential, and the auth-row generator), so rows can name the cell verbs, the actor resolvers and the _testing_* backdoors the spines mount beside the declared surface. The requests go to the spawned backend, which runs its own handlers. Both spines mount this method set (the action-manifest parity gate holds them to it).

returns

RpcEndpointSpec[]

one endpoint at SPINE_RPC_PATH carrying build_full_spine_rpc_actions's list

FullSpineMount
#

testing/cross_backend/full_spine_mount.ts view source

FullSpineMount import type {FullSpineMount} from '@fuzdev/fuz_app/testing/cross_backend/full_spine_mount.js';

The spine binary's RPC and WS action sets, built from one action list.

rpc_actions

Every action on the RPC endpoint — build_full_spine_rpc_actions's list.

type RpcAction[]

readonly

ws_actions

The WS endpoint's actions: protocol_actions first, then every RPC action not already among them (peer/ping is on both lists). The same handler instances as rpc_actions.

type Action<ActionSpecUnion>[]

readonly

FullSpineMountOptions
#

testing/cross_backend/full_spine_mount.ts view source

FullSpineMountOptions import type {FullSpineMountOptions} from '@fuzdev/fuz_app/testing/cross_backend/full_spine_mount.js';

daemon_token_state

Daemon-token runtime state threaded into create_testing_actions — the _testing_reset handler mutates keeper_account_id after re-seeding. Pass the same instance the daemon-token middleware reads. For the coverage test (method enumeration only, handlers never run) any stub state satisfies it.

type DaemonTokenState

readonly

notification_sender?

WS notification sender for the role-grant-offer fan-out. Pass the SAME ConnectionRegistry the WS endpoint registers connections against (the registry is the fan-out target). Omitted for enumeration.

type NotificationSender | null

readonly

Depends on
#