Commit 2e6f032
authored
* feat(prisma-next)!: make the adapter EQL v3 only
Remove the EQL v2 surface from `@cipherstash/prisma-next` entirely — the
install path, the authoring constructors, the runtime codecs, and the v2
subpath exports — so the adapter installs only EQL v3 and works on managed
Postgres (e.g. Supabase) as a non-superuser.
Install path (the root cause of the Supabase block):
- Re-root the v3 baseline migration as an invariant-only genesis edge
(`from: null`); the contract now models no storage; the head ref requires
only `cipherstash:install-eql-v3-bundle-v1`. The v2 and v3 baselines were
chained (v3 started from v2's `to` state, head required both invariants),
so `migration apply` always ran the v2 install first — which fails on a
non-superuser role. Re-emit the contract-space artefacts.
- Delete the v2 baseline migration (`20260601T0000_install_eql_bundle`).
API/code removal:
- Delete the v2 authoring/runtime/codec code: `cipherstashFromStackV2`,
the `*V2` constructors, the v2 codec runtime + composite wire, the baked
`eql-install.generated`, and the v2 codec-control hooks.
- Remove the `./middleware` and `./migration` subpath exports.
- Move the version-neutral `stampRoutingKeysFromAst` into `execution/routing`
so `src/middleware/` can be removed; keep the shared value envelopes
(`EncryptedString`/`BigInt`/`Boolean`/`Date`/`Json`) and `decryptAll`. The
v3 surface is unchanged.
Prune the v2 tests and update the shared/v3 tests (descriptor, migration,
bundling-isolation, operator/type gating) for the v3-only reality.
Refs #709
* docs(prisma-next): update README, DEVELOPING, skill, and layout for v3-only
Rewrite `DEVELOPING.md` for the v3 architecture (catalog-derived domains,
the `eql*` operator surface, the query-term seam, the genesis-edge
migration) and match this repo's actual `src/` layout. Drop the removed v2
surface from the README subpath table, the bundled `stash-prisma-next`
skill, the `AGENTS.md` repository layout, and the prisma example JSDoc.
Refs #709
* fix(prisma-next): address review — wire the v3 encode diagnostic, fix stale docs
James's review (#712) and CodeRabbit.
Wire the "middleware not wired" diagnostic on the v3 write path.
`isBulkEncryptMiddlewareRegistered` was marked-but-never-read: the read
site lived in the v2 `cell-codec-factory.ts`, deleted in this PR, and v3
never had one. Port it to `CipherstashV3CellCodec#encode` so an SDK with
no `bulkEncryptMiddlewareV3(sdk)` registered fails fast with
`RUNTIME.ENCODE_FAILED` and a copy-pasteable wiring snippet instead of an
opaque pg serialise error. Memoised per codec (the registry is add-only),
so it costs one WeakSet lookup rather than one per cell.
Docs and comments naming removed symbols:
- README: drop the "legacy v2 surface keeps its `cipherstash*` names"
clause, and switch the query example from `cipherstashIlike` to
`eqlMatch`. The LIKE wildcard goes too — `eqlMatch` is bloom
token containment (`eql_v3.contains`), not SQL `LIKE`, so
`"%@example.com"` would have been misleading.
- migration.ts: the trailing rationale still said "invariant-only
self-edge" after the edge was re-rooted as genesis.
- runtime-v3.ts: referenced the removed `createCipherstashRuntimeDescriptor`,
and described a v2/v3 co-registration constraint that no longer exists.
- operator-gating-v3.test.ts: header claimed to pin v2/v3 method-name
disjointness; the body now pins the `eql*` prefix instead.
- from-stack-v3.test.ts: described `cipherstashFromStackV2` as "separate,
untouched" when it was removed outright.
- DEVELOPING.md: said the v3 codec raises no wiring diagnostic — now it does.
320 -> 322 unit tests (both new cases cover the diagnostic: it fires for an
unregistered SDK, and stays silent for an already-encrypted envelope).
Typecheck, build, and biome clean.
1 parent 5edef3b commit 2e6f032
99 files changed
Lines changed: 1123 additions & 20200 deletions
File tree
- .changeset
- examples/prisma/src
- packages/prisma-next
- migrations
- 20260601T0000_install_eql_bundle
- 20260601T0100_install_eql_v3_bundle
- refs
- src
- execution
- exports
- extension-metadata
- middleware
- migration
- stack
- types
- v3
- test
- live
- v3
- skills/stash-prisma-next
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
| |||
0 commit comments