Skip to content

Remove eql_v2 — ship only the self-contained eql_v3 surface#315

Merged
tobyhede merged 20 commits into
eql_v3from
remove-eql-v2
Jun 23, 2026
Merged

Remove eql_v2 — ship only the self-contained eql_v3 surface#315
tobyhede merged 20 commits into
eql_v3from
remove-eql-v2

Conversation

@tobyhede

Copy link
Copy Markdown
Contributor

Remove eql_v2 — ship only the self-contained eql_v3 surface

Removes the entire eql_v2 implementation (SQL, build variants, tests, fixtures, task scripts, CI jobs) so the repository ships a single, self-contained eql_v3 encrypted-domain surface. Executes the 2026-06-22-remove-eql-v2 plan, rebased onto eql_v3 (the live integration branch).

This is a major (3.0.0) public-API break. See ADR-0001 and the CHANGELOG.md [Unreleased]Removed entry.

What changed

  • New: tasks/pin_search_path_v3.sql (v3-only search_path pinning) and src/v3/lint/lints.sql (eql_v3.lints(), ported from eql_v2.lints(), scoped to eql_v3).
  • Build collapsed to a single v3 build. mise run build produces only release/cipherstash-encrypt.sql (+ -uninstall.sql) under the canonical name (combined/Supabase/Protect variants removed), so existing install URLs keep working.
  • Deleted: all non-src/v3/ SQL (encrypted, operators, config, encryptindex, SEM, lint, schema/common/crypto/version), the v2 uninstallers + pin_search_path.sql, the v2 test binaries, the committed v2 fixtures, v2 data/helper migrations 002–007, and the v2 SQLx harness helpers.
  • Repointed: test install → v3 artifact, reset.sql/splinter.sh/self_contained_v3/clean_install_v3/preview.sh → canonical artifact + eql_v3; CI workflows drop v2/supabase/protect jobs and assets. Fixtures retain eql_v3's eql_v3_* generated-fixture convention.
  • Dropped capabilities (no eql_v3 replacement, per ADR-0001): config management, encryptindex, the eql_v2_encrypted composite, LIKE/ILIKE, bool ops, opclass-on-column, GROUP BY/grouped_value.

Local verification (green)

  • mise run clean && mise run build → single canonical artifact, 0 eql_v2 symbols.
  • test:self_contained_v3; test:clean_install_v3 earlier (lints: 0 errors, no eql_v2 schema); splinter earlier (all findings allowlisted, ERROR=0).
  • test:v3-jsonb:inventory, test:crates, test:codegen.
  • The full nextest suite and test:matrix:inventory are left to CI (the local sandbox hit a disk-space limit mid-compile; not a code issue). test:sqlx prep + ZeroKMS fixture generation + the fixture-shape test passed on the pre-rebase tree.

Notes

  • Residual eql_v2 string references are deliberate: self-containment meta-comments in src/v3/* (e.g. "owns no eql_v2"), the clean_install_v3 gate's "assert no eql_v2" check, and the EQL payload-envelope version (v:2). The self_contained_v3 gate proves no actual v2 dependency.
  • Heavy reference-doc rewrites (README, docs/reference/*) are deferred to a follow-up PR (plan Task 15). This PR carries the functional removal + release-discipline docs (ADR + CHANGELOG).

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fe060f52-500e-403d-afaf-0b5bdc20f4d8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-eql-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

tobyhede added 3 commits June 22, 2026 16:30
…gration READMEs

Review caught build_validation_tests.rs still reading cipherstash-encrypt-v3.sql
after the Task 9 rename to the canonical name — would fail CI. Repoint all five
path literals to cipherstash-encrypt{,-uninstall}.sql. Also refresh the migration
READMEs that still documented the deleted 002-007 migrations.
The v2-coupled tasks/pin_search_path.sql is removed; the v3 build appends
tasks/pin_search_path_v3.sql. Update the prose references in src/v3 doc comments
and inlinability.rs accordingly (comment-only; no functional change).
…lan in ADR

The structural guard `encrypted_domain_blockers_are_plpgsql_and_non_strict`
matched only `%encrypted_domain_unsupported_bool%`, so a `_jsonb` (`#>`, `||`,
`-`) or `_text` (`#>>`, `->>`) blocker regressing to LANGUAGE sql / STRICT would
escape it — even though that test exists to backstop `eql_v3.lints()` without
depending on it. Broaden to `%encrypted_domain_unsupported%`, matching the
`encrypted_domain_blockers` CTE in src/v3/lint/lints.sql verbatim so the two
cannot drift. The jsonb-domain-arg EXISTS still excludes the shared
`encrypted_domain_unsupported_*(text, text)` helpers.

Also cross-link the deferred Tier-1 reference-doc rewrite plan from ADR-0001's
Related section so the follow-up is discoverable.
@tobyhede tobyhede marked this pull request as ready for review June 22, 2026 22:31
@tobyhede tobyhede requested a review from freshtonic June 22, 2026 22:38
Port version introspection to the self-contained eql_v3 surface after the
eql_v2 removal dropped eql_v2.version() (and left tasks/build.sh's --version
flag consumed nowhere).

- src/v3/version.template: eql_v3.version() returns bare-semver text, plus a
  COMMENT ON SCHEMA eql_v3 marker for obj_description() discoverability.
  REQUIRE src/v3/schema.sql only; self-contained, no eql_v2 symbols. The
  generated src/v3/version.sql is gitignored like the other v3 SQL.
- tasks/build.sh: sed-substitute the template before the v3 glob, reviving the
  --version flag (usage_version, DEV fallback).
- release workflows: pass prefix-stripped bare semver to --version; fix the
  stale 'eql_v2.version() byte-identical' comment.
- CHANGELOG/ADR-0001: document the re-home (not a silent drop).

version() is pinned by pin_search_path_v3.sql (not inline-critical), so the
splinter function_search_path_mutable lint does not flag it.

User-facing doc repointing is owned by the migrate-docs-to-eql-v3 branch.
- v3_jsonb_operator_surface_tests: drop dead eql_v2_encrypted exclusion
  subqueries (composite type removed -> subquery is always-true) and the
  now-stale explanatory comment
- xml-to-markdown.py: make the operator-schema match v3-aware
  (['eql_v2','public'] -> add 'eql_v3') so v3-only doc generation resolves
  eql_v3 operator names
- matrix.rs: fix now-false comment claiming the generic eql_v2_encrypted
  MIN/MAX overload is reachable via cast (overload removed); logic unchanged
- eql_plaintext.rs: reword Cast doc-comment off the removed
  eql_v2.add_search_config reference
@tobyhede tobyhede merged commit 89948f0 into eql_v3 Jun 23, 2026
18 checks passed
@tobyhede tobyhede deleted the remove-eql-v2 branch June 23, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant