Test CellCreateAuthorize policy mounted on both reference spines — the
TS spine binary's full mount (full_spine_mount.ts) and the Rust
testing_spine_stub — so the cross-backend cell_gated_create suite proves
the parent-aware cell-creation authorizer agrees TS↔Rust. The twin of the
Rust TestCellGatedCreateAuthorize, directory model.
A global admin bypasses everything (`{allow: true, moderation_required:
false}) — a scoped admin` row is no admin here. For anyone else:
- Root creation (
root_id null): kind: 'space' is admin-only (denied);
every other parentless kind stays open, so the plain-create cell_crud /
cell_relations suites are unaffected. - Contribution (
root_id set): the governing root's
policy[kind] = {min_role?, moderation_required?} decides — a missing
entry (or no policy) denies, a present min_role the actor lacks globally
denies, and otherwise it admits with the entry's moderation_required
folded into the verdict. The root's policy arrives in input.root_policy
(the handler read it in-tx), so the predicate is pure — no DB read of
its own (which also dodges the single-connection in-memory deadlock a
separate handle would hit — pglet, PGlite).
Its validate_policy accepts a policy whose every entry is an object with
an optional string min_role and an optional boolean moderation_required,
and refuses any other with ERROR_CELL_POLICY_INVALID.