testing/cross_backend/cell_crud.ts view source
(options: RpcPathCapabilityGatedCrossSuiteOptions): void import {describe_cell_crud_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/cell_crud.js'; options
returns
void Dedicated stateful cell-CRUD parity suite for the cross-backend harness.
The generic describe_rpc_round_trip_tests can't cover cells: the verbs
are stateful (update / delete / get-by-id need a real cell id threaded
from a prior create) and cell_get's input has a top-level check.
So cells stay off the standard declared surface (create_spine_surface_spec)
— exactly like ws / sse — and this suite plus its sibling
describe_cell_relations_cross_tests (grant / field / item / clone / audit)
are the cell validators. This one gates on capabilities.cell_crud; it runs
against any backend that live-mounts the cell surface (the TS spine binary,
the in-process Hono app, and the Rust testing_spine_stub).
Drives the full lifecycle (create → get → update → delete → list, threading the created id) plus the authz matrix the wire contract guarantees. Every success response is parsed against the verb's declared output schema (CellCreateOutput / CellGetOutput / …), so a TS↔Rust envelope drift — not just a CellJson field drift — fails the suite:
public cells only — private is 404 (existence not leaked);cell_list pages honor limit + offset, and a page is visible rows:
a newer run of cells the caller can't see never crowds the visible ones
out, for a non-owner and for anon, and an admin's pages tile every row;path → 409 (cell_path_taken);path write by a non-admin → 403 (cell_path_admin_only), on both create
and update (even by the owner);cell_get with neither id nor path → invalid_params;cell_list with created_by → invalid_params;kind inside data still gets the authz error (404 / 403), never the
kind error — authz runs before the input-shape checks, on both spines;kind is rejected on create (cell_kind_empty) and is
accepted as a list filter that matches nothing;kind of exactly CELL_KIND_LENGTH_MAX UTF-16 code units is stored
whole, and one unit past it is invalid_params on create and as a list
filter;data that is no CellData — not an object, or a label / summary
that is no string — is 400 invalid_params with the generic message and
no reason on cell_create, cell_update and (with
capabilities.cell_relations) cell_clone's with_data_patch, ahead of
every cell check (a missing or hidden cell refuses it the same way, never
with the 404 mask), and writes no cell.The visibility-manage-tier 403 (cell_visibility_manage_only) needs a
non-owner editor, which only a cell_grant can produce, so it lives in
describe_cell_relations_cross_tests alongside the grant verbs rather than
here.
testing/cross_backend/cell_crud.ts view source
(options: RpcPathCapabilityGatedCrossSuiteOptions): void import {describe_cell_crud_cross_tests} from '@fuzdev/fuz_app/testing/cross_backend/cell_crud.js'; optionsvoid