testing/cross_backend/cell_gated_create.ts view source
(options: RpcPathCrossSuiteOptions): void import {describe_cell_gated_create_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/cell_gated_create.js'; options
returns
void Cross-backend parity suite for the parent-aware cell-creation authorizer (CellCreateAuthorize) — the directory model.
The authorizer adds no method, column, or wire shape, so the schema-snapshot and action-manifest parity gates are blind to a TS↔Rust authorizer divergence (the authorizer in the wrong phase, a different deny shape, the 404/403 split, the moderation outcome). This behavioral cross case is the only gate that catches one — proven *here in fuz_app*, against both reference spines.
Both spines mount the same directory-model policy (the TS spine binary via
create_test_cell_gated_create_authorize, the Rust testing_spine_stub via
TestCellGatedCreateAuthorize): admin bypasses; a non-admin creating a
kind: 'space' root is denied (admin-only); a contribution under a
space is gated by the space's data.policy[kind] = {min_role, moderation_required},
with the moderation outcome folded into the verdict; plain parentless creates
stay open. The suite asserts all spines agree on:
space root → 403
cell_create_forbidden; admin → succeeds.participant → succeeds.moderation_required — a participant's post
(moderation_required: true) is born moderation: 'pending' + private; a
react (moderation_required: false) is born moderation: 'approved' at
the author's visibility.cell_not_found (the
parent is masked); under a public space → 403 (you see it, you
can't contribute).Gated on capabilities.cell_gated_create — true only on the reference
spine binaries that mount the policy, so it skips for generic consumers and
the in-process default app (the authorizer hook's in-process coverage is the
standalone auth/cell_create_authorize.db.test.ts).
$lib-free by contract (relative specifiers only).
2 declarations
testing/cross_backend/cell_gated_create.ts view source
(options: RpcPathCrossSuiteOptions): void import {describe_cell_gated_create_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/cell_gated_create.js'; optionsvoid testing/cross_backend/cell_gated_create.ts view source
(options: RpcPathCrossSuiteOptions): void import {describe_cell_moderate_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/cell_gated_create.js'; Cross-backend parity for the cell_moderate verb (the `pending →
approved | rejected` transition) — root-authority-gated.
Builds a moderated public space (admin) + a participant's post (born
pending + private under the moderation_required: true policy), then
proves both spines agree:
moderation: 'approved' +
visibility: 'public' (the contribution goes live).403 cell_moderate_forbidden (the
author can *view* their own pending cell, so they reach the gate, and are
denied — moderation authority is over the governing root, not the
contribution).cell_not_found, never learns it exists.moderation: 'rejected', visibility stays private.Gated on capabilities.cell_gated_create — a pending contribution only
exists when the directory authorizer is mounted (reference spine binaries).
$lib-free by contract (relative specifiers only).
optionsvoid