testing/cross_backend/query_shape.ts view source
(options: RpcPathCapabilityGatedCrossSuiteOptions): void import {describe_query_shape_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/query_shape.js'; options
returns
void Cross-backend query-string shape parity suite.
The TS pipeline reads queries through Hono's c.req.query() — a duplicated
key resolves to its first occurrence — and only routes that declare a
strict object query schema 400 unknown keys, in the pipeline's
params → query → 401 → authz → 403 phase order. A derived-serde axum
extractor diverges on every axis (a plain-text pre-handler "duplicate
field" 400 observable anonymously, silently ignored unknown keys, query
rejection ahead of the 401), so each spine surface that reads a query is
pinned here on both backends:
GET /api/account/status — NO query schema: a duplicated acting
reads first-wins (the persona resolves), a malformed acting answers
account-only (never a default-actor resolve), unknown keys are ignored,
and an anonymous caller with junk query hears 401, never a query 400.method / id / params read
first-wins; a duplicated method must dispatch the first one on every
backend (a last-wins reader dispatches a different method per backend on
the same request). Every response the GET handler writes — a dispatched
answer and its own query refusal alike — is Cache-Control: no-store.GET /api/facts/:hash (gated on capabilities.fact_serving_admin_hash) —
strict query schema: unknown keys and a malformed acting are 400
invalid_query_params even for an anonymous caller (query precedes the
401 guard), while a duplicated acting takes the first occurrence.The per-surface in-process TS pins live beside each module's own tests
(account_status.test.ts, action_rpc.test.ts,
serve_fact_route.db.test.ts); this suite is the cross-impl gate, so it is
cross-process only — like login_security.ts and testing_backdoor.ts.
2 declarations
testing/cross_backend/query_shape.ts view source
(options: RpcPathCapabilityGatedCrossSuiteOptions): void import {describe_query_shape_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/query_shape.js'; optionsvoid testing/cross_backend/query_shape.ts view source
RpcPathCapabilityGatedCrossSuiteOptions import type {QueryShapeCrossTestOptions} from '@fuzdev/fuz_app/testing/cross_backend/query_shape.js'; Options for the query-shape parity suite. The standard capability-gating
RPC-dispatched cross-suite shape (setup_test / capabilities /
rpc_path); aliases the shared RpcPathCapabilityGatedCrossSuiteOptions
rather than minting a duplicate.
rpc_path?RPC endpoint path the methods are mounted on. Default /api/rpc.
type string
setup_testPer-test fixture-producing function (fresh keeper + db per call).
type (): Promise<TestFixture>
Promise<TestFixture>capabilitiesBackend capability declarations — each suite gates on its own flag.
type BackendCapabilities