testing/cross_backend/app_settings.ts

Cross-backend effect suite for the open_signup app setting.

The declarative conformance table pins the admin gate on app_settings_get / app_settings_update (401 / 403 / 200). This suite pins the behavioral effect of the toggle end to end: an admin flips open_signup via app_settings_update, and a subsequent anonymous POST /signup observes the new value.

  • toggle on → anonymous signup without an invite succeeds (200) — with open_signup: true, the invite gate is skipped.
  • toggle off → anonymous signup is refused (403 no_matching_invite) — flipping it back restores the invite requirement, proving the gate keys on the live value rather than a one-time read.

The signup handler reads the toggle fresh from the database on every request, so the admin's write is visible to the next signup. This suite runs in a single process, so it validates the read-through *mechanism* — not multi-process consistency (which the fresh-read shape provides by construction but no single-binary test can observe).

Cites security.md §Signup. Runs both legs via the shared {setup_test} protocol: in-process (auth/app_settings_parity.db.test.ts) + cross-process (cross_backend/app_settings.cross.test.ts, TS spine binaries + Rust testing_spine_stub). Mounted on every spine, so the suite is ungated.

$lib-free by contract (relative specifiers only).

view source

Declarations
#

2 declarations

AppSettingsCrossTestOptions
#

testing/cross_backend/app_settings.ts view source

RpcPathCrossSuiteOptions import type {AppSettingsCrossTestOptions} from '@fuzdev/fuz_app/testing/cross_backend/app_settings.js';

Options for the app-settings effect suite (the standard RPC-dispatched shape).

rpc_path?

RPC endpoint path the methods are mounted on. Default /api/rpc.

type string

readonly

setup_test

Per-test fixture-producing function (fresh keeper + db per call).

type (): Promise<TestFixtureBase>

readonly
returns Promise<TestFixtureBase>

capabilities

Backend capability declarations — each suite gates on its own flag.

type BackendCapabilities

readonly

describe_app_settings_cross_tests
#

Depends on
#