Matrix log verification — Stage 3: op-qualified index names (finding-1)#291
Open
tobyhede wants to merge 4 commits into
Open
Matrix log verification — Stage 3: op-qualified index names (finding-1)#291tobyhede wants to merge 4 commits into
tobyhede wants to merge 4 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
82f3acb to
32bf768
Compare
Split the index-engagement fan-out so each (domain, op, using) is its own one per-(domain,using) test that swept the op list internally. Each op now carries its own case_id, so the Stage 2 statement/plan log is joinable to a single (domain, operator) — closing the design's finding-1 naming gap. The leaf body (eqlmatrix::tag, executed count(*) under enable_seqscan=off, assert_index_scan_uses) is unchanged; only the fan-out and the test name move.
The index-engagement split (finding-1) renames matrix_<T>_<domain>_index_ engages_<using> to op-qualified matrix_<T>_<domain>_index_engages_<op>_<using>. Regenerate the committed matrix_tests.txt set (one line per (domain,op,using)) and re-derive matrix_tests_eq_only.txt. Coordinated with the matrix-coverage CI gate, which git-diff-exit-codes these snapshots.
… arms The index-engagement op fan-out (finding-1) changes the macro bodies, so the int4 cargo-expand body snapshot moves. Regenerated under the pinned nightly (mise run test:matrix:expand). The diff is confined to the index_engages arms; non-index arm bodies are unchanged, and the regenerated index arms still carry the eqlmatrix tag, SET LOCAL enable_seqscan=off, and assert_index_scan_uses — proof the Stage 2 leaf behaviour survived the driver refactor.
The finding-1 op-qualification (matrix_<T>_<domain>_index_engages_<op>_<using>) was authored before the text scalar / eqidx-routed equality existed, so rebasing it onto the text shape surfaced a naming divergence the old swept names hid: - text serves eq on an ordered domain from a dedicated eq index, naming it `<domain>_eqidx_index_engages_eq_<using>`, where an ordered scalar whose ord index also serves eq names it `<domain>_index_engages_eq_<using>`. Two coordinated changes: - Regenerate snapshots/matrix_tests_text.txt to the op-qualified names (commit a967cd1's intent, which could not touch the text snapshot — text did not exist on the source branch). - Make the text superset gate routing-agnostic: fold the `_eqidx` routing segment away before the superset `comm`, so the invariant compares (domain, op, index) COVERAGE rather than the physical index that serves it. A genuinely dropped eq arm (neither name present) still fails; the strict per-type compare still pins text's real `_eqidx` names byte-for-byte. mise run test:matrix:inventory passes (6 types reconciled).
017c8bb to
a2265f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stage 3 of the matrix log-verification work. Lifts the index-engagement fan-out so each
(domain, op, using)is its own#[sqlx::test]namedmatrix_<T>_<domain>_index_engages_<op>_<using>(e.g.matrix_int4_ord_index_engages_lt_btree) instead of one per-(domain, using)test that swept the operator list inside a single body. Each operator now carries its owncase_id, so the Stage 2 statement/plan log is joinable to a single(domain, operator)— closing the design's finding-1 naming gap that Stage 4's matcher depends on.The driver refactor reworks the fan-out only; the Stage 2 leaf body (
eqlmatrix::tag, executedcount(*)underSET LOCAL enable_seqscan=off,assert_index_scan_uses) is reproduced verbatim minus the inner op loop. No other test category is renamed.Stacked on
matrix-capture-stage2(PR #285). Will retarget tomainwhen #285 merges.Commits
op-qualify index-engagement test names (finding-1)— the macro split (__scalar_matrix_index_op_outer!+ reshaped__scalar_matrix_index_case!)regenerate name snapshots—matrix_tests.txt+ derivedmatrix_tests_eq_only.txtregenerate cargo-expand snapshot—int4_expanded.rs, diff confined to index armsTest Plan
cargo test --test encrypted_domain --no-run— macros expandint4eq/ord/ord_ore)mise run test:matrix:inventory— green (op-qualifiedmatrix_tests.txt)mise run test:matrix:catalog-coverage— green (domain prefixes intact)int4_expanded.rsregen diff confined toindex_engagesarms; markers (eqlmatrix,enable_seqscan=off,assert_index_scan_uses) intact