Skip to content

test(fixtures): align scalar fixture names eql_v2_ → eql_v3_#311

Merged
tobyhede merged 13 commits into
eql_v3from
align-scalar-fixture-names
Jun 22, 2026
Merged

test(fixtures): align scalar fixture names eql_v2_ → eql_v3_#311
tobyhede merged 13 commits into
eql_v3from
align-scalar-fixture-names

Conversation

@tobyhede

@tobyhede tobyhede commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

What

Renames the catalog-driven scalar test fixtures from the vestigial eql_v2_<T> prefix to eql_v3_<T>, so the fixture table/file/module names match the eql_v3 schema domains they actually exercise.

Why

The scalar fixtures (eql_v2_int4, eql_v2_text, …) are tables in the fixtures schema that test the eql_v3.* domains exclusively — every value is cast to eql_v3.<type> and extracted via eql_v3.eq_term/eql_v3.ord_term. The eql_v2_ prefix is a leftover from the original prototype and has nothing to do with the eql_v2 schema, which created persistent confusion (the intent to use eql_v3_ was already half-landed — scalar_types.rs documented pub mod eql_v3_<T> while the macro still emitted eql_v2_).

What changed

  • Name sources: the eql-tests-macros proc-macro (module idents, fixture-name literal, dispatch arms, matrix eql_type) and the runtime table-name / doubles builders (scalar_domains.rs, eql_doubles.rs).
  • All downstream references: harness library, every #[sqlx::test(scripts(...))] ref, include_str! fixture paths, the fixtures.eql_v3_<T> SQL, and the renamed eql_v3_int4_fixture_tests.rs.
  • Config: .gitignore glob (eql_v2*eql_v3*) and the mise.toml self-contained-v3 / expand fixture paths.
  • Generated artifacts: regenerated eql_v3_*.sql fixtures and the int4_expanded.rs cargo-expand snapshot.
  • Docs + two stale prototype comments (eql-types/src/v3/mod.rs, src/ore_block_u64_8_256/operators.sql).

Safety

Genuine eql_v2 schema symbols (eql_v2_encrypted, eql_v2_configuration, eql_v2.*, eql_v2.ste_vec_entry) are untouched — every rename was scoped to the fixture token set, and a final repo-wide sweep confirms zero eql_v2_<scalar> references remain while the schema symbols are intact. The eql_v2_<entity> self-containment rule message in build_validation_tests.rs is deliberately kept.

Verification

  • mise run test: 2271 passed, 1 failed. The single failure (float_special::negative_zero_and_positive_zero_compare_equal_and_share_ore) is pre-existing and unrelated — it uses live encryption (reads no fixture), tests whether the cipherstash-client encoder canonicalizes -0.0+0.0, and sits entirely outside this diff (no CATALOG / codegen / float SQL touched). Every fixture-consuming test passes against the renamed fixtures.
  • mise run test:matrix:inventory: passes (10 types, snapshot unchanged).
  • The regenerated int4_expanded.rs also absorbs pre-existing matrix.rs line-number drift (the committed snapshot predated 9 matrix.rs commits).

Notes

  • No CHANGELOG.md entry — test-infrastructure-only, fixtures are gitignored, no caller-observable surface change.
  • Base branch: eql_v3 (this is part of the v3 line, not yet on main).

Summary by CodeRabbit

  • Chores
    • Updated test fixture naming convention from v2 to v3 pattern across the entire test infrastructure and build configuration. Changes include fixture directory references, generated test module identifiers, build task scripts, and supporting documentation. The underlying testing functionality and execution behavior remain unchanged; this is primarily an internal standardization of test organization and fixture management.

@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: b2b08f42-5835-403b-872a-15cb36d01942

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 align-scalar-fixture-names

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 and usage tips.

