Generic dual-spawn vitest globalSetup factory — spawns + bootstraps
*two* backends at once and provides both serialized handles, for any
cross-impl gate that needs both alive together. (The per-backend
create_cross_backend_global_setup derives one backend from the project
name; this brings up a pair.)
Its primary use is the schema- / action-manifest-parity gates (capture
each backend over a _testing_* introspection RPC and diff with
assert_schema_snapshots_equal / assert_action_manifests_equal) — which is
why the default provide_keys are parity_handle_*. The login-security gate
(global_setup_login_security.ts) reuses it with its own keys; any future
two-backend gate can too.
A consumer's dual-spawn global_setup.ts collapses to:
import {create_dual_spawn_global_setup} from
'@fuzdev/fuz_app/testing/cross_backend/create_dual_spawn_global_setup.ts';
import {deno_backend_config, rust_backend_config} from './my_backend_config.js';
import './cross_test_types.js';
export default create_dual_spawn_global_setup({
configs: {a: deno_backend_config, b: rust_backend_config},
});The .cross.test.ts injects both keys, rebuilds each with
reconstruct_bootstrapped_handle, and asserts. Run this project in a
later groupOrder than the single-backend projects (or with distinct
ports) — it reuses both configs' ports, so it must not run concurrently
with the per-backend projects.