testing/cross_backend/fact_serving.ts view source
(options: FactServingCrossTestOptions): void import {describe_fact_serving_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/fact_serving.js'; options
returns
void Cross-backend fact-serving parity suite — the per-reference (cell-scoped) read model over real HTTP.
Re-proves the D1 fact-access cases (docs/security.md § Fact Access Control)
against each backend's real auth resolution, twinning fuz_app's
server/serve_fact_route.ts and the Rust fuz_fact_serving routers:
fact row; authz lives on the (cell, hash) edge, never unioned);GET /api/facts/:hash is admin (keeper) only:
non-admin → 403, anonymous → 401;acting-less) cell-scoped route, so it can't
read its own *private* fact there (admitted only by public cells). Opt-in
(needs the multi-actor setup); every spine resolves the acting actor at the
dispatcher's authorization phase from account-grain credentials, so the
multi-actor account is drivable on TS and Rust alike.Facts are seeded embedded via _testing_put_fact (the cross-process
driver has no DB handle); the referencing cell via the cell_create RPC
(extract_refs lifts the blake3: hash in data into cell.refs). Gated
on capabilities.fact_serving; runs under every cross_backend_* project —
the TS spine binary and the Rust testing_spine_stub both mount the serve
routes + the seeder.
$lib-free by contract (relative specifiers only) so it imports from the
spawnable cross-process test files.
2 declarations
testing/cross_backend/fact_serving.ts view source
(options: FactServingCrossTestOptions): void import {describe_fact_serving_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/fact_serving.js'; optionsvoid testing/cross_backend/fact_serving.ts view source
FactServingCrossTestOptions import type {FactServingCrossTestOptions} from '@fuzdev/fuz_app/testing/cross_backend/fact_serving.js'; The fact suite adds one optional knob to the shared cell options: a setup variant whose keeper carries a second actor. Only the multi-actor case needs it; the rest of the suite runs single-actor, so wiring it is opt-in. Omit it and the multi-actor case silently skips.
setup_test_multi_actor?type SetupTest