Skip to content

Commit 229ce59

Browse files
calvinbrewerclaude
andcommitted
feat(stack,cli)!: re-baseline EQL v3 on eql-3.0.0 GA and protect-ffi 0.29
protect-ffi 0.28 → 0.29 and @cipherstash/eql 3.0.0-alpha.3 → 3.0.0: - Rename every EQL v3 column-domain reference to the GA naming convention: flat, prefixed domains in public (public.eql_v3_text_search, public.eql_v3_integer_ord, …). Query domains stay eql_v3.query_<name>. DOMAIN_REGISTRY keys, introspection params, drizzle DDL emission, tests, skills, and the supabase reference doc all follow. - v3 scalar/selector encryptQuery no longer throws: protect-ffi 0.29 mints term-only eql_v3.query_<name> operands, the query_jsonb needle, and bare selector hashes. EQL_V3_QUERY_UNSUPPORTED is gone; docs updated. The supabase adapter and drizzle operators keep the full-envelope operand design (PostgREST cannot cast filter values; the SQL function per proof selects the term). - Pin ste_vec mode: 'standard' in the v2 searchableJson() builders (stack and @cipherstash/schema). 0.29 flipped the library default to compat (EQL v3's op term); unpinned, every v2 JSON containment query matches nothing and new rows stop being comparable with existing ones. The v2 wire format stays byte-stable. - CLI: vendor cipherstash-encrypt-v3.sql from the pinned @cipherstash/eql package (sha256-verified against its releaseManifest) instead of a hand-vendored stack fixture. Drop the v3 Supabase bundle variant: since eql-3.0.0 one artifact installs everywhere (operator classes self-skip on insufficient_privilege; ORE-backed domains are disabled when the opclass is absent, CIP-3468). --supabase now only adds the role grants for v3. - encrypt-lock-context guards split into one client per wire format; EncryptionV3 override test asserts the v3 pin. - Skills: add the EQL v3 typed-schema section to stash-encryption, the eql/v3/drizzle integration to stash-drizzle, and re-sync stash-supabase + docs/reference/supabase-sdk.md against the current adapter (contains() instead of like/ilike, no freeTextSearch tuner, introspecting factory, single install artifact). - AGENTS.md subpath-export list gains eql/v3, eql/v3/drizzle, and v3. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent cd521a0 commit 229ce59

55 files changed

Lines changed: 27380 additions & 91717 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'stash': minor
3+
---
4+
5+
`stash eql install --eql-version 3` now installs the eql-3.0.0 GA bundle,
6+
vendored from the pinned `@cipherstash/eql` package (sha256-verified).
7+
8+
Since eql-3.0.0 one artifact installs everywhere: the operator-class
9+
statements self-skip when the role lacks superuser (managed Postgres,
10+
Supabase) and the bundle disables the ORE-backed encrypted domains it cannot
11+
support. The separate v3 Supabase bundle variant is gone — `--supabase` and
12+
`--exclude-operator-family` no longer select a different v3 file (the role
13+
GRANTs for `eql_v3` / `eql_v3_internal` still apply with `--supabase`).
14+
15+
The bundled skills are also refreshed for the eql-3.0.0 naming convention
16+
(`public.eql_v3_<name>` column domains) and the EQL v3 typed-schema surface.

.changeset/eql-v3-ga-rebaseline.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
'@cipherstash/stack': minor
3+
---
4+
5+
Re-baseline EQL v3 on the eql-3.0.0 GA release and protect-ffi 0.29.
6+
7+
- **Breaking (v3 preview surface):** the EQL v3 column domains follow the
8+
eql-3.0.0 naming convention — flat, prefixed names in `public`
9+
(`public.eql_v3_text_search`, `public.eql_v3_integer_ord`, …) instead of the
10+
alpha-era bare names. Databases installed from an alpha bundle must be
11+
re-installed (`stash eql install --eql-version 3` replaces the schema).
12+
- `encryptQuery` under `eqlVersion: 3` now returns EQL v3 query operands
13+
(protect-ffi 0.29): term-only scalar operands for the `eql_v3.query_<name>`
14+
domains, the `eql_v3.query_jsonb` containment needle, and bare selector
15+
hashes for JSON path queries — v3 scalar and selector queries no longer
16+
throw `EQL_V3_QUERY_UNSUPPORTED` (the code is gone).
17+
- v2 `searchableJson()` columns now pin the SteVec encoding to `standard`
18+
explicitly. protect-ffi 0.29 flipped the library default to `compat`
19+
(EQL v3's encoding); without the pin, v2 JSON containment queries would
20+
silently match nothing and newly written rows would not be comparable with
21+
existing ones.
22+
- The EQL v3 test/install SQL is sourced from the pinned `@cipherstash/eql`
23+
package (3.0.0) instead of a hand-vendored fixture.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@cipherstash/schema': patch
3+
---
4+
5+
`searchableJson()` now pins the SteVec encoding mode to `standard` explicitly.
6+
protect-ffi 0.29 flipped the library default to `compat` (the EQL v3
7+
encoding); pinning keeps the v2 wire format byte-stable so existing encrypted
8+
JSON columns stay queryable and comparable.

.github/workflows/tests.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ jobs:
7878
- name: Test — lint script self-tests
7979
run: pnpm run test:scripts
8080

81-
# The EQL v3 bundles in packages/cli/src/sql are vendored (derived from
82-
# the stack fixture monolith by gen:eql-v3-sql). Regenerate and fail on
83-
# any diff so the fixture and the shipped bundles cannot drift silently.
84-
- name: Check — vendored EQL v3 SQL bundles are in sync
81+
# The EQL v3 bundle in packages/cli/src/sql is vendored from the pinned
82+
# @cipherstash/eql package (sha256-verified by gen:eql-v3-sql).
83+
# Regenerate and fail on any diff so the pin and the shipped bundle
84+
# cannot drift silently.
85+
- name: Check — vendored EQL v3 SQL bundle is in sync
8586
run: |
8687
pnpm --filter stash run gen:eql-v3-sql
87-
git diff --exit-code -- packages/cli/src/sql/cipherstash-encrypt-v3.sql packages/cli/src/sql/cipherstash-encrypt-v3-supabase.sql
88+
git diff --exit-code -- packages/cli/src/sql/cipherstash-encrypt-v3.sql
8889
8990
- name: Create .env file in ./packages/protect/
9091
run: |

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ If these variables are missing, tests that require live encryption will fail or
7272
## Repository Layout
7373

7474
- `packages/stack`: Main package (`@cipherstash/stack`) containing the encryption client and all integrations
75-
- Subpath exports: `@cipherstash/stack`, `@cipherstash/stack/client`, `@cipherstash/stack/identity`, `@cipherstash/stack/schema`, `@cipherstash/stack/types`, `@cipherstash/stack/drizzle`, `@cipherstash/stack/dynamodb`, `@cipherstash/stack/supabase`, `@cipherstash/stack/encryption`, `@cipherstash/stack/errors`, `@cipherstash/stack/wasm-inline`
75+
- Subpath exports: `@cipherstash/stack`, `@cipherstash/stack/client`, `@cipherstash/stack/identity`, `@cipherstash/stack/schema`, `@cipherstash/stack/eql/v3`, `@cipherstash/stack/eql/v3/drizzle`, `@cipherstash/stack/v3`, `@cipherstash/stack/types`, `@cipherstash/stack/drizzle`, `@cipherstash/stack/dynamodb`, `@cipherstash/stack/supabase`, `@cipherstash/stack/encryption`, `@cipherstash/stack/errors`, `@cipherstash/stack/wasm-inline`
7676
- `packages/protect`: Core encryption library (internal, re-exported via `@cipherstash/stack`)
7777
- `src/index.ts`: Public API (`Encryption`, exports)
7878
- `src/ffi/index.ts`: `EncryptionClient` implementation, bridges to `@cipherstash/protect-ffi`

0 commit comments

Comments
 (0)