tobyhede added 2 commits June 22, 2026 10:23
The SteVec document fixture is now generated through FixtureSpec
(tests/sqlx/src/fixtures/v3_ste_vec.rs, since 3640e2a) and
gitignored/regenerated like every scalar fixture — it is no longer a
committed blob pending a generator. Also reword two 'committed'
doc-comments (NAME / PAYLOAD_TYPE) to 'canonical' to avoid implying the
gitignored .sql is tracked.
tasks/test/sqlx-archive.sh asserted the fixtures existed via an
`ls eql_v2_*.sql` glob that the rename left stale, failing the
build-archive job with 'eql_v2_*.sql missing'. Also updates the matching
comment in bench.sh. These glob refs were missed by the token/{ sweeps.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tests/sqlx/fixtures/FIXTURE_SCHEMA.md (1)

213-217: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Clarify the namespace distinction between fixture table and encrypted-domain type.

Line 213 states "so a downstream public.eql_v3_int4 domain can coexist." This is confusing because per CLAUDE.md, the encrypted-domain types live in the eql_v3 schema (e.g., eql_v3.int4), not the public schema. The comment appears to be a mechanical update from the old eql_v2 fixture era that doesn't match the actual architecture.

Consider clarifying: the fixture table (fixtures.eql_v3_int4) is separate from the domain type namespace (eql_v3.int4), so they don't conflict. If the intent is to document that the fixtures schema avoids polluting public, that's useful context; if the intent is to reserve space for a user-created public domain, that conflicts with the documented architecture.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/sqlx/fixtures/FIXTURE_SCHEMA.md` around lines 213 - 217, The comment in
the FIXTURE_SCHEMA.md file around the CREATE TABLE fixtures.eql_v3_int4
statement incorrectly states that the downstream domain type exists in the
public schema as public.eql_v3_int4, but according to the documented
architecture in CLAUDE.md, encrypted-domain types actually live in the eql_v3
schema (e.g., eql_v3.int4). Clarify the comment to correctly explain that the
fixture table in the fixtures schema is separate and distinct from the domain
type namespace in the eql_v3 schema, and that using the fixtures schema prevents
polluting the public schema. Remove the outdated reference to public.eql_v3_int4
and replace it with accurate context about the schema separation strategy.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/sqlx/fixtures/FIXTURE_SCHEMA.md`:
- Around line 213-217: The comment in the FIXTURE_SCHEMA.md file around the
CREATE TABLE fixtures.eql_v3_int4 statement incorrectly states that the
downstream domain type exists in the public schema as public.eql_v3_int4, but
according to the documented architecture in CLAUDE.md, encrypted-domain types
actually live in the eql_v3 schema (e.g., eql_v3.int4). Clarify the comment to
correctly explain that the fixture table in the fixtures schema is separate and
distinct from the domain type namespace in the eql_v3 schema, and that using the
fixtures schema prevents polluting the public schema. Remove the outdated
reference to public.eql_v3_int4 and replace it with accurate context about the
schema separation strategy.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0f5c33b0-6ebe-4d10-a40c-30d394adee82

📥 Commits

Reviewing files that changed from the base of the PR and between 5aad993 and 84b3826.

📒 Files selected for processing (38)
  • .gitignore
  • CLAUDE.md
  • crates/eql-tests-macros/src/lib.rs
  • crates/eql-types/src/v3/mod.rs
  • docs/reference/adding-a-scalar-encrypted-domain-type.md
  • mise.toml
  • src/ore_block_u64_8_256/operators.sql
  • tasks/fixtures.toml
  • tasks/test/bench.sh
  • tasks/test/sqlx-archive.sh
  • tasks/test/stub-fixtures.sh
  • tests/sqlx/README.md
  • tests/sqlx/fixtures/FIXTURE_SCHEMA.md
  • tests/sqlx/snapshots/int4_expanded.rs
  • tests/sqlx/src/fixtures/cipherstash.rs
  • tests/sqlx/src/fixtures/eql_doubles.rs
  • tests/sqlx/src/fixtures/mod.rs
  • tests/sqlx/src/fixtures/scalar_fixture.rs
  • tests/sqlx/src/fixtures/spec.rs
  • tests/sqlx/src/fixtures/v3_numeric_collision.rs
  • tests/sqlx/src/fixtures/v3_ste_vec.rs
  • tests/sqlx/src/fixtures/validation.rs
  • tests/sqlx/src/jsonb_entry.rs
  • tests/sqlx/src/scalar_domains.rs
  • tests/sqlx/tests/aggregate_tests.rs
  • tests/sqlx/tests/encrypted_domain/constraints.rs
  • tests/sqlx/tests/encrypted_domain/family/inlinability.rs
  • tests/sqlx/tests/encrypted_domain/family/jsonb_operator_surface.rs
  • tests/sqlx/tests/encrypted_domain/family/mutations.rs
  • tests/sqlx/tests/encrypted_domain/property/README.md
  • tests/sqlx/tests/encrypted_domain/property/cross_ciphertext.rs
  • tests/sqlx/tests/encrypted_domain/property/fixture_oracle.rs
  • tests/sqlx/tests/encrypted_domain/signed.rs
  • tests/sqlx/tests/encrypted_domain/text/text_match.rs
  • tests/sqlx/tests/eql_v3_int4_fixture_tests.rs
  • tests/sqlx/tests/generate_all_fixtures.rs
  • tests/sqlx/tests/lint_tests.rs
  • tests/sqlx/tests/ore_block_comparator_tests.rs

tobyhede added 2 commits June 22, 2026 13:41
- Split fixtures into committed (eql_v2-era) vs generated/gitignored (eql_v3)
- Replace int4-specific section with general 'Generated eql_v3 fixtures'
  (int4 is the bootstrap reference, not a special case)
- Fix false 'no EQL dependency' claim: v3_doc_int4/v3_ste_vec use eql_v3.json
- Document match_data.sql and aggregate_minmax_data.sql committed fixtures
- Point eql_v3 fixture additions at eql-scalars::CATALOG, not hand-written SQL
…-support caveat

The eql_v3 encrypted-JSONB surface referenced a decision doc
(docs/decisions/2026-06-10-eql-v3-json-type-kind.md) that was never
committed, in 4 places (operators.sql, jsonb_test.sql, v3_jsonb_tests.rs,
CHANGELOG.md). The full rationale already lives inline at each site.

Redirect those pointers to a real, user-facing home and document the
caveat there: add an 'eql_v3 encrypted JSONB - typed operands' section to
docs/reference/json-support.md explaining that bare untyped literals
resolve to the native jsonb operator (the domain flattens to its base
type for unknown-typed RHS), with correct/incorrect examples. This is
intrinsic to the domain type-kind, mitigated by the Proxy always passing
typed parameters; no separate decision doc is needed.
@tobyhede tobyhede force-pushed the align-scalar-fixture-names branch from 9575338 to 34c3937 Compare June 22, 2026 04:08
@tobyhede tobyhede merged commit 03c53ec into eql_v3 Jun 22, 2026
18 checks passed
@tobyhede tobyhede deleted the align-scalar-fixture-names branch June 22, 2026 04:33
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