@quickback-dev/cli 0.56.8 → 0.56.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/docs/content.js +2 -2
- package/dist/docs/content.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/skill/docs/compiler/definitions/changesets.md +16 -0
- package/dist/skill/docs/compiler/definitions/firewall.md +5 -1
- package/package.json +1 -1
- package/src/skill/docs/compiler/definitions/changesets.md +16 -0
- package/src/skill/docs/compiler/definitions/firewall.md +5 -1
package/dist/docs/content.js
CHANGED
|
@@ -95,7 +95,7 @@ export const DOCS = {
|
|
|
95
95
|
},
|
|
96
96
|
"compiler/definitions/changesets": {
|
|
97
97
|
"title": "Changesets — aggregate writes",
|
|
98
|
-
"content": "A **changeset** writes a parent row and its owned relations — junction\nmemberships, normalized phones/emails, line items — in **one request**,\nreplacing the hand-rolled multi-table action. You declare the one fact the\ncompiler was missing — which relations are **compositions** (owned by this\nroot) vs **references** (independent entities) — and the compiler generates\nthe whole write path.\n\nChangesets are a **contract v2** capability (`contract: { version: \"v2\" }`).\nDeclaring `owns` on a v1-pinned project is a compile error.\n\n## Declaring the boundary — `owns`\n\n```ts title=\"quickback/features/projects/projects.ts\"\nexport default feature(\"projects\", {\n // ...columns, firewall, guards, masking, read...\n create: { access: { roles: [\"admin\", \"owner\"] } },\n update: { access: { roles: [\"admin\", \"owner\"] } },\n\n owns: {\n tasks: {\n table: \"tasks\", // camelCase table name — a defineTable in this project\n fk: \"projectId\", // FK on the CHILD pointing at this root's PK\n refs: { // client-supplied pointers at INDEPENDENT entities\n assigneeId: \"people\",\n reviewerId: \"people\", // nullable refs may be omitted or null\n },\n inherit: [\"organizationId\"], // parent columns copied onto every inserted child\n owns: { // grandchildren — structural nesting, depth-capped\n checklist: { table: \"taskChecklistItems\", fk: \"taskId\", inherit: [\"organizationId\"] },\n },\n },\n },\n});\n```\n\n| Key | Meaning |\n|---|---|\n| `table` | The owned child — **must** be a `defineTable`/`feature()` in the project. String literal, never an identifier. Auth tables can never be owned. |\n| `fk` | The spine: the child column pointing at this root. **Compiler-stamped** on inserts; a client-supplied value is rejected. |\n| `refs` | Columns pointing at independent entities. Client-supplied, **existence-checked inside the caller's tenant** (the referenced table's firewall is ANDed) — on inserts **and** patches. The referenced row is never written through. |\n| `inherit` | Tenant/denorm columns copied verbatim from the (firewall-verified) parent row onto every inserted child. Compiler-stamped; client values rejected. |\n| `owns` | Nested owned relations. Max 3 levels of nesting (the aggregate spans at most 4 tables). |\n\nA child's [`q.stamp`](/compiler/definitions/schema#qstamp--proven-principal-identity-columns) identity columns are a **fourth, disjoint** source, sitting alongside `fk`/`inherit`/`refs`. On a changeset **insert** the engine stamps them from the **caller's proven scope claim** (`ctx.scope.<kind>.<claim>`) — *not* from the parent row — but only when the caller is a scope-only principal; an org-admitted caller keeps their client value (org-firewall-bounded). The contrast is exact: `inherit` copies **tenant** columns from the firewall-verified *parent*, `q.stamp` copies **identity** from the proven *token*. A required claim absent on a scope principal fails the op with **403** — emitted *before* the ref-existence checks, so a claim-less caller cannot probe which rows exist. A `refs` key may not alias a `q.stamp` column (a column is compiler-stamped **or** a client ref, never both). On a changeset **patch** op the stamp column is **immutable** — a client value for it is rejected (400) like any systemManaged column, matching the plain update path. Because the stamp lives inside the changeset handler, a **keyed** (`Idempotency-Key`) replay neither re-writes nor re-stamps; a keyless retry re-writes and re-stamps.\n\n**Owning a relation is not a write grant.** Every changeset op is admitted by\nthe **child table's own crud declaration**: `insert` requires `create:` on the\nchild, `patch` requires `update:`, `delete` requires `delete:` (soft mode only\nin v1) — each with its own `access`. There is no per-relation access override:\naccess is declared exactly once, on the child.\n\n### `routes: false` — changeset admission without a raw route\n\nWidening a child's access for changeset use must not silently open its raw\nCRUD surface. The `create`, `update`, and `delete` op configs accept\n`routes: false` (`upsert`/`put` does not): the access stays declared (it is\nthe changeset admission gate) while the raw HTTP route — and its\nauto-promoted batch variant — is never mounted, documented, or counted in\nthe operations manifest.\n\n```ts title=\"quickback/features/projects/tasks.ts\"\nupdate: { access: { roles: [\"member\", \"admin\", \"owner\"] }, routes: false },\n```\n\n## The wire contract\n\nOne blessed path — **RFC 5789 media-type dispatch** on the routes you already\nhave. No subpath.\n\n- `PATCH /api/v2/<resource>/:id` with\n `Content-Type: application/vnd.quickback.changeset+json` — apply a changeset\n to an existing root. Plain `application/json` keeps the flat-column PATCH.\n- `POST /api/v2/<resource>` with the same media type — create the root and its\n children in one changeset.\n\n```jsonc\n// PATCH /api/v2/projects/prj_1 (Content-Type: application/vnd.quickback.changeset+json)\n{\n \"patch\": { \"name\": \"Renamed\" }, // sparse ROOT patch (optional)\n \"tasks\": {\n \"insert\": [\n {\n \"lid\": \"t1\", // client correlation id\n \"title\": \"Ship it\",\n \"assigneeId\": \"per_9\", // ref — tenant-checked\n \"checklist\": { \"insert\": [{ \"label\": \"QA pass\" }] } // grandchild, FKs onto t1's minted id\n }\n ],\n \"patch\": [{ \"id\": \"tsk_2\", \"state\": \"done\" }],\n \"delete\": [\"tsk_3\"]\n }\n}\n```\n\n```jsonc\n// Response\n{\n \"success\": true,\n \"root\": { \"id\": \"prj_1\", \"name\": \"Renamed\", /* masked through the root's masking */ },\n \"created\": { \"t1\": \"tsk_9a…\", \"/tasks/insert/0/checklist/insert/0\": \"tci_44…\" },\n \"meta\": { \"ops\": 4, \"transactional\": false }\n}\n```\n\n- Inserts/patches apply parent-first (document order); deletes apply\n children-first.\n- `lid` correlates a minted id in `created`; entries without a `lid` key on\n their JSON Pointer. A nested insert's FK comes from its parent op's minted\n id — an unresolvable parent lid is a pointer-carrying **400**, never a\n silent re-parent onto the root.\n- `Prefer: return=minimal` omits `root` from the response. v1 representation\n is **root-row-only** (re-read through the root's masking) — nested aggregate\n reads are the phase-2 `?include=` reader; use [`defineView`\n includes](/compiler/definitions/read) today.\n\n### Headers\n\n| Header | Behavior |\n|---|---|\n| `If-Match` | Optimistic concurrency against the **root revision** — the root's `updatedAt` (or the injected `modifiedAt` audit column). Accepted value forms: `W/\"<revision>\"`, `\"<revision>\"`, or the bare revision value, where `<revision>` is the raw value of the revision column as returned in the root row. **Do not echo `GET /:id`'s `ETag` header into `If-Match`** — that ETag is the contract layer's body-hash ETag, not this revision, and will always **412**. Compared inside the transaction; mismatch → **412**. Every accepted changeset touches the revision. A root with no revision column answers `If-Match` with **428 PRECONDITION_UNSUPPORTED** — never silently ignored; the POST variant always answers 428 (no pre-existing revision to match). |\n| `Idempotency-Key` | The standard write-retry key. Claims are principal-scoped — a replayed key from a different principal is a 422, never a cached-body leak. |\n| `Prefer` | `return=representation` (default) or `return=minimal`. |\n\n### Errors\n\nRFC 9457 `application/problem+json`. The failing op is identified by a JSON\nPointer in the `pointer` extension (`/tasks/insert/0/assigneeId`). On\n**non-transactional providers** the error also carries an `ops` extension\nlisting the outcomes of ops applied before the failure — the honest committed\nprefix. On **transactional providers** the rollback erased every applied op,\nso the error carries **no `ops` extension** (advertising rolled-back ids would\npoint clients at rows that no longer exist). **Outcome entries carry only\n`{ pointer, status, id? }` — never child field values** (v1 deliberately\nwithholds nested child representation, so errors cannot become an\nunmasked-child side channel).\n\n## The security model — \"owning a relation is not a backdoor\"\n\nThe **root op** runs the root table's full single-record gate stack, in order:\nauth → cross-tenant guard → the root's own `update` (PATCH) / `create` (POST)\naccess — **always, including child-only bodies; there is no child-only bypass\nlane** → firewall fetch (reveal → 403 / hide → 404, byte-consistent with the\nplain handler) → `requireSelf` → root body schema + ownership guard + guards.\nThe POST variant runs the root's full create pipeline (org validation, FK\nexistence checks, defaults/computed, ownership stamping).\n\nEvery **child op** then pays:\n\n1. **Admission** — declared relation, declared op kind (unknown keys are 400s).\n2. **The child's own access** — the pre-record role gate runs **before any row\n fetch** (no 404-vs-403 ID probing under the aggregate); `record:`\n predicates are evaluated against the fetched row on patch/delete and\n against the submitted input on insert.\n3. **systemManaged rejection** — client data carrying `fk`, any `inherit`\n column, or an ownership column is **rejected** with the op's pointer, never\n stripped or stamped-over. (The child's *plain-CRUD* guards are unaffected —\n a junction may keep its FK createable for its raw route; the same field in\n a changeset op is rejected because the changeset supplies it structurally.)\n4. **The child's column body schema** — q-authored children pay the same Zod\n types/enums/lengths backstop their plain POST/PATCH enforces (strict,\n guards-aware, with the compiler-stamped columns omitted). Drizzle-authored\n children have no Zod on their plain routes either, so none applies here —\n parity, not an omission.\n5. **The child's guards** — `createable`/`updatable` validation.\n6. **The child's firewall** — every patch/delete WHERE is\n `spine FK = parent id AND child firewall AND id`, same-feature or\n cross-feature alike. Inserts derive tenant columns only from the\n firewall-verified parent row.\n7. **Tenant-scoped `refs` checks** — each non-null ref must exist inside the\n referenced table's firewall, on **inserts and patches alike** (re-pointing\n a ref pays the same check; only columns present in the op's data are\n checked).\n8. **Server-minted child ids** — a client-supplied child primary key on an\n insert is rejected (like the plain POST's strict body schema), unless the\n project is configured for client-provided ids (`generateId: false`).\n\nChild `delete` ops stamp the **fixed `deletedAt`** audit column — exactly what\nthe plain DELETE route stamps (the audit wrapper then auto-stamps\n`deletedBy`). An `isNull` firewall arm on any other column (e.g.\n`archivedAt`) is a read-scoping predicate, never the soft-delete stamp.\n\nCompile-time, fail-closed (everything throws, nothing normalizes silently):\n\n- **Per-arm tenant coverage**: every column arm of the child's *resolved*\n firewall — including **every branch of an `any:` OR** — must be satisfiable\n by `fk`/`inherit`. Covering one arm of an OR is not coverage. This runs over\n the post-expansion firewall, so lanes spliced from\n [`authz.rules`](/compiler/definitions/access#centrally-defined-access-rules)\n gates and `{ tenant }` anchors are checked too.\n- Children firewalled through a **subquery arm** (`via:`, `{ permission }`,\n arrows) cannot be owned in v1 — even when the arm arrives through a gate\n splice.\n- `refs` keys must be **disjoint** from `{fk} ∪ inherit ∪ ownership columns` —\n a column is either compiler-stamped or a client ref, never both (blocks\n ownership-column injection through a ref).\n- **Relationship / FGA access arms are compile errors** on the changeset lane\n — on the root's `update`/`create` access and on every admitted child op's\n access. Those arms are decided by inline route code the changeset engine\n does not emit in v1; rather than silently widen (or silently 403) the gate,\n the compiler refuses. Use roles/record predicates, or keep the write in an\n authored action. (Function-form access is refused for the same reason.)\n- **Envelope-encrypted roots cannot ride the changeset in v1** — the response\n path does not run the decrypt-then-mask prepare helper, so the returned root\n would carry sealed ciphertext. The compiler refuses rather than degrade\n silently. (Sealed-mode columns are unaffected — plain routes return those\n as-is too.)\n- **Relation names `insert`, `patch`, `delete`, and `lid` are rejected** —\n the wire parser reserves those payload keys, so such a relation would be\n silently unreachable on the wire.\n- One aggregate root per table, acyclic graph, bounded depth, declared child\n ops only, soft-delete children only, contract v2 only.\n\n## `afterCommit` — emit a realtime signal after the changeset commits\n\nA changeset that must notify live views declares **`afterCommit`** on the\naggregate root — a declarative broadcast, **not** a hand-rolled\n`try { realtime.* } catch {}` tail. It fires **one aggregate-level CloudEvent**\nstrictly **after** the transaction commits, riding the existing\n[named-invalidation / Broadcaster egress](/stack/realtime/named-invalidations)\n(so it inherits the CloudEvents envelope + AsyncAPI description for free).\n\n```ts title=\"quickback/features/travel/lodging-reservations.ts\"\nexport default defineTable(lodgingReservations, {\n // ...firewall / read / crud ...\n owns: { occupants: { table: \"lodgingReservationGuests\", fk: \"reservationId\",\n inherit: [\"eventId\", \"organizationId\"] } },\n afterCommit: {\n broadcast: {\n travelChanged: {\n event: \"attendRealtime.mobileBundleChanged.travelUpdated\", // registry.event.variant\n delivery: \"thisEvent\", // MUST be in the event's `deliveries` allowlist\n payload: {\n eventId: \"root.eventId\", // a committed root column\n reservationId: \"rootId\", // the root pk\n occupantIds: \"affectedIds\", // ids of child rows touched this changeset\n },\n },\n },\n },\n});\n```\n\n- **One event per aggregate**, not one per touched child. The payload carries\n an **affected-ids / changed-paths** roll-up derived from the applied ops\n (`affectedIds` = child ids, `changedPaths` = JSON pointers) — **ids and\n pointers only, never child field values**.\n- **`delivery` is required and fail-closed.** The audience lives on a named\n [delivery profile](/stack/realtime/named-invalidations); it must appear in the\n referenced event's `deliveries` allowlist. There is **no default selection**,\n so an event permitting a narrow AND a wide room can never silently fan a\n changeset frame to the wider one.\n- **Payload sources:** `root.<col>` (a committed root column), `rootId`,\n `affectedIds`, `changedPaths`. Every payload key the variant declares must be\n mapped; unknown sources / undeclared keys are compile errors.\n- **Best-effort:** a broadcast failure never rolls back the committed changeset\n (`console.warn`, dispatched on `waitUntil`).\n- **Root-row frame:** `afterCommit: { realtime: true }` additionally emits the\n root row (postgres_changes-style) on the table's own `realtime` room. The row\n rides unmasked **with the table's `MASKING_CONFIG`** so the Broadcaster masks\n per-subscriber-role at fanout — the same discipline plain CRUD realtime uses.\n\n### Fail-closed disclosure gates\n\nBecause a broadcast payload is **not** masked at fanout (only the root-row frame\nis), afterCommit fails the build rather than leak:\n\n- A **masked `root.<col>`** may ride a broadcast only to a role-only delivery\n whose roles ⊆ the column's unmask roles (same app-role namespace). A\n **scope-keyed** delivery or an **empty unmask set** (`show: { or: 'owner' }`)\n **always** throws.\n- **`affectedIds` / `rootId` / `changedPaths`** carry firewalled row IDs\n (existence/enumeration). They may ride a scope-keyed delivery (bounded to one\n scope-instance room); a role-only / org-wide delivery throws unless you\n acknowledge with `disclosesChildIds: true`.\n\n### `q.scope` verified vs `q.stamp` proven — the \"stamp then emit\" rule\n\nWhen a changeset [stamps a proven identity](/compiler/definitions/schema#qstamp--proven-principal-identity-columns)\nand then emits it, the two features compose on one write path:\n\n| | `q.scope('<kind>')` | `q.stamp({ fromScope, claim })` |\n|---|---|---|\n| Purpose | tenant isolation column | proven-principal **identity** column |\n| Firewall arm? | **yes** — it is the tenant WHERE | **never** |\n| Verified how? | firewall re-verifies on read/patch/delete | token provenance (un-spoofable) |\n| Phrase | \"**stamp AND verify**\" | \"stamp AND **prove**\" |\n| Safe to broadcast? | to the matching scope-keyed room | **only** to an audience ⊆ the stamping scope kind |\n\nA `q.stamp` identity column (e.g. `guestId`) sourced via `root.<col>` is\n**audience-gated like `affectedIds`** (05×06 integration): the delivery must be\nscope-keyed to the **same scope kind** that stamped it, else the build fails —\nunless you acknowledge with **`disclosesStampedIdentity: true`**. A stamp is\nun-spoofable, not un-*sensitive*: provenance is not audience clearance.\n\n### Idempotency — at-least-once\n\nafterCommit is **at-least-once**, exactly as idempotent as the write it rides.\nA retry carrying the **same `Idempotency-Key`** neither re-writes nor re-emits\n(the middleware returns the cached response before the handler runs). A\n**keyless** retry re-runs the whole handler → re-writes **and** re-emits. Callers\nthat need single-delivery must send an `Idempotency-Key`.\n\n### No-tx: \"row written ⇏ event fired\"\n\nOn a no-tx provider (D1 / neon-http), a mid-changeset failure **throws** before\nthe success path, so **no frames emit** for the partially-applied prefix —\n`meta.transactional: false` is the only guarantee signal. A **fully-successful**\nno-tx changeset **does** emit, still with `transactional: false`. Never assume\n\"row written ⇒ event fired\"; `meta.transactional` is the contract.\n\n> **Deferred out of v1:** embedding reindex on the changeset lane, `notify`\n> (device push — a WS broadcast is not an APNs/web-push delivery), and lifting\n> `afterCommit` onto plain tables/actions. The compiler still **warns** when an\n> `owns` root/child declares `realtime` **without** `afterCommit`, or declares\n> `embeddings`, so a silent asymmetry can't be enabled unknowingly.\n\n## Atomicity — honest, per provider\n\nThe whole changeset runs inside `db.transaction()` when the provider supports\nit; `meta.transactional` reports the actual guarantee (same contract as\n[batch operations](/compiler/targets/hono-api/using-the-api/batch-operations)):\n\n| Provider | transactional | Behavior |\n|---|---|---|\n| postgres / supabase / neon (websocket / hyperdrive) / libsql / better-sqlite3 / bun-sqlite | `true` | One transaction; any op failure rolls back the root op and every child op |\n| cloudflare-d1, neon over http (the Cloudflare default) | `false` | Deterministic parent-first **fail-fast**: the first failure stops the changeset; ops already applied stay committed (a consistent prefix — each was independently authorized) |\n\n## Calling it from authored code\n\nThe engine is exported per root as `apply<Singular>Changeset` — the seam\nauthored actions delegate through when they still need residue logic\n(preconditions, server-side transforms, notifications) around the aggregate\nwrite:\n\n```ts title=\"quickback/features/projects/actions/importBoard.ts\"\n// Action files are compiled into the feature directory, next to the\n// generated module — the relative import resolves at runtime.\n\nexport default defineAction({\n // ...description, input, access...\n execute: async ({ db, ctx, input }) => {\n // precondition / transform residue …\n const result = await applyProjectChangeset(db, ctx, input.projectId, input.changes);\n // notify / respond …\n return result;\n },\n});\n```\n\n**There is no trusted mode.** The auth assertion, cross-tenant guard, and the\nroot's own pre-record access gate are the helper's first statements — an\nauthored action whose action-level access is looser than the root's crud\naccess still pays the root's declared authorization when it delegates. The\nHTTP handler is a thin wrapper over the same helper (parse + Problem-Details\nrendering only).\n\n## Standards mapping\n\n| Changeset concept | Grounded in |\n|---|---|\n| Media-type dispatch on PATCH | RFC 5789 (the media type selects patch semantics) |\n| `lid` correlation + op list | JMAP `/set` creation ids, JSON:API `lid` |\n| Root-revision `If-Match` | JMAP state tokens, RFC 9110 preconditions |\n| Pointer-carrying errors | RFC 9457 Problem Details + RFC 6901 JSON Pointer |\n| Nested relation ops | SCIM PATCH (typed sub-resources) |\n\n## What stays phase 2\n\nFull-document `replace` diff sugar (and its `key:` reconciliation field), the\n`application/json-patch+json` representation, cross-branch `$lid` references,\nnested `Prefer: return=representation`, `?include=` aggregate reads, and\nfind-or-create roots by business key (`conflictTarget`)."
|
|
98
|
+
"content": "A **changeset** writes a parent row and its owned relations — junction\nmemberships, normalized phones/emails, line items — in **one request**,\nreplacing the hand-rolled multi-table action. You declare the one fact the\ncompiler was missing — which relations are **compositions** (owned by this\nroot) vs **references** (independent entities) — and the compiler generates\nthe whole write path.\n\nChangesets are a **contract v2** capability (`contract: { version: \"v2\" }`).\nDeclaring `owns` on a v1-pinned project is a compile error.\n\n## Declaring the boundary — `owns`\n\n```ts title=\"quickback/features/projects/projects.ts\"\nexport default feature(\"projects\", {\n // ...columns, firewall, guards, masking, read...\n create: { access: { roles: [\"admin\", \"owner\"] } },\n update: { access: { roles: [\"admin\", \"owner\"] } },\n\n owns: {\n tasks: {\n table: \"tasks\", // camelCase table name — a defineTable in this project\n fk: \"projectId\", // FK on the CHILD pointing at this root's PK\n refs: { // client-supplied pointers at INDEPENDENT entities\n assigneeId: \"people\",\n reviewerId: \"people\", // nullable refs may be omitted or null\n },\n inherit: [\"organizationId\"], // parent columns copied onto every inserted child\n owns: { // grandchildren — structural nesting, depth-capped\n checklist: { table: \"taskChecklistItems\", fk: \"taskId\", inherit: [\"organizationId\"] },\n },\n },\n },\n});\n```\n\n| Key | Meaning |\n|---|---|\n| `table` | The owned child — **must** be a `defineTable`/`feature()` in the project. String literal, never an identifier. Auth tables can never be owned. |\n| `fk` | The spine: the child column pointing at this root. **Compiler-stamped** on inserts; a client-supplied value is rejected. |\n| `refs` | Columns pointing at independent entities. Client-supplied, **existence-checked inside the caller's tenant** (the referenced table's firewall is ANDed) — on inserts **and** patches. The referenced row is never written through. |\n| `inherit` | Tenant/denorm columns copied verbatim from the (firewall-verified) parent row onto every inserted child. Compiler-stamped; client values rejected. |\n| `owns` | Nested owned relations. Max 3 levels of nesting (the aggregate spans at most 4 tables). |\n\nA child's [`q.stamp`](/compiler/definitions/schema#qstamp--proven-principal-identity-columns) identity columns are a **fourth, disjoint** source, sitting alongside `fk`/`inherit`/`refs`. On a changeset **insert** the engine stamps them from the **caller's proven scope claim** (`ctx.scope.<kind>.<claim>`) — *not* from the parent row — but only when the caller is a scope-only principal; an org-admitted caller keeps their client value (org-firewall-bounded). The contrast is exact: `inherit` copies **tenant** columns from the firewall-verified *parent*, `q.stamp` copies **identity** from the proven *token*. A required claim absent on a scope principal fails the op with **403** — emitted *before* the ref-existence checks, so a claim-less caller cannot probe which rows exist. A `refs` key may not alias a `q.stamp` column (a column is compiler-stamped **or** a client ref, never both). On a changeset **patch** op the stamp column is **immutable** — a client value for it is rejected (400) like any systemManaged column, matching the plain update path. Because the stamp lives inside the changeset handler, a **keyed** (`Idempotency-Key`) replay neither re-writes nor re-stamps; a keyless retry re-writes and re-stamps.\n\n**Owning a relation is not a write grant.** Every changeset op is admitted by\nthe **child table's own crud declaration**: `insert` requires `create:` on the\nchild, `patch` requires `update:`, `delete` requires `delete:` (soft mode only\nin v1) — each with its own `access`. There is no per-relation access override:\naccess is declared exactly once, on the child.\n\n### `routes: false` — changeset admission without a raw route\n\nWidening a child's access for changeset use must not silently open its raw\nCRUD surface. The `create`, `update`, and `delete` op configs accept\n`routes: false` (`upsert`/`put` does not): the access stays declared (it is\nthe changeset admission gate) while the raw HTTP route — and its\nauto-promoted batch variant — is never mounted, documented, or counted in\nthe operations manifest.\n\n```ts title=\"quickback/features/projects/tasks.ts\"\nupdate: { access: { roles: [\"member\", \"admin\", \"owner\"] }, routes: false },\n```\n\n## The wire contract\n\nOne blessed path — **RFC 5789 media-type dispatch** on the routes you already\nhave. No subpath.\n\n- `PATCH /api/v2/<resource>/:id` with\n `Content-Type: application/vnd.quickback.changeset+json` — apply a changeset\n to an existing root. Plain `application/json` keeps the flat-column PATCH.\n- `POST /api/v2/<resource>` with the same media type — create the root and its\n children in one changeset.\n\n```jsonc\n// PATCH /api/v2/projects/prj_1 (Content-Type: application/vnd.quickback.changeset+json)\n{\n \"patch\": { \"name\": \"Renamed\" }, // sparse ROOT patch (optional)\n \"tasks\": {\n \"insert\": [\n {\n \"lid\": \"t1\", // client correlation id\n \"title\": \"Ship it\",\n \"assigneeId\": \"per_9\", // ref — tenant-checked\n \"checklist\": { \"insert\": [{ \"label\": \"QA pass\" }] } // grandchild, FKs onto t1's minted id\n }\n ],\n \"patch\": [{ \"id\": \"tsk_2\", \"state\": \"done\" }],\n \"delete\": [\"tsk_3\"]\n }\n}\n```\n\n```jsonc\n// Response\n{\n \"success\": true,\n \"root\": { \"id\": \"prj_1\", \"name\": \"Renamed\", /* masked through the root's masking */ },\n \"created\": { \"t1\": \"tsk_9a…\", \"/tasks/insert/0/checklist/insert/0\": \"tci_44…\" },\n \"meta\": { \"ops\": 4, \"transactional\": false }\n}\n```\n\n- Inserts/patches apply parent-first (document order); deletes apply\n children-first.\n- `lid` correlates a minted id in `created`; entries without a `lid` key on\n their JSON Pointer. A nested insert's FK comes from its parent op's minted\n id — an unresolvable parent lid is a pointer-carrying **400**, never a\n silent re-parent onto the root.\n- `Prefer: return=minimal` omits `root` from the response. v1 representation\n is **root-row-only** (re-read through the root's masking) — nested aggregate\n reads are the phase-2 `?include=` reader; use [`defineView`\n includes](/compiler/definitions/read) today.\n\n### Headers\n\n| Header | Behavior |\n|---|---|\n| `If-Match` | Optimistic concurrency against the **root revision** — the root's `updatedAt` (or the injected `modifiedAt` audit column). Accepted value forms: `W/\"<revision>\"`, `\"<revision>\"`, or the bare revision value, where `<revision>` is the raw value of the revision column as returned in the root row. **Do not echo `GET /:id`'s `ETag` header into `If-Match`** — that ETag is the contract layer's body-hash ETag, not this revision, and will always **412**. Compared inside the transaction; mismatch → **412**. Every accepted changeset touches the revision. A root with no revision column answers `If-Match` with **428 PRECONDITION_UNSUPPORTED** — never silently ignored; the POST variant always answers 428 (no pre-existing revision to match). |\n| `Idempotency-Key` | The standard write-retry key. Claims are principal-scoped — a replayed key from a different principal is a 422, never a cached-body leak. |\n| `Prefer` | `return=representation` (default) or `return=minimal`. |\n\n### Errors\n\nRFC 9457 `application/problem+json`. The failing op is identified by a JSON\nPointer in the `pointer` extension (`/tasks/insert/0/assigneeId`). On\n**non-transactional providers** the error also carries an `ops` extension\nlisting the outcomes of ops applied before the failure — the honest committed\nprefix. On **transactional providers** the rollback erased every applied op,\nso the error carries **no `ops` extension** (advertising rolled-back ids would\npoint clients at rows that no longer exist). **Outcome entries carry only\n`{ pointer, status, id? }` — never child field values** (v1 deliberately\nwithholds nested child representation, so errors cannot become an\nunmasked-child side channel).\n\n## The security model — \"owning a relation is not a backdoor\"\n\nThe **root op** runs the root table's full single-record gate stack, in order:\nauth → cross-tenant guard → the root's own `update` (PATCH) / `create` (POST)\naccess — **always, including child-only bodies; there is no child-only bypass\nlane** → firewall fetch (reveal → 403 / hide → 404, byte-consistent with the\nplain handler) → `requireSelf` → root body schema + ownership guard + guards.\nThe POST variant runs the root's full create pipeline (org validation, FK\nexistence checks, defaults/computed, ownership stamping).\n\nEvery **child op** then pays:\n\n1. **Admission** — declared relation, declared op kind (unknown keys are 400s).\n2. **The child's own access** — the pre-record role gate runs **before any row\n fetch** (no 404-vs-403 ID probing under the aggregate); `record:`\n predicates are evaluated against the fetched row on patch/delete and\n against the submitted input on insert.\n3. **systemManaged rejection** — client data carrying `fk`, any `inherit`\n column, or an ownership column is **rejected** with the op's pointer, never\n stripped or stamped-over. (The child's *plain-CRUD* guards are unaffected —\n a junction may keep its FK createable for its raw route; the same field in\n a changeset op is rejected because the changeset supplies it structurally.)\n4. **The child's column body schema** — q-authored children pay the same Zod\n types/enums/lengths backstop their plain POST/PATCH enforces (strict,\n guards-aware, with the compiler-stamped columns omitted). Drizzle-authored\n children have no Zod on their plain routes either, so none applies here —\n parity, not an omission.\n5. **The child's guards** — `createable`/`updatable` validation.\n6. **The child's firewall** — every patch/delete WHERE is\n `spine FK = parent id AND child firewall AND id`, same-feature or\n cross-feature alike. Inserts derive tenant columns only from the\n firewall-verified parent row.\n7. **Tenant-scoped `refs` checks** — each non-null ref must exist inside the\n referenced table's firewall, on **inserts and patches alike** (re-pointing\n a ref pays the same check; only columns present in the op's data are\n checked).\n8. **Server-minted child ids** — a client-supplied child primary key on an\n insert is rejected (like the plain POST's strict body schema), unless the\n project is configured for client-provided ids (`generateId: false`).\n\nChild `delete` ops stamp the **fixed `deletedAt`** audit column — exactly what\nthe plain DELETE route stamps (the audit wrapper then auto-stamps\n`deletedBy`). An `isNull` firewall arm on any other column (e.g.\n`archivedAt`) is a read-scoping predicate, never the soft-delete stamp.\n\n### Handler triggers fire — the changeset is a first-party write\n\nEvery root and owned-child op writes through the **same audit-wrapped `db`\nchokepoint** the plain CRUD routes and actions use — not a raw Drizzle handle.\nSo a child's declared [`handler:` triggers](/compiler/definitions/triggers#handler-triggers-handler)\nfire on the changeset exactly as they do on the child's own route: `beforeInsert`\n/ `beforeUpdate` / `beforeDelete` run at the write (a throw becomes the same\n`TRIGGER_REJECTED` and — on a transactional provider — rolls the whole aggregate\nback), and `afterInsert` / `afterUpdate` run once per affected row. Audit\nstamping (`createdBy` / `modifiedBy`) rides the same chokepoint. The only gap is\n`afterDelete`, which the soft-delete stamp can't see — identical to the plain\nDELETE route's own limitation. (`sql:` triggers fire on every path regardless,\nas always.) This is the parity the trigger docs promise: a generated\ncontract-v2 changeset is a compiler write surface, not one of the\nqueue/cron/raw-SQL bypasses that skip handler hooks.\n\nCompile-time, fail-closed (everything throws, nothing normalizes silently):\n\n- **Per-arm tenant coverage**: every column arm of the child's *resolved*\n firewall — including **every branch of an `any:` OR** — must be satisfiable\n by `fk`/`inherit`. Covering one arm of an OR is not coverage. This runs over\n the post-expansion firewall, so lanes spliced from\n [`authz.rules`](/compiler/definitions/access#centrally-defined-access-rules)\n gates and `{ tenant }` anchors are checked too.\n- Children firewalled through a **subquery arm** (`via:`, `{ permission }`,\n arrows) cannot be owned in v1 — even when the arm arrives through a gate\n splice.\n- `refs` keys must be **disjoint** from `{fk} ∪ inherit ∪ ownership columns` —\n a column is either compiler-stamped or a client ref, never both (blocks\n ownership-column injection through a ref).\n- **Relationship / FGA access arms are compile errors** on the changeset lane\n — on the root's `update`/`create` access and on every admitted child op's\n access. Those arms are decided by inline route code the changeset engine\n does not emit in v1; rather than silently widen (or silently 403) the gate,\n the compiler refuses. Use roles/record predicates, or keep the write in an\n authored action. (Function-form access is refused for the same reason.)\n- **Envelope-encrypted roots cannot ride the changeset in v1** — the response\n path does not run the decrypt-then-mask prepare helper, so the returned root\n would carry sealed ciphertext. The compiler refuses rather than degrade\n silently. (Sealed-mode columns are unaffected — plain routes return those\n as-is too.)\n- **Relation names `insert`, `patch`, `delete`, and `lid` are rejected** —\n the wire parser reserves those payload keys, so such a relation would be\n silently unreachable on the wire.\n- One aggregate root per table, acyclic graph, bounded depth, declared child\n ops only, soft-delete children only, contract v2 only.\n\n## `afterCommit` — emit a realtime signal after the changeset commits\n\nA changeset that must notify live views declares **`afterCommit`** on the\naggregate root — a declarative broadcast, **not** a hand-rolled\n`try { realtime.* } catch {}` tail. It fires **one aggregate-level CloudEvent**\nstrictly **after** the transaction commits, riding the existing\n[named-invalidation / Broadcaster egress](/stack/realtime/named-invalidations)\n(so it inherits the CloudEvents envelope + AsyncAPI description for free).\n\n```ts title=\"quickback/features/travel/lodging-reservations.ts\"\nexport default defineTable(lodgingReservations, {\n // ...firewall / read / crud ...\n owns: { occupants: { table: \"lodgingReservationGuests\", fk: \"reservationId\",\n inherit: [\"eventId\", \"organizationId\"] } },\n afterCommit: {\n broadcast: {\n travelChanged: {\n event: \"attendRealtime.mobileBundleChanged.travelUpdated\", // registry.event.variant\n delivery: \"thisEvent\", // MUST be in the event's `deliveries` allowlist\n payload: {\n eventId: \"root.eventId\", // a committed root column\n reservationId: \"rootId\", // the root pk\n occupantIds: \"affectedIds\", // ids of child rows touched this changeset\n },\n },\n },\n },\n});\n```\n\n- **One event per aggregate**, not one per touched child. The payload carries\n an **affected-ids / changed-paths** roll-up derived from the applied ops\n (`affectedIds` = child ids, `changedPaths` = JSON pointers) — **ids and\n pointers only, never child field values**.\n- **`delivery` is required and fail-closed.** The audience lives on a named\n [delivery profile](/stack/realtime/named-invalidations); it must appear in the\n referenced event's `deliveries` allowlist. There is **no default selection**,\n so an event permitting a narrow AND a wide room can never silently fan a\n changeset frame to the wider one.\n- **Payload sources:** `root.<col>` (a committed root column), `rootId`,\n `affectedIds`, `changedPaths`. Every payload key the variant declares must be\n mapped; unknown sources / undeclared keys are compile errors.\n- **Best-effort:** a broadcast failure never rolls back the committed changeset\n (`console.warn`, dispatched on `waitUntil`).\n- **Root-row frame:** `afterCommit: { realtime: true }` additionally emits the\n root row (postgres_changes-style) on the table's own `realtime` room. The row\n rides unmasked **with the table's `MASKING_CONFIG`** so the Broadcaster masks\n per-subscriber-role at fanout — the same discipline plain CRUD realtime uses.\n\n### Fail-closed disclosure gates\n\nBecause a broadcast payload is **not** masked at fanout (only the root-row frame\nis), afterCommit fails the build rather than leak:\n\n- A **masked `root.<col>`** may ride a broadcast only to a role-only delivery\n whose roles ⊆ the column's unmask roles (same app-role namespace). A\n **scope-keyed** delivery or an **empty unmask set** (`show: { or: 'owner' }`)\n **always** throws.\n- **`affectedIds` / `rootId` / `changedPaths`** carry firewalled row IDs\n (existence/enumeration). They may ride a scope-keyed delivery (bounded to one\n scope-instance room); a role-only / org-wide delivery throws unless you\n acknowledge with `disclosesChildIds: true`.\n\n### `q.scope` verified vs `q.stamp` proven — the \"stamp then emit\" rule\n\nWhen a changeset [stamps a proven identity](/compiler/definitions/schema#qstamp--proven-principal-identity-columns)\nand then emits it, the two features compose on one write path:\n\n| | `q.scope('<kind>')` | `q.stamp({ fromScope, claim })` |\n|---|---|---|\n| Purpose | tenant isolation column | proven-principal **identity** column |\n| Firewall arm? | **yes** — it is the tenant WHERE | **never** |\n| Verified how? | firewall re-verifies on read/patch/delete | token provenance (un-spoofable) |\n| Phrase | \"**stamp AND verify**\" | \"stamp AND **prove**\" |\n| Safe to broadcast? | to the matching scope-keyed room | **only** to an audience ⊆ the stamping scope kind |\n\nA `q.stamp` identity column (e.g. `guestId`) sourced via `root.<col>` is\n**audience-gated like `affectedIds`** (05×06 integration): the delivery must be\nscope-keyed to the **same scope kind** that stamped it, else the build fails —\nunless you acknowledge with **`disclosesStampedIdentity: true`**. A stamp is\nun-spoofable, not un-*sensitive*: provenance is not audience clearance.\n\n### Idempotency — at-least-once\n\nafterCommit is **at-least-once**, exactly as idempotent as the write it rides.\nA retry carrying the **same `Idempotency-Key`** neither re-writes nor re-emits\n(the middleware returns the cached response before the handler runs). A\n**keyless** retry re-runs the whole handler → re-writes **and** re-emits. Callers\nthat need single-delivery must send an `Idempotency-Key`.\n\n### No-tx: \"row written ⇏ event fired\"\n\nOn a no-tx provider (D1 / neon-http), a mid-changeset failure **throws** before\nthe success path, so **no frames emit** for the partially-applied prefix —\n`meta.transactional: false` is the only guarantee signal. A **fully-successful**\nno-tx changeset **does** emit, still with `transactional: false`. Never assume\n\"row written ⇒ event fired\"; `meta.transactional` is the contract.\n\n> **Deferred out of v1:** embedding reindex on the changeset lane, `notify`\n> (device push — a WS broadcast is not an APNs/web-push delivery), and lifting\n> `afterCommit` onto plain tables/actions. The compiler still **warns** when an\n> `owns` root/child declares `realtime` **without** `afterCommit`, or declares\n> `embeddings`, so a silent asymmetry can't be enabled unknowingly.\n\n## Atomicity — honest, per provider\n\nThe whole changeset runs inside `db.transaction()` when the provider supports\nit; `meta.transactional` reports the actual guarantee (same contract as\n[batch operations](/compiler/targets/hono-api/using-the-api/batch-operations)):\n\n| Provider | transactional | Behavior |\n|---|---|---|\n| postgres / supabase / neon (websocket / hyperdrive) / libsql / better-sqlite3 / bun-sqlite | `true` | One transaction; any op failure rolls back the root op and every child op |\n| cloudflare-d1, neon over http (the Cloudflare default) | `false` | Deterministic parent-first **fail-fast**: the first failure stops the changeset; ops already applied stay committed (a consistent prefix — each was independently authorized) |\n\n## Calling it from authored code\n\nThe engine is exported per root as `apply<Singular>Changeset` — the seam\nauthored actions delegate through when they still need residue logic\n(preconditions, server-side transforms, notifications) around the aggregate\nwrite:\n\n```ts title=\"quickback/features/projects/actions/importBoard.ts\"\n// Action files are compiled into the feature directory, next to the\n// generated module — the relative import resolves at runtime.\n\nexport default defineAction({\n // ...description, input, access...\n execute: async ({ db, ctx, input }) => {\n // precondition / transform residue …\n const result = await applyProjectChangeset(db, ctx, input.projectId, input.changes);\n // notify / respond …\n return result;\n },\n});\n```\n\n**There is no trusted mode.** The auth assertion, cross-tenant guard, and the\nroot's own pre-record access gate are the helper's first statements — an\nauthored action whose action-level access is looser than the root's crud\naccess still pays the root's declared authorization when it delegates. The\nHTTP handler is a thin wrapper over the same helper (parse + Problem-Details\nrendering only).\n\n## Standards mapping\n\n| Changeset concept | Grounded in |\n|---|---|\n| Media-type dispatch on PATCH | RFC 5789 (the media type selects patch semantics) |\n| `lid` correlation + op list | JMAP `/set` creation ids, JSON:API `lid` |\n| Root-revision `If-Match` | JMAP state tokens, RFC 9110 preconditions |\n| Pointer-carrying errors | RFC 9457 Problem Details + RFC 6901 JSON Pointer |\n| Nested relation ops | SCIM PATCH (typed sub-resources) |\n\n## What stays phase 2\n\nFull-document `replace` diff sugar (and its `key:` reconciliation field), the\n`application/json-patch+json` representation, cross-branch `$lid` references,\nnested `Prefer: return=representation`, `?include=` aggregate reads, and\nfind-or-create roots by business key (`conflictTarget`)."
|
|
99
99
|
},
|
|
100
100
|
"compiler/definitions/concepts": {
|
|
101
101
|
"title": "Glossary",
|
|
@@ -123,7 +123,7 @@ export const DOCS = {
|
|
|
123
123
|
},
|
|
124
124
|
"compiler/definitions/firewall": {
|
|
125
125
|
"title": "Firewall - Data Isolation",
|
|
126
|
-
"content": "The firewall generates WHERE clauses automatically to isolate data by user, organization, or team.\n\n## Basic Usage\n\nThe cleanest pattern is `q.scope()` — declare the tenant column once and the firewall is auto-derived:\n\n```typescript\n// features/candidates/candidates.ts\n\nexport default feature('candidates', {\n columns: {\n id: q.id(),\n name: q.text().required(),\n email: q.text().required(),\n organizationId: q.scope('organization'), // Auto-derives the firewall\n },\n // No firewall: block needed — auto-derived as\n // [{ field: 'organizationId', equals: 'ctx.activeOrgId' },\n // { field: 'deletedAt', isNull: true }]\n // ... guards, crud, read\n});\n```\n\nIf you need to declare the firewall explicitly, two forms are accepted — pick whichever reads better:\n\n**Named-scope** (compact, default for simple overrides):\n\n```typescript\nfirewall: { organization: { column: 'tenant_id' } }\nfirewall: { owner: { column: 'account_user_id' } }\nfirewall: { exception: true } // opt out of tenant scoping entirely\n```\n\n**Predicate array** (explicit, required for `in`-lists or custom non-scope predicates):\n\n```typescript\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'deletedAt', isNull: true },\n]\n```\n\nBoth shapes compile to the same canonical predicate array internally — the named-scope object is coerced at parse time. Pick by readability.\n\n## Auto-detected column synonyms\n\nWhen you omit the `firewall:` block entirely, the compiler scans the schema for one of these isolation columns and auto-derives the predicates:\n\n| Scope | Accepted column names |\n|---|---|\n| Organization | `organizationId`, `organisationId`, `orgId`, `organization`, `organisation`, `org` |\n| User | `userId` |\n| Team | `teamId` |\n\n`ownerId` is **not** auto-detected — it's reserved for business-logic ownership (who owns this record), not access control. A table that has only `ownerId` and no isolation column raises a targeted error explaining the distinction; either rename to `userId` if the column controls access, add an isolation column, or specify `firewall:` explicitly.\n\n## Predicate Shape\n\n```typescript\ntype FirewallPredicate =\n | { field: string; equals: string; optional?: boolean; nullable?: true } // column = ctx.* (or literal)\n | { field: string; isNull: true } // column IS NULL\n | { field: string; in: string[] | string; optional?: boolean } // column IN (...)\n | { field: string; via: string } // column IN (relationship subquery)\n | { field?: string; permission: string } // named authz.permissions reference (v0.35+)\n | { all: FirewallPredicate[] } // AND group (v0.35+)\n | { any: FirewallPredicate[] } // OR group (v0.35+)\n | { exception: true }; // opt out of tenant scoping\n\ntype FirewallConfig = ReadonlyArray<FirewallPredicate>;\n\n// Resource top-level (sibling to `firewall:`)\nfirewallErrorMode?: 'reveal' | 'hide';\n```\n\nThe top-level array is AND'd together. `firewallErrorMode` lives at the resource top level — it's a presentation-layer choice (403 vs 404), not a query-shape one.\n\n## Boolean groups: `all` / `any` (v0.35+)\n\nA flat array can only express AND. To grant access through **either** of two independent paths — \"an org member **OR** an event attendee\" — nest an `any` group. The top-level array stays sugar for `all`, so every existing firewall is byte-identical.\n\n```typescript\nfirewall: {\n any: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' }, // org-member grant\n { field: 'eventId', equals: 'ctx.scope.event' }, // attendee grant (token-verified)\n ],\n}\n```\n\nNull-safe scope semantics make this safe (these apply **inside `all`/`any` groups**, opt-in via the new syntax):\n\n- A **scope** arm (`ctx.activeOrgId`, `ctx.activeTeamId`, `ctx.scope.*`) whose claim is **absent never binds `undefined`** (the classic 500 / \"match every row\" trap). In an `any` group an absent arm **drops**; if **every** arm drops, the group denies with `sql\\`1 = 0\\`` (the empty-guard) — never a full-table read. In an `all` group an absent required scope **denies** the group.\n- Mark an arm `{ optional: true }` to **drop-instead-of-deny** when absent inside an `all` group (the teamless rest-of-org slice — `ctx.activeTeamId` is implicitly optional).\n- **Owner** (`ctx.userId`) and **soft-delete** (`isNull deletedAt`) are always present / always AND'd — never relaxed.\n\n`nullable: true` is a separate database-schema opt-in, supported only on an\nowner predicate whose source is exactly `ctx.userId`. It allows the persisted\nowner column to be NULL; NULL rows still do not match the owner arm because SQL\nequality never matches NULL. It does not make the request claim optional.\n\n```typescript\n// (org OR event) AND owner AND not-deleted\nfirewall: {\n all: [\n { any: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'eventId', equals: 'ctx.scope.event' },\n ] },\n { field: 'ownerId', equals: 'ctx.userId' },\n ],\n}\n```\n\nThe `ctx.scope.*` arms are how **relationship-derived scopes** (attendees, shuttle drivers, vendors) reach event-scoped rows without org membership — see [Scopes & capability grants](/compiler/definitions/scopes).\n\n## Relationship-based scoping (`via:`)\n\nFor relationship authorization — \"this user can see rows X if they have a confirmed `event_guests` row pointing at X\" — declare the relationship under `authz.relationships` in `quickback.config.ts`, then reference it from `firewall:` with a `via:` predicate. These relationships (and the named roles/permissions built on them) are defined once, centrally — see [Centrally defined access rules](/compiler/definitions/access#centrally-defined-access-rules).\n\n```typescript\n// quickback.config.ts\nauthz: {\n relationships: {\n guestOf: {\n from: 'event_guests', // table name\n subject: { column: 'userId', equals: 'ctx.userId' }, // caller side\n resource: { column: 'eventId' }, // resource side\n where: { status: 'confirmed' }, // optional row filter\n },\n },\n}\n\n// features/sessions/sessions.ts\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'eventId', via: 'guestOf' },\n]\n```\n\nCompiles to:\n\n```sql\nWHERE sessions.organizationId = ?\n AND sessions.eventId IN (\n SELECT eventId FROM event_guests\n WHERE userId = ?\n AND status = 'confirmed'\n AND <event_guests' own firewall — tenant scope + soft-delete>\n )\n```\n\nKey properties:\n\n- **Firewall stays the outermost AND.** A guest of an event in another tenant is still blocked by your tenant predicate. Relationship-based scoping never bypasses tenant isolation.\n- **The relationship table's own firewall is AND'd into the subquery.** Soft-deleting a `event_guests` row revokes access immediately; cross-tenant relationship rows can't grant access.\n- **Anonymous callers fail closed.** `ctx.userId` is null-guarded; the subquery short-circuits to `WHERE 1 = 0` for unauthenticated requests.\n- **The relationship table must be tenant-scoped** (`firewall: { exception: true }` is rejected at compile time on relationship tables).\n\nSee [Access — relationships](/compiler/definitions/access#authz-relationships) for the full `authz.relationships` shape and role-binding patterns.\n\n## Named permissions (`{ permission }`)\n\nA `via:` arm references **one** relationship. When the same grant rule —\n\"organizer **or** confirmed attendee\" — recurs across several resources,\nname it **once** under `authz.permissions` and reference it from any\nfirewall with a `{ permission }` arm. See [Permissions](/compiler/definitions/permissions)\nfor the full DSL.\n\n```typescript\n// quickback.config.ts\nauthz: {\n relationships: { organizerOf: { /* … */ }, attendeeOf: { /* … */ } },\n permissions: {\n 'event:view': { anyOf: ['organizerOf', 'attendeeOf'] },\n },\n}\n\n// features/sessions/sessions.ts\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'eventId', permission: 'event:view' },\n]\n```\n\nThe compiler lowers `{ permission }` to the same `all` / `any` relationship\nsubqueries the expression names — `anyOf` becomes an OR of subqueries,\n`allOf` an AND. `field` is the resource-side column those subqueries\nconstrain (the same column you'd put on a `via:` arm).\n\nA permission referenced from a firewall can also resolve an\n[**arrow**](/compiler/definitions/arrows) — an `{ arrowRef, permission }`\nleaf that traverses a foreign key to inherit authority from a parent object\n(\"org admins of the event's org can see its announcements\", \"anyone who\nadministers an ancestor folder can read this one\"). An arrow leaf lowers to\nan FK-hop subquery (non-recursive) or a bounded `WITH RECURSIVE` CTE\n(self-FK hierarchy), tenant-constrained at every row.\n\n**M1 limit — firewall arms must be SQL-pushable.** A firewall runs as a\nWHERE clause, so a permission referenced from one may only resolve to\nrelationship subqueries. A permission whose expression contains a\n**claim-site leaf** (`{ role }`, `{ scopeRole }`, `{ pseudoRole }`) or a\n`not` is rejected at compile time when referenced from a firewall — those\nshapes are valid in the DSL but reserved for future claim/runtime\nenforcement sites. Use a role gate on `read.access` / `crud.*.access` for\nmembership checks.\n\nThe compile-time analyzer additionally flags a referenced permission that can\nnever be satisfied, an arm shadowed by a broader one, and the SQL / CTE cost\nof each permission — see [Diagnostics](/compiler/definitions/diagnostics).\n\n## Named tenant anchors (`{ tenant }`)\n\nThe tenant predicate `{ field: 'organizationId', equals: 'ctx.activeOrgId' }` tends to be repeated on every table. Declare it **once** as a named anchor and reference it by name:\n\n```typescript\n// quickback.config.ts\nauthz: {\n tenants: {\n org: { column: 'organizationId', equals: 'ctx.activeOrgId' },\n },\n}\n\n// any firewall — top level or inside all/any groups:\nfirewall: [\n { tenant: 'org' }, // → { field: 'organizationId', equals: 'ctx.activeOrgId' }\n { field: 'deletedAt', isNull: true },\n]\n\n// per-site COLUMN override (the claim side is never overridable):\nfirewall: [{ field: 'orgId', tenant: 'org' }]\n```\n\nThe anchor's `equals` must be a **verified ctx claim**: `ctx.activeOrgId` | `ctx.userId` | `ctx.scope.<kind>` | `ctx.scope.<kind>.<subKey>`. `ctx.activeTeamId` (drop-when-absent semantics stay a per-resource decision) and legacy aliases are rejected at declaration time — an anchor can never bind a request-derived value. A `{ tenant }` reference carrying its own `equals` is a compile error (one source of truth); an unknown anchor name is a compile error listing the declared anchors.\n\nExpansion happens at compile time, before rendering — the emitted SQL is byte-identical to writing the predicate inline. Auth-DB read views accept the same anchors as a string: [`tenant: 'org'`](/stack/realtime/live-views#auth-db-includes-source-auth) — with one extra constraint: an anchor referenced from an auth-view include must bind a single-segment session claim (`ctx.<claim>`); scope-principal claims (`ctx.scope.*`) are firewall-lane bindings and are rejected there.\n\n## Named gate references (`{ rule }`)\n\nA [gate](/compiler/definitions/access#named-gates-authzrules) that declares `firewall` lanes can be stamped onto a resource by name:\n\n```typescript\n// quickback.config.ts\nauthz: {\n rules: {\n eventRow: {\n who: { roles: ['owner', 'admin', 'member'] },\n firewall: [{ any: [\n { tenant: 'org' }, // org staff\n { field: 'eventId', equals: 'ctx.scope.event' }, // signed scope claim\n ] }],\n },\n },\n}\n\n// the resource:\nfirewall: [{ rule: 'eventRow' }]\n// composes with the resource's own lanes (top-level AND):\nfirewall: [{ rule: 'eventRow' }, { field: 'kind', equals: 'ctx.scope.event.kind' }]\n```\n\nSemantics — **AND-compose, top-level only, a reference can only narrow**:\n\n- The gate's lanes splice into the resource's **top-level AND array** in place. They never replace the resource's own lanes, and composition can only *narrow* the row set.\n- `{ rule }` is **not** valid inside an `{ all }` / `{ any }` group — a gate's firewall is one-or-more AND lanes, and splicing a multi-lane gate into an `any` group would OR-flatten it, admitting rows in **other tenants** that merely match one lane. This is a type error at authoring time and a compile error at coerce time.\n- A gate's firewall may not contain `{ exception: true }` (a named bundle can never smuggle a firewall opt-out) or another `{ rule }` (gates don't nest — expansion is single-step, so cycles are impossible by construction).\n- A gate with **no** `firewall` arm referenced from `firewall:` is a compile error — a who/record-only gate would silently contribute zero row lanes while the `record:` filter only ever applies at access sites.\n\nThe splice expands before validation and rendering, so the emitted `buildFirewallConditions` helper is byte-identical to writing the lanes inline — same groups, same absent-claim `1 = 0` guards, same `via:` subqueries.\n\n## Context Sources\n\nWhen `equals` references the request context, use these standard sources:\n\n| Source | Description |\n|--------|-------------|\n| `ctx.userId` | Current authenticated user's ID |\n| `ctx.activeOrgId` | User's active organization ID |\n| `ctx.activeTeamId` | User's active team ID |\n\nThese values are populated by the auth middleware from the user's session. Any predicate where `equals` starts with `ctx.` is treated as server-derived: the column lands in `GUARDS_CONFIG.systemManaged` (clients cannot submit it) and is auto-populated on create / upsert from the context.\n\n## Auto-Derivation\n\nWhen the `firewall:` block is omitted, the compiler scans the schema for known scope columns and synthesises the predicate array:\n\n| Column found | Predicate emitted |\n|--------------|-------------------|\n| `organizationId` / `organisationId` / `orgId` / `organization` / `organisation` / `org` | `{ field: '...', equals: 'ctx.activeOrgId' }` |\n| `userId` | `{ field: 'userId', equals: 'ctx.userId' }` |\n| `teamId` | `{ field: 'teamId', equals: 'ctx.activeTeamId' }` |\n| `deletedAt` (always present via audit injection) | `{ field: 'deletedAt', isNull: true }` — appended automatically whenever the schema carries the column, regardless of which firewall shape you wrote |\n\n`q.scope(kind)` is the canonical way to declare the column — auto-derivation works the same way for plain `q.text().required()` or Drizzle `text(...).notNull()` columns named to match the convention.\n\n**Rules:**\n- Exactly one isolation column → auto-derived.\n- Zero columns AND no PUBLIC route → compile-time error (\"missing isolation column\").\n- Two or more (e.g. `organizationId` + `ownerId`) → compile-time error; declare `firewall:` explicitly.\n\n## What `{ exception: true }` Actually Does\n\n`{ exception: true }` disables **tenant scoping only** — the generated `buildFirewallConditions()` emits no tenant `WHERE` clauses. It does **not** affect:\n\n- **Audit field injection.** `createdAt`, `modifiedAt`, `createdBy`, `modifiedBy`, `deletedAt`, `deletedBy` are always added to every table unless you disable them globally with `compiler.features.auditFields: false`.\n- **Soft-delete filtering.** If the table has a `deletedAt` column (which it does by default, thanks to audit injection), the firewall still emits `isNull(<table>.deletedAt)` so soft-deleted records stay hidden. To opt out of soft-delete filtering on an exception resource, either set `compiler.features.auditFields: false` globally or hand-author a schema without `deletedAt`.\n\nSo `firewall: [{ exception: true }]` on the default configuration returns `isNull(<table>.deletedAt)` from `buildFirewallConditions()` — no tenant filter, soft-delete filter still applied.\n\n## Sysadmin Escape Hatch\n\nWhen `cms: { sysadmin: true }` is set on the project (introduced in v0.15.0), every `buildFirewallConditions()` emits a runtime branch that drops tenant scopes for `ctx.userRole === 'sysadmin'` callers while keeping the soft-delete predicate:\n\n```typescript\n// Generated for an org-scoped table when cms.sysadmin: true\nexport function buildFirewallConditions(ctx: AppContext): SQL | undefined {\n if (ctx.userRole === 'sysadmin') {\n return isNull(invoices.deletedAt); // tenant predicate dropped, soft-delete kept\n }\n return and(\n eq(invoices.organizationId, ctx.activeOrgId!),\n isNull(invoices.deletedAt),\n );\n}\n```\n\nThe escape branch is **only** emitted when:\n\n- `cms.sysadmin: true` is set on the project config\n- The table has at least one tenant-scope predicate (org / owner / team / `via:` relationship). Tables with no tenant scopes already return what a sysadmin would see, so the runtime check would be dead code.\n- The firewall does not declare `{ exception: true }` (no tenant scopes to drop).\n\n**Sysadmin is distinct from appmanager.** `userRole === 'appmanager'` callers still go through the firewall normally — only `userRole === 'sysadmin'` triggers the bypass. Appmanager is the platform control-plane tier, expressed with plain `userRole` checks; sysadmin is the opt-in cross-tenant DB-admin tier. See [CMS Configuration](/compiler/config#cms-configuration).\n\nIf your project doesn't set `cms.sysadmin: true`, the escape branch is never emitted and the role value is functionally inert.\n\n## Common Patterns\n\n```typescript\n// Public/system table - no tenant filtering (soft-delete still applied)\nfirewall: [{ exception: true }]\n\n// Organization-scoped (auto-derived when organizationId is present — block can be omitted)\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'deletedAt', isNull: true },\n]\n\n// User-owned personal data\nfirewall: [\n { field: 'ownerId', equals: 'ctx.userId' },\n { field: 'deletedAt', isNull: true },\n]\n\n// Multi-tenant + per-team scoping\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'teamId', equals: 'ctx.activeTeamId' },\n { field: 'deletedAt', isNull: true },\n]\n\n// Custom ctx field\nfirewall: [\n { field: 'workspaceId', equals: 'ctx.activeWorkspaceId' },\n]\n\n// Status-gated (literal value, not ctx-derived — does NOT add to systemManaged)\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'status', in: ['active', 'pending'] },\n]\n```\n\n## Error Responses\n\nWhen a record isn't found behind the firewall (wrong org, soft-deleted, or genuinely doesn't exist), the error response depends on `firewallErrorMode`:\n\n### Reveal Mode (Default)\n\nReturns **403** with a structured error:\n\n```json\n{\n \"error\": \"Record not found or not accessible\",\n \"layer\": \"firewall\",\n \"code\": \"FIREWALL_NOT_FOUND\",\n \"hint\": \"Check the record ID and your organization membership\"\n}\n```\n\nThis is developer-friendly and helps debug access issues during development.\n\n### Hide Mode\n\nReturns **404** with a generic error:\n\n```json\n{\n \"error\": \"Not found\",\n \"code\": \"NOT_FOUND\"\n}\n```\n\nUse `firewallErrorMode: 'hide'` for security-hardened deployments where you don't want attackers to distinguish between \"record exists but you can't access it\" and \"record doesn't exist\":\n\n```typescript\nexport default defineTable(records, {\n firewall: [{ field: 'organizationId', equals: 'ctx.activeOrgId' }],\n firewallErrorMode: 'hide', // Opaque 404s prevent record enumeration\n});\n```\n\n### Foreign-Key Referential Checks\n\nGenerated `POST /` and `POST /batch` handlers validate every foreign-key column against the **target table's** firewall before inserting. If a record references a row that the caller can't see (wrong org, soft-deleted, or non-existent), the request fails with:\n\n```json\n{\n \"error\": \"Referenced jobs row not found\",\n \"code\": \"FK_NOT_FOUND\",\n \"layer\": \"validation\",\n \"field\": \"jobId\"\n}\n```\n\nThis closes a cross-tenant injection vector: even if an attacker knows a foreign tenant's row ID, they cannot attach a child record to it, and they cannot trigger a cross-tenant cascade delete. The check uses the target table's `buildXFirewallConditions(ctx)` helper, so it honors whatever firewall predicates the target declared (organization, owner, team, custom). FKs to tables with `{ exception: true }` get a plain existence check (still verifies the row exists, doesn't tenant-scope it).\n\nThe check runs after guards but before the insert, so it appears as `layer: \"validation\"` in error responses. Status code is `400`, not `404` — returning `404` would leak existence of out-of-scope rows.\n\n### Pre-Record ID-Probe Defense\n\nIndependent of `firewallErrorMode`, generated `/:id` handlers run a\n**role-only access check before** the firewall query (see\n[Access ordering](/compiler/definitions/access#evaluation-order)). A caller\nwithout the right role gets 403 before the database is touched, so they\ncan't distinguish \"row exists out-of-scope\" from \"row doesn't exist\" via\nresponse timing or status differences.\n\n`firewallErrorMode` controls what happens **after** the role check passes\nbut the firewall hides the row — i.e., when an authorized caller asks for\na record in another tenant. Use `'hide'` to make that case indistinguishable\nfrom a non-existent ID.\n\n## Rules\n\n- Every resource MUST have at least one tenant predicate OR `{ exception: true }` OR a PUBLIC route\n- `{ exception: true }` cannot be combined with tenant predicates in the same array\n\n## Why Can't You Mix `{ exception: true }` with Tenant Predicates?\n\nThey represent opposite intentions:\n- `{ exception: true }` = \"Don't generate tenant `WHERE` clauses, data is public/global\"\n- Tenant predicates = \"Generate tenant `WHERE` clauses to isolate data\"\n\nCombining them would be contradictory — you can't both isolate and not isolate. (Note: soft-delete filtering is independent of this decision, see above.)\n\n## Handling \"Some Public, Some Private\" Data\n\nIf you need records that are sometimes public and sometimes scoped, you have two options:\n\n### Option 1: Two Separate Tables\n\nSplit into two tables - one public, one scoped:\n\n```typescript\n// features/job-templates/template-library.ts - Public job templates\nexport default defineTable(templateLibrary, {\n firewall: [{ exception: true }],\n // ...\n});\n\n// features/job-templates/custom-templates.ts - Org's custom job templates\nexport default defineTable(customTemplates, {\n firewall: [{ field: 'ownerId', equals: 'ctx.userId' }],\n // ...\n});\n```\n\n### Option 2: Use Access Control Instead\n\nKeep tenant scope but make access permissive, then control visibility via `access`:\n\n```typescript\n// features/jobs/jobs.ts\nexport default defineTable(jobs, {\n firewall: [{ field: 'organizationId', equals: 'ctx.activeOrgId' }],\n read: {\n // Anyone in the org can list — visibility differences are handled\n // via record-level access conditions on /:id\n access: { roles: [\"owner\", \"hiring-manager\", \"recruiter\", \"interviewer\"] },\n },\n // Use record conditions to allow public jobs OR owned jobs on GET /:id\n // (single-record GET inherits read.access, with optional record-level overrides)\n // ...\n});\n```\n\n### Which to Choose?\n\n| Scenario | Recommendation |\n|----------|----------------|\n| Truly global data (app config, public job templates) | `exception: true` in separate resource |\n| \"Public within org\" but still org-isolated | Ownership scope + permissive access rules |\n| Recruiter can toggle job postings public/private | Ownership scope + `visibility` field + access conditions |"
|
|
126
|
+
"content": "The firewall generates WHERE clauses automatically to isolate data by user, organization, or team.\n\n## Basic Usage\n\nThe cleanest pattern is `q.scope()` — declare the tenant column once and the firewall is auto-derived:\n\n```typescript\n// features/candidates/candidates.ts\n\nexport default feature('candidates', {\n columns: {\n id: q.id(),\n name: q.text().required(),\n email: q.text().required(),\n organizationId: q.scope('organization'), // Auto-derives the firewall\n },\n // No firewall: block needed — auto-derived as\n // [{ field: 'organizationId', equals: 'ctx.activeOrgId' },\n // { field: 'deletedAt', isNull: true }]\n // ... guards, crud, read\n});\n```\n\nIf you need to declare the firewall explicitly, two forms are accepted — pick whichever reads better:\n\n**Named-scope** (compact, default for simple overrides):\n\n```typescript\nfirewall: { organization: { column: 'tenant_id' } }\nfirewall: { owner: { column: 'account_user_id' } }\nfirewall: { exception: true } // opt out of tenant scoping entirely\n```\n\n**Predicate array** (explicit, required for `in`-lists or custom non-scope predicates):\n\n```typescript\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'deletedAt', isNull: true },\n]\n```\n\nBoth shapes compile to the same canonical predicate array internally — the named-scope object is coerced at parse time. Pick by readability.\n\n## Auto-detected column synonyms\n\nWhen you omit the `firewall:` block entirely, the compiler scans the schema for one of these isolation columns and auto-derives the predicates:\n\n| Scope | Accepted column names |\n|---|---|\n| Organization | `organizationId`, `organisationId`, `orgId`, `organization`, `organisation`, `org` |\n| User | `userId` |\n| Team | `teamId` |\n\n`ownerId` is **not** auto-detected — it's reserved for business-logic ownership (who owns this record), not access control. A table that has only `ownerId` and no isolation column raises a targeted error explaining the distinction; either rename to `userId` if the column controls access, add an isolation column, or specify `firewall:` explicitly.\n\n## Predicate Shape\n\n```typescript\ntype FirewallPredicate =\n | { field: string; equals: string; optional?: boolean; nullable?: true } // column = ctx.* (or literal)\n | { field: string; isNull: true } // column IS NULL\n | { field: string; in: string[] | string; optional?: boolean } // column IN (...)\n | { field: string; via: string } // column IN (relationship subquery)\n | { field?: string; permission: string } // named authz.permissions reference (v0.35+)\n | { all: FirewallPredicate[] } // AND group (v0.35+)\n | { any: FirewallPredicate[] } // OR group (v0.35+)\n | { exception: true }; // opt out of tenant scoping\n\ntype FirewallConfig = ReadonlyArray<FirewallPredicate>;\n\n// Resource top-level (sibling to `firewall:`)\nfirewallErrorMode?: 'reveal' | 'hide';\n```\n\nThe top-level array is AND'd together. `firewallErrorMode` lives at the resource top level — it's a presentation-layer choice (403 vs 404), not a query-shape one.\n\n## Boolean groups: `all` / `any` (v0.35+)\n\nA flat array can only express AND. To grant access through **either** of two independent paths — \"an org member **OR** an event attendee\" — nest an `any` group. The top-level array stays sugar for `all`, so every existing firewall is byte-identical.\n\n```typescript\nfirewall: {\n any: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' }, // org-member grant\n { field: 'eventId', equals: 'ctx.scope.event' }, // attendee grant (token-verified)\n ],\n}\n```\n\nNull-safe scope semantics make this safe (these apply **inside `all`/`any` groups**, opt-in via the new syntax):\n\n- A **scope** arm (`ctx.activeOrgId`, `ctx.activeTeamId`, `ctx.scope.*`) whose claim is **absent never binds `undefined`** (the classic 500 / \"match every row\" trap). In an `any` group an absent arm **drops**; if **every** arm drops, the group denies with `sql\\`1 = 0\\`` (the empty-guard) — never a full-table read. In an `all` group an absent required scope **denies** the group.\n- Mark an arm `{ optional: true }` to **drop-instead-of-deny** when absent inside an `all` group (the teamless rest-of-org slice — `ctx.activeTeamId` is implicitly optional).\n- **Owner** (`ctx.userId`) and **soft-delete** (`isNull deletedAt`) are always present / always AND'd — never relaxed.\n\n`nullable: true` is a separate database-schema opt-in, supported only on an\nowner predicate whose source is exactly `ctx.userId`. It allows the persisted\nowner column to be NULL; NULL rows still do not match the owner arm because SQL\nequality never matches NULL. It does not make the request claim optional.\n\n```typescript\n// (org OR event) AND owner AND not-deleted\nfirewall: {\n all: [\n { any: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'eventId', equals: 'ctx.scope.event' },\n ] },\n { field: 'ownerId', equals: 'ctx.userId' },\n ],\n}\n```\n\nThe `ctx.scope.*` arms are how **relationship-derived scopes** (attendees, shuttle drivers, vendors) reach event-scoped rows without org membership — see [Scopes & capability grants](/compiler/definitions/scopes).\n\n## Relationship-based scoping (`via:`)\n\nFor relationship authorization — \"this user can see rows X if they have a confirmed `event_guests` row pointing at X\" — declare the relationship under `authz.relationships` in `quickback.config.ts`, then reference it from `firewall:` with a `via:` predicate. These relationships (and the named roles/permissions built on them) are defined once, centrally — see [Centrally defined access rules](/compiler/definitions/access#centrally-defined-access-rules).\n\n```typescript\n// quickback.config.ts\nauthz: {\n relationships: {\n guestOf: {\n from: 'event_guests', // table name\n subject: { column: 'userId', equals: 'ctx.userId' }, // caller side\n resource: { column: 'eventId' }, // resource side\n where: { status: 'confirmed' }, // optional row filter\n },\n },\n}\n\n// features/sessions/sessions.ts\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'eventId', via: 'guestOf' },\n]\n```\n\nCompiles to:\n\n```sql\nWHERE sessions.organizationId = ?\n AND sessions.eventId IN (\n SELECT eventId FROM event_guests\n WHERE userId = ?\n AND status = 'confirmed'\n AND <event_guests' own firewall — tenant scope + soft-delete>\n )\n```\n\nKey properties:\n\n- **Firewall stays the outermost AND.** A guest of an event in another tenant is still blocked by your tenant predicate. Relationship-based scoping never bypasses tenant isolation.\n- **The relationship table's own firewall is AND'd into the subquery.** Soft-deleting a `event_guests` row revokes access immediately; cross-tenant relationship rows can't grant access.\n- **Anonymous callers fail closed.** `ctx.userId` is null-guarded; the subquery short-circuits to `WHERE 1 = 0` for unauthenticated requests.\n- **The relationship table must be tenant-scoped** (`firewall: { exception: true }` is rejected at compile time on relationship tables).\n\nSee [Access — relationships](/compiler/definitions/access#authz-relationships) for the full `authz.relationships` shape and role-binding patterns.\n\n## Named permissions (`{ permission }`)\n\nA `via:` arm references **one** relationship. When the same grant rule —\n\"organizer **or** confirmed attendee\" — recurs across several resources,\nname it **once** under `authz.permissions` and reference it from any\nfirewall with a `{ permission }` arm. See [Permissions](/compiler/definitions/permissions)\nfor the full DSL.\n\n```typescript\n// quickback.config.ts\nauthz: {\n relationships: { organizerOf: { /* … */ }, attendeeOf: { /* … */ } },\n permissions: {\n 'event:view': { anyOf: ['organizerOf', 'attendeeOf'] },\n },\n}\n\n// features/sessions/sessions.ts\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'eventId', permission: 'event:view' },\n]\n```\n\nThe compiler lowers `{ permission }` to the same `all` / `any` relationship\nsubqueries the expression names — `anyOf` becomes an OR of subqueries,\n`allOf` an AND. `field` is the resource-side column those subqueries\nconstrain (the same column you'd put on a `via:` arm).\n\nA permission referenced from a firewall can also resolve an\n[**arrow**](/compiler/definitions/arrows) — an `{ arrowRef, permission }`\nleaf that traverses a foreign key to inherit authority from a parent object\n(\"org admins of the event's org can see its announcements\", \"anyone who\nadministers an ancestor folder can read this one\"). An arrow leaf lowers to\nan FK-hop subquery (non-recursive) or a bounded `WITH RECURSIVE` CTE\n(self-FK hierarchy), tenant-constrained at every row.\n\n**M1 limit — firewall arms must be SQL-pushable.** A firewall runs as a\nWHERE clause, so a permission referenced from one may only resolve to\nrelationship subqueries. A permission whose expression contains a\n**claim-site leaf** (`{ role }`, `{ scopeRole }`, `{ pseudoRole }`) or a\n`not` is rejected at compile time when referenced from a firewall — those\nshapes are valid in the DSL but reserved for future claim/runtime\nenforcement sites. Use a role gate on `read.access` / `crud.*.access` for\nmembership checks.\n\nThe compile-time analyzer additionally flags a referenced permission that can\nnever be satisfied, an arm shadowed by a broader one, and the SQL / CTE cost\nof each permission — see [Diagnostics](/compiler/definitions/diagnostics).\n\n## Named tenant anchors (`{ tenant }`)\n\nThe tenant predicate `{ field: 'organizationId', equals: 'ctx.activeOrgId' }` tends to be repeated on every table. Declare it **once** as a named anchor and reference it by name:\n\n```typescript\n// quickback.config.ts\nauthz: {\n tenants: {\n org: { column: 'organizationId', equals: 'ctx.activeOrgId' },\n },\n}\n\n// any firewall — top level or inside all/any groups:\nfirewall: [\n { tenant: 'org' }, // → { field: 'organizationId', equals: 'ctx.activeOrgId' }\n { field: 'deletedAt', isNull: true },\n]\n\n// per-site COLUMN override (the claim side is never overridable):\nfirewall: [{ field: 'orgId', tenant: 'org' }]\n```\n\nThe anchor's `equals` must be a **verified ctx claim**: `ctx.activeOrgId` | `ctx.userId` | `ctx.scope.<kind>` | `ctx.scope.<kind>.<subKey>`. `ctx.activeTeamId` (drop-when-absent semantics stay a per-resource decision) and legacy aliases are rejected at declaration time — an anchor can never bind a request-derived value. A `{ tenant }` reference carrying its own `equals` is a compile error (one source of truth); an unknown anchor name is a compile error listing the declared anchors.\n\nExpansion happens at compile time, before rendering — the emitted SQL is byte-identical to writing the predicate inline. Auth-DB read views accept the same anchors as a string: [`tenant: 'org'`](/stack/realtime/live-views#auth-db-includes-source-auth) — with one extra constraint: an anchor referenced from an auth-view include must bind a single-segment session claim (`ctx.<claim>`); scope-principal claims (`ctx.scope.*`) are firewall-lane bindings and are rejected there.\n\n## Named gate references (`{ rule }`)\n\nA [gate](/compiler/definitions/access#named-gates-authzrules) that declares `firewall` lanes can be stamped onto a resource by name:\n\n```typescript\n// quickback.config.ts\nauthz: {\n rules: {\n eventRow: {\n who: { roles: ['owner', 'admin', 'member'] },\n firewall: [{ any: [\n { tenant: 'org' }, // org staff\n { field: 'eventId', equals: 'ctx.scope.event' }, // signed scope claim\n ] }],\n },\n },\n}\n\n// the resource:\nfirewall: [{ rule: 'eventRow' }]\n// composes with the resource's own lanes (top-level AND):\nfirewall: [{ rule: 'eventRow' }, { field: 'kind', equals: 'ctx.scope.event.kind' }]\n```\n\nSemantics — **AND-compose, top-level only, a reference can only narrow**:\n\n- The gate's lanes splice into the resource's **top-level AND array** in place. They never replace the resource's own lanes, and composition can only *narrow* the row set.\n- `{ rule }` is **not** valid inside an `{ all }` / `{ any }` group — a gate's firewall is one-or-more AND lanes, and splicing a multi-lane gate into an `any` group would OR-flatten it, admitting rows in **other tenants** that merely match one lane. This is a type error at authoring time and a compile error at coerce time.\n- A gate's firewall may not contain `{ exception: true }` (a named bundle can never smuggle a firewall opt-out) or another `{ rule }` (gates don't nest — expansion is single-step, so cycles are impossible by construction).\n- A gate with **no** `firewall` arm referenced from `firewall:` is a compile error — a who/record-only gate would silently contribute zero row lanes while the `record:` filter only ever applies at access sites.\n\nThe splice expands before validation and rendering, so the emitted `buildFirewallConditions` helper is byte-identical to writing the lanes inline — same groups, same absent-claim `1 = 0` guards, same `via:` subqueries.\n\n## Context Sources\n\nWhen `equals` references the request context, use these standard sources:\n\n| Source | Description |\n|--------|-------------|\n| `ctx.userId` | Current authenticated user's ID |\n| `ctx.activeOrgId` | User's active organization ID |\n| `ctx.activeTeamId` | User's active team ID |\n| `ctx.scope.<kind>` / `ctx.scope.<kind>.<subKey>` | A verified scope-principal claim (see [Scopes](/compiler/definitions/scopes)) |\n| `ctx.<claim>.<subKey>` | A [feature-area](/compiler/definitions/feature-areas) context anchor — a row the area/relationship middleware loaded from a proven route param and exposed on `ctx` (e.g. `ctx.event.id`, `ctx.event.organizationId`). Present only on the area-claimed route; renders null-safe (deny-when-absent) inside `all`/`any` groups |\n\nThese values are populated by the auth middleware (or, for scope/area anchors, the area middleware) from the request. Any predicate where `equals` starts with `ctx.` is treated as server-derived: the column lands in `GUARDS_CONFIG.systemManaged` (clients cannot submit it) and is **auto-populated on create / changeset-root insert / upsert** from that context source — a raw-Drizzle selected-event fence like `{ field: 'eventId', equals: 'ctx.event.id' }` stamps `eventId` from `ctx.event.id` the same way `q.scope('organization')` stamps `organizationId`.\n\n**Only conjunctive arms auto-populate.** A `ctx.*`-bound column is auto-populated only when its arm is **conjunctive** — reachable through the top-level array or a nested `all:` group, so it holds for every admitted row. A column bound *only* through an `any:` branch is disjunctive and lane-dependent (e.g. an attendee's own `eventPersonId`, which must come from a **proven** scope claim, not the org lane), so the compiler does **not** guess a create value for it. Give such a column its own population source — declare it with [`q.scope()` / `q.stamp()`](/compiler/definitions/schema#qstamp--proven-principal-identity-columns) (a proven-identity column force-stamps from the scope claim), let it inherit through a changeset `inherit`/`fk`, or write it in an authored action. A `NOT NULL` disjunctive-only column with none of these has no create path and will hit the database `NOT NULL` constraint on insert.\n\n## Auto-Derivation\n\nWhen the `firewall:` block is omitted, the compiler scans the schema for known scope columns and synthesises the predicate array:\n\n| Column found | Predicate emitted |\n|--------------|-------------------|\n| `organizationId` / `organisationId` / `orgId` / `organization` / `organisation` / `org` | `{ field: '...', equals: 'ctx.activeOrgId' }` |\n| `userId` | `{ field: 'userId', equals: 'ctx.userId' }` |\n| `teamId` | `{ field: 'teamId', equals: 'ctx.activeTeamId' }` |\n| `deletedAt` (always present via audit injection) | `{ field: 'deletedAt', isNull: true }` — appended automatically whenever the schema carries the column, regardless of which firewall shape you wrote |\n\n`q.scope(kind)` is the canonical way to declare the column — auto-derivation works the same way for plain `q.text().required()` or Drizzle `text(...).notNull()` columns named to match the convention.\n\n**Rules:**\n- Exactly one isolation column → auto-derived.\n- Zero columns AND no PUBLIC route → compile-time error (\"missing isolation column\").\n- Two or more (e.g. `organizationId` + `ownerId`) → compile-time error; declare `firewall:` explicitly.\n\n## What `{ exception: true }` Actually Does\n\n`{ exception: true }` disables **tenant scoping only** — the generated `buildFirewallConditions()` emits no tenant `WHERE` clauses. It does **not** affect:\n\n- **Audit field injection.** `createdAt`, `modifiedAt`, `createdBy`, `modifiedBy`, `deletedAt`, `deletedBy` are always added to every table unless you disable them globally with `compiler.features.auditFields: false`.\n- **Soft-delete filtering.** If the table has a `deletedAt` column (which it does by default, thanks to audit injection), the firewall still emits `isNull(<table>.deletedAt)` so soft-deleted records stay hidden. To opt out of soft-delete filtering on an exception resource, either set `compiler.features.auditFields: false` globally or hand-author a schema without `deletedAt`.\n\nSo `firewall: [{ exception: true }]` on the default configuration returns `isNull(<table>.deletedAt)` from `buildFirewallConditions()` — no tenant filter, soft-delete filter still applied.\n\n## Sysadmin Escape Hatch\n\nWhen `cms: { sysadmin: true }` is set on the project (introduced in v0.15.0), every `buildFirewallConditions()` emits a runtime branch that drops tenant scopes for `ctx.userRole === 'sysadmin'` callers while keeping the soft-delete predicate:\n\n```typescript\n// Generated for an org-scoped table when cms.sysadmin: true\nexport function buildFirewallConditions(ctx: AppContext): SQL | undefined {\n if (ctx.userRole === 'sysadmin') {\n return isNull(invoices.deletedAt); // tenant predicate dropped, soft-delete kept\n }\n return and(\n eq(invoices.organizationId, ctx.activeOrgId!),\n isNull(invoices.deletedAt),\n );\n}\n```\n\nThe escape branch is **only** emitted when:\n\n- `cms.sysadmin: true` is set on the project config\n- The table has at least one tenant-scope predicate (org / owner / team / `via:` relationship). Tables with no tenant scopes already return what a sysadmin would see, so the runtime check would be dead code.\n- The firewall does not declare `{ exception: true }` (no tenant scopes to drop).\n\n**Sysadmin is distinct from appmanager.** `userRole === 'appmanager'` callers still go through the firewall normally — only `userRole === 'sysadmin'` triggers the bypass. Appmanager is the platform control-plane tier, expressed with plain `userRole` checks; sysadmin is the opt-in cross-tenant DB-admin tier. See [CMS Configuration](/compiler/config#cms-configuration).\n\nIf your project doesn't set `cms.sysadmin: true`, the escape branch is never emitted and the role value is functionally inert.\n\n## Common Patterns\n\n```typescript\n// Public/system table - no tenant filtering (soft-delete still applied)\nfirewall: [{ exception: true }]\n\n// Organization-scoped (auto-derived when organizationId is present — block can be omitted)\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'deletedAt', isNull: true },\n]\n\n// User-owned personal data\nfirewall: [\n { field: 'ownerId', equals: 'ctx.userId' },\n { field: 'deletedAt', isNull: true },\n]\n\n// Multi-tenant + per-team scoping\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'teamId', equals: 'ctx.activeTeamId' },\n { field: 'deletedAt', isNull: true },\n]\n\n// Custom ctx field\nfirewall: [\n { field: 'workspaceId', equals: 'ctx.activeWorkspaceId' },\n]\n\n// Status-gated (literal value, not ctx-derived — does NOT add to systemManaged)\nfirewall: [\n { field: 'organizationId', equals: 'ctx.activeOrgId' },\n { field: 'status', in: ['active', 'pending'] },\n]\n```\n\n## Error Responses\n\nWhen a record isn't found behind the firewall (wrong org, soft-deleted, or genuinely doesn't exist), the error response depends on `firewallErrorMode`:\n\n### Reveal Mode (Default)\n\nReturns **403** with a structured error:\n\n```json\n{\n \"error\": \"Record not found or not accessible\",\n \"layer\": \"firewall\",\n \"code\": \"FIREWALL_NOT_FOUND\",\n \"hint\": \"Check the record ID and your organization membership\"\n}\n```\n\nThis is developer-friendly and helps debug access issues during development.\n\n### Hide Mode\n\nReturns **404** with a generic error:\n\n```json\n{\n \"error\": \"Not found\",\n \"code\": \"NOT_FOUND\"\n}\n```\n\nUse `firewallErrorMode: 'hide'` for security-hardened deployments where you don't want attackers to distinguish between \"record exists but you can't access it\" and \"record doesn't exist\":\n\n```typescript\nexport default defineTable(records, {\n firewall: [{ field: 'organizationId', equals: 'ctx.activeOrgId' }],\n firewallErrorMode: 'hide', // Opaque 404s prevent record enumeration\n});\n```\n\n### Foreign-Key Referential Checks\n\nGenerated `POST /` and `POST /batch` handlers validate every foreign-key column against the **target table's** firewall before inserting. If a record references a row that the caller can't see (wrong org, soft-deleted, or non-existent), the request fails with:\n\n```json\n{\n \"error\": \"Referenced jobs row not found\",\n \"code\": \"FK_NOT_FOUND\",\n \"layer\": \"validation\",\n \"field\": \"jobId\"\n}\n```\n\nThis closes a cross-tenant injection vector: even if an attacker knows a foreign tenant's row ID, they cannot attach a child record to it, and they cannot trigger a cross-tenant cascade delete. The check uses the target table's `buildXFirewallConditions(ctx)` helper, so it honors whatever firewall predicates the target declared (organization, owner, team, custom). FKs to tables with `{ exception: true }` get a plain existence check (still verifies the row exists, doesn't tenant-scope it).\n\nThe check runs after guards but before the insert, so it appears as `layer: \"validation\"` in error responses. Status code is `400`, not `404` — returning `404` would leak existence of out-of-scope rows.\n\n### Pre-Record ID-Probe Defense\n\nIndependent of `firewallErrorMode`, generated `/:id` handlers run a\n**role-only access check before** the firewall query (see\n[Access ordering](/compiler/definitions/access#evaluation-order)). A caller\nwithout the right role gets 403 before the database is touched, so they\ncan't distinguish \"row exists out-of-scope\" from \"row doesn't exist\" via\nresponse timing or status differences.\n\n`firewallErrorMode` controls what happens **after** the role check passes\nbut the firewall hides the row — i.e., when an authorized caller asks for\na record in another tenant. Use `'hide'` to make that case indistinguishable\nfrom a non-existent ID.\n\n## Rules\n\n- Every resource MUST have at least one tenant predicate OR `{ exception: true }` OR a PUBLIC route\n- `{ exception: true }` cannot be combined with tenant predicates in the same array\n\n## Why Can't You Mix `{ exception: true }` with Tenant Predicates?\n\nThey represent opposite intentions:\n- `{ exception: true }` = \"Don't generate tenant `WHERE` clauses, data is public/global\"\n- Tenant predicates = \"Generate tenant `WHERE` clauses to isolate data\"\n\nCombining them would be contradictory — you can't both isolate and not isolate. (Note: soft-delete filtering is independent of this decision, see above.)\n\n## Handling \"Some Public, Some Private\" Data\n\nIf you need records that are sometimes public and sometimes scoped, you have two options:\n\n### Option 1: Two Separate Tables\n\nSplit into two tables - one public, one scoped:\n\n```typescript\n// features/job-templates/template-library.ts - Public job templates\nexport default defineTable(templateLibrary, {\n firewall: [{ exception: true }],\n // ...\n});\n\n// features/job-templates/custom-templates.ts - Org's custom job templates\nexport default defineTable(customTemplates, {\n firewall: [{ field: 'ownerId', equals: 'ctx.userId' }],\n // ...\n});\n```\n\n### Option 2: Use Access Control Instead\n\nKeep tenant scope but make access permissive, then control visibility via `access`:\n\n```typescript\n// features/jobs/jobs.ts\nexport default defineTable(jobs, {\n firewall: [{ field: 'organizationId', equals: 'ctx.activeOrgId' }],\n read: {\n // Anyone in the org can list — visibility differences are handled\n // via record-level access conditions on /:id\n access: { roles: [\"owner\", \"hiring-manager\", \"recruiter\", \"interviewer\"] },\n },\n // Use record conditions to allow public jobs OR owned jobs on GET /:id\n // (single-record GET inherits read.access, with optional record-level overrides)\n // ...\n});\n```\n\n### Which to Choose?\n\n| Scenario | Recommendation |\n|----------|----------------|\n| Truly global data (app config, public job templates) | `exception: true` in separate resource |\n| \"Public within org\" but still org-isolated | Ownership scope + permissive access rules |\n| Recruiter can toggle job postings public/private | Ownership scope + `visibility` field + access conditions |"
|
|
127
127
|
},
|
|
128
128
|
"compiler/definitions/guards": {
|
|
129
129
|
"title": "Guards - Field Modification Rules",
|
package/dist/docs/content.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","s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IACrB,uBAAuB;IACvB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,WAAW;IACX,0BAA0B;IAC1B,iBAAiB;IACjB,0BAA0B;IAC1B,yBAAyB;IACzB,2BAA2B;IAC3B,oBAAoB;IACpB,uBAAuB;IACvB,OAAO;IACP,YAAY;IACZ,uBAAuB;IACvB,cAAc;IACd,2BAA2B;IAC3B,gCAAgC;IAChC,gBAAgB;IAChB,2BAA2B;IAC3B,oCAAoC;IACpC,kCAAkC;IAClC,+BAA+B;IAC/B,iBAAiB;IACjB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,cAAc;IACd,+BAA+B;IAC/B,wBAAwB;IACxB,gBAAgB;IAChB,yBAAyB;CAC1B,CAAC"}
|
|
1
|
+
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../src/docs/content.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,0DAA0D;AAO1D,MAAM,CAAC,MAAM,IAAI,GAA6B;IAC5C,WAAW,EAAE;QACX,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,q3xGAAq3xG;KACj4xG;IACD,4BAA4B,EAAE;QAC5B,OAAO,EAAE,oBAAoB;QAC7B,SAAS,EAAE,giRAAgiR;KAC5iR;IACD,wCAAwC,EAAE;QACxC,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,kmEAAkmE;KAC9mE;IACD,6BAA6B,EAAE;QAC7B,OAAO,EAAE,eAAe;QACxB,SAAS,EAAE,0iUAA0iU;KACtjU;IACD,gCAAgC,EAAE;QAChC,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,2iKAA2iK;KACvjK;IACD,mCAAmC,EAAE;QACnC,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,2jMAA2jM;KACvkM;IACD,yBAAyB,EAAE;QACzB,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,4kFAA4kF;KACx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yCAAyC;IACzC,6CAA6C;IAC7C,2BAA2B;IAC3B,qDAAqD;IACrD,0DAA0D;IAC1D,iDAAiD;IACjD,8CAA8C;IAC9C,gDAAgD;IAChD,yCAAyC;IACzC,iDAAiD;IACjD,sDAAsD;IACtD,mDAAmD;IACnD,kBAAkB;IAClB,0BAA0B;IAC1B,OAAO;IACP,gCAAgC;IAChC,wCAAwC;IACxC,iCAAiC;IACjC,oCAAoC;IACpC,mCAAmC;IACnC,yCAAyC;IACzC,2BAA2B;IAC3B,yCAAyC;IACzC,oCAAoC;IACpC,wCAAwC;IACxC,oCAAoC;IACpC,wBAAwB;IACxB,kBAAkB;IAClB,iCAAiC;IACjC,oBAAoB;IACpB,qBAAqB;IACrB,wBAAwB;IACxB,YAAY;IACZ,6BAA6B;IAC7B,+BAA+B;IAC/B,4BAA4B;IAC5B,4BAA4B;IAC5B,oBAAoB;IACpB,qBAAqB;IACrB,uBAAuB;IACvB,mBAAmB;IACnB,sBAAsB;IACtB,sBAAsB;IACtB,qBAAqB;IACrB,WAAW;IACX,0BAA0B;IAC1B,iBAAiB;IACjB,0BAA0B;IAC1B,yBAAyB;IACzB,2BAA2B;IAC3B,oBAAoB;IACpB,uBAAuB;IACvB,OAAO;IACP,YAAY;IACZ,uBAAuB;IACvB,cAAc;IACd,2BAA2B;IAC3B,gCAAgC;IAChC,gBAAgB;IAChB,2BAA2B;IAC3B,oCAAoC;IACpC,kCAAkC;IAClC,+BAA+B;IAC/B,iBAAiB;IACjB,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,wBAAwB;IACxB,wBAAwB;IACxB,yBAAyB;IACzB,cAAc;IACd,+BAA+B;IAC/B,wBAAwB;IACxB,gBAAgB;IAChB,yBAAyB;CAC1B,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQ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E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;KAAM,CAAC;IACJ,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC,CAAC;IACzE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -181,6 +181,22 @@ the plain DELETE route stamps (the audit wrapper then auto-stamps
|
|
|
181
181
|
`deletedBy`). An `isNull` firewall arm on any other column (e.g.
|
|
182
182
|
`archivedAt`) is a read-scoping predicate, never the soft-delete stamp.
|
|
183
183
|
|
|
184
|
+
### Handler triggers fire — the changeset is a first-party write
|
|
185
|
+
|
|
186
|
+
Every root and owned-child op writes through the **same audit-wrapped `db`
|
|
187
|
+
chokepoint** the plain CRUD routes and actions use — not a raw Drizzle handle.
|
|
188
|
+
So a child's declared [`handler:` triggers](/compiler/definitions/triggers#handler-triggers-handler)
|
|
189
|
+
fire on the changeset exactly as they do on the child's own route: `beforeInsert`
|
|
190
|
+
/ `beforeUpdate` / `beforeDelete` run at the write (a throw becomes the same
|
|
191
|
+
`TRIGGER_REJECTED` and — on a transactional provider — rolls the whole aggregate
|
|
192
|
+
back), and `afterInsert` / `afterUpdate` run once per affected row. Audit
|
|
193
|
+
stamping (`createdBy` / `modifiedBy`) rides the same chokepoint. The only gap is
|
|
194
|
+
`afterDelete`, which the soft-delete stamp can't see — identical to the plain
|
|
195
|
+
DELETE route's own limitation. (`sql:` triggers fire on every path regardless,
|
|
196
|
+
as always.) This is the parity the trigger docs promise: a generated
|
|
197
|
+
contract-v2 changeset is a compiler write surface, not one of the
|
|
198
|
+
queue/cron/raw-SQL bypasses that skip handler hooks.
|
|
199
|
+
|
|
184
200
|
Compile-time, fail-closed (everything throws, nothing normalizes silently):
|
|
185
201
|
|
|
186
202
|
- **Per-arm tenant coverage**: every column arm of the child's *resolved*
|
|
@@ -280,8 +280,12 @@ When `equals` references the request context, use these standard sources:
|
|
|
280
280
|
| `ctx.userId` | Current authenticated user's ID |
|
|
281
281
|
| `ctx.activeOrgId` | User's active organization ID |
|
|
282
282
|
| `ctx.activeTeamId` | User's active team ID |
|
|
283
|
+
| `ctx.scope.<kind>` / `ctx.scope.<kind>.<subKey>` | A verified scope-principal claim (see [Scopes](/compiler/definitions/scopes)) |
|
|
284
|
+
| `ctx.<claim>.<subKey>` | A [feature-area](/compiler/definitions/feature-areas) context anchor — a row the area/relationship middleware loaded from a proven route param and exposed on `ctx` (e.g. `ctx.event.id`, `ctx.event.organizationId`). Present only on the area-claimed route; renders null-safe (deny-when-absent) inside `all`/`any` groups |
|
|
283
285
|
|
|
284
|
-
These values are populated by the auth middleware from the
|
|
286
|
+
These values are populated by the auth middleware (or, for scope/area anchors, the area middleware) from the request. Any predicate where `equals` starts with `ctx.` is treated as server-derived: the column lands in `GUARDS_CONFIG.systemManaged` (clients cannot submit it) and is **auto-populated on create / changeset-root insert / upsert** from that context source — a raw-Drizzle selected-event fence like `{ field: 'eventId', equals: 'ctx.event.id' }` stamps `eventId` from `ctx.event.id` the same way `q.scope('organization')` stamps `organizationId`.
|
|
287
|
+
|
|
288
|
+
**Only conjunctive arms auto-populate.** A `ctx.*`-bound column is auto-populated only when its arm is **conjunctive** — reachable through the top-level array or a nested `all:` group, so it holds for every admitted row. A column bound *only* through an `any:` branch is disjunctive and lane-dependent (e.g. an attendee's own `eventPersonId`, which must come from a **proven** scope claim, not the org lane), so the compiler does **not** guess a create value for it. Give such a column its own population source — declare it with [`q.scope()` / `q.stamp()`](/compiler/definitions/schema#qstamp--proven-principal-identity-columns) (a proven-identity column force-stamps from the scope claim), let it inherit through a changeset `inherit`/`fk`, or write it in an authored action. A `NOT NULL` disjunctive-only column with none of these has no create path and will hit the database `NOT NULL` constraint on insert.
|
|
285
289
|
|
|
286
290
|
## Auto-Derivation
|
|
287
291
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quickback-dev/cli",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.10",
|
|
4
4
|
"description": "CLI for Quickback — define your backend in TypeScript, compile to a fully wired Cloudflare Worker (or Bun / Node) with auth, database, migrations, security, CMS, and Account UI.",
|
|
5
5
|
"author": "Kardoe Incorporated <paul@kardoe.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -181,6 +181,22 @@ the plain DELETE route stamps (the audit wrapper then auto-stamps
|
|
|
181
181
|
`deletedBy`). An `isNull` firewall arm on any other column (e.g.
|
|
182
182
|
`archivedAt`) is a read-scoping predicate, never the soft-delete stamp.
|
|
183
183
|
|
|
184
|
+
### Handler triggers fire — the changeset is a first-party write
|
|
185
|
+
|
|
186
|
+
Every root and owned-child op writes through the **same audit-wrapped `db`
|
|
187
|
+
chokepoint** the plain CRUD routes and actions use — not a raw Drizzle handle.
|
|
188
|
+
So a child's declared [`handler:` triggers](/compiler/definitions/triggers#handler-triggers-handler)
|
|
189
|
+
fire on the changeset exactly as they do on the child's own route: `beforeInsert`
|
|
190
|
+
/ `beforeUpdate` / `beforeDelete` run at the write (a throw becomes the same
|
|
191
|
+
`TRIGGER_REJECTED` and — on a transactional provider — rolls the whole aggregate
|
|
192
|
+
back), and `afterInsert` / `afterUpdate` run once per affected row. Audit
|
|
193
|
+
stamping (`createdBy` / `modifiedBy`) rides the same chokepoint. The only gap is
|
|
194
|
+
`afterDelete`, which the soft-delete stamp can't see — identical to the plain
|
|
195
|
+
DELETE route's own limitation. (`sql:` triggers fire on every path regardless,
|
|
196
|
+
as always.) This is the parity the trigger docs promise: a generated
|
|
197
|
+
contract-v2 changeset is a compiler write surface, not one of the
|
|
198
|
+
queue/cron/raw-SQL bypasses that skip handler hooks.
|
|
199
|
+
|
|
184
200
|
Compile-time, fail-closed (everything throws, nothing normalizes silently):
|
|
185
201
|
|
|
186
202
|
- **Per-arm tenant coverage**: every column arm of the child's *resolved*
|
|
@@ -280,8 +280,12 @@ When `equals` references the request context, use these standard sources:
|
|
|
280
280
|
| `ctx.userId` | Current authenticated user's ID |
|
|
281
281
|
| `ctx.activeOrgId` | User's active organization ID |
|
|
282
282
|
| `ctx.activeTeamId` | User's active team ID |
|
|
283
|
+
| `ctx.scope.<kind>` / `ctx.scope.<kind>.<subKey>` | A verified scope-principal claim (see [Scopes](/compiler/definitions/scopes)) |
|
|
284
|
+
| `ctx.<claim>.<subKey>` | A [feature-area](/compiler/definitions/feature-areas) context anchor — a row the area/relationship middleware loaded from a proven route param and exposed on `ctx` (e.g. `ctx.event.id`, `ctx.event.organizationId`). Present only on the area-claimed route; renders null-safe (deny-when-absent) inside `all`/`any` groups |
|
|
283
285
|
|
|
284
|
-
These values are populated by the auth middleware from the
|
|
286
|
+
These values are populated by the auth middleware (or, for scope/area anchors, the area middleware) from the request. Any predicate where `equals` starts with `ctx.` is treated as server-derived: the column lands in `GUARDS_CONFIG.systemManaged` (clients cannot submit it) and is **auto-populated on create / changeset-root insert / upsert** from that context source — a raw-Drizzle selected-event fence like `{ field: 'eventId', equals: 'ctx.event.id' }` stamps `eventId` from `ctx.event.id` the same way `q.scope('organization')` stamps `organizationId`.
|
|
287
|
+
|
|
288
|
+
**Only conjunctive arms auto-populate.** A `ctx.*`-bound column is auto-populated only when its arm is **conjunctive** — reachable through the top-level array or a nested `all:` group, so it holds for every admitted row. A column bound *only* through an `any:` branch is disjunctive and lane-dependent (e.g. an attendee's own `eventPersonId`, which must come from a **proven** scope claim, not the org lane), so the compiler does **not** guess a create value for it. Give such a column its own population source — declare it with [`q.scope()` / `q.stamp()`](/compiler/definitions/schema#qstamp--proven-principal-identity-columns) (a proven-identity column force-stamps from the scope claim), let it inherit through a changeset `inherit`/`fk`, or write it in an authored action. A `NOT NULL` disjunctive-only column with none of these has no create path and will hit the database `NOT NULL` constraint on insert.
|
|
285
289
|
|
|
286
290
|
## Auto-Derivation
|
|
287
291
|
